/* Signals page. Builds on the tokens and components in atlas.css. Plain CSS, no build step. */

:root {
  --series: var(--layer-1);   /* the one data colour on this page; text never uses it */
}

.crumb { margin: 0 0 6px; font-size: 13px; color: var(--text-2); }

.jump {
  display: flex; flex-wrap: wrap; gap: 6px 8px; padding: 14px 0 6px;
}
.jump a {
  text-decoration: none; font-size: 13.5px; padding: 5px 11px;
  border: 1px solid var(--border); border-radius: 999px; white-space: nowrap;
}
.jump a:hover { background: var(--surface-2); }

.domain { padding: 22px 0 6px; scroll-margin-top: 10px; }
.domain > h2 { font-size: 21px; line-height: 1.2; margin: 0 0 4px; letter-spacing: -0.01em; }
.domain-sub { margin: 0 0 14px; color: var(--text-2); max-width: 76ch; }

.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards > .wide { grid-column: 1 / -1; }
}

.card h3 { font-size: 16px; line-height: 1.3; margin: 0 0 2px; overflow-wrap: anywhere; }
.card .card-sub { margin-bottom: 10px; }

.pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 10px; font-size: 13px; color: var(--text-2); }
.pick select { height: 32px; max-width: 100%; }

/* ---------- Chart ---------- */

.plot { position: relative; }
.plot svg { display: block; width: 100%; height: auto; overflow: visible; border-radius: 4px; touch-action: pan-y; }
.plot svg:focus-visible { outline-offset: 2px; }
.plot .grid-line { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.plot .base-line { stroke: var(--border); stroke-width: 1; shape-rendering: crispEdges; }
.plot .tick { fill: var(--text-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.plot .line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.plot .end-dot, .plot .hover-dot { fill: var(--series); stroke: var(--surface); stroke-width: 2; }
.plot .cross { stroke: var(--text-2); stroke-width: 1; shape-rendering: crispEdges; }
.plot .end-label {
  fill: var(--text); font-size: 12px; font-weight: 650;
  paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round;
}
.plot .pt { fill: var(--series); opacity: 0.35; }

.tooltip .tt-value { font-weight: 650; font-size: 13.5px; }

/* ---------- Data disclosure ---------- */

details.data { margin-top: 10px; font-size: 13.5px; }
details.data > summary { cursor: pointer; color: var(--text); width: fit-content; padding: 4px 0; }
details.data .table-scroll { margin-top: 6px; max-height: 320px; }
details.data th { position: sticky; top: 0; background: var(--surface-2); padding: 6px 10px; font-weight: 600; white-space: nowrap; }
details.data td { overflow-wrap: anywhere; }

/* ---------- Event lists ---------- */

.events { list-style: none; margin: 0; padding: 0; }
.events li { display: grid; grid-template-columns: 7.2em minmax(0, 1fr); gap: 2px 14px; padding: 9px 0; border-top: 1px solid var(--grid); }
.events li:first-child { border-top: 0; padding-top: 2px; }
.events .ev-date { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13.5px; }
.events .ev-title { font-weight: 600; overflow-wrap: anywhere; }
.events .ev-meta { color: var(--text-2); font-size: 13px; overflow-wrap: anywhere; }
.events .ev-desc { font-size: 13.5px; margin-top: 2px; overflow-wrap: anywhere; }
.tag {
  display: inline-block; font-size: 11.5px; line-height: 1.5; padding: 0 7px; margin-right: 6px;
  border: 1px solid var(--border); border-radius: 999px; color: var(--text-2); white-space: nowrap; font-weight: 400;
}
@media (max-width: 520px) {
  .events li { grid-template-columns: minmax(0, 1fr); }
}
.more-btn { margin-top: 10px; }

/* ---------- Source line under every chart and list ---------- */

.src { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--grid); color: var(--text-2); font-size: 12.5px; line-height: 1.5; }
.src p { margin: 0 0 4px; overflow-wrap: anywhere; }
.src p:last-child { margin-bottom: 0; }
.src strong { color: var(--text); font-weight: 600; }
.src .asof { font-variant-numeric: tabular-nums; }
.notice {
  margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--border); border-left: 3px solid var(--text);
  border-radius: 6px; background: var(--surface-2); font-size: 13px; color: var(--text); overflow-wrap: anywhere;
}
.derived { color: var(--text-2); font-size: 12.5px; margin: 8px 0 0; }

/* ---------- Attribution list ---------- */

.attrib { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.attrib > li { padding: 10px 0; border-top: 1px solid var(--grid); overflow-wrap: anywhere; }
.attrib > li:first-child { border-top: 0; padding-top: 0; }
.attrib .a-name { font-weight: 600; }
.attrib .a-line { color: var(--text-2); margin-top: 2px; }
.attrib ul { margin: 4px 0 0; padding-left: 18px; color: var(--text-2); }

/* ---------- Verification label, stale notice, link status ---------- */

.ev-flag {
  margin-top: 4px; padding: 5px 8px; border: 1px solid var(--text); border-radius: 6px;
  font-size: 13px; background: var(--surface-2); overflow-wrap: anywhere;
}
.legend-note { margin: 0 0 12px; color: var(--text-2); font-size: 13px; max-width: 90ch; }
.legend-note strong { color: var(--text); }
.ls-note { color: var(--text-2); font-weight: 400; font-size: 0.92em; }
a.ls-gone { text-decoration-style: dotted; }

/* ---------- Multi-line chart: a total and the parts inside it ---------- */
:root {
  --m1: #2a78d6; --m2: #eb6834; --m3: #1baf7a; --m4: #c98500; --m5: #8e5bd0;
  --m6: #d0457a; --m7: #0a9bb0; --m8: #7a8a1c; --m9: #a65a2a; --m10: #5a6b8c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --m1: #4a95ec; --m2: #f07a4a; --m3: #2dc08b; --m4: #e0a020; --m5: #a984e6;
    --m6: #e8639a; --m7: #2cb5c8; --m8: #a3b53c; --m9: #cf8650; --m10: #8ea0c4;
  }
}
.multi-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 8px; font-size: 13px; color: var(--text-2); }
.multi-ctl .seg { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.multi-ctl .seg button { border: 0; background: var(--surface); color: var(--text); padding: 5px 10px; font: inherit; cursor: pointer; }
.multi-ctl .seg button[aria-pressed="true"] { background: var(--text); color: var(--surface); }
.multi-ctl .quick button, .multi-ctl .btn-s { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 6px; padding: 4px 9px; font: inherit; font-size: 12.5px; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; max-height: 8.6em; overflow-y: auto; padding: 2px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  border-radius: 999px; padding: 3px 10px 3px 8px; font: inherit; font-size: 12.5px; cursor: pointer; }
.chip .sw { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--c, var(--text)); background: transparent; flex: none; }
.chip[aria-pressed="true"] { color: var(--text); border-color: var(--text-2); }
.chip[aria-pressed="true"] .sw { background: var(--c, var(--text)); }
.chip:focus-visible, .multi-ctl button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.plot .mline { fill: none; stroke: var(--c, var(--text)); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.plot .mline.total { stroke-width: 3; }
.plot .mline.proj { stroke-dasharray: 6 5; }
.plot .mdot { fill: var(--c, var(--text)); stroke: var(--surface); stroke-width: 2; }
.tt-list { margin-top: 4px; }
.tt-list .tt-row { display: flex; justify-content: space-between; gap: 14px; }
.tt-list .tt-row .sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.plot .marea { fill: var(--c); fill-opacity: 0.88; stroke: var(--surface); stroke-width: 0.6; }
.plot .mmark { fill: var(--c); stroke: var(--surface); stroke-width: 2; }
.plot .mmark.proj { fill: var(--surface); stroke: var(--c); stroke-width: 2.5; }
details.data.plain .table-scroll { max-height: none; overflow: visible; }
details.data.plain td:nth-child(2) { min-width: 9em; }
details.data.plain td:last-child { min-width: 6em; }
