/* GeekScope: Data page only. Loads after css/system.css.
   The full-size counter, "Who's in" (the page's one authored moment: the index fills
   rule by rule), the index manifest, and the four sources with their cadence. */

@media (min-width: 1100px) { .br { display: block; white-space: nowrap; } }

/* ---------- hero ---------- */
.d-hero { padding: clamp(28px, 6vh, 72px) 0 56px; }
.d-hero-in { display: grid; gap: 20px; }
@media (min-width: 1100px) {
  .d-hero { padding-bottom: 72px; }
  .d-hero-in { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; }
  .d-hero h1 { grid-column: 1 / span 8; }
  .d-hero .lede { grid-column: 9 / span 4; margin: 0; padding-bottom: 8px; }
}

/* ---------- the counter, full size: the sentence across the page, a long scale ---------- */
.counter--full { padding-top: 48px; padding-bottom: 56px; box-shadow: 0 -1px 0 var(--ink); }
@media (min-width: 768px) {
  .counter--full .ask-q { font-size: clamp(30px, 3.4vw, 40px); }
}
@media (min-width: 1100px) {
  .counter--full { padding: 64px var(--g) 72px; }
  .counter--full .counter-in { grid-template-columns: minmax(0, 1fr); row-gap: 56px; }
  .counter--full .ask-q { font-size: clamp(36px, 3vw, 44px); line-height: 1.4; }
  .counter--full .ask-row { margin-top: 30px; }
  .counter--full .answer {
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end;
    text-align: left; padding-top: 44px; box-shadow: 0 -1px 0 var(--rule);
  }
  .counter--full .readout { grid-column: 1 / span 5; grid-row: 1; }
  .counter--full .ro-num { font-size: 96px; justify-content: flex-start; }
  .counter--full .lscale { grid-column: 6 / span 7; grid-row: 1; margin: 0 0 6px; }
  .counter--full .ls-track { height: 20px; }
  .counter--full .ro-unit { grid-column: 1 / span 5; grid-row: 2; }
  .counter--full .ro-note { grid-column: 1 / span 5; grid-row: 3; margin-left: 0; }
  .counter--full .ro-small { grid-column: 6 / span 7; grid-row: 2; align-self: start; margin: 14px 0 0; max-width: 36em; }
}

/* ---------- who's in: the rules on the left, the index filling on the right ---------- */
.whos { padding-top: var(--sec); }
.whos-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; }
.whos-intro { margin-top: 20px; color: var(--ink-2); max-width: 30em; }
.rules { margin-top: 30px; }
.rule, .notin { position: relative; padding: 22px 0 26px 34px; box-shadow: 0 -1px 0 var(--ink); }
.rule p, .notin p { font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 30em; }
.rule strong, .notin strong { color: var(--ink); font-weight: 650; }
/* each rule wears the dot it adds to the index: filled for 10+ papers, open for the rest */
.rule::before { content: ""; position: absolute; left: 2px; top: 31px; width: 11px; height: 11px; border-radius: 50%; }
.r-1::before { background: var(--ink); }
.r-2::before, .r-3::before { box-shadow: inset 0 0 0 1.4px var(--ink); }
.notin { box-shadow: 0 -2px 0 var(--ink); }
.notin::before { content: ""; position: absolute; left: 2px; top: 36px; width: 12px; height: 1.5px; background: var(--ink-2); }

.ix { margin: 0; background: var(--slide); box-shadow: 0 -1px 0 var(--ink), 0 1px 0 var(--ink); }
.ix .plate-bar { padding-left: 16px; padding-right: 16px; }
.ix-body { position: relative; padding: 22px 16px 18px; }
.ix-keys { position: relative; height: 46px; }
.ix-k {
  position: absolute; bottom: 10px; margin: 0; white-space: nowrap;
  font: 500 16px/1.2 var(--mono); font-variation-settings: "wdth" 87; letter-spacing: -0.01em;
  color: var(--burnt); transform: rotate(-3deg); transform-origin: left bottom;
}
.ix-k .pn-k { font-weight: 650; }
.ix-k-in { left: 0; }
.ix-k-rest { margin-left: 16px; }
.ix-field { position: relative; }
.ix-field .ix-l { position: absolute; inset: 0; width: 100%; height: 100%; }
.ix-marks { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ix-field-d { display: none; aspect-ratio: 1000 / 600; }
.ix-field-m { aspect-ratio: 600 / 700; }
.ix-key-m { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 16px; font: 450 15px/1.4 var(--mono); font-variation-settings: "wdth" 87; color: var(--ink-2); }
.ix-key-m span { display: inline-flex; align-items: center; gap: 8px; }
.ix-key-m i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.ix-key-m .k-in { color: var(--ink); }
.ix-total { margin-top: 16px; display: flex; align-items: baseline; justify-content: flex-end; gap: 10px; font-size: 15px; color: var(--ink-2); }
.ix-total .num { font-size: 20px; font-weight: 500; color: var(--ink); font-variation-settings: "wdth" 100; }
.ix figcaption { padding: 14px 16px 16px; font-size: 15px; line-height: 1.55; color: var(--ink-2); box-shadow: 0 -1px 0 var(--rule); }
.ix-keys-d { display: none; }
@media (min-width: 768px) {
  .ix .plate-bar { padding-left: 40px; padding-right: 40px; }
  .ix-body { padding: 28px 40px 22px; }
  .ix figcaption { padding: 16px 40px 18px; }
  .ix-body .reg-tl, .ix-body .reg-bl { left: 14px; }
  .ix-body .reg-tr, .ix-body .reg-br { right: 14px; }
  .ix-body .reg-tl, .ix-body .reg-tr { top: 14px; }
  .ix-key-m { display: none; }
  .ix-keys-d { display: block; }
  .ix-field-m { display: none; }
  .ix-field-d { display: block; }
}
@media (min-width: 1100px) {
  .whos-in { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
  .whos-text { grid-column: 1 / span 5; padding-bottom: 120px; }
  .ix { grid-column: 7 / span 6; position: sticky; top: max(24px, calc(50vh - 330px)); }
  html.still .ix { position: static; }
  .rules { margin-top: 40px; }
  .rule, .notin { padding: 30px 0 40px 38px; }
  .rule::before { top: 39px; }
  .notin::before { top: 44px; }
  .rule p, .notin p { font-size: 19px; }
}

/* ---------- the numbers: an index manifest, set like an instrument's spec sheet ---------- */
.nums { padding-top: var(--sec); }
.nums-grid { margin-top: 40px; display: grid; gap: 52px; }
.sheet { background: var(--slide); box-shadow: 0 -1px 0 var(--ink), 0 1px 0 var(--ink); }
.sheet-bar {
  display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px;
  font: 450 15px/1.3 var(--mono); font-variation-settings: "wdth" 87; color: var(--ink-2);
  box-shadow: 0 1px 0 var(--rule);
}
.spec { width: 100%; border-collapse: collapse; }
.spec thead { display: none; }
.spec tbody { display: block; }
.spec tr { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 14px; align-items: baseline; padding: 14px 16px 13px; border-top: 1px solid var(--rule); }
.spec th[scope="row"] { grid-column: 1 / -1; text-align: left; font-size: 17px; font-weight: 550; line-height: 1.35; }
.spec td { padding: 6px 0 0; }
.spec td.c-v { font-size: 24px; line-height: 1.1; font-weight: 500; font-variation-settings: "wdth" 100; letter-spacing: -0.025em; white-space: nowrap; }
.spec .c-d { text-align: right; font: 450 15px/1.3 var(--mono); font-variation-settings: "wdth" 87; color: var(--ink-2); }
.spec .c-d::before { content: attr(data-l) " "; }
.spec .g { display: block; padding: 26px 16px 10px; border-top: 0; }
.spec tbody + tbody .g { border-top: 1px solid var(--ink); }
.spec .g th { font: 450 15px/1.2 var(--mono); font-variation-settings: "wdth" 87; color: var(--ink-2); text-align: left; }
.spec .lead td.c-v { font-size: 24px; }
@media (min-width: 768px) { .spec .lead td.c-v { font-size: 30px; } .spec .c-d { white-space: nowrap; } }
@media (min-width: 768px) {
  .sheet-bar { padding: 14px 24px; }
  .spec { table-layout: fixed; }
  .spec thead { display: table-header-group; }
  .spec tbody { display: table-row-group; }
  .spec tr { display: table-row; padding: 0; border: 0; }
  .spec th, .spec td { display: table-cell; vertical-align: baseline; padding: 15px 24px 14px; border-top: 1px solid var(--rule); }
  .spec thead th { padding: 18px 24px 12px; border-top: 0; border-bottom: 1px solid var(--ink); font: 450 15px/1.3 var(--mono); font-variation-settings: "wdth" 87; color: var(--ink-2); text-align: left; }
  .spec thead .c-v, .spec thead .c-d { text-align: right; }
  .spec thead th:first-child { width: 52%; }
  .spec thead .c-d { width: 22%; }
  .spec td.c-v { text-align: right; }
  .spec .c-d::before { content: none; }
  .spec .g { display: table-row; padding: 0; }
  .spec .g th { padding: 28px 24px 10px; border-top: 0; }
  .spec tbody + tbody .g th { border-top: 1px solid var(--ink); }
  .spec tbody .g + tr th, .spec tbody .g + tr td { border-top: 0; }
}

/* the same index placed by country: the plate in miniature, and the tray it can't place */
.where { margin: 0; }
.where-row { display: grid; grid-template-columns: minmax(0, 4.15fr) minmax(0, 1fr); column-gap: 12px; align-items: end; }
.where-row { padding: 18px 16px; background: var(--slide); box-shadow: 0 -1px 0 var(--ink), 0 1px 0 var(--ink); }
.where-pv { position: relative; aspect-ratio: 2295 / 1064; }
.where-pv .ly { position: absolute; inset: 0; width: 100%; height: 100%; }
.where-box { position: relative; aspect-ratio: 520 / 1000; background: var(--plate); box-shadow: inset 0 0 0 1px var(--ink); }
.where-box img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); }
.where-ns { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; }
.where-n { display: grid; gap: 2px; font-size: 15px; line-height: 1.35; color: var(--ink-2); }
.where-n-r { text-align: right; }
.where-n .num { font-size: 19px; color: var(--ink); font-variation-settings: "wdth" 100; font-weight: 500; }
.where figcaption { margin-top: 18px; padding-top: 14px; box-shadow: 0 -1px 0 var(--rule); font-size: 15px; line-height: 1.55; color: var(--ink-2); max-width: 34em; }
@media (min-width: 1100px) {
  .nums-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; margin-top: 48px; }
  .sheet { grid-column: 1 / span 7; }
  .where { grid-column: 8 / span 5; padding-left: 24px; padding-bottom: 6px; }
}

/* ---------- where the evidence comes from: the shape legend, with cadence ---------- */
.srcs { margin-top: var(--sec); background: var(--slide); }
.srcs-in { max-width: var(--max); margin: 0 auto; padding: 72px var(--g) 76px; display: grid; gap: 36px; }
.srcs-head p { margin-top: 18px; color: var(--ink-2); max-width: 30em; }
.legend--cad .cad { grid-column: 2; font: 450 15px/1.35 var(--mono); font-variation-settings: "wdth" 87; color: var(--ink); }
/* taller rows: thread each shape to the next from its own centre, at every width */
@media (min-width: 1100px) {
  .srcs-in { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding: 104px var(--g) 112px; }
  .srcs-head { grid-column: 1 / span 5; }
  .srcs .legend { grid-column: 6 / span 7; }
  .legend--cad::before { display: none; }
  .legend--cad li { row-gap: 4px; align-items: start; }
  .legend--cad li:not(:last-child)::after { display: block; left: 17px; top: 44px; bottom: -44px; }
  .legend--cad .shape { margin-top: 0; }
  .legend--cad h3 { align-self: start; padding-top: 4px; }
  .legend--cad .cad { grid-column: 3; }
  .legend--cad li:has(.cad) h3 { grid-row: 1 / span 2; }
  .legend--cad li:has(.cad) .shape { grid-row: 1 / span 2; }
}

/* ---------- closing ---------- */
.d-close { padding: var(--sec) 0 calc(var(--sec) * 0.72); }
.d-close-in { display: grid; gap: 22px; }
.d-close-side p { color: var(--ink-2); font-size: 19px; }
.d-close-side .actions { margin-top: 22px; }
@media (min-width: 1100px) {
  .d-close-in { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; }
  .d-close h2 { grid-column: 1 / span 7; }
  .d-close-side { grid-column: 9 / span 4; padding-bottom: 4px; }
}

/* ==========================================================================
   The authored moment: the index fills, rule by rule.
   Filled dots (10+ papers) settle first, then the open dots (the rest), then the
   pencil marks the split and the total stamps on. Final state without support,
   under reduced motion, and with ?still.
   ========================================================================== */
@keyframes wd-settle { from { opacity: 0; transform: translateY(-14px); filter: blur(3px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes wd-fade { from { opacity: 0; } to { opacity: 1; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* phone and tablet: the figure runs on its own view timeline */
    .ix-field { view-timeline: --ixf block; }
    html:not(.still) .ix-in { animation: wd-settle linear both; animation-timeline: --ixf; animation-range: entry 30% cover 42%; }
    html:not(.still) .ix-rest { animation: wd-settle linear both; animation-timeline: --ixf; animation-range: cover 40% cover 56%; }
    html:not(.still) .ix-marks .gp { stroke-dasharray: 1 2; animation: tl-draw linear both; animation-timeline: --ixf; animation-range: cover 54% cover 64%; }
    html:not(.still) .ix-k-in { animation: wd-fade linear both; animation-timeline: --ixf; animation-range: cover 34% cover 44%; }
    html:not(.still) .ix-k-rest { animation: wd-fade linear both; animation-timeline: --ixf; animation-range: cover 58% cover 66%; }
    html:not(.still) .ix-total { animation: tl-stamp linear both; animation-timeline: --ixf; animation-range: cover 62% cover 70%; }

    /* desktop: the figure stays in view while the rules pass; each rule fills its share */
    @media (min-width: 1100px) {
      .whos { timeline-scope: --wr1, --wr2, --wr3, --wr4; }
      .r-1 { view-timeline: --wr1 block; }
      .r-2 { view-timeline: --wr2 block; }
      .r-3 { view-timeline: --wr3 block; }
      .r-4 { view-timeline: --wr4 block; }
      html:not(.still) .ix-in { animation-timeline: --wr1; animation-range: cover 28% cover 54%; }
      html:not(.still) .ix-k-in { animation-timeline: --wr1; animation-range: cover 46% cover 58%; }
      html:not(.still) .ix-rest { animation-timeline: --wr2; animation-range: cover 28% cover 54%; }
      html:not(.still) .ix-marks .gp { animation-timeline: --wr3; animation-range: cover 26% cover 50%; }
      html:not(.still) .ix-k-rest { animation-timeline: --wr3; animation-range: cover 42% cover 54%; }
      html:not(.still) .ix-total { animation-timeline: --wr4; animation-range: cover 22% cover 40%; }
    }
  }
}

/* CSP-safe positions from the approved mockup. */
.data-position-1 { --p:0.9019; }
.data-position-2 { left:0%; }
.data-position-3 { left:23%; }
.data-position-4 { left:46%; }
.data-position-5 { left:69%; }
.data-position-6 { left:92%; }
.data-position-7 { left:77.7%; }
.data-position-8 { --i:0; }
