/* ============================================================================
   AIN UI FOUNDATION - DESIGN TOKENS  (served at /ui/tokens.css, linked from app.html)
   ---------------------------------------------------------------------------
   IDENTITY, restated 2026-10-06 for the workflow-first refactor. See ui/DESIGN_PLAN.md.
   The product is AGRICULTURAL CREDIT INTELLIGENCE, and its two assets are BREADTH
   (millions of resolvable entities, sited in real geography) and DEPTH (a few with
   verified financial state). Two instruments from that world encode exactly those axes:

     THE PLAT SURVEY ... breadth. Thin measured linework, section grid, marker ticks.
                         Governs layout, rules, the relationship graph, the map.
     THE SOIL HORIZON .. depth. A stratigraphic band stack read top-down.
                         Governs how one entity intelligence depth is shown.

   Ground is COOL PAPER, never cream. Ink is a slate-blue with a real hue, never a
   tinted black. One interactive accent (survey blue); three semantics (ledger oxblood
   for risk, horizon teal for verified/upside, fallow for needs-review) kept strictly
   separate from the accent so selection never reads as a warning.

   WHAT CHANGED AND WHY IT IS SAFE: every token NAME below is preserved, only VALUES
   moved. All 27 view modules consume these names, so they inherit the new identity
   without being rewritten - that is the whole point. Previous values are kept in
   ui/tokens.css.pre_refactor for reference.
   ---------------------------------------------------------------------------
   EPISTEMIC GRAMMAR - PRESERVED. This grammar already does the uncertainty work the
   product needs, so it is re-valued, never replaced:
     OBSERVED / VERIFIED ........ solid horizon teal (fact, earned)
     RECONSTRUCTED / PUBLIC_INFERRED .. fallow outline (assembled inference)
     MODELED / DERIVED .......... survey blue (computed, not observed)
     COUNTERFACTUAL ............. violet, distinct from modeled
     SIMULATED .................. dashed (a route, never an actual execution)
     UNKNOWN .................... neutral + the literal word UNKNOWN, NEVER a zero
   Rules: human label FIRST + code label SECOND; never colour alone (always a shape or
   word cue); never animate a value before it exists.

   CUSTOMER CONFIDENTIALITY: no token, class or string here may name an underlying data
   source. The grammar says how well a thing is known, never how it was obtained.
   ========================================================================== */

/* ---- THE FACE, SERVED BY AIN ITSELF -----------------------------------------------------------
   Self-hosted so the product has no network dependency for type. One variable file carries 400-800,
   so weight is free and no extra request buys a heavier title. */
@font-face{
  font-family:'Schibsted Grotesk'; font-style:normal; font-weight:400 800; font-display:swap;
  src:url('/ui/fonts/schibsted-grotesk-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:'Schibsted Grotesk'; font-style:normal; font-weight:400 800; font-display:swap;
  src:url('/ui/fonts/schibsted-grotesk-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root{
  /* ---- core palette: cool paper + slate ink + one accent + three semantics ---- */
  --paper:#F2F4F1; --paper-sunk:#E9ECE8; --white:#FFFFFF;
  --ink:#141A1B; --muted:#566160; --faint:#667271;   /* 2026-11-11 WCAG AA: #8A9594 read 3.08 on white; this reads 5.0 */
  --survey:#1F4E6B; --survey-tint:#E7EDF1; --survey-deep:#15374B;
  --ledger:#A33826; --ledger-tint:#F7E9E5;
  --horizon:#1F6B56; --horizon-tint:#E6EFEB;
  --fallow:#8A6D2B; --fallow-tint:#F4EFE3;
  --graticule:#CDD4CE;

  /* legacy names, re-pointed so existing views inherit the new identity untouched */
  --green:#1F6B56; --green-deep:#17523F; --green-dark:#0C2A20;
  --green-bright:#2C8E72; --green-tint:#E6EFEB;
  --gold:#8A6D2B; --gold-light:#C0A669;
  --red:#A33826; --red-tint:#F7E9E5;
  --amber:#8A6D2B; --amber-tint:#F4EFE3;
  --line:#DFE4DF; --card-line:rgba(20,26,27,.13); --hairline:rgba(20,26,27,.07);
  --fern:#1F6B56; --ink3:#566160;

  /* ---- epistemic tokens (derived from the 6 grammar states) ---- */
  --ep-observed-fg:#17523F;  --ep-observed-bg:#E6EFEB;  --ep-observed-line:rgba(31,107,86,.44);
  --ep-recon-fg:#7A5F26;     --ep-recon-bg:#F4EFE3;     --ep-recon-line:rgba(138,109,43,.50);
  --ep-modeled-fg:#1F4E6B;   --ep-modeled-bg:#E7EDF1;   --ep-modeled-line:rgba(31,78,107,.34);
  --ep-cf-fg:#4C4080;        --ep-cf-bg:#EBE9F3;        --ep-cf-line:rgba(76,64,128,.40);
  --ep-sim-fg:#7A5F26;       --ep-sim-bg:#F4EFE3;       --ep-sim-line:rgba(138,109,43,.55);
  --ep-unknown-fg:#566160;   --ep-unknown-bg:#EAEDE9;   --ep-unknown-line:rgba(86,97,96,.32);
  /* categorical (non-epistemic) status */
  --st-pass-fg:#17523F; --st-pass-bg:#E6EFEB;
  --st-warn-fg:#7A5F26; --st-warn-bg:#F4EFE3;
  --st-breach-fg:#A33826; --st-breach-bg:#F7E9E5;

  /* ---- DEPTH AS A MATERIAL (new) -------------------------------------------------------------
     The three depth layers are the product's central honesty, and until now they were carried by
     a word and a colour. They are now a MATERIAL, in 2D and in the 3D world, so a reader learns
     the model by looking at it rather than by reading a legend:
       VERIFIED ....... solid. Full opacity, sharp edge, true fill. A fact under management.
       RECONSTRUCTED .. SCREENED. A halftone of the real thing, which is literally what a
                        reconstruction is - the image is there, printed in dots, not continuous.
       RESOLVED ....... grain. A tick or a sparse mark: the entity exists, nothing more is claimed.
       NOT ESTABLISHED  a hairline VOID. Never a fill, never a zero, and it keeps its own shape so
                        absence occupies space on the page instead of collapsing out of it. */
  --depth-verified:var(--horizon);
  --depth-verified-fill:rgba(31,107,86,.92);
  --depth-recon:var(--fallow);
  --depth-recon-fill:rgba(138,109,43,.55);
  --depth-recon-screen:5px;          /* halftone cell: the screen frequency of a reconstruction */
  --depth-resolved:var(--faint);
  --depth-resolved-fill:rgba(138,149,148,.40);
  --depth-void-line:rgba(86,97,96,.34);

  /* ---- THE 3D WORLD (new) ---------------------------------------------------------------------
     One light-ground diorama. These are the ONLY colours the world may use, so the canvas and the
     HUD can never drift apart. Ground stays paper: the world is a survey model on a table, not a
     night-time data visualisation, and a bank CRO reads a lit table as an instrument. */
  --w-ground:#EDEFEA; --w-ground-deep:#E2E6E0;
  --w-tile:#DFE4DD; --w-tile-edge:#C4CCC3;
  --w-tile-lit:#CBD8D0;              /* a state carrying findings that require review */
  --w-structure:#2B3335;             /* bank buildings: graphite solids */
  --w-structure-lit:var(--survey);
  --w-thread:rgba(31,78,107,.50);    /* relationship threads: real edges only */
  --w-thread-hot:rgba(163,56,38,.78);/* a thread the selected finding travels */
  --w-sky-0:#F4F6F2; --w-sky-1:#E6EAE4;

  /* ---- type: ONE FAMILY - Schibsted Grotesk, self-hosted -------------------------------------
     THREE DEFECTS CLOSED AT ONCE, and the third is not cosmetic:

     1. THE SERIF DISPLAY IS RETIRED. Fraunces set every page title, and the house style paired it
        with an italic phrase ("National book, at a glance.", "WI . every lender."). A serif display
        with one italicised phrase is the single most recognisable tell of generated design, and it
        made a credit instrument read like a magazine.
     2. THE MONOSPACE LABEL IS RETIRED. IBM Plex Mono set every micro-label and most figures, so the
        dominant texture of the product was tracked-out mono. --font-mono now points at the same
        family: tabular numerals do the alignment work that mono was being used for, which is what
        they exist for. No module had to be edited; they all consume these names.
     3. THE TYPE NO LONGER COMES OFF THE NETWORK. Fraunces and Plex were fetched from Google Fonts
        on every boot. AIN's first claim to a national-security or bank buyer is that it runs on an
        airgapped laptop - and on an airgapped laptop that request fails and the whole product
        silently falls back to system fonts. The face is now served from /ui/fonts by AIN itself.

     Schibsted Grotesk earns the role rather than being a safe pick: a news grotesque built for
     dense tabular reading, with the slightly narrow, high-pressure forms that let a long bank name
     and a nine-figure number sit in the same row without either being shrunk. */
  --font-display:"Schibsted Grotesk",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-ui:"Schibsted Grotesk",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-data:"Schibsted Grotesk",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-mono:"Schibsted Grotesk",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-serif:"Schibsted Grotesk",system-ui,-apple-system,"Segoe UI",sans-serif;
  --num:tabular-nums;
  /* classical 1.25 scale */
  --t-xs:12px; --t-sm:14px; --t-base:16px; --t-md:20px; --t-lg:25px;
  --t-xl:31px; --t-2xl:39px; --t-3xl:49px;

  /* ---- geometry (12-col desktop grid) ---- */
  --col:12; --gutter:16px; --radius:8px; --radius-pill:999px; --radius-op:14px;

  /* ---- MOTION, AS CINEMATOGRAPHY -------------------------------------------------------------
     Tiers by ROLE, not by taste. The product's one real motion idea is that changing scope is a
     CAMERA MOVE inside a single world, so scope gets its own long tier with anticipation and
     follow-through, and everything else stays short enough to feel mechanical rather than animated.
     A duration here is a promise: if a motion cannot be traced to a data field or a scope change,
     it does not get one. */
  --ease:cubic-bezier(.2,.8,.2,1);
  --ease-camera:cubic-bezier(.65,0,.35,1);     /* weight: slow out, settle in */
  --dur-hover:120ms; --dur-tab:170ms; --dur-drawer:240ms;
  --dur-drill:280ms; --dur-num:380ms; --dur-redistribute:450ms; --dur-path:520ms;
  --dur-panel:260ms;                            /* a HUD panel arriving over the world */
  --dur-camera:900ms;                           /* one scope step: state to lender to book */
  --dur-assemble:1200ms;                        /* an identity assembling from its parts */
}

/* REDUCED MOTION IS A FULL FALLBACK, NOT A DIMMER. Every camera flight becomes a cut; the world
   still renders and every value is still present. Declared here, next to the durations it governs,
   so a new surface cannot pick up a long duration without also picking up its fallback. */
@media (prefers-reduced-motion: reduce){
  :root{
    --dur-hover:0ms; --dur-tab:0ms; --dur-drawer:0ms; --dur-drill:0ms; --dur-num:0ms;
    --dur-redistribute:0ms; --dur-path:0ms; --dur-panel:0ms; --dur-camera:0ms; --dur-assemble:0ms;
  }
}

/* base */
.ain-ui{color:var(--ink);font:16px/1.55 var(--font-ui);
  /* the ground IS the plat survey: a section grid, barely there, over cool paper. It sites the
     interface in measured space instead of floating cards on a wash. The rule now sits on the
     SIXTH line only, like a survey sheet's section lines rather than graph paper, so it reads as
     measurement and never as a texture. */
  background-color:var(--paper);
  background-image:linear-gradient(to right,rgba(20,26,27,.030) 1px,transparent 1px),
                   linear-gradient(to bottom,rgba(20,26,27,.030) 1px,transparent 1px);
  background-size:96px 96px;
  /* TABULAR NUMERALS ARE FOR COLUMNS, NOT FOR PROSE. Setting them on the root looked like obeying
     "tabular numerals on every number", and it broke running text: in Schibsted Grotesk the tabular
     set also widens the COMMA and the FULL STOP, so sentences rendered as "Lenders , producers and
     the economic state of both , assembled from public records across 56 U . S . jurisdictions" and
     figures as "$2 . 25B". It is applied to the columnar classes below instead, which is where the
     rule was always aiming: alignment. */
  font-variant-numeric:normal;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
/* TITLES ARE SET TIGHT AND HEAVY, NOT LARGE AND DECORATIVE. The weight does the work the serif used
   to do, and -.02em tracking at display sizes keeps a long institution name on one line. */
.ain-ui h1,.ain-ui h2,.ain-ui h3,.ain-ui .display{font-family:var(--font-display);
  font-weight:700;letter-spacing:-.021em;text-wrap:balance}
/* `.mono` and `.coord` survive as NAMES because 27 modules use them, but they no longer summon a
   monospace face. They now mean "a figure that must align in a column", which is what every one of
   their call sites actually meant. */
.ain-ui .mono,.ain-ui .coord{font-family:var(--font-data);font-variant-numeric:var(--num);
  letter-spacing:.005em}
.ain-ui *{box-sizing:border-box}
.ain-ui .num,.ain-ui td.num,.ain-ui th.num{font-variant-numeric:var(--num)}
.ain-ui .goldstrip{height:2px;background:linear-gradient(90deg,var(--survey) 0%,var(--graticule) 38%,var(--graticule) 62%,var(--survey) 100%);opacity:.5}
/* `.serif` and the `<em>` inside a page title were the italic-accent house style. The class is kept
   (modules reference it) but it no longer italicises: it now reads as the QUIET half of a title,
   which is what those phrases always were. */
.ain-ui .serif,.ain-ui .pagehead em,.pagehead em{font-family:var(--font-display);font-style:normal;
  font-weight:400;color:var(--muted)}

/* ---- DEPTH MATERIALS, as reusable surfaces -----------------------------------------------------
   Any module can mark an element with its depth and inherit the material, so the three layers look
   the same everywhere without each view inventing its own treatment. */
.dep-verified{color:var(--depth-verified)}
.dep-recon{color:var(--depth-recon)}
.dep-resolved{color:var(--depth-resolved)}
/* RECONSTRUCTED IS PRINTED AS A SCREEN. A halftone of the real thing: present, legible, and
   visibly not continuous. This is the single clearest way to show "assembled, not verified"
   without a word, and it is why reconstructed areas can carry full-size figures safely. */
.mat-screened{background-image:radial-gradient(var(--depth-recon-fill) 0.9px,transparent 1px);
  background-size:var(--depth-recon-screen) var(--depth-recon-screen)}
.mat-solid{background:var(--depth-verified-fill)}
/* ABSENCE KEEPS ITS SHAPE. A void is outlined, never filled, and never collapses to nothing - so
   "not established" occupies the same space a value would, and reads as a fact rather than a gap. */
.mat-void{border:1px dashed var(--depth-void-line);background:transparent;color:var(--muted)}

/* 12-col grid helper */
.ain-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:var(--gutter)}
@media(max-width:760px){.ain-grid{grid-template-columns:repeat(4,1fr)}}

/* card */
.ac-card{background:var(--white);border:1px solid var(--graticule);border-radius:var(--radius);
  padding:16px 18px}
/* elevation is a ROLE, not a default. Only a card genuinely lifted above the canvas asks
   for it, so hierarchy survives instead of flattening under one uniform shadow. */
.ac-card--raised{box-shadow:0 1px 2px rgba(20,33,46,.05),0 8px 24px rgba(20,33,46,.06)}
.ac-card--enter{animation:ac-rise var(--dur-drill) var(--ease) both}
.ac-card.dark{background:radial-gradient(120% 100% at 0% 0%,#175033 0%,#0E2B1D 60%,#0A2114 100%);
  color:#fff;border:0;box-shadow:0 14px 34px rgba(14,43,29,.28)}
.ac-card.dark .ac-k{color:#9BAA9C} .ac-card.dark .ac-v{color:#fff}

.ac-k{color:var(--muted);font-size:13px}
.ac-v{font-weight:700;font-size:15px;font-variant-numeric:var(--num)}
.ac-goldrule{display:flex;align-items:center;gap:10px;font:800 10px var(--font-data);
  letter-spacing:2px;color:var(--gold);text-transform:uppercase;margin:2px 0 8px}
.ac-goldrule:before,.ac-goldrule:after{content:"";height:1px;flex:1;
  background:linear-gradient(90deg,transparent,#C7A14B)}
.ac-goldrule:after{background:linear-gradient(90deg,#C7A14B,transparent)}

/* ---- EPISTEMIC BADGE (shape + word, never color alone) ---- */
.ac-badge{display:inline-flex;align-items:center;gap:6px;
  font:700 10px var(--font-data);letter-spacing:.5px;padding:2px 9px;border-radius:6px;
  vertical-align:1px;white-space:nowrap}
.ac-badge .ac-badge__code{font-size:8.5px;letter-spacing:.7px;opacity:.72}
.ac-badge .ac-badge__glyph{width:8px;height:8px;flex:0 0 auto;display:inline-block}
.ac-badge--observed{background:var(--ep-observed-bg);color:var(--ep-observed-fg);
  box-shadow:inset 0 0 0 1px var(--ep-observed-line)}
.ac-badge--reconstructed{background:transparent;color:var(--ep-recon-fg);
  box-shadow:inset 0 0 0 1.5px var(--ep-recon-line)} /* amber OUTLINE */
.ac-badge--modeled{background:var(--ep-modeled-bg);color:var(--ep-modeled-fg);
  box-shadow:inset 0 0 0 1px var(--ep-modeled-line)}
.ac-badge--counterfactual{background:var(--ep-cf-bg);color:var(--ep-cf-fg);
  box-shadow:inset 0 0 0 1px var(--ep-cf-line)}
.ac-badge--simulated{background:var(--ep-sim-bg);color:var(--ep-sim-fg);
  border:1px dashed var(--ep-sim-line)} /* DASHED */
.ac-badge--unknown{background:var(--ep-unknown-bg);color:var(--ep-unknown-fg);
  box-shadow:inset 0 0 0 1px var(--ep-unknown-line)}
/* glyph shapes reinforce state without relying on color */
.ac-badge--observed .ac-badge__glyph{background:var(--ep-observed-fg);border-radius:50%}
.ac-badge--reconstructed .ac-badge__glyph{border:1.5px solid var(--ep-recon-fg);border-radius:2px}
.ac-badge--modeled .ac-badge__glyph{background:var(--ep-modeled-fg);
  clip-path:polygon(50% 0,100% 100%,0 100%)} /* triangle = computed */
.ac-badge--counterfactual .ac-badge__glyph{background:var(--ep-cf-fg);
  clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)} /* diamond */
.ac-badge--simulated .ac-badge__glyph{border:1.5px dashed var(--ep-sim-fg);border-radius:50%}
.ac-badge--unknown .ac-badge__glyph{border:1.5px dotted var(--ep-unknown-fg);border-radius:50%}

/* ---- STATE METRIC ---- */
.ac-metric{display:flex;flex-direction:column;gap:3px}
.ac-metric__label{color:var(--faint);font:700 10px var(--font-data);letter-spacing:1.3px;text-transform:uppercase}
.ac-metric__value{font:800 26px/1.05 var(--font-data);font-variant-numeric:var(--num);color:var(--ink)}
.ac-metric__value.is-unknown{font-family:var(--font-serif);font-style:italic;font-size:22px;color:var(--muted)}
.ac-metric__value.is-modeled{color:var(--ep-modeled-fg)}
.ac-metric__value.is-reconstructed{color:var(--ep-recon-fg)}
.ac-metric__value.is-counterfactual{color:var(--ep-cf-fg)}
.ac-metric__sub{color:var(--muted);font-size:12px}

/* ---- CONTEXT CAPSULE (persistent object rail, 44-52px) ---- */
.ac-capsule{display:flex;align-items:center;gap:12px;min-height:46px;
  padding:6px 16px;background:rgba(253,253,252,.92);border:1px solid var(--hairline);
  border-radius:var(--radius);font-size:13px}
.ac-capsule__crumbs{display:flex;align-items:center;gap:7px;color:var(--muted);flex-wrap:wrap}
.ac-capsule__crumbs b{color:var(--ink);font-weight:700}
.ac-capsule__sep{color:var(--faint)}
.ac-capsule__asof{color:var(--faint);font-size:12px;font-variant-numeric:var(--num)}
.ac-capsule__right{margin-left:auto;display:flex;align-items:center;gap:8px}
.ac-capsule__btn{background:#fff;border:1px solid var(--hairline);border-radius:var(--radius-pill);
  padding:5px 12px;font:600 12px var(--font-data);color:var(--muted);cursor:pointer;
  transition:all var(--dur-hover) var(--ease)}
.ac-capsule__btn:hover{color:var(--ink);border-color:var(--card-line)}

/* ---- ENTITY HEADER ---- */
.ac-entity{display:flex;align-items:flex-start;gap:14px}
.ac-entity__mark{width:44px;height:44px;flex:0 0 auto;border-radius:10px;
  background:linear-gradient(160deg,#1E9E53,#0E2B1D);color:#fff;font:800 17px var(--font-data);
  display:flex;align-items:center;justify-content:center;box-shadow:0 4px 10px rgba(14,43,29,.28)}
.ac-entity__name{font:italic 26px/1.1 var(--font-serif);color:var(--ink)}
.ac-entity__meta{color:var(--muted);font-size:13px;margin-top:2px;display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.ac-entity__right{margin-left:auto;text-align:right}

/* ---- EVIDENCE DRAWER ---- */
.ac-drawer{background:#fff;border:1px solid var(--hairline);border-left:3px solid var(--gold);
  border-radius:var(--radius);padding:14px 16px;max-width:560px}
.ac-drawer--enter{animation:ac-drawer-in var(--dur-drawer) var(--ease) both}
.ac-drawer__claim{font:italic 18px/1.25 var(--font-serif);color:var(--ink);margin-bottom:10px}
.ac-drawer__field{display:grid;grid-template-columns:150px 1fr;gap:10px;padding:7px 0;
  border-top:1px solid var(--line);align-items:baseline}
.ac-drawer__field:first-of-type{border-top:0}
.ac-drawer__ft{color:var(--faint);font:700 10px var(--font-data);letter-spacing:.8px;text-transform:uppercase}
.ac-drawer__fv{color:var(--ink);font-size:13px;font-variant-numeric:var(--num)}
.ac-drawer__fv.is-empty{color:var(--muted);font-style:italic}
.ac-drawer__fv .warn{color:var(--red)}

/* ---- ECONOMIC PATH (causal) ---- */
.ac-path{display:flex;align-items:stretch;flex-wrap:wrap;gap:0}
.ac-path__node{position:relative;min-width:118px;max-width:180px;padding:10px 12px;
  border-radius:10px;background:#fff;border:1px solid var(--hairline);font-size:12px}
.ac-path__node.is-observed{border-color:var(--ep-observed-line);background:var(--ep-observed-bg)}
.ac-path__node.is-modeled{border-color:var(--ep-modeled-line);background:var(--ep-modeled-bg)}
.ac-path__node.is-reconstructed{border:1.5px solid var(--ep-recon-line);background:transparent}
.ac-path__node.is-unknown{border:1.5px dashed var(--ep-unknown-line);background:var(--ep-unknown-bg)}
.ac-path__role{font:700 9px var(--font-data);letter-spacing:1px;text-transform:uppercase;color:var(--faint)}
.ac-path__lbl{font-weight:700;margin-top:2px;color:var(--ink)}
.ac-path__val{font-variant-numeric:var(--num);color:var(--muted);margin-top:2px}
.ac-path__edge{align-self:center;display:flex;align-items:center;padding:0 4px;min-width:34px}
.ac-path__edge svg{overflow:visible}
.ac-path__edge-lbl{font:700 8.5px var(--font-data);letter-spacing:.4px;color:var(--faint);white-space:nowrap}
.ac-path--draw .ac-path__edge-line{stroke-dasharray:60;stroke-dashoffset:60;
  animation:ac-draw var(--dur-path) var(--ease) forwards}
.ac-path--draw .ac-path__node{animation:ac-rise var(--dur-drill) var(--ease) both}

/* ---- STATE TRANSITION TRACK ---- */
.ac-track{display:flex;align-items:center;gap:0;flex-wrap:wrap}
.ac-track__step{display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:var(--radius-pill);
  font:700 11px var(--font-data);letter-spacing:.4px;background:#fff;border:1px solid var(--hairline);color:var(--faint)}
.ac-track__step.is-done{background:var(--ep-observed-bg);color:var(--ep-observed-fg);border-color:var(--ep-observed-line)}
.ac-track__step.is-current{background:#fff;color:var(--ink);border-color:var(--card-line);box-shadow:0 2px 8px rgba(23,122,67,.14)}
.ac-track__step.is-sim{background:var(--ep-sim-bg);color:var(--ep-sim-fg);border:1px dashed var(--ep-sim-line)}
.ac-track__step.is-pending{opacity:.55}
.ac-track__arrow{color:var(--faint);padding:0 6px;font-size:12px}
.ac-track__stop{color:var(--ep-sim-fg);font:700 10px var(--font-data);padding-left:8px}

/* ---- RISK WATERFALL ---- */
.ac-wf{display:flex;flex-direction:column;gap:7px}
.ac-wf__row{display:grid;grid-template-columns:150px 1fr 110px;gap:10px;align-items:center}
.ac-wf__lbl{font-size:12px;color:var(--muted)}
.ac-wf__bar{height:20px;border-radius:5px;position:relative;background:var(--line);overflow:hidden}
.ac-wf__fill{height:100%;border-radius:5px}
.ac-wf__fill.qeuc{background:linear-gradient(90deg,#177A43,#1E9E53)}
.ac-wf__fill.protectable{background:var(--ep-modeled-bg);box-shadow:inset 0 0 0 1px var(--ep-modeled-line)}
.ac-wf__fill.qualifying{background:var(--ep-observed-bg);box-shadow:inset 0 0 0 1px var(--ep-observed-line)}
.ac-wf__fill.residual{background:repeating-linear-gradient(45deg,var(--red-tint),var(--red-tint) 6px,#fff 6px,#fff 8px);
  box-shadow:inset 0 0 0 1px rgba(178,64,31,.4)}
.ac-wf__val{text-align:right;font:700 13px var(--font-data);font-variant-numeric:var(--num)}
.ac-wf--grow .ac-wf__fill{animation:ac-grow var(--dur-redistribute) var(--ease) both}

/* ---- DECISION FRONTIER ---- */
.ac-frontier{position:relative}
.ac-frontier svg{width:100%;height:auto;display:block}
.ac-frontier__axis{stroke:var(--hairline);stroke-width:1}
.ac-frontier__curve{fill:none;stroke:var(--ep-modeled-fg);stroke-width:2}
.ac-frontier__pt{fill:#fff;stroke:var(--green-deep);stroke-width:2}
.ac-frontier__pt--sel{fill:var(--green);stroke:var(--green-dark)}
.ac-frontier__pt--noaction{fill:var(--ep-unknown-bg);stroke:var(--muted);stroke-dasharray:3 2}
.ac-frontier__lbl{font:600 10px var(--font-data);fill:var(--muted)}
.ac-frontier__axlbl{font:700 9px var(--font-data);letter-spacing:.6px;fill:var(--faint);text-transform:uppercase}

/* ---- FACTOR HEATMAP ---- */
.ac-heat{display:grid;gap:4px}
.ac-heat__cell{padding:8px 9px;border-radius:6px;font-size:11px;min-height:44px;
  display:flex;flex-direction:column;justify-content:space-between}
.ac-heat__cell .n{font:800 14px var(--font-data);font-variant-numeric:var(--num)}
.ac-heat__cell .l{font:700 9px var(--font-data);letter-spacing:.4px;opacity:.8}
.ac-heat__cell.is-unknown{background:var(--ep-unknown-bg);color:var(--muted);
  border:1px dashed var(--ep-unknown-line)}
.ac-heat__legend{display:flex;gap:10px;margin-top:8px;font-size:11px;color:var(--muted);align-items:center}
.ac-heat__swatch{width:14px;height:14px;border-radius:3px;display:inline-block;vertical-align:-2px;margin-right:4px}

/* ---- HISTORICAL ANALOG ---- */
.ac-analog{border:1px solid var(--hairline);border-radius:10px;padding:12px 14px;background:#fff}
.ac-analog__hd{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.ac-analog__regime{font:italic 17px/1.1 var(--font-serif);color:var(--ink)}
.ac-analog__sim{font:800 13px var(--font-data);color:var(--ep-modeled-fg);font-variant-numeric:var(--num)}
.ac-analog__body{display:flex;gap:18px;margin-top:8px;flex-wrap:wrap}
.ac-analog__stat .l{font:700 9px var(--font-data);letter-spacing:.6px;color:var(--faint);text-transform:uppercase}
.ac-analog__stat .v{font:700 14px var(--font-data);font-variant-numeric:var(--num);color:var(--ink)}
.ac-analog__note{color:var(--muted);font-size:11px;margin-top:6px}

/* ---- RESEARCH VERDICT ---- */
.ac-verdict{display:inline-flex;flex-direction:column;gap:4px;border-radius:10px;padding:11px 14px;
  border:1px solid var(--hairline);background:#fff}
.ac-verdict__hd{display:flex;align-items:center;gap:8px;font:800 14px var(--font-data);letter-spacing:.5px}
.ac-verdict--survives .ac-verdict__hd{color:var(--fern)}
.ac-verdict--partial .ac-verdict__hd{color:var(--amber)}
.ac-verdict--killed .ac-verdict__hd{color:var(--muted)}
.ac-verdict--all-rejected{border-color:var(--card-line);background:linear-gradient(180deg,#FCFDFB,#F4F8F1)}
.ac-verdict--all-rejected .ac-verdict__hd{color:var(--ink)}
.ac-verdict__sub{font-size:12px;color:var(--muted)}
.ac-verdict__hold{margin-top:4px;font:700 10px var(--font-data);letter-spacing:.6px;color:var(--fern);
  background:var(--green-tint);padding:2px 8px;border-radius:5px;display:inline-block;align-self:flex-start}

/* ---- COVERAGE STATUS ---- */
.ac-cov{display:flex;align-items:center;gap:10px}
.ac-cov__meter{flex:1;height:12px;border-radius:6px;background:var(--line);overflow:hidden;position:relative}
.ac-cov__seg{height:100%;float:left}
.ac-cov__seg.verified{background:var(--green)}
.ac-cov__seg.modeled{background:var(--ep-modeled-bg);box-shadow:inset 0 0 0 1px var(--ep-modeled-line)}
.ac-cov__seg.residual{background:repeating-linear-gradient(45deg,var(--red-tint),var(--red-tint) 5px,#fff 5px,#fff 7px)}
.ac-cov__seg.unknown{background:var(--ep-unknown-bg);
  background-image:repeating-linear-gradient(90deg,transparent,transparent 3px,rgba(92,106,94,.25) 3px,rgba(92,106,94,.25) 4px)}
.ac-cov__val{font:700 13px var(--font-data);font-variant-numeric:var(--num);min-width:60px;text-align:right}

/* ---- EXCEPTION STATE ---- */
.ac-exc{border:1px solid;border-radius:10px;padding:12px 14px;display:flex;gap:12px;align-items:flex-start}
.ac-exc--unknown{border-color:var(--ep-unknown-line);background:var(--ep-unknown-bg)}
.ac-exc--stale{border-color:rgba(143,94,7,.4);background:var(--amber-tint)}
.ac-exc--blocked{border-color:rgba(178,64,31,.35);background:var(--red-tint)}
.ac-exc--not-assessable{border-color:var(--ep-unknown-line);background:#fff}
.ac-exc__glyph{width:26px;height:26px;flex:0 0 auto;border-radius:50%;display:flex;align-items:center;
  justify-content:center;font:800 14px var(--font-data)}
.ac-exc--unknown .ac-exc__glyph{background:#fff;color:var(--muted);border:1.5px dotted var(--muted)}
.ac-exc--stale .ac-exc__glyph{background:#fff;color:var(--amber)}
.ac-exc--blocked .ac-exc__glyph{background:#fff;color:var(--red)}
.ac-exc__title{font:800 12px var(--font-data);letter-spacing:.4px;text-transform:uppercase;color:var(--ink)}
.ac-exc__body{color:var(--muted);font-size:12px;margin-top:2px}

/* ---- CHANGE SINCE LAST ---- */
.ac-change{display:flex;flex-direction:column;gap:6px}
.ac-change__row{display:grid;grid-template-columns:1fr auto auto auto;gap:10px;align-items:baseline;
  padding:6px 0;border-top:1px solid var(--line)}
.ac-change__row:first-child{border-top:0}
.ac-change__lbl{font-size:12px;color:var(--muted)}
.ac-change__from{font-variant-numeric:var(--num);color:var(--faint);font-size:12px}
.ac-change__arrow{color:var(--faint)}
.ac-change__to{font-variant-numeric:var(--num);font-weight:700;font-size:13px}
.ac-change__delta{font:700 11px var(--font-data);padding:1px 7px;border-radius:5px;font-variant-numeric:var(--num)}
.ac-change__delta.up{color:var(--fern);background:var(--green-tint)}
.ac-change__delta.down{color:var(--red);background:var(--red-tint)}
.ac-change__delta.flat{color:var(--muted);background:var(--ep-unknown-bg)}
.ac-change__delta.edge{color:var(--ep-modeled-fg);background:var(--ep-modeled-bg)}
.ac-change__empty{color:var(--muted);font-style:italic;font-family:var(--font-serif);font-size:14px;padding:8px 0}

/* ---- SOURCE LINEAGE ---- */
.ac-lineage{display:flex;align-items:center;flex-wrap:wrap;gap:0}
.ac-lineage__node{padding:7px 11px;border-radius:8px;background:#fff;border:1px solid var(--hairline);
  font-size:11px;max-width:170px}
.ac-lineage__node .src{font-weight:700;color:var(--ink)}
.ac-lineage__node .meta{color:var(--faint);font-size:10px;font-variant-numeric:var(--num)}
.ac-lineage__node.is-stale{border-color:rgba(143,94,7,.5);background:var(--amber-tint)}
.ac-lineage__arrow{color:var(--faint);padding:0 8px}
.ac-lineage__op{font:600 9px var(--font-data);letter-spacing:.4px;color:var(--muted);text-transform:uppercase}

/* ---- RELATIONSHIP MAP ---- */
.ac-relmap svg{width:100%;height:auto;display:block}
.ac-relmap__node text{font:600 10px var(--font-data);fill:var(--ink)}
.ac-relmap__center{fill:var(--green-tint);stroke:var(--green-deep);stroke-width:1.5}
.ac-relmap__edge{stroke-width:1.5;fill:none}
.ac-relmap__edge.is-observed{stroke:var(--ep-observed-line)}
.ac-relmap__edge.is-inferred{stroke:var(--ep-recon-fg);stroke-dasharray:4 3}
.ac-relmap__edge.is-unknown{stroke:var(--ep-unknown-line);stroke-dasharray:2 3}
.ac-relmap__peer{fill:#fff;stroke:var(--hairline);stroke-width:1}

/* ---- AUDIT RECEIPT ---- */
.ac-receipt{border:1px solid var(--hairline);border-radius:8px;background:#FCFDFB;padding:12px 14px;
  font-variant-numeric:var(--num)}
.ac-receipt__hd{display:flex;align-items:center;gap:8px;font:800 10px var(--font-data);letter-spacing:1.2px;
  text-transform:uppercase;color:var(--gold);margin-bottom:8px}
.ac-receipt__row{display:grid;grid-template-columns:130px 1fr;gap:10px;padding:3px 0;font-size:12px}
.ac-receipt__rk{color:var(--faint);font:700 10px var(--font-data);letter-spacing:.5px;text-transform:uppercase}
.ac-receipt__rv{color:var(--ink);word-break:break-all}
.ac-receipt__hash{font-family:ui-monospace,"SF Mono",Menlo,monospace;font-size:11px;color:var(--muted)}
.ac-receipt__seal{color:var(--fern);font-weight:700}

/* ---- COMPARE MODE ---- */
.ac-compare{display:grid;grid-template-columns:1fr auto 1fr;gap:14px;align-items:stretch}
.ac-compare__col{border:1px solid var(--hairline);border-radius:10px;padding:12px 14px;background:#fff}
.ac-compare__col.is-baseline{background:#FCFDFB}
.ac-compare__col.is-counterfactual{border-color:var(--ep-cf-line);background:var(--ep-cf-bg)}
.ac-compare__col.is-scenario{border-color:var(--ep-modeled-line);background:var(--ep-modeled-bg)}
.ac-compare__title{font:700 10px var(--font-data);letter-spacing:.8px;text-transform:uppercase;color:var(--faint);margin-bottom:8px}
.ac-compare__mrow{display:flex;justify-content:space-between;gap:8px;padding:4px 0;border-top:1px solid var(--line);font-size:12px}
.ac-compare__mrow:first-of-type{border-top:0}
.ac-compare__mk{color:var(--muted)}
.ac-compare__mv{font-weight:700;font-variant-numeric:var(--num)}
.ac-compare__vs{align-self:center;font:800 11px var(--font-data);color:var(--faint);letter-spacing:1px;
  writing-mode:vertical-rl;text-orientation:mixed}
.ac-compare__mv.better{color:var(--fern)} .ac-compare__mv.worse{color:var(--red)}

/* =================== MOTION (spec 10) =================== */
@keyframes ac-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes ac-drawer-in{from{opacity:0;transform:translateX(10px)}to{opacity:1;transform:translateX(0)}}
@keyframes ac-grow{from{width:0}}
@keyframes ac-draw{to{stroke-dashoffset:0}}
@keyframes ac-numfade{from{opacity:.35}to{opacity:1}}
/* number arrival: fade in ONLY when a value exists (never before). Applied by JS. */
.ac-numarrive{animation:ac-numfade var(--dur-num) var(--ease) both}

/* No bounce / spring / confetti / AI-orbs on LIGHT instrument surfaces. The CASCADE OBSERVATORY section
   below carries the owner-approved dark-field grammar: glow, physics-settled layout, and travelling
   particles - but particles ride ONLY observed-transmission edges, never modeled overlays or set-membership. */

/* ============================================================================
   CASCADE OBSERVATORY GRAMMAR - dark-field constellation surfaces ONLY
   (.cgbox, .hcb, .ecv-obsv, .cgthreads). Consolidates the hues previously hardcoded
   inline in cliff_radar.html and app.html so every observatory surface re-themes here.
   ============================================================================ */
:root{
  --cas-field-base:#F4F7F9;            /* = --green-dark */
  --cas-field-core:#FFFFFF;
  --cas-field-deep:#EDF1F4;
  --cas-nebula-gold:rgba(154,123,47,.05);
  --cas-nebula-green:rgba(31,111,92,.05);
  --cas-horizon:rgba(45,91,169,.07);
  --cas-ripple:#2D5BA9;                /* map, do not re-mint */
  --cas-edge:#AFC0CE;                  /* = --gold */
  --cas-edge-hot:#2D5BA9;
  --cas-flow:#5B86CF;                  /* particle fill; observed transmission ONLY */
  --cas-node-filed:#8C2F39;            /* public-filing tier */
  --cas-node-risk:#9A7B2F;             /* at-risk cohort */
  --cas-node-ok:#1F6F5C;
  --cas-node-state:#5A6B7A;            /* geography tier */
  --cas-watch-1:#C9D6E0; --cas-watch-2:#AFC0CE; --cas-watch-3:#93A7B8;
  --cas-label-ink:#14212E; --cas-label-sub:#5A6B7A; --cas-label-tag:#7A8B9A;
  --cas-hub-label-ink:#FFFFFF;
  --cas-chip-bg:#2D5BA9; --cas-chip-line:rgba(45,91,169,.35);
  --cas-bar-from:rgba(45,91,169,.18); --cas-bar-to:#5FBF86;
  --cas-threads-line:rgba(45,91,169,.20); --cas-dot-idle:rgba(199,161,75,.26);
  --cas-spark-ref:#9A7B2F;   /* the "flat / reference" trend hue - a dark amber distinct from --gold, semantic not decorative */
  --cas-dim-edge:.12; --cas-dim-node:.26; --cas-dim-label:.10;   /* reactive-attention coefficients */
}

@media (prefers-reduced-motion: reduce){
  .ain-ui *,.ac-card--enter,.ac-drawer--enter,
  .ac-path--draw .ac-path__edge-line,.ac-path--draw .ac-path__node,
  .ac-wf--grow .ac-wf__fill,.ac-numarrive{
    animation:none !important;transition:none !important}
  .ac-path--draw .ac-path__edge-line{stroke-dashoffset:0 !important}
  .ac-wf--grow .ac-wf__fill{width:var(--ac-final-w,auto) !important}
}

/* The cascade block above was authored for a DARK field and has been re-grounded onto
   paper, keeping the same contrast RELATIONSHIPS (base recedes, resting edges are
   survey linework, an active path advances in the accent, labels read as ink) so the
   cascade view's own logic is untouched - only what the colours resolve to moved. */
