/* ============================================================================
   BOOKWATCH PREMIUM VISUAL PASS - bookwatch_premium.css
   ----------------------------------------------------------------------------
   Gives the LENDER / BookWatch surface a premium economic-intelligence visual
   identity: cool-paper RESTING environment, deep slate-blue ACTIVE
   "intelligence surfaces", restrained survey / horizon illumination that moves ONLY
   when economic information does.

   GOVERNING IDEA
     Light moving == economic information propagating.
     Motion communicates STATE and PROPAGATION, never ambient decoration.
     The gleam is a ONE-SHOT effect (never an infinite/continuous glow), so it
     stays inside the existing observatory doctrine (tokens.css / cascade css:
     "No continuous glow anywhere").

   SCOPE
     EVERYTHING here is scoped under .bookwatch-shell. It never overrides the
     global app, and never contaminates the producer / commodity / admin shells.
     The scientific epistemic grammar (OBSERVED/MODELED/RECONSTRUCTED/UNKNOWN
     color+shape+word) from tokens.css is preserved unchanged; the premium layer
     only adds a resting palette + state-triggered motion on top.

   STATE HOOK CLASSES (added by bookwatch_premium.js or by the view at render):
     .bw-intelligence-surface           a deep slate active surface
     .bw-intelligence-surface.is-updated | .is-selected | .is-propagating |
       .is-verified                     trigger a single gleam pass
     .bw-metric-changed                 one metric value flash
     .bw-priority.is-material           priority card, illuminated left edge
     .bw-priority.is-selected           selected priority card
     .ecv__edge.is-propagating          a cascade path light sweep (one pass)
     .ecv__node.is-active | .is-focus   cascade node illumination (horizon / survey)

   No tilde, em-dash or en-dash anywhere (project style rule).
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. SCOPED TOKENS  (never global; harmonized with tokens.css survey/horizon)
   --------------------------------------------------------------------------- */
/* RE-VALUED 2026-10-06 against ui/DESIGN_PLAN.md. The NAMES are unchanged so every
   consumer (gold_lender.js, the cascade chrome, the lifecycle strip) inherits the new
   identity untouched; only the VALUES moved. The old values were the generic
   agriculture palette (forest green + harvest gold on warm ivory) that the plan
   refuses. The ground is now cool paper, the deep plane is a slate-blue soil horizon,
   the single interactive accent is survey blue, and the verified semantic is horizon
   teal. On-dark variants are lightened so contrast survives on the deep plane. */
.bookwatch-shell{
  --bw-ivory:var(--paper-sunk,#F4F7F9);
  --bw-paper:var(--paper,#FBFCFD);
  --bw-forest-950:#0B1724;
  --bw-forest-900:#102030;
  --bw-forest-800:#1B3449;
  --bw-navy:var(--ink,#14212E);
  --bw-gold:#8FB3E6;          /* on-dark survey: focus and selection, never a warning */
  --bw-teal:#6FC3AE;          /* on-dark horizon: verified depth / upside */
  --bw-ink:var(--ink,#14212E);
  --bw-ondark:#EDF2F7;
  --bw-ondark-muted:#9FB2C4;
  /* motion budget (inherits the app ease; every duration <= 900ms) */
  --bw-gleam-dur:900ms;
  --bw-flow-dur:850ms;
  --bw-metric-dur:700ms;
  --bw-resolve-dur:220ms;
}

/* ---------------------------------------------------------------------------
   2. RESTING ENVIRONMENT  (cool paper, not flat white)
   --------------------------------------------------------------------------- */
.bookwatch-shell{
  background:
    radial-gradient(circle at 76% 12%, rgba(45,91,169,.055), transparent 28%),
    linear-gradient(180deg, var(--bw-paper) 0%, var(--bw-ivory) 100%);
}

/* ---------------------------------------------------------------------------
   3. INTELLIGENCE SURFACES  (the ACTIVE economic plane; used selectively)
   Applied to: Today economic-pulse header, active investigation canvas, the
   authorization/execution track, the verified after-state, a selected event.
   Do NOT turn every card deep (that is enforced by only tagging these nodes).
   --------------------------------------------------------------------------- */
.bookwatch-shell .bw-intelligence-surface{
  position:relative;
  overflow:hidden;
  color:var(--bw-ondark);
  background:
    linear-gradient(145deg, rgba(255,255,255,.045), transparent 34%),
    linear-gradient(160deg, var(--bw-forest-800) 0%, var(--bw-forest-900) 52%, var(--bw-forest-950) 100%);
  border:1px solid rgba(143,179,230,.22);
  box-shadow:
    0 14px 40px rgba(20,33,46,.14),
    inset 0 1px rgba(255,255,255,.06);
}
/* legibility: recolor the scientific chrome that lives inside a dark surface.
   Metric labels/values, gold rules, subtext and receipt keys are re-toned for
   contrast; epistemic BADGES keep their own backgrounds and stay legible. */
.bookwatch-shell .bw-intelligence-surface .ac-goldrule{color:var(--bw-gold)}
.bookwatch-shell .bw-intelligence-surface .ac-metric__label,
.bookwatch-shell .bw-intelligence-surface .ac-metric__sub{color:var(--bw-ondark-muted)}
.bookwatch-shell .bw-intelligence-surface .ac-metric__value{color:var(--bw-ondark)}
.bookwatch-shell .bw-intelligence-surface .ac-metric__value.is-unknown{color:#C3D0DB}
.bookwatch-shell .bw-intelligence-surface .ac-receipt__rk{color:var(--bw-ondark-muted)}
.bookwatch-shell .bw-intelligence-surface .ac-receipt__rv{color:var(--bw-ondark)}
/* a serif heading placed on a dark surface. gold_lender sets an inline
   color:var(--ink) on serifHead(), so this override is intentionally
   !important-scoped to serif text living inside an intelligence surface. */
.bookwatch-shell .bw-intelligence-surface .bw-onlight{color:var(--bw-ondark)}
.bookwatch-shell .bw-intelligence-surface [style*="var(--font-serif)"]{color:var(--bw-ondark) !important}

/* survey top edge on a material/selected surface */
.bookwatch-shell .bw-intelligence-surface.is-material,
.bookwatch-shell .bw-intelligence-surface.is-selected{
  border-top:2px solid transparent;
  background-image:
    linear-gradient(90deg, rgba(143,179,230,.0), rgba(143,179,230,.85), rgba(143,179,230,.0)),
    linear-gradient(145deg, rgba(255,255,255,.045), transparent 34%),
    linear-gradient(160deg, var(--bw-forest-800) 0%, var(--bw-forest-900) 52%, var(--bw-forest-950) 100%);
  background-origin:border-box;
  background-clip:border-box, padding-box, padding-box;
}

/* ---------------------------------------------------------------------------
   4. THE GLEAM LAYER  (single pass; opacity+transform only; GPU friendly)
   --------------------------------------------------------------------------- */
.bookwatch-shell .bw-intelligence-surface::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:0;
  z-index:2;
  background:linear-gradient(
    112deg,
    transparent 35%,
    rgba(255,255,255,.04) 43%,
    rgba(111,195,174,.22) 48%,
    rgba(205,224,250,.16) 51%,
    transparent 58%
  );
  transform:translateX(-80%);
  will-change:transform,opacity;
}
.bookwatch-shell .bw-intelligence-surface.is-updated::after,
.bookwatch-shell .bw-intelligence-surface.is-selected::after,
.bookwatch-shell .bw-intelligence-surface.is-propagating::after,
.bookwatch-shell .bw-intelligence-surface.is-verified::after{
  animation:bw-gleam var(--bw-gleam-dur) cubic-bezier(.2,.7,.2,1) 1;
}
/* VERIFIED settles: the light passes once, then the surface rests (no repeat) */
.bookwatch-shell .bw-intelligence-surface.is-verified{
  border-color:rgba(111,195,174,.34);
}

@keyframes bw-gleam{
  0%   { opacity:0; transform:translateX(-90%); }
  20%  { opacity:1; }
  100% { opacity:0; transform:translateX(90%); }
}

/* ---------------------------------------------------------------------------
   5. METRIC-CHANGE GLEAM  (fires only when a real value changes state)
   --------------------------------------------------------------------------- */
.bookwatch-shell .bw-metric-changed{
  animation:bw-metric-flash var(--bw-metric-dur) ease-out 1;
}
@keyframes bw-metric-flash{
  0%   { color:var(--bw-gold); text-shadow:0 0 12px rgba(143,179,230,.5); }
  100% { color:inherit; text-shadow:none; }
}

/* ---------------------------------------------------------------------------
   6. ECONOMIC CASCADE PROPAGATION  (reuse the EXISTING cascade SVG; no new
   graph engine). Only the currently relevant path animates, one pass.
   These extend .ecv__edge / .ecv__node from economic_cascade.css and only
   apply inside the BookWatch shell.
   --------------------------------------------------------------------------- */
.bookwatch-shell .ecv__edge.is-propagating{
  stroke:var(--bw-teal);
  stroke-width:2.25;
  stroke-dasharray:7 10;
  filter:drop-shadow(0 0 4px rgba(111,195,174,.55));
  animation:bw-flow var(--bw-flow-dur) linear 1;
}
@keyframes bw-flow{
  from { stroke-dashoffset:34; }
  to   { stroke-dashoffset:0; }
}
/* a selected material path finishes in gold (current focus) */
.bookwatch-shell .ecv__edge.is-selected{
  stroke:var(--bw-gold);
  filter:drop-shadow(0 0 5px rgba(143,179,230,.40));
}

/* ---- THE ACTIVE CASCADE CANVAS = the intelligence plane (deep forest glass) ----
   The cascade graph area becomes the dark active layer while the surrounding chrome
   (header / summary / legend / inspector) stays ivory for readability. Node boxes
   stay light islands (legible); edges / grid / arrows are retuned for contrast on
   dark so nothing becomes illegible. This is what makes AIN read as a living
   economic system rather than a white flowchart. */
.bookwatch-shell .ecv__canvaswrap{
  background:
    /* faint economic network trace (two hairline grids), extremely subtle */
    repeating-linear-gradient(90deg, rgba(255,255,255,.020) 0 1px, transparent 1px 68px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.016) 0 1px, transparent 1px 68px),
    /* directional illumination around where intelligence enters + lands */
    radial-gradient(120% 80% at 16% 6%, rgba(111,195,174,.13), transparent 46%),
    radial-gradient(110% 90% at 90% 96%, rgba(143,179,230,.09), transparent 48%),
    /* deep desaturated forest depth */
    linear-gradient(150deg, #1B3449 0%, #11212F 55%, #0B1724 100%);
  border-radius:12px;
  box-shadow:inset 0 1px rgba(255,255,255,.06), inset 0 0 0 1px rgba(143,179,230,.16),
    inset 0 -40px 80px rgba(0,0,0,.22);
  /* fit-to-content: the graph is the hero. Center it and let it scale to fill the
     canvas width (viewBox preserves aspect) so there is no empty upper field and no
     clipped nodes. */
  display:flex; align-items:center; justify-content:center;
  padding:22px; min-height:340px; max-height:none; overflow:visible;
}
.bookwatch-shell .ecv__svg{
  width:100%; height:auto; min-height:0; max-width:1160px; display:block;
}
/* faint scientific grid, lightened for the dark plane */
.bookwatch-shell .ecv__grid line{ stroke:rgba(255,255,255,.06); opacity:1; }
/* edges: light enough to read on dark; state still carried by hue + dash */
.bookwatch-shell .ecv__edge{ stroke:rgba(226,236,230,.30); }
.bookwatch-shell .ecv__edge.is-supported{ stroke:rgba(111,195,174,.60); }
.bookwatch-shell .ecv__edge.is-modeled{ stroke:rgba(150,183,214,.52); }
.bookwatch-shell .ecv__edge.is-candidate{ stroke:rgba(150,183,214,.42); }
.bookwatch-shell .ecv__edge.is-historical{ stroke:rgba(224,196,138,.5); }
.bookwatch-shell .ecv__edge.is-counterfactual{ stroke:rgba(178,158,214,.55); }
.bookwatch-shell .ecv__edge.is-degraded{ stroke:rgba(224,196,138,.6); }
.bookwatch-shell .ecv__arrowhead{ fill:rgba(226,236,230,.5); }
.bookwatch-shell .ecv__edge-lbl{ fill:rgba(226,236,230,.5); }
/* node boxes get a soft lift off the plane */
.bookwatch-shell .ecv__node-box{ filter:drop-shadow(0 5px 12px rgba(0,0,0,.30)); }

/* ---- NODE GRAMMAR: structure encodes role. The economic INTELLIGENCE objects
   (observed event / driver / effect) are dark forest/navy surfaces; the
   INSTITUTIONAL objects (cohort / operation / book) are warm ivory cards. That
   ivory-on-forest interplay lives inside the canvas, and is semantically true. */
/* -- dark intelligence nodes: observed event / economic driver / economic effect -- */
.bookwatch-shell .ecv__node.is-role-source_observation .ecv__node-box{ fill:#17384B; stroke:rgba(111,195,174,.55); stroke-width:1.5; }
.bookwatch-shell .ecv__node.is-role-economic_factor .ecv__node-box{ fill:#13304A; stroke:rgba(143,179,230,.52); stroke-width:1.4; }
.bookwatch-shell .ecv__node.is-role-mechanism .ecv__node-box{ fill:#1B3449; stroke:rgba(111,195,174,.42); stroke-width:1.4; }
.bookwatch-shell .ecv__node.is-role-source_observation .ecv__node-title,
.bookwatch-shell .ecv__node.is-role-source_observation .ecv__node-val,
.bookwatch-shell .ecv__node.is-role-economic_factor .ecv__node-title,
.bookwatch-shell .ecv__node.is-role-economic_factor .ecv__node-val,
.bookwatch-shell .ecv__node.is-role-mechanism .ecv__node-title,
.bookwatch-shell .ecv__node.is-role-mechanism .ecv__node-val{ fill:#EDF2F7; }
.bookwatch-shell .ecv__node.is-role-source_observation .ecv__node-role,
.bookwatch-shell .ecv__node.is-role-economic_factor .ecv__node-role,
.bookwatch-shell .ecv__node.is-role-mechanism .ecv__node-role{ fill:rgba(199,161,75,.92); }
.bookwatch-shell .ecv__node.is-role-source_observation .ecv__node-state,
.bookwatch-shell .ecv__node.is-role-economic_factor .ecv__node-state,
.bookwatch-shell .ecv__node.is-role-mechanism .ecv__node-state{ fill:rgba(244,241,232,.62); }
/* -- ivory institutional nodes: cohort (gold edge) / operation / book / outcome -- */
.bookwatch-shell .ecv__node.is-role-cohort .ecv__node-box{ fill:#EAF0F9; stroke:rgba(45,91,169,.52); stroke-width:1.5; }
.bookwatch-shell .ecv__node.is-role-operation .ecv__node-box,
.bookwatch-shell .ecv__node.is-role-book .ecv__node-box,
.bookwatch-shell .ecv__node.is-role-outcome .ecv__node-box,
.bookwatch-shell .ecv__node.is-role-institution .ecv__node-box{ fill:#FFFFFF; stroke:rgba(45,91,169,.22); stroke-width:1.2; }
.bookwatch-shell .ecv__node.is-role-cohort .ecv__node-role,
.bookwatch-shell .ecv__node.is-role-book .ecv__node-role{ fill:#1E4480; }
/* -- available control: soft green -- */
.bookwatch-shell .ecv__node.is-role-control .ecv__node-box{ fill:var(--horizon-tint,#E8F2EF); stroke:var(--horizon,#1F6F5C); stroke-width:1.3; }
/* -- unknown / terminated: muted outline on the dark plane -- */
.bookwatch-shell .ecv__node.is-role-unknown .ecv__node-box,
.bookwatch-shell .ecv__node.is-terminal .ecv__node-box{ fill:rgba(255,255,255,.03); stroke:rgba(244,241,232,.28); stroke-dasharray:4 4; }
.bookwatch-shell .ecv__node.is-role-unknown .ecv__node-title,
.bookwatch-shell .ecv__node.is-terminal .ecv__node-title{ fill:rgba(244,241,232,.6); }
.bookwatch-shell .ecv__node.is-role-unknown .ecv__node-role,
.bookwatch-shell .ecv__node.is-terminal .ecv__node-role{ fill:rgba(244,241,232,.4); }
/* stronger title type inside the larger nodes */
.bookwatch-shell .ecv__node-title{ font-size:13.5px; font-weight:700; }
.bookwatch-shell .ecv__node-role{ font-size:8.5px; letter-spacing:1px; }

/* ---- CHROME: the whole cascade reads as one ivory-framed instrument with a
   deep forest-glass header (gold hairline rule) ---- */
.bookwatch-shell .ecv{
  border:1px solid rgba(23,75,54,.16);
  border-radius:16px;
  background:linear-gradient(180deg,var(--white,#fff) 0%,var(--paper-sunk,#F4F7F9) 100%);
  box-shadow:0 24px 60px rgba(20,33,46,.14);
}
.bookwatch-shell .ecv__header{
  background:linear-gradient(160deg,#1B3449 0%,#101F2E 100%);
  border-bottom:1px solid rgba(143,179,230,.38);
  color:#EDF2F7;
}
.bookwatch-shell .ecv__eyebrow{ color:var(--bw-gold); }
.bookwatch-shell .ecv__title{ color:#EDF2F7; }
.bookwatch-shell .ecv__asof{ color:rgba(247,245,238,.58); }
.bookwatch-shell .ecv__lenses{ background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.14); }
.bookwatch-shell .ecv__lens{ color:rgba(247,245,238,.72); }
.bookwatch-shell .ecv__lens:hover{ color:#fff; }
.bookwatch-shell .ecv__lens.is-active{ background:rgba(143,179,230,.18); color:#EDF2F7; box-shadow:inset 0 0 0 1px rgba(143,179,230,.42); }
.bookwatch-shell .ecv__header .ecv__btn{ background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.16); color:rgba(247,245,238,.82); }
.bookwatch-shell .ecv__header .ecv__btn:hover{ color:#fff; border-color:rgba(143,179,230,.5); }

/* ---- METRIC ROW: institutional instrumentation (large tabular numbers) ---- */
.bookwatch-shell .ecv__summary{
  gap:36px; padding:16px 24px;
  background:linear-gradient(180deg, rgba(18,59,43,.05), transparent);
}
.bookwatch-shell .ecv__stat-l{ font-size:10px; letter-spacing:1.4px; color:var(--faint); }
.bookwatch-shell .ecv__stat-v{ font-size:30px; line-height:1.02; font-weight:800; color:var(--ink,#14212E); font-variant-numeric:tabular-nums; }
.bookwatch-shell .ecv__scale-note{ color:var(--muted); }

/* hover preview (motion package: hover response <120ms): a light, immediate teal
   affordance on a hovered node so the graph feels interrogable before a click.
   Never competes with selection gold; suppressed once a selection is active. */
.bookwatch-shell .ecv__node{ cursor:pointer; }
.bookwatch-shell .ecv:not(.bw-has-selection) .ecv__node:hover .ecv__node-box{
  filter:drop-shadow(0 0 6px rgba(111,195,174,.5));
  transition:filter 100ms ease;
}

/* node illumination: teal == currently propagating, gold == selected/focus.
   adverse/unknown keep their epistemic tokens (never overridden here). */
.bookwatch-shell .ecv__node.is-active .ecv__node-box{
  filter:drop-shadow(0 0 5px rgba(111,195,174,.46));
}
.bookwatch-shell .ecv__node.is-focus .ecv__node-box{
  filter:drop-shadow(0 0 7px rgba(143,179,230,.52));
}
/* selection focus: gold == current focus. The selected node glows gold; when a
   selection is active, the on-path (not faded) edges read gold too. State, not
   motion, so it persists under reduced-motion. Epistemic dash patterns are kept. */
.bookwatch-shell .ecv__node.is-selected .ecv__node-box{
  stroke:#9FC0EE !important;
  stroke-width:2.6;
  filter:drop-shadow(0 0 9px rgba(225,194,115,.7));
}
.bookwatch-shell .ecv.bw-has-selection .ecv__edges .ecv__edge-g:not(.is-faded) .ecv__edge{
  stroke:#9FC0EE;
  stroke-width:2;
  filter:drop-shadow(0 0 5px rgba(225,194,115,.5));
}
/* disambiguate the selection: subordinate every OTHER node so the selected node is
   unmistakably the focus (the on-path highlight is context, not the subject). */
.bookwatch-shell .ecv.bw-has-selection .ecv__node:not(.is-selected):not(.is-faded){ opacity:.66; }
.bookwatch-shell .ecv.bw-has-selection .ecv__node.is-selected{ opacity:1; }
/* the inspector reads as the explanation of the SELECTED node: gold accent on its
   title + a short content transition so it feels connected to the chosen path. */
.bookwatch-shell .ecv.bw-has-selection .ecv__insp-title{
  border-left:3px solid var(--bw-gold);
  padding-left:9px;
}
.bookwatch-shell .ecv__inspector{ transition:background var(--bw-resolve-dur) var(--ease,ease); }

/* ---------------------------------------------------------------------------
   7. PRIORITY CARDS  (default warm; material gets a thin illuminated left edge;
   hover a faint forest border. NOT every card neon.)
   --------------------------------------------------------------------------- */
.bookwatch-shell .bw-priority{
  transition:border-color var(--dur-hover,120ms) var(--ease,ease),
             box-shadow var(--dur-hover,120ms) var(--ease,ease);
}
.bookwatch-shell .bw-priority:hover{
  border-color:rgba(23,75,54,.28);
}
.bookwatch-shell .bw-priority.is-material{
  border-left:3px solid var(--bw-gold);
  box-shadow:0 1px 2px rgba(22,37,28,.05), -1px 0 10px rgba(143,179,230,.10);
}
.bookwatch-shell .bw-priority.is-selected{
  border-left:3px solid var(--bw-teal);
  box-shadow:0 6px 20px rgba(20,33,46,.14);
}

/* ---------------------------------------------------------------------------
   7b. DECISION RAIL CONCLUSION  (steer 10): keep the rail ivory/white for
   readability; give ONLY the conclusion a restrained gold top edge. State, not
   motion. The rail is a fixed element inside body.bookwatch-shell for lenders.
   --------------------------------------------------------------------------- */
.bookwatch-shell .dr-concl{
  border-top:2px solid var(--bw-gold);
  padding-top:10px;
}

/* ---------------------------------------------------------------------------
   7e. CONTROL LIFECYCLE STRIP (screen 18): AVAILABLE -> RECOMMENDED -> AUTHORIZED
   -> ROUTED -> EXECUTED -> VERIFICATION PENDING -> VERIFIED. The signature
   "monitored exposure to verified action" pipeline. VERIFIED settles dark/teal.
   --------------------------------------------------------------------------- */
.bookwatch-shell .bw-lifecycle{ display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:12px 0 4px; }
.bookwatch-shell .bw-lc{ display:flex; flex-direction:column; gap:3px; padding:10px 12px; border-radius:10px;
  background:#fff; border:1px solid var(--hairline,rgba(20,33,46,.08)); min-width:104px; text-align:center; }
/* the tracked-out uppercase micro-label is retired: weight and size carry the rank instead */
.bookwatch-shell .bw-lc__s{ font:600 11px var(--font-data); letter-spacing:0; color:var(--muted); }
.bookwatch-shell .bw-lc__n{ font:800 19px var(--font-data); font-variant-numeric:tabular-nums; color:var(--ink); line-height:1; }
.bookwatch-shell .bw-lc.is-verified{ background:linear-gradient(160deg,#1B3449,#101F2E); border-color:rgba(111,195,174,.4); }
.bookwatch-shell .bw-lc.is-verified .bw-lc__s{ color:var(--bw-teal); }
.bookwatch-shell .bw-lc.is-verified .bw-lc__n{ color:#EDF2F7; }
.bookwatch-shell .bw-lc__arrow{ color:var(--faint); font-weight:700; font-size:14px; }

/* ---------------------------------------------------------------------------
   7d. SEGMENTED CONTROL (screen 11 Scenario Forward / Reverse-solve).
   --------------------------------------------------------------------------- */
.bookwatch-shell .bw-seg{ display:inline-flex; background:#fff; border:1px solid var(--card-line,rgba(45,91,169,.14)); border-radius:var(--radius-pill,999px); padding:3px; }
.bookwatch-shell .bw-seg__b{ border:0; background:transparent; color:var(--muted); font:700 12px var(--font-data); padding:7px 16px; border-radius:var(--radius-pill,999px); cursor:pointer; transition:all 140ms ease; }
.bookwatch-shell .bw-seg__b:hover{ color:var(--ink); }
.bookwatch-shell .bw-seg__b.on{ background:var(--horizon,#1F6F5C); color:#fff; }

/* ---------------------------------------------------------------------------
   7c. CONTROL CARD QUEUE (screen 12): decision-first cards, not a flat table.
   Each card = one operation's control with exposure / window / owner / state.
   Ranking stays economic (revenue never influences order). Scoped to lender.
   --------------------------------------------------------------------------- */
.bookwatch-shell .bw-ccq{ display:flex; flex-direction:column; gap:10px; margin-top:12px; }
.bookwatch-shell .bw-cc{
  background:#fff; border:1px solid var(--hairline,rgba(20,33,46,.08)); border-left:3px solid var(--hairline,rgba(20,33,46,.08));
  border-radius:12px; padding:14px 16px; cursor:pointer;
  box-shadow:0 1px 2px rgba(22,37,28,.05);
  transition:border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.bookwatch-shell .bw-cc:hover{ border-color:rgba(23,75,54,.28); box-shadow:0 8px 24px rgba(14,42,31,.10); }
.bookwatch-shell .bw-cc.BREACH{ border-left-color:var(--ledger,#8C2F39); }
.bookwatch-shell .bw-cc.WARN{ border-left-color:var(--fallow,#9A7B2F); }
.bookwatch-shell .bw-cc.PASS{ border-left-color:var(--horizon,#1F6F5C); }
.bookwatch-shell .bw-cc__top{ display:flex; justify-content:space-between; align-items:baseline; gap:10px; }
.bookwatch-shell .bw-cc__op b{ font:700 15px var(--font-data); color:var(--ink); }
.bookwatch-shell .bw-cc__id{ font-size:11px; color:var(--faint); margin-left:8px; }
.bookwatch-shell .bw-cc__why{ font-size:13px; color:var(--muted); margin:6px 0 10px; }
.bookwatch-shell .bw-cc__grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.bookwatch-shell .bw-cc__l{ display:block; font:500 11.5px var(--font-data); letter-spacing:0; color:var(--muted); }
.bookwatch-shell .bw-cc__v{ display:block; font:700 14px var(--font-data); font-variant-numeric:tabular-nums; color:var(--ink); margin-top:2px; }
.bookwatch-shell .bw-cc__foot{ margin-top:10px; }

/* ---------------------------------------------------------------------------
   8. OBJECT RESOLVE TRANSITION  (Book -> Cohort -> Operation feels like the
   system resolving DEEPER into the same object, not a hard page redraw).
   Applied by JS to the surface body when it swaps; also used as the
   View-Transition fallback. Short + directional; no long page fades.
   --------------------------------------------------------------------------- */
.bookwatch-shell .bw-resolve-in{
  animation:bw-resolve var(--bw-resolve-dur) cubic-bezier(.2,.8,.2,1) both;
}
@keyframes bw-resolve{
  from { opacity:0; transform:translateX(10px) scale(.996); }
  to   { opacity:1; transform:translateX(0) scale(1); }
}
/* View Transitions API (progressive; ignored where unsupported) */
::view-transition-old(bw-object){ animation:bw-vt-out 180ms both; }
::view-transition-new(bw-object){ animation:bw-vt-in 220ms both; }
@keyframes bw-vt-out{ to { opacity:0; transform:translateX(-8px); } }
@keyframes bw-vt-in{ from { opacity:0; transform:translateX(10px); } }

/* ---------------------------------------------------------------------------
   8b. COMMITTEE EXPORT / PRESENTATION MODE (screen 17): when exporting the brief,
   strip normal application chrome so the printed/exported artifact is a clean,
   decision-ready one-pager (no nav, no ribbon, no rail).
   --------------------------------------------------------------------------- */
@media print {
  body > header, #nav, .marketribbon, #market, #decisionrail, .sidecar, .goldstrip,
  #personaui, #ticker { display:none !important; }
  body { padding:0 !important; background:#fff !important; }
  main, #main { padding:0 !important; max-width:none !important; margin:0 !important; }
  .card, .bw-intelligence-surface { box-shadow:none !important; break-inside:avoid; }
}
body.brief-export > header, body.brief-export #nav, body.brief-export #decisionrail,
body.brief-export #market, body.brief-export .marketribbon { display:none !important; }
body.brief-export { padding-right:0 !important; }
body.brief-export main, body.brief-export #main { max-width:900px; margin:0 auto; }

/* ---------------------------------------------------------------------------
   9. REDUCED MOTION  (kill all premium motion; state remains legible)
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce){
  .bookwatch-shell *,
  .bookwatch-shell *::before,
  .bookwatch-shell *::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
  }
  .bookwatch-shell .bw-intelligence-surface::after{ opacity:0 !important; }
  .bookwatch-shell .ecv__edge.is-propagating{ stroke-dashoffset:0 !important; }
}

/* ============================================================================
   BOOKWATCH WORK QUEUE  (.bwq)  - the surface in bookwatch_workflow.js
   ----------------------------------------------------------------------------
   The lender own book as an ANALYST WORK QUEUE, built to ui/DESIGN_PLAN.md:
   cool paper ground with a plat-survey graticule, ONE self-hosted grotesque for
   display, interface and figures, and the money hierarchy expressed as a
   SOIL-HORIZON band stack rather than a row of identical KPI cards.
   (The face named here used to be a serif display paired with a monospace label
   style. Both are retired at the token level; this file only consumes the
   tokens, so the note is corrected rather than the rules.)

   Refused on purpose, per the plan: identical rounded KPI cards with one shadow;
   tracked-out ALL-CAPS eyebrows above every heading; middle-dot meta joins;
   numbered 01/02/03 markers; an arrow glyph appended to link text.

   Every colour is a token. Semantic (ledger / horizon / fallow) is kept strictly
   separate from the accent (survey), so a risk badge never borrows the selection
   colour and a selection never reads as a warning.
   ========================================================================== */

/* USE THE CANVAS. This was 1180px, which left the right half of a 1600px window empty on every
   BookWatch screen while the content ran down a single narrow column. The measure of a PARAGRAPH is
   still capped per element (.bwq-head__s, .bwq-q__s and the notes all carry their own ch limits),
   so widening the shell widens the INSTRUMENTS and never the reading line. */
.bwq{ padding:0 0 64px; max-width:1560px;
  /* TABULAR FIGURES WHERE FIGURES ALIGN, AND NOWHERE ELSE. The app root sets tabular numerals on everything, and in this face tabular also widens the COMMA and the FULL STOP, so running prose came out as "compare against ,  so no change is reported". Columns of figures keep tabular; sentences do not. Every figure class in this file already declares its own tabular rule. */
  font-variant-numeric:normal; }
.bwq *{ box-sizing:border-box; }

/* ---- the six questions, in two columns ------------------------------------
   Left: what the officer reads and acts on, in order. Right: the standing
   condition of the book. One column below 1120px, where a split would make
   every instrument too narrow to read. */
.bwq-grid{ display:grid; grid-template-columns:minmax(0,1.18fr) minmax(0,1fr);
  gap:0 34px; align-items:start; }
.bwq-col{ min-width:0; }
.bwq-col > .bwq-sec:first-child{ margin-top:30px; }
@media (max-width:1120px){ .bwq-grid{ grid-template-columns:minmax(0,1fr); gap:0; } }

/* ---- the identity band ---------------------------------------------------- */
.bwq-head{ display:flex; justify-content:space-between; align-items:flex-end; gap:24px;
  flex-wrap:wrap; padding:28px 0 18px; border-bottom:1px solid var(--graticule); }
.bwq-h1{ font:600 var(--t-xl)/1.06 var(--font-display); color:var(--ink); margin:0;
  letter-spacing:-.015em; text-wrap:balance; }
.bwq-head__s{ margin:6px 0 0; font:400 var(--t-base)/1.5 var(--font-ui); color:var(--muted); max-width:60ch; }
.bwq-head__m{ display:flex; gap:8px; flex-wrap:wrap; }
.bwq-boot{ padding:28px 0; }

/* ---- THE HORIZON STACK: the money hierarchy read top-down ---------------- */
.bwq-stack{ margin:20px 0 0; border:1px solid var(--graticule); border-radius:var(--radius);
  background:var(--white); overflow:hidden; }
.bwq-band{ display:grid; grid-template-columns:200px 1fr 136px; grid-template-areas:"l t v" ". n n";
  align-items:center; gap:4px 16px; padding:13px 18px; border-bottom:1px solid var(--line); }
.bwq-band:last-of-type{ border-bottom:0; }
.bwq-band__l{ grid-area:l; font:500 var(--t-sm)/1.3 var(--font-ui); color:var(--ink); }
.bwq-band__track{ grid-area:t; height:16px; background:var(--paper-sunk); border-radius:2px;
  overflow:hidden; box-shadow:inset 0 0 0 1px rgba(45,91,169,.07); }
.bwq-band__track > i{ display:block; height:100%; }
.bwq-band__v{ grid-area:v; text-align:right; font:600 var(--t-md)/1 var(--font-mono);
  font-variant-numeric:var(--num); color:var(--ink); }
.bwq-band__v.is-unknown{ font-size:var(--t-sm); color:var(--muted); letter-spacing:.04em; }
.bwq-band__n{ grid-area:n; font:400 var(--t-xs)/1.4 var(--font-ui); color:var(--faint); }
/* the four horizons, deepest material last */
.bwq-band--ex .bwq-band__track > i{ background:var(--survey-deep); }
.bwq-band--pr .bwq-band__track > i{ background:var(--survey); }
.bwq-band--qu .bwq-band__track > i{ background:var(--horizon); }
.bwq-band--ca .bwq-band__track > i{ background:var(--horizon); opacity:.55; }
.bwq-band--rs .bwq-band__track > i{ background:var(--ledger); }
.bwq-band--rs .bwq-band__v{ color:var(--ledger); }
.bwq-band--qu .bwq-band__v{ color:var(--horizon); }
.bwq-stack__f{ display:flex; align-items:center; gap:10px; padding:10px 18px;
  background:var(--paper-sunk); border-top:1px solid var(--line); }
.bwq-stack__as{ font:400 var(--t-xs)/1.4 var(--font-ui); color:var(--muted); }

/* ---- the firewall band: discovered, held OUTSIDE the controlled total ---- */
.bwq-fw{ margin:10px 0 0; padding:14px 18px; border:1px dashed var(--fallow);
  border-radius:var(--radius); background:var(--fallow-tint); }
.bwq-fw.is-empty{ border-style:solid; border-color:var(--graticule); background:var(--white); padding:10px 18px; }
.bwq-fw__t{ font:600 var(--t-sm)/1.3 var(--font-ui); color:var(--fallow); }
.bwq-fw__b{ margin-top:3px; font:400 var(--t-sm)/1.5 var(--font-ui); color:var(--ink); }
.bwq-fw__n{ margin-top:6px; display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  font:400 var(--t-xs)/1.5 var(--font-ui); color:var(--muted); }

/* ---- the two-basis denominator disclosure -------------------------------- */
.bwq-basis{ margin:10px 0 0; border:1px solid var(--graticule); border-radius:var(--radius);
  background:var(--white); }
.bwq-basis > summary{ cursor:pointer; padding:12px 18px; font:500 var(--t-sm)/1.45 var(--font-ui);
  color:var(--ink); list-style:none; }
.bwq-basis > summary::-webkit-details-marker{ display:none; }
.bwq-basis > summary::before{ content:"+"; display:inline-block; width:14px; color:var(--survey); font-weight:600; }
.bwq-basis[open] > summary::before{ content:"-"; }
.bwq-basis__grid{ display:grid; grid-template-columns:1fr 150px 1fr; gap:0;
  border-top:1px solid var(--line); }
.bwq-basis__c, .bwq-basis__gap{ padding:14px 18px; }
.bwq-basis__gap{ background:var(--paper-sunk); border-left:1px solid var(--line); border-right:1px solid var(--line); text-align:center; }
.bwq-basis__k{ font:500 var(--t-xs)/1.3 var(--font-ui); color:var(--muted); }
.bwq-basis__v{ margin-top:4px; font:600 var(--t-md)/1.1 var(--font-mono); font-variant-numeric:var(--num); color:var(--ink); }
.bwq-basis__n{ margin-top:5px; font:400 var(--t-xs)/1.5 var(--font-ui); color:var(--faint); }
.bwq-basis__f{ margin:0; padding:12px 18px; border-top:1px solid var(--line);
  font:400 var(--t-xs)/1.6 var(--font-ui); color:var(--muted); }

/* ---- the five questions -------------------------------------------------- */
.bwq-sec{ margin-top:38px; }
.bwq-q{ margin-bottom:14px; }
.bwq-q__t{ margin:0; font:600 var(--t-lg)/1.14 var(--font-display); color:var(--ink);
  letter-spacing:-.012em; text-wrap:balance; }
.bwq-q__s{ margin:5px 0 0; font:400 var(--t-sm)/1.55 var(--font-ui); color:var(--muted); max-width:72ch; }
.bwq-fact{ margin:0; padding:14px 16px; border-left:2px solid var(--graticule);
  font:400 var(--t-sm)/1.6 var(--font-ui); color:var(--muted); background:var(--white); max-width:78ch; }
.bwq-note{ margin:10px 0 0; font:400 var(--t-xs)/1.6 var(--font-ui); color:var(--faint); max-width:82ch; }
.bwq-more{ margin:8px 0 0; font:400 var(--t-xs)/1.5 var(--font-ui); color:var(--faint); }

/* ---- depth chips + state pills (grammar, never colour alone) ------------- */
.bwq-chip{ display:inline-block; padding:1px 7px; border-radius:var(--radius-pill);
  font:500 11px/1.6 var(--font-ui); letter-spacing:.01em; white-space:nowrap; }
.bwq-chip--ob{ background:var(--ep-observed-bg); color:var(--ep-observed-fg); box-shadow:inset 0 0 0 1px var(--ep-observed-line); }
.bwq-chip--rc{ background:var(--ep-recon-bg); color:var(--ep-recon-fg); box-shadow:inset 0 0 0 1px var(--ep-recon-line); }
.bwq-chip--md{ background:var(--ep-modeled-bg); color:var(--ep-modeled-fg); box-shadow:inset 0 0 0 1px var(--ep-modeled-line); }
.bwq-chip--cf{ background:var(--ep-cf-bg); color:var(--ep-cf-fg); box-shadow:inset 0 0 0 1px var(--ep-cf-line); }
.bwq-chip--sm{ background:var(--ep-sim-bg); color:var(--ep-sim-fg); box-shadow:inset 0 0 0 1px var(--ep-sim-line); }
.bwq-chip--uk{ background:var(--ep-unknown-bg); color:var(--ep-unknown-fg); box-shadow:inset 0 0 0 1px var(--ep-unknown-line); }
.bwq-state{ display:inline-block; padding:1px 7px; border-radius:2px;
  font:600 11px/1.6 var(--font-ui); white-space:nowrap; }
.bwq-state--br{ background:var(--st-breach-bg); color:var(--st-breach-fg); }
.bwq-state--wn{ background:var(--st-warn-bg); color:var(--st-warn-fg); }
.bwq-state--ps{ background:var(--st-pass-bg); color:var(--st-pass-fg); }
.bwq-state--uk{ background:var(--ep-unknown-bg); color:var(--ep-unknown-fg); }
.bwq-tag{ display:inline-block; padding:1px 7px; border:1px solid var(--graticule); border-radius:2px;
  font:400 11px/1.6 var(--font-ui); color:var(--muted); background:var(--white); white-space:nowrap; }
.bwq-tag--open{ border-color:var(--horizon); color:var(--horizon); }
.bwq-tag--closing{ border-color:var(--fallow); color:var(--fallow); }

/* ---- THE WORK QUEUE: items, not cards ----------------------------------- */
.bwq-queue{ border:1px solid var(--graticule); border-radius:var(--radius);
  background:var(--white); overflow:hidden; }
.bwq-group{ border-bottom:1px solid var(--graticule); }
.bwq-group:last-child{ border-bottom:0; }
.bwq-item{ display:grid; grid-template-columns:150px 1fr 160px 70px; align-items:start; gap:16px;
  padding:14px 18px 14px 15px; border-bottom:1px solid var(--line); border-left:3px solid var(--graticule);
  text-align:left; width:100%; background:transparent; }
.bwq-group > .bwq-item:last-child{ border-bottom:0; }
.bwq-item.is-openable{ cursor:pointer; transition:background var(--dur-hover) var(--ease); }
.bwq-item.is-openable:hover, .bwq-item.is-openable:focus-visible{ background:var(--survey-tint); outline:none; }
.bwq-item--ledger{ border-left-color:var(--ledger); }
.bwq-item--fallow{ border-left-color:var(--fallow); }
.bwq-item--horizon{ border-left-color:var(--horizon); }
.bwq-item--survey{ border-left-color:var(--survey); }
.bwq-item__type{ font:500 var(--t-xs)/1.5 var(--font-ui); color:var(--muted); padding-top:2px; }
.bwq-item--ledger .bwq-item__type{ color:var(--ledger); }
.bwq-item--fallow .bwq-item__type{ color:var(--fallow); }
.bwq-item--horizon .bwq-item__type{ color:var(--horizon); }
.bwq-item--survey .bwq-item__type{ color:var(--survey); }
.bwq-item__h{ font:500 var(--t-base)/1.35 var(--font-ui); color:var(--ink); display:flex; gap:8px;
  align-items:baseline; flex-wrap:wrap; }
.bwq-item__w{ margin-top:3px; font:400 var(--t-sm)/1.55 var(--font-ui); color:var(--muted); max-width:64ch; }
.bwq-item__meta{ margin-top:7px; display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.bwq-item__num{ text-align:right; }
.bwq-item__fig{ font:600 var(--t-md)/1.05 var(--font-mono); font-variant-numeric:var(--num); color:var(--ledger); }
.bwq-item--horizon .bwq-item__fig{ color:var(--horizon); }
.bwq-item__figl, .bwq-item__fig2{ margin-top:2px; font:400 var(--t-xs)/1.4 var(--font-ui); color:var(--faint); }
.bwq-item__fig2{ color:var(--horizon); }
.bwq-item__go{ text-align:right; font:500 var(--t-sm)/1.4 var(--font-ui); color:var(--survey); padding-top:3px; }
.bwq-item__go.is-none{ color:transparent; }

/* ---- compact row list (since-strip, actor groups, discovered band) ------- */
.bwq-list{ border-top:1px solid var(--line); }
.bwq-row{ display:grid; grid-template-columns:92px minmax(0,1.1fr) minmax(0,1.6fr) 128px 60px;
  align-items:center; gap:14px; width:100%; text-align:left; padding:10px 18px; background:transparent;
  border:0; border-bottom:1px solid var(--line); cursor:pointer; font:inherit;
  transition:background var(--dur-hover) var(--ease); }
.bwq-row:last-child{ border-bottom:0; }
.bwq-row:hover, .bwq-row:focus-visible{ background:var(--survey-tint); outline:none; }
.bwq-row__n{ font:500 var(--t-sm)/1.4 var(--font-ui); color:var(--ink); overflow:hidden; text-overflow:ellipsis; }
.bwq-row__m{ font:400 var(--t-xs)/1.5 var(--font-ui); color:var(--muted); }
.bwq-row__k{ display:block; font-style:normal; color:var(--faint); }
.bwq-row__v{ text-align:right; font:500 var(--t-sm)/1.3 var(--font-mono); font-variant-numeric:var(--num); color:var(--ink); }
.bwq-row__go{ text-align:right; font:500 var(--t-xs)/1.4 var(--font-ui); color:var(--survey); }

/* ---- since-strip -------------------------------------------------------- */
.bwq-since{ border:1px solid var(--graticule); border-radius:var(--radius); background:var(--white); }
.bwq-since__tally{ display:flex; gap:18px; flex-wrap:wrap; padding:13px 18px; }
.bwq-since__t{ font:500 var(--t-sm)/1.4 var(--font-ui); color:var(--muted); }
.bwq-since__t--rs{ color:var(--ledger); }
.bwq-since__t--up{ color:var(--horizon); }
.bwq-since__t--fs{ color:var(--faint); }
.bwq-since .bwq-fact{ border-left:0; border-top:1px solid var(--line); }

/* ---- actor attribution -------------------------------------------------- */
.bwq-actors{ display:grid; gap:14px; }
.bwq-actor{ border:1px solid var(--graticule); border-radius:var(--radius); background:var(--white); }
.bwq-actor__h{ display:flex; justify-content:space-between; align-items:baseline; padding:12px 18px; }
.bwq-actor__who{ font:600 var(--t-base)/1.3 var(--font-display); color:var(--ink); }
.bwq-actor__n{ font:400 var(--t-xs)/1.4 var(--font-ui); color:var(--muted); }
.bwq-actor .bwq-more{ padding:0 18px 12px; }

/* ---- control calendar --------------------------------------------------- */
.bwq-cal{ margin-top:16px; }
.bwq-cal__t{ font:600 var(--t-base)/1.3 var(--font-display); color:var(--ink); margin-bottom:8px; }
.bwq-cal__r{ display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:1px;
  background:var(--graticule); border:1px solid var(--graticule); border-radius:var(--radius); overflow:hidden; }
.bwq-cal__c{ background:var(--white); padding:12px 14px; }
.bwq-cal__d{ font:400 var(--t-xs)/1.4 var(--font-ui); color:var(--muted); }
.bwq-cal__v{ margin-top:3px; font:600 var(--t-md)/1.05 var(--font-mono); font-variant-numeric:var(--num); color:var(--ink); }
.bwq-cal__v.is-none{ font:500 var(--t-sm)/1.5 var(--font-ui); color:var(--muted); }
.bwq-cal__n{ margin-top:2px; font:400 var(--t-xs)/1.4 var(--font-ui); color:var(--faint); }

/* ---- sub-blocks inside a question (peer, factors, transmission, stress) -- */
.bwq-sub{ margin-top:16px; border:1px solid var(--graticule); border-radius:var(--radius);
  background:var(--white); padding:16px 18px; }
.bwq-sub__t{ font:600 var(--t-base)/1.3 var(--font-display); color:var(--ink);
  display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.bwq-sub__s{ margin:6px 0 0; font:400 var(--t-sm)/1.6 var(--font-ui); color:var(--muted); max-width:78ch; }
.bwq-peer{ display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:1px;
  margin-top:12px; background:var(--graticule); border:1px solid var(--graticule); border-radius:4px; overflow:hidden; }
.bwq-peer__c{ background:var(--white); padding:12px 14px; }
.bwq-peer__k{ font:400 var(--t-xs)/1.4 var(--font-ui); color:var(--muted); }
.bwq-peer__v{ margin-top:4px; font:600 var(--t-sm)/1.35 var(--font-ui); color:var(--ink); }

.bwq-fac{ margin-top:12px; }
.bwq-fac__r{ display:grid; grid-template-columns:200px 1fr 150px 110px; align-items:center; gap:14px;
  padding:6px 0; border-bottom:1px solid var(--line); }
.bwq-fac__r:last-child{ border-bottom:0; }
.bwq-fac__k{ font:400 var(--t-sm)/1.4 var(--font-ui); color:var(--ink); }
.bwq-fac__b{ height:10px; background:var(--paper-sunk); border-radius:2px; overflow:hidden;
  box-shadow:inset 0 0 0 1px rgba(45,91,169,.07); }
.bwq-fac__b > i{ display:block; height:100%; background:var(--survey); }
.bwq-fac__b--up > i{ background:var(--horizon); }
.bwq-fac__n{ font:400 var(--t-xs)/1.4 var(--font-ui); color:var(--faint); }
.bwq-fac__v{ text-align:right; font:500 var(--t-sm)/1.3 var(--font-mono); font-variant-numeric:var(--num); color:var(--ink); }

.bwq-tx{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:1px; margin-top:12px;
  background:var(--graticule); border:1px solid var(--graticule); border-radius:4px; overflow:hidden; }
.bwq-tx__c{ background:var(--white); padding:12px 14px; }
.bwq-tx__v{ font:600 var(--t-md)/1.05 var(--font-mono); font-variant-numeric:var(--num); color:var(--ink); }
.bwq-tx__c--up .bwq-tx__v{ color:var(--horizon); }
.bwq-tx__c--dn .bwq-tx__v{ color:var(--ledger); }
.bwq-tx__k{ margin-top:3px; font:400 var(--t-xs)/1.4 var(--font-ui); color:var(--muted); }

.bwq-bnd{ margin:12px 0 0; padding-left:20px; }
.bwq-bnd li{ font:400 var(--t-sm)/1.7 var(--font-ui); color:var(--ink); }
.bwq-anal, .bwq-liq{ margin-top:14px; padding-top:12px; border-top:1px solid var(--line); }
.bwq-anal__t, .bwq-liq__t{ font:600 var(--t-sm)/1.3 var(--font-ui); color:var(--ink); }
.bwq-anal__p{ margin:6px 0 0; font:400 var(--t-sm)/1.6 var(--font-ui); color:var(--muted); max-width:80ch; }
.bwq-liq__r{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; margin-top:10px; }
.bwq-liq__v{ font:600 var(--t-md)/1.05 var(--font-mono); font-variant-numeric:var(--num); color:var(--ink); }
.bwq-liq__c--rs .bwq-liq__v{ color:var(--ledger); }
.bwq-liq__c--uk .bwq-liq__v{ color:var(--muted); }
.bwq-liq__k{ margin-top:3px; font:400 var(--t-xs)/1.5 var(--font-ui); color:var(--faint); }

/* ---- upside (co-equal with risk; never a padded positive) ---------------- */
.bwq-up{ display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:1px;
  background:var(--graticule); border:1px solid var(--graticule); border-radius:var(--radius); overflow:hidden; }
.bwq-up__c{ background:var(--white); padding:15px 18px; border-top:2px solid var(--horizon); }
.bwq-up__v{ font:600 var(--t-lg)/1.02 var(--font-mono); font-variant-numeric:var(--num); color:var(--horizon); }
.bwq-up__k{ margin-top:5px; font:400 var(--t-xs)/1.55 var(--font-ui); color:var(--muted); }

/* ---- what to open next -------------------------------------------------- */
.bwq-next{ border:1px solid var(--graticule); border-left:3px solid var(--survey);
  border-radius:var(--radius); background:var(--white); padding:16px 18px; }
.bwq-next__h{ font:600 var(--t-md)/1.2 var(--font-display); color:var(--ink); }
.bwq-next__p{ margin:7px 0 0; font:400 var(--t-sm)/1.6 var(--font-ui); color:var(--muted); max-width:80ch; }
.bwq-next__m{ margin-top:10px; display:flex; gap:7px; flex-wrap:wrap; align-items:center; }
.bwq-cta{ margin-top:14px; font:500 var(--t-sm)/1 var(--font-ui); color:var(--white);
  background:var(--survey); border:1px solid var(--survey-deep); border-radius:4px;
  padding:10px 16px; cursor:pointer; transition:background var(--dur-hover) var(--ease); }
.bwq-cta:hover{ background:var(--survey-deep); }
.bwq-reveal{ font:500 var(--t-sm)/1 var(--font-ui); color:var(--survey); background:var(--white);
  border:1px solid var(--survey); border-radius:4px; padding:9px 15px; cursor:pointer;
  transition:background var(--dur-hover) var(--ease); }
.bwq-reveal:hover{ background:var(--survey-tint); }
.bwq-reveal[disabled]{ color:var(--muted); border-color:var(--graticule); cursor:progress; }

/* ---- the explicit review mark -------------------------------------------
   A review is an ACT, so it gets a control, not a side effect of arriving. The note beside it says
   where the mark lives, because the answer ("your seat, every device") is the whole point of moving
   it off this browser's localStorage. */
.bwq-markrow{ margin-top:14px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.bwq-mark{ font:500 var(--t-sm)/1 var(--font-ui); color:var(--survey); background:var(--white);
  border:1px solid var(--survey); border-radius:4px; padding:9px 15px; cursor:pointer;
  transition:background var(--dur-hover) var(--ease); }
.bwq-mark:hover{ background:var(--survey-tint); }
.bwq-mark[disabled]{ color:var(--muted); border-color:var(--graticule); cursor:default; background:var(--white); }
.bwq-mark__n{ font:400 var(--t-xs)/1.5 var(--font-ui); color:var(--muted); }

/* ---- the full book ------------------------------------------------------ */
.bwq-sec--book{ border-top:1px solid var(--graticule); padding-top:30px; }
#bwq-book.is-hidden{ display:none; }
.bwq-tools{ display:flex; justify-content:space-between; align-items:center; gap:14px;
  flex-wrap:wrap; margin:16px 0 10px; }
.bwq-filters{ display:flex; gap:6px; flex-wrap:wrap; }
.bwq-f{ font:400 var(--t-xs)/1 var(--font-ui); color:var(--muted); background:var(--white);
  border:1px solid var(--graticule); border-radius:var(--radius-pill); padding:7px 13px; cursor:pointer; }
.bwq-f.on{ color:var(--survey-deep); border-color:var(--survey); background:var(--survey-tint); font-weight:500; }
.bwq-search{ font:400 var(--t-sm)/1 var(--font-ui); color:var(--ink); background:var(--white);
  border:1px solid var(--graticule); border-radius:4px; padding:9px 12px; min-width:280px; }
.bwq-search:focus{ outline:none; border-color:var(--survey); box-shadow:0 0 0 3px var(--survey-tint); }
.bwq-tablewrap{ border:1px solid var(--graticule); border-radius:var(--radius);
  background:var(--white); overflow:auto; max-height:72vh; }
.bwq-table{ width:100%; border-collapse:collapse; }
.bwq-table th{ position:sticky; top:0; z-index:1; background:var(--paper-sunk); text-align:left;
  font:500 var(--t-xs)/1.3 var(--font-ui); color:var(--muted); padding:10px 12px;
  border-bottom:1px solid var(--graticule); cursor:pointer; white-space:nowrap; }
.bwq-table th.num{ text-align:right; }
.bwq-table th.is-sorted{ color:var(--survey-deep); }
.bwq-dir{ font-style:normal; font-weight:400; color:var(--faint); margin-left:5px; }
.bwq-table td{ padding:9px 12px; border-bottom:1px solid var(--line);
  font:400 var(--t-sm)/1.4 var(--font-ui); color:var(--ink); vertical-align:top; }
.bwq-table td.num{ text-align:right; font-family:var(--font-mono); font-variant-numeric:var(--num); }
.bwq-table tr:last-child td{ border-bottom:0; }
.bwq-tr{ cursor:pointer; transition:background var(--dur-hover) var(--ease); }
.bwq-tr:hover{ background:var(--survey-tint); }
.bwq-td__n{ display:block; font-weight:500; }
.bwq-td__id{ display:block; font:400 11px/1.4 var(--font-mono); font-style:normal; color:var(--faint); }
.bwq-td--rs{ color:var(--ledger); }
.bwq-reconband{ margin-top:16px; border:1px dashed var(--fallow); border-radius:var(--radius);
  background:var(--white); }
.bwq-reconband__t{ padding:13px 18px 0; font:600 var(--t-base)/1.3 var(--font-display); color:var(--ink);
  display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.bwq-reconband__s{ margin:5px 0 12px; padding:0 18px; font:400 var(--t-xs)/1.6 var(--font-ui);
  color:var(--muted); max-width:86ch; }

/* ---- narrow ------------------------------------------------------------- */
@media (max-width:900px){
  .bwq-item{ grid-template-columns:1fr; gap:8px; }
  .bwq-item__num, .bwq-item__go{ text-align:left; }
  .bwq-row{ grid-template-columns:1fr; gap:4px; }
  .bwq-row__v, .bwq-row__go{ text-align:left; }
  .bwq-band{ grid-template-columns:1fr 110px; grid-template-areas:"l v" "t t" "n n"; }
  .bwq-basis__grid{ grid-template-columns:1fr; }
  .bwq-basis__gap{ border-left:0; border-right:0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
  .bwq-fac__r{ grid-template-columns:1fr 1fr; }
  .bwq-search{ min-width:0; width:100%; }
}

/* ---- reduced motion: the surface is already motion-light ---------------- */
@media (prefers-reduced-motion:reduce){
  .bwq *{ transition:none !important; animation:none !important; }
}
