/* chainscore.net shared console shell — light AML workspace chrome for all engines. */

:root {
  --ss-accent: #ff5300;
  --ss-accent-hover: #e64a00;
  --ss-ink: #293972;
  --ss-ink-soft: #3d4f8a;
  --ss-mute: #6b7394;
  --ss-faint: #9aa3c0;
  --ss-bg: #f7f8fc;
  --ss-surface: #ffffff;
  --ss-line: #e6e9f2;
  --ss-line-strong: #d0d5e6;
  --ss-ok: #1b7f4a;
  --ss-font: "Mulish", -apple-system, system-ui, sans-serif;
  --ss-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ss-radius: 8px;
  --ss-shadow: 0 1px 2px rgba(41, 57, 114, 0.06), 0 10px 28px rgba(41, 57, 114, 0.05);
  --ss-product: #ff5300;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ss-font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ss-ink);
  background:
    radial-gradient(1200px 520px at 8% -10%, rgba(255, 83, 0, 0.08), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(41, 57, 114, 0.1), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, var(--ss-bg) 38%, #eef1f8 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ss-ink);
  text-decoration: none;
}
a:hover {
  color: var(--ss-accent);
}

code,
.mono,
.addr {
  font-family: var(--ss-mono);
}

/* ------------------------------------------------------------------ chrome */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ss-line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, var(--ss-shadow);
}

.topbar::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--ss-accent), #293972);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ss-ink);
}

.brand strong {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ss-ink);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.brand span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ss-faint);
}

.topnav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.topnav a {
  color: var(--ss-mute);
  font-size: 0.88rem;
  font-weight: 650;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  border-bottom: none;
  text-decoration: none;
  font-family: var(--ss-font);
}

.topnav a:hover {
  background: rgba(41, 57, 114, 0.06);
  color: var(--ss-ink);
  text-decoration: none;
}

.topnav a.active {
  background: rgba(255, 83, 0, 0.1);
  color: var(--ss-accent);
  font-weight: 750;
  border-bottom: none;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3.5rem;
}

.page-title,
h1.page-title {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ss-ink);
  font-family: var(--ss-font);
}

.page-sub {
  margin: 0 0 1.25rem;
  color: var(--ss-mute);
  font-size: 0.95rem;
}

.footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  text-align: center;
  color: var(--ss-faint);
  font-size: 0.78rem;
  font-weight: 600;
}

.card,
.panel {
  background: var(--ss-surface);
  border: 1px solid var(--ss-line);
  border-radius: 10px;
  box-shadow: var(--ss-shadow);
}

/* One surface language: products may use .card or .panel interchangeably. */
.panel.card,
.card.panel {
  /* no-op alias marker */
}

.report-actions,
.actions.report-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0 0 1rem;
  padding: 0.55rem 0;
  position: sticky;
  top: 3.4rem;
  z-index: 6;
  background: color-mix(in srgb, var(--ss-page, #f7f8fc) 92%, #fff);
  border-bottom: 1px solid var(--ss-line);
}

.settings-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1rem;
}

.settings-subnav a {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ss-faint, #6b7280);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--ss-line);
  background: #fff;
  text-decoration: none;
}

.settings-subnav a.active,
.settings-subnav a:hover {
  color: var(--ss-accent, #ff5300);
  border-color: #ffd0b8;
}

.topnav a.nav-quiet {
  opacity: 0.72;
  font-weight: 600;
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .topbar-inner {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .topnav {
    margin-left: 0;
    width: 100%;
  }
  .report-actions,
  .actions {
    top: 0;
  }
}

body.product-chaintrace .wrap {
  max-width: 1400px;
}
body.product-chaintrace .topbar-inner {
  max-width: 1400px;
}
body.product-chaintrace .footer {
  max-width: 1400px;
}

.topnav .badge {
  vertical-align: middle;
}

/* Diagram frame. One neutral surface for every product's SVG chart. */
.diagram-frame {
  border: 1px solid var(--ss-line, #e6e9f2);
  border-radius: 12px;
  padding: 0.4rem;
  background: #fff;
}

.diagram-frame svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Diagram colour key. Node fill is the primary risk signal in every product
   diagram, so the key ships with the diagram and must survive print. */
.diagram-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.85rem;
  margin: 0.55rem 0 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--ss-mute, #6b7394);
}

.diagram-key-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ss-mute, #6b7394);
}

.diagram-key-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.diagram-key-item i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: 0 0 auto;
}

.diagram-key-item svg {
  flex: 0 0 auto;
}

/* Timestamp distribution. Hop-1 cashflow above a hop-2+ small-multiple so the
   two are never read as one histogram. The caption is the STR sentence. */
.time-dist {
  margin: 1rem 0 0;
}

.time-dist h3 {
  margin: 0.2rem 0 0.35rem;
}

.time-dist-caption {
  margin: 0 0 0.35rem;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ss-ink, #1b2437);
}

.time-dist-caveat {
  margin: 0 0 0.65rem;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ss-mute, #6b7394);
}

.time-dist-svg {
  width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------- coverage
   Attribution coverage: how much of a screening's value rests on a real label.
   Graded rather than binary, because "we identified two thirds of this" is a
   different message from "we identified almost none of it" and a reviewer acts
   differently on each. */

.coverage-banner {
  border: 1px solid var(--ss-line-strong);
  border-left-width: 3px;
  border-radius: var(--ss-radius);
  background: var(--ss-surface);
  padding: 12px 14px;
  margin: 0 0 14px;
}

.coverage-banner p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ss-ink-soft);
}

.coverage-banner .coverage-detail {
  color: var(--ss-mute);
  font-size: 12px;
}

/* What the percentage was measured over. A transaction report covers two
   addresses and a due-diligence report covers one half of its own score, so
   where that applies the scope has to read as part of the claim rather than as
   a footnote under it. */
.coverage-banner .coverage-scope {
  font-size: 12px;
  font-weight: 600;
}

.coverage-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.coverage-head strong {
  font-size: 13px;
  letter-spacing: 0.01em;
}

.coverage-bar {
  flex: 1 1 120px;
  min-width: 90px;
  height: 6px;
  border-radius: 3px;
  background: var(--ss-line);
  overflow: hidden;
}

.coverage-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: currentColor;
}

.coverage-sufficient {
  border-left-color: var(--ss-ok);
  color: var(--ss-ok);
}

.coverage-partial {
  border-left-color: #b4700e;
  color: #b4700e;
}

.coverage-insufficient {
  border-left-color: #b3261e;
  color: #b3261e;
  background: #fdf4f3;
}

/* The headline score stays visible, but it is no longer the thing the eye
   lands on first. Coverage already said the number is not a summary of the
   wallet; this is the layout following through on that flag. */
.score-figure.score-unrepresentative .gauge,
.score-figure.score-unrepresentative .arc,
.score-figure.score-unrepresentative .score-dial {
  opacity: 0.42;
  filter: grayscale(1);
}

.score-caveat {
  margin: 8px 0 0;
  max-width: 148px;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 600;
  color: #b3261e;
}

/* Label provenance. Sits in the report footer rather than competing with the
   score, but stays legible in print, since that is the copy that gets filed. */
.label-sources {
  margin: 14px 0 4px;
  padding: 12px 14px;
  border: 1px solid #e3e6ea;
  border-radius: 8px;
  background: #fafbfc;
  font-size: 13px;
  line-height: 1.5;
}

.label-sources h4 {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #5b6470;
}

.label-sources ul {
  margin: 0;
  padding-left: 18px;
}

.label-sources li + li {
  margin-top: 4px;
}

.label-sources .warn {
  color: #8a5300;
}

.label-sources code {
  font-family: var(--ss-mono);
  font-size: 12px;
  background: #eef0f3;
  padding: 0 4px;
  border-radius: 3px;
}

/* One informative block for report-wide limits. Provenance keeps citations. */
.notice-disclaimer {
  margin: 16px 0 8px;
  padding: 16px 18px 14px;
  border: 1px solid var(--ss-line-strong, #d0d5e6);
  border-radius: var(--ss-radius, 8px);
  background: #f4f6fb;
}
.notice-disclaimer-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ss-mute, #6b7394);
}
.notice-disclaimer h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.notice-disclaimer-lead {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ss-mute, #6b7394);
}
.notice-disclaimer ul {
  margin: 0;
  padding-left: 18px;
}
.notice-disclaimer li + li {
  margin-top: 8px;
}
.notice-disclaimer li {
  font-size: 13.5px;
  line-height: 1.5;
}
.notice-disclaimer .warn {
  color: #8a5300;
}
.notice-disclaimer code {
  font-family: var(--ss-mono);
  font-size: 12px;
  background: #eef0f3;
  padding: 0 4px;
  border-radius: 3px;
}

.coverage-chip {
  display: inline-block;
  font-family: var(--ss-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.cdd-box {
  margin: 14px 0;
  border: 1px solid var(--ss-line);
  border-radius: var(--ss-radius);
  background: #fafbfe;
}
.cdd-box > summary {
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 13px;
  color: var(--ss-ink);
}
.cdd-box[open] > summary {
  border-bottom: 1px solid var(--ss-line);
}
.cdd-fields { padding: 12px; }
.cdd-note {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--ss-mute);
}
.cdd-box .row {
  display: flex;
  gap: 12px;
}
.cdd-box .row > * { flex: 1; min-width: 0; }
.cdd-box .field { margin-bottom: 12px; }
.cdd-box label {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  text-transform: none;
  letter-spacing: 0;
}
.cdd-box input,
.cdd-box select {
  width: 100%;
  max-width: 100%;
}
.cdd-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 13px !important;
}
.cdd-check input { width: auto !important; }
@media (max-width: 640px) {
  .cdd-box .row { flex-direction: column; }
  .cdd-check { margin-top: 0; }
}

.screen-wait {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--ss-mute, #6b7394);
}

@media print {
  .diagram-key {
    display: flex !important;
  }
  .diagram-key-item i {
    /* Keep swatches solid when browsers drop backgrounds in print. */
    border: 1px solid rgba(0, 0, 0, 0.25);
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  /* A filed report must carry its own caveat. */
  .coverage-banner,
  .notice-disclaimer {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
