/* ============================================================
   /science — the algorithm page
   ------------------------------------------------------------
   Black hero, white body, black endcap: the same arrangement as
   every other page, with the hero inverted because the model is
   the subject. The body is generated by
   tools/sync-science-facts.mjs; this is the surface it is drawn
   on, and it states no fact.

   One motion per section, started once when the section
   arrives. The hidden start state belongs to the script (.sci-js)
   so a page without it, or a capture that never scrolls, shows
   everything.
   ============================================================ */
/* One dark page, on the site's ground rather than a warm one of its own.
   This page went dark months before the rest and picked #151412 with a
   warm raised scale to match; once every page was charcoal that read as
   a different site, so the surfaces now come from theme.css and only the
   things this page genuinely means differently stay here.

   Since 2026-10-20 the body is white and the gold is the site's one gold,
   on what a reader presses and on what they have chosen, never on a figure
   or a name; status is the system's green, yellow and red. */
.sci{
  --bg:var(--ground); --raised:var(--surface); --raised-2:#30303A;
  /* The track under each market's ladder. It was --surface, which went
     white with the palette on 2026-10-20, so on a white page the ladders
     lost their bar and kept only the tick and the hatch (founder,
     2026-10-21: "colours are not working correctly"). */
  --subtle:var(--n-200);
  /* Status is the system's: --ok, --attn and --gap from theme.css, used
     directly below. This block used to redefine them as a sage, an amber
     and a terracotta from the old warm palette, lifted for a dark page. */
  background:transparent; color:var(--ink);
  /* A faint rule grid, the paper this is drawn on. */
  background-image:linear-gradient(rgba(255,255,255,.022) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.022) 1px,transparent 1px);
  background-size:64px 64px;
}
.sci .btn-ghost{color:var(--ink);border-color:var(--line-strong);background:transparent}
.sci .btn-ghost:hover{border-color:var(--ink);background:rgba(255,255,255,.05)}
/* :not(.tm) — the engine walkthrough is also a .sci-card for its spacing,
   but it is a self-contained black terminal and brings its own surface.
   This file loads after engine-terminal.css, so the card background was
   winning and the walkthrough rendered white on the light page. */
.sci-card:not(.tm){background:var(--raised);border:1px solid var(--line);border-radius:16px}
.sci-card.tm{border:1px solid var(--line);border-radius:16px}
.sci-sec{padding:var(--sec,88px) 0;position:relative}
.sci-sec + .sci-sec{padding-top:0}
.sci-head{max-width:760px;margin:0 auto 40px;text-align:center}
.sci-head .eyebrow{display:inline-block;margin-bottom:14px}
.sci-head .h2{margin-bottom:14px}
.sci-head .lead{margin-left:auto;margin-right:auto;max-width:620px}
/* Three statements, three centred lines, no emphasis on any of them: who the
   table is drawn for, what it is a sample of, and that the sample is not the
   thing the engine actually computes. A bolded figure in the middle made the
   second line the headline, which is the one of the three that matters least. */
.sci-note{max-width:760px;margin:22px auto 0;font-size:13px;line-height:1.7;color:var(--muted);text-align:center}
.sci-note span{display:block}

/* ---- the hero, inverted ------------------------------------------------ */
/* No background here: the hero is scroll-cards.css's .hero-card, which paints
   its own ink and wash. A `background:var(--deep)` here reset the wash, at
   equal specificity and later in the cascade. */
.sci .ph{--ph-muted:var(--muted)}
.sci .ph .h1,.sci .ph .lead{color:var(--ink)}
.sci .sc-cue{border-color:rgba(255,255,255,.22);color:#B9B1A4}
/* The index carries categories, not steps, so it has no numbers. It is
   only generated once two verticals are live (sync-science-facts.mjs); the
   "Coming soon" entries it used to carry went on 2026-10-22. */
.sci-verts .is-on .ph-ix-line{transform:scaleX(1);background:var(--gold-active)}
.sci-verts .is-on .ph-ix-name{color:#EDE6DA}

/* A tooltip, shared by the categories, the run marker and the warning. */
.sci-tip{position:absolute;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%) translateY(4px);white-space:nowrap;font-size:11px;font-weight:500;letter-spacing:.04em;text-transform:uppercase;padding:5px 9px;border-radius:5px;background:#1C1917;color:#FFFFFF;box-shadow:0 0 0 1px rgba(255,255,255,.14);opacity:0;pointer-events:none;transition:opacity .18s ease,transform .18s ease;z-index:3}

[class*="sci-"]:hover > .sci-tip,[class*="sci-"]:focus-visible > .sci-tip{opacity:1;transform:translateX(-50%) translateY(0)}

/* ---- safety ------------------------------------------------------------- */
.sci-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-width:900px;margin:0 auto}
.sci-gbox{display:flex;align-items:center;gap:12px;padding:16px 18px;border:1px solid var(--line);border-radius:12px;background:var(--raised);font-family:inherit;color:inherit;cursor:pointer;text-align:left;transition:border-color .18s ease,background .18s ease}
.sci-gbox:hover{border-color:var(--line-strong)}
.sci-gbox[aria-expanded="true"]{border-color:var(--gold);background:var(--raised-2)}
.sci-gbox:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.sci-gbox-n{font-size:20px;font-weight:500;letter-spacing:-.02em;font-feature-settings:"tnum";color:var(--ink)}
.sci-gbox-name{font-size:14px;font-weight:500;letter-spacing:-.005em}
.sci-glist{max-width:900px;margin:14px auto 0;border:1px solid var(--line);border-radius:12px;padding:4px 20px}
.sci-check{padding:13px 0;border-bottom:1px solid var(--line)}
.sci-check:last-child{border-bottom:0}
.sci-check-n{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:500}
.sci-check-d{margin:3px 0 0;font-size:13px;line-height:1.55;color:var(--ink-80)}
/* Two different markers, and they are not the same claim.
   .sci-dot says this check FIRED in the run, and the only checks that carry
   it are the ones that removed a product — it is keyed off the engine's
   removed_by_check. So it takes --bad, the colour this page already uses for
   a removal: the strike-through on a cut product and the NEVER zone past an
   upper limit. It was gold, which is the page's accent rather than a meaning,
   and read as "notable" when it means "this one stopped something".
   .sci-warn stays amber: that check warns and removes nothing. */
.sci-dot,.sci-warn{position:relative;width:8px;height:8px;border-radius:50%;display:inline-block;flex:0 0 auto}
.sci-dot{background:var(--gap)}
.sci-warn{background:var(--attn)}
/* The plan checks box: the same box as the safety groups, marked as a
   different kind of check. Dashed rather than solid, and the figure in the
   muted gold rather than the strong one — these shape a plan, they do not
   stop an unsafe product, and the row should not imply they do. */
/* The tiles are no longer controls: no pointer, no hover, no focus ring. */
#sci-examples{margin-top:30px}
.sci-gbox--static{cursor:default}
.sci-gbox--static:hover{border-color:var(--line)}
.sci-gbox--plan.sci-gbox--static:hover{border-color:var(--line)}
.sci-gbox--plan{border-style:dashed}
.sci-gbox--plan .sci-gbox-n{color:var(--ink)}
.sci-gbox--plan[aria-expanded="true"]{border-style:solid}

/* ---- markets ------------------------------------------------------------- */
.sci-countries{max-width:1000px;margin:0 auto}
.sci-csel{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-bottom:22px}
.sci-cbtn{padding:8px 15px;border:1px solid var(--line);border-radius:999px;background:transparent;color:var(--ink-80);font-size:13.5px;font-weight:500;font-family:inherit;cursor:pointer;transition:border-color .18s ease,color .18s ease,background .18s ease}
/* --gold-strong, not --gold: white on #B47F39 is 3.48:1 and on #96682B
   it is 4.87. The same fill every other gold button on the site uses. */
.sci-cbtn[aria-pressed="true"]{background:var(--gold-strong);border-color:var(--gold-strong);color:var(--white);font-weight:500}
.sci-cbtn:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.sci-auth{max-width:900px;margin:0 auto 26px;text-align:center;font-size:13.5px;line-height:1.6;color:var(--muted)}
.sci-auth b{display:block;font-size:16px;font-weight:500;color:var(--ink);margin-bottom:5px;letter-spacing:-.01em}
.sci-ladders{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 28px;max-width:900px;margin:0 auto}
.sci-dose{padding:16px 0;border-top:1px solid var(--line)}
.sci-dose-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:14px}
.sci-dose-n{font-size:14.5px;font-weight:500;letter-spacing:-.01em}
.sci-dose-s{font-size:10.5px;font-weight:500;letter-spacing:.04em;text-transform:uppercase;border-radius:999px;padding:3px 8px}
.sci-dose-s.is-strict{color:var(--gap-text);background:var(--gap-tint)}
.sci-dose-s.is-lenient{color:var(--ok-text);background:var(--ok-tint)}
.sci-track{position:relative;height:6px;border-radius:999px;background:var(--subtle);margin:0 0 26px}
.sci-never{position:absolute;top:0;bottom:0;right:0;border-radius:0 999px 999px 0;background:repeating-linear-gradient(45deg,rgba(239,68,68,.32) 0 4px,transparent 4px 8px);border-left:1px solid var(--gap)}
.sci-never-l{position:absolute;right:6px;top:10px;font-size:10px;font-weight:500;color:var(--gap-text);letter-spacing:.05em;text-transform:uppercase}
.sci-mark{position:absolute;top:-5px;width:2px;height:16px;border-radius:1px;background:var(--ink);transition:left .5s cubic-bezier(.2,.7,.25,1)}
.sci-mark i{position:absolute;top:19px;left:50%;transform:translateX(-50%);font-size:10.5px;font-style:normal;white-space:nowrap;color:var(--ink-80);font-feature-settings:"tnum";font-weight:500}
.sci-mark.is-left i{left:0;transform:none}
.sci-mark.is-right i{left:auto;right:0;transform:none}
.sci-dose-f{margin:0;font-size:12.5px;line-height:1.5;color:var(--muted)}

/* ---- the endcap ---------------------------------------------------------- */
.footer{position:relative;overflow:hidden;background:transparent;padding:48px 0 32px}

/* ---- motion -------------------------------------------------------------- */
.sci-js .sci-sec:not(.is-in) .sci-in{opacity:0;transform:translateY(14px)}
.sci-sec.is-in .sci-in{opacity:1;transform:none;transition:opacity .5s ease,transform .5s cubic-bezier(.2,.7,.25,1)}
.sci-sec.is-in .sci-in:nth-child(2){transition-delay:.06s}
.sci-sec.is-in .sci-in:nth-child(3){transition-delay:.12s}

/* ---- narrow -------------------------------------------------------------- */
@media (max-width:860px){
  .sci-groups{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sci-ladders{grid-template-columns:minmax(0,1fr);gap:0}
}
@media (max-width:760px){
  .sci-glist{padding:4px 16px}
}
@media (prefers-reduced-motion:reduce){
  .sci-js .sci-sec:not(.is-in) .sci-in{opacity:1;transform:none}
  .sci-sec .sci-in{transition:none}
  .sci-mark,.sci-tip{transition:none}
}

/* ============================================================
   The technical layer
   ------------------------------------------------------------
   Data reads as data: tabular figures everywhere a number can
   change, hairline rules, uppercase micro-labels, and corner
   ticks on the panels that carry a run. Motion is one
   orchestrated pass per section and never blocks reading: every
   end state is the resting state, so reduced motion and a
   capture with animation off both show the finished page.
   ============================================================ */
.sci [data-count],.sci-gbox-n,.sci-mark i,.sci-prow dd{
  font-variant-numeric:tabular-nums;font-feature-settings:"tnum"}

/* ---- what the model covers --------------------------------------------- */
.sci-goalgrid{display:flex;flex-wrap:wrap;justify-content:center;gap:0;max-width:1000px;margin:0 auto;
  border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:18px 0}
.sci-goalname{position:relative;font-size:13px;line-height:1.6;color:var(--ink-80);padding:5px 14px;white-space:nowrap}
.sci-goalname::after{content:"";position:absolute;right:0;top:50%;transform:translateY(-50%);width:1px;height:11px;background:var(--line)}
.sci-goalname:last-child::after{display:none}
.sci-js .sci-sec:not(.is-in) .sci-goalname{opacity:0;transform:translateY(6px)}
.sci-sec.is-in .sci-goalname{opacity:1;transform:none;
  transition:opacity .4s ease,transform .4s cubic-bezier(.2,.7,.25,1);
  transition-delay:calc(var(--i,0) * 14ms)}
/* ---- The product explorer ----------------------------------------------
   It is the goal explorer's components, reused rather than restyled: the
   selector carries .sci-goalgrid / .sci-goalname and the panel .sci-subs, so
   the two sections match because they ARE the same thing, and a change to one
   cannot leave the other behind. Only the detail rows are new.

   Two columns with a rule between each pair, no card: a box round every
   attribute turns six facts into six objects. */
/* The tail of the selector row. A label, not a control: there is no fifth
   panel for it to open, and something that looks pressable and is not is
   worse than something that plainly is not. It takes the row's own metrics so
   it sits on the same line as the names, and no separator after it. */
.sci-goalmore{font-size:13px;line-height:1.6;padding:5px 14px;color:var(--muted);white-space:nowrap}
/* The goals' fold (2026-10-22): ten open, the rest behind the button, and
   all of them in the page. On the products' row the same class is a plain
   count, so only the button form gets the hand and the colour. */
button.sci-goalmore{font:inherit;font-size:13px;line-height:1.6;border:0;background:none;cursor:pointer;color:var(--gold-text, var(--gold-hover));font-weight:500}
button.sci-goalmore:hover{text-decoration:underline;text-underline-offset:3px}
button.sci-goalmore:focus-visible{outline:2px solid var(--gold);outline-offset:2px;border-radius:4px}
.sci-goalgrid[data-goals]:not(.is-open) .sci-goalname.is-more:not([aria-expanded="true"]){display:none}

.sci-prows{max-width:680px;margin:20px auto 0;text-align:left}
.sci-prow{display:grid;grid-template-columns:minmax(0,210px) minmax(0,1fr);gap:18px;
  padding:12px 2px;border-top:1px solid var(--line)}
.sci-prow:first-child{border-top:0}
.sci-prow dt{margin:0;font-size:13.5px;line-height:1.5;color:var(--muted)}
.sci-prow dd{margin:0;font-size:15px;line-height:1.5;color:var(--ink)}
.sci-prow-none{color:var(--muted);font-style:italic}
.sci-prod-foot{margin:18px 0 0;text-align:center;font-size:13px;color:var(--muted)}
/* The panel reserves a height for the goal lists; the attribute rows set
   their own, and a fixed minimum leaves a gap under the shorter products. */
.sci-subs.sci-prod{min-height:0}
@media (max-width:620px){
  .sci-prow{grid-template-columns:minmax(0,1fr);gap:2px;padding:11px 2px}
  .sci-prow dt{font-size:13px}
}

/* ---- One divider between the two explorers ---------------------------- */
.sci-divider{border:0;border-top:1px solid var(--line);max-width:720px;margin:0 auto 54px}
}
/* Stacked, the sign would be a stray character on its own line. */
@media (max-width:620px){
}

/* ---- corner ticks on a panel that carries a reading --------------------- */
.sci-glist{position:relative}

/* ---- the group boxes draw their rule ----------------------------------- */
.sci-gbox{position:relative;overflow:hidden}
.sci-gbox::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--gold);
  transform:scaleX(0);transform-origin:0 50%;transition:transform .32s cubic-bezier(.2,.7,.25,1)}
.sci-gbox[aria-expanded="true"]::after{transform:scaleX(1)}

@media (prefers-reduced-motion:reduce){
  .sci-sec.is-in .sci-goalname{transition:none;transition-delay:0s}
  .sci-js .sci-sec:not(.is-in) .sci-goalname{opacity:1;transform:none}
  .sci-gbox::after{transition:none}
}

/* ---- a goal shows its signals -------------------------------------------
   One panel under the grid rather than a popover on each of 41 labels:
   a popover at this density either covers the grid or pushes it about,
   and a panel with a floor under it does neither. Hover, focus and tap
   all drive it, so it is not hover-only on a phone. */
.sci-goalname{background:transparent;border:0;font-family:inherit;cursor:pointer;
  transition:color .16s ease}
.sci-goalname:hover{color:var(--gold)}
/* The open goal is the one whose signals are showing underneath, so it is
   marked more firmly than a hover: gold, heavier, and carrying its own
   underline. Colour alone at 13px in a wall of 41 names was findable only if
   you already knew where to look. */
.sci-goalname[aria-expanded="true"]{color:var(--gold);font-weight:500}
.sci-goalname[aria-expanded="true"]::before{content:"";position:absolute;left:14px;right:14px;
  bottom:-1px;height:1.5px;background:var(--gold);border-radius:2px}
.sci-goalname:focus-visible{outline:2px solid var(--gold);outline-offset:2px;border-radius:4px}
.sci-subs{max-width:860px;margin:22px auto 0;min-height:112px;text-align:center}
.sci-subs-t{font-size:15px;font-weight:500;letter-spacing:-.01em;color:var(--ink)}
.sci-subs-list{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-top:12px}
.sci-subs-list span{font-size:12.5px;line-height:1.5;padding:5px 11px;border-radius:999px;
  background:var(--raised);border:1px solid var(--line);color:var(--ink-80)}
@media (max-width:760px){.sci-subs{min-height:150px}}

/* ---- the closing card is black, like every other page -------------------
   .sc-reveal paints var(--ink) and writes in var(--white), and this page
   remaps both for a dark surface — so inside .sci the card came out beige
   with invisible text. The endcap takes the real values back. */
.sci .closer,.sci .footer{--white:#ffffff;--muted-on-dark:rgba(255,255,255,.72)}
.sci .closer .h1,.sci .closer .lead,.sci .closer .eyebrow{color:var(--white)}
.sci .closer .lead{color:rgba(255,255,255,.72)}
.sci .closer .eyebrow{color:rgba(255,255,255,.62)}
.sci .closer .btn-ghost{color:#fff;border-color:rgba(255,255,255,.34)}
.sci .closer .btn-ghost:hover{border-color:#fff;background:rgba(255,255,255,.08)}
.sci .closer .btn-primary{background:#96682B;color:#F7F2E8}

.sci-legal{display:block;margin-top:8px;font-size:12.5px;color:var(--ink-60)}

