/* Optic v2 components. Each block is one component; names match the JS module
   that renders it. Colours and sizes come from tokens.css only. */

/* ---------- shell: rail (groups only), top bar, phone tab bar ---------- */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(90deg, var(--c-plane-2) var(--rail), var(--c-line-2) var(--rail) calc(var(--rail) + 1px), transparent calc(var(--rail) + 1px)); }
.rail { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 22px 14px 18px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 20px; text-decoration: none; border: 1px solid transparent; border-radius: var(--r-pill); }
.brand svg { width: 28px; height: 28px; color: var(--c-ink); flex: none; }
.brand-word { font: 600 var(--t-sm)/1 var(--f-label); letter-spacing: .1em; }
.brand-word span { font-weight: 400; color: var(--c-ink-3); }
.rail-sec { font: 500 var(--t-sm)/1 var(--f-label); color: var(--c-ink-3); margin: 18px 12px 8px; }
.rail-nav, .rail-foot { display: flex; flex-direction: column; gap: 2px; }
.rail-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--c-line-2); }
.rail-row { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 42px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid transparent; background: none; text-decoration: none; text-align: left; cursor: pointer; font-weight: 500; font-size: var(--t-base); color: var(--c-ink-2); transition: background-color var(--d), border-color var(--d), color var(--d); }
.rail-row svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; flex: none; }
/* the gold outlined pill: sidebar only (house rule) */
.rail-row:hover, .brand:hover { border-color: var(--c-gold-light); background: var(--c-gold-wash); color: var(--c-ink); }
.rail-row[aria-current="page"] { color: var(--c-ink); background: var(--c-raised); font-weight: 600; box-shadow: 0 1px 0 var(--c-line); }
.rail-row[aria-current="page"] svg { stroke: var(--c-gold); }
.rail-row .legacy { margin-left: auto; font: 500 var(--t-xs)/1 var(--f-label); color: var(--c-ink-3); }

.stage { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--s-3); padding: 14px clamp(20px, 4vw, 56px); background: color-mix(in srgb, var(--c-plane) 90%, transparent); backdrop-filter: saturate(1.2) blur(12px); }
.topbar .brand-sm { display: none; width: 36px; height: 36px; flex: none; }
.topbar .brand-sm svg { width: 34px; height: 34px; color: var(--c-ink); }
.search-btn { flex: 0 1 520px; display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 12px 0 16px; border-radius: var(--r-ctl); border: 1px solid var(--c-line); background: var(--c-raised); color: var(--c-ink-3); cursor: text; text-align: left; font-size: var(--t-body); }
.search-btn:hover { border-color: var(--c-ink-3); }
.search-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; flex: none; }
.search-btn span { flex: 1; }
kbd { font: 500 var(--t-xs)/1 var(--f-sans); padding: 4px 7px; border-radius: var(--r-sm); border: 1px solid var(--c-line); color: var(--c-ink-3); }
.topbar .spacer { flex: 1; }
.account-btn { flex: none; white-space: nowrap; min-width: var(--tap); height: var(--tap); padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid var(--c-line); background: var(--c-raised); cursor: pointer; font-weight: 600; font-size: var(--t-base); }
.account-btn.avatar { padding: 0; width: var(--tap); background: var(--c-scene); color: var(--c-on-scene); border-color: var(--c-scene); font: 600 var(--t-sm)/1 var(--f-label); }
.tabbar { display: none; }

/* ---------- buttons and controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: var(--r-ctl); border: 1px solid var(--c-line); background: var(--c-raised); color: var(--c-ink); cursor: pointer; font-weight: 600; font-size: var(--t-base); text-decoration: none; white-space: nowrap; transition: background-color var(--d), border-color var(--d), transform var(--d-fast) var(--ease); }
.btn:hover { border-color: var(--c-ink-3); }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
/* gold, by the design standard, marks the current selection and a view's one most important action */
.btn-primary { background: var(--c-gold); border-color: var(--c-gold); color: var(--c-on-gold); }
.btn-primary:hover { border-color: var(--c-gold); opacity: .9; }
/* Milo inside a page: contextual and quiet, its line icon before the words; the top bar's Ask Milo is the one gold entry */
.btn-milo { border-color: var(--c-line); background: transparent; color: var(--c-ink-2); }
.btn-milo:hover { background: var(--c-sunk); border-color: var(--c-ink-3); color: var(--c-ink); }
.btn-milo .ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; flex: none; }
.topbar-milo { border-color: var(--c-gold-light); color: var(--c-ink); white-space: nowrap; flex: none; }
.topbar-milo:hover { background: var(--c-sunk); border-color: var(--c-gold-light); }
/* Milo switched off on this deployment (ui/milo.js checkAvailability): the buttons still open the drawer,
   which says why, but no longer look ready to answer */
html[data-milo="off"] .btn-milo, html[data-milo="off"] [data-v2-milo].btn { border-style: dashed; border-color: var(--c-line); color: var(--c-ink-2); }
html[data-milo="off"] .btn-milo::after, html[data-milo="off"] [data-v2-milo].btn::after { content: "Off"; margin-left: 2px; padding: 3px 6px; border-radius: var(--r-xs); background: var(--c-sunk); color: var(--c-ink-3); font: 600 var(--t-xs)/1 var(--f-label); }
/* Home's panel headers: thirteen "Off" tags on one screen was noise; the dashed outline and the description
   say it, and the top bar's launcher carries the tag */
html[data-milo="off"] [data-v2-milo].btn.ws-ask::after { content: none; }
.btn[aria-pressed="true"] { background: var(--c-active); border-color: var(--c-ink-3); color: var(--c-ink); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: var(--t-base); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--c-ink-2); font-weight: 500; }
.btn-quiet:hover { border-color: transparent; background: var(--c-sunk); color: var(--c-ink); }
.textlink { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0; border: 0; background: none; color: var(--c-ink); text-decoration: underline; text-decoration-color: var(--c-line); text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 600; font-size: var(--t-lg); cursor: pointer; text-decoration: none; }
.textlink:hover { text-decoration-color: currentColor; }
.textlink svg, .go svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.seg { display: inline-flex; flex-wrap: wrap; padding: 3px; border-radius: var(--r-ctl); background: var(--c-plane-2); border: 1px solid var(--c-line-2); }
.seg button { min-height: 40px; min-width: var(--tap); padding: 0 14px; border: 0; border-radius: var(--r-ctl-in); background: none; color: var(--c-ink-2); cursor: pointer; font: 500 var(--t-base)/1 var(--f-sans); }
.seg button:hover:not([aria-pressed="true"]) { color: var(--c-ink); }
.seg button[aria-pressed="true"] { background: var(--c-active); color: var(--c-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--c-line); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid var(--c-line); background: transparent; cursor: pointer; font: 500 var(--t-base)/1 var(--f-sans); color: var(--c-ink-2); }
.chip:hover { border-color: var(--c-ink-3); }
.chip[aria-pressed="true"] { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-plane); }
.chip[aria-pressed="true"] .tick, .chip[aria-pressed="true"] .up, .chip[aria-pressed="true"] .down { color: var(--c-plane); }
/* Touch sizes: on a phone or a touch screen every control a finger reaches is at least 44px (DESIGN-STANDARD, Controls) */
@media (pointer: coarse), (max-width: 860px) {
  .btn-sm, .chip, .seg button, .tabbar a, .tabbar button, select, .select select, .legal .textlink { min-height: var(--tap); }
  .seg { padding: 2px; }
  .topbar .brand-sm { width: var(--tap); height: var(--tap); display: grid; place-items: center; }
}
.field { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border-radius: var(--r-ctl); border: 1px solid var(--c-line); background: var(--c-raised); }
.field:focus-within { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.field input { flex: 1; min-width: 0; min-height: var(--tap); border: 0; outline: 0; background: none; font-size: var(--t-body); color: var(--c-ink); }
.field svg { width: 18px; height: 18px; fill: none; stroke: var(--c-ink-3); stroke-width: 1.7; flex: none; }
.pill { display: inline-flex; align-items: center; font: 500 var(--t-sm)/1 var(--f-label); padding: 6px 10px; border-radius: var(--r-pill); border: 1px solid var(--c-line); color: var(--c-ink-3); }

/* ---------- figure: the one number a section leads with ---------- */
.figure .t-label { margin-bottom: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.delta { display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline; margin-top: 14px; font-size: var(--t-xl); font-weight: 500; }
.delta .t-muted { font-weight: 400; }

/* ---------- charts ---------- */
.chart-slot { position: relative; min-height: 40px; }
.chart-wrap { position: relative; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 4px; border-radius: var(--r-xs); }
.chart:focus:not(:focus-visible) { outline: none; }   /* Chrome rings a clicked svg (:focus); the gold ring is for the keyboard */
.chart .line { fill: none; stroke: var(--c-chart-ink); stroke-width: 2; stroke-linejoin: round; }
/* a change of source: the dashed bridge is not a move, and the rule says where it happens */
.chart .line-gap { fill: none; stroke: var(--c-warn); stroke-width: 1.5; stroke-dasharray: 3 4; }
.chart .mark-rule { stroke: var(--c-warn); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .mark-t { fill: var(--c-warn); font: 600 var(--t-xs)/1 var(--f-label); paint-order: stroke; stroke: var(--c-raised); stroke-width: 3px; }
.chart .area { stroke: none; }
.chart .end { fill: var(--c-chart-ink); }
.chart .grid { stroke: var(--c-chart-grid); stroke-width: 1; }
.chart .ax { fill: var(--c-ink-3); font: 500 var(--t-chart)/1 var(--f-sans); font-variant-numeric: tabular-nums; }
.chart .ev-rule { stroke: var(--c-chart-grid); stroke-dasharray: 2 3; }
.chart .ev-hit { fill: transparent; }
.chart .ev-dot { fill: var(--c-plane); stroke: var(--c-gold-ink); stroke-width: 2; }
.chart .ev-mark { cursor: pointer; outline: none; }
.chart .ev-rule { pointer-events: none; }   /* the marker is its dot and label; its rule must not take a touch or a measure across the plot */
.chart .ev-mark:focus-visible .ev-dot { stroke: var(--c-focus); stroke-width: 3; }
.chart .ev-lab { fill: var(--c-gold-ink); font: 600 var(--t-chart)/1 var(--f-label); }
.chart .cone path { stroke: none; }
.chart .cone-edge { stroke: var(--c-cone-edge); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .cone-end { stroke: var(--c-cone-edge); stroke-width: 1.5; }
.chart .tag { font: 600 var(--t-chart)/1 var(--f-label); fill: var(--c-ink); paint-order: stroke; stroke: var(--c-halo); stroke-width: 4px; stroke-linejoin: round; font-variant-numeric: tabular-nums; }
.chart .tag.up { fill: var(--c-pos); } .chart .tag.down { fill: var(--c-neg); } .chart .tag-k { fill: var(--c-gold-ink); }
.chart .focus-ring { fill: none; stroke: var(--c-gold-ink); stroke-width: 1.5; opacity: .55; }
.chart .xh-v { stroke: var(--c-ink-3); stroke-width: 1; } .chart .xh-dot { fill: var(--c-chart-ink); stroke: var(--c-plane); stroke-width: 2; }
.chart-tip { position: absolute; top: 0; pointer-events: none; padding: 8px 10px; border-radius: var(--r-1); background: var(--c-tip-bg); color: var(--c-tip-ink); font: 500 var(--t-md)/1.35 var(--f-sans); white-space: nowrap; box-shadow: var(--sh-pop); }
.chart-tip span { opacity: .75; margin-left: 4px; }
/* wider than its chart (a measurement on a phone): the dates take a line of their own and the text wraps inside it */
.chart-tip.is-narrow { white-space: normal; width: max-content; max-width: 100%; } .chart-tip.is-narrow span { display: block; margin-left: 0; } .chart-tip em { display: block; font-style: normal; opacity: .85; }
.spark { display: block; width: 112px; height: 32px; }
.spark path { fill: none; stroke-width: 1.6; stroke-linejoin: round; }
.spark.up path { stroke: var(--c-pos); } .spark.down path { stroke: var(--c-neg); }
.meter { display: block; height: auto; max-width: 100%; overflow: visible; margin: 6px 0 2px; }
.meter .tk { stroke: var(--c-ink-3); } .meter .tk.major { stroke: var(--c-ink-2); }
.meter .fair { fill: var(--c-gold-wash); } .meter .edge { stroke: var(--c-gold); stroke-width: 1.5; }
.meter text { font: 500 var(--t-xs)/1 var(--f-label); fill: var(--c-ink-3); } .meter .px { fill: var(--c-ink); font-weight: 600; } .meter .mark { fill: var(--c-ink); }

/* ---------- market strip: one ruled row ---------- */
.mstrip { display: grid; grid-template-columns: repeat(var(--n, 8), minmax(0, 1fr)); margin-top: 28px; border-top: 1px solid var(--c-line); }
.mstrip > * { display: block; padding: 14px 16px 12px 0; min-width: 0; text-decoration: none; }
.mstrip .k { display: block; font: 500 var(--t-md)/1.2 var(--f-label); color: var(--c-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mstrip .v { display: block; font-weight: 600; font-size: var(--t-lg); margin-top: 4px; }
.mstrip .d { font-size: var(--t-md); font-weight: 500; }

/* ---------- scene: the one statement piece (Home only) ---------- */
.scene { position: relative; overflow: hidden; margin-top: 56px; border-radius: var(--r-4); background: var(--c-scene); color: var(--c-on-scene); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.scene .lens { position: relative; padding: 26px 12px 18px 22px; border-right: 1px solid rgba(244, 239, 229, .08); min-height: 320px; display: flex; flex-direction: column; }
.scene .lens-k { font: 500 var(--t-md)/1.3 var(--f-label); color: var(--c-on-scene-2); margin: 0 0 6px 4px; display: flex; flex-wrap: wrap; gap: 10px; }
.scene .lens-k b { color: var(--c-gold-light); font-weight: 500; white-space: nowrap; }
.scene .lens .chart-slot { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.scene .copy { padding: clamp(28px, 3.6vw, 48px); display: flex; flex-direction: column; justify-content: center; }
.scene .kicker { font: 500 var(--t-md)/1.25 var(--f-label); color: var(--c-gold-light); }
.scene .claim { font: 500 var(--t-xl)/1.45 var(--f-sans); margin-top: 18px; max-width: 40ch; color: var(--c-on-scene); text-wrap: pretty; }
.scene .big { font: var(--w-display) clamp(52px, 6.4vw, 96px)/0.92 var(--f-sans); letter-spacing: -0.045em; margin-top: 16px; text-shadow: 0 0 32px rgba(244, 239, 229, .12); }
.scene .big-cap { color: var(--c-on-scene-2); margin-top: 10px; font-size: var(--t-base); max-width: 42ch; line-height: 1.45; }
.scene .second { margin-top: 14px; color: var(--c-on-scene-2); font-size: var(--t-base); display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.scene .second b { color: var(--c-on-scene); font: 600 var(--t-lead)/1 var(--f-sans); }
.scene .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.scene .btn { background: transparent; color: var(--c-on-scene); border-color: rgba(244, 239, 229, .28); }
.scene .btn:hover { border-color: var(--c-on-scene); }
.scene .btn-light { background: var(--c-on-scene); color: var(--c-scene); border-color: var(--c-on-scene); }
.scene .btn-milo { border-color: var(--c-gold-light); }
.scene .src { grid-column: 1 / -1; padding: 14px clamp(22px, 3vw, 40px); border-top: 1px solid rgba(244, 239, 229, .1); font-size: var(--t-md); color: var(--c-on-scene-2); }

/* ---------- rows: positions and watchlists ---------- */
.rows { border-top: 1px solid var(--c-line); }
.row-head, .row { display: grid; grid-template-columns: var(--cols, minmax(180px, 1.5fr) 130px 150px 100px 120px 20px); gap: 20px; align-items: center; }
.row-head { padding: 10px 8px; font: 500 var(--t-md)/1.2 var(--f-label); color: var(--c-ink-3); border-bottom: 1px solid var(--c-line); }
.row-head .num, .row .num { text-align: right; }
.row { width: 100%; padding: 16px 8px; border: 0; border-bottom: 1px solid var(--c-line-2); background: none; text-align: left; cursor: pointer; transition: background-color var(--d), opacity var(--d); font-size: var(--t-lg); }
.row:hover { background: var(--c-plane-2); }
.row[aria-expanded="true"], .row[aria-current="true"] { background: var(--c-gold-wash); }
.row .who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.row .who small { font-size: var(--t-base); color: var(--c-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .num { font-weight: 600; }
.row .note { color: var(--c-ink-2); font-size: var(--t-base); min-width: 0; }
.row .chev, .ev-head .chev, details .chev { width: 16px; height: 16px; fill: none; stroke: var(--c-ink-3); stroke-width: 1.7; flex: none; transition: transform var(--d) var(--ease); }
.weight { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.wbar { width: 64px; height: 6px; border-radius: var(--r-xs); background: var(--c-sunk); position: relative; overflow: hidden; }
.wbar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--c-gold); border-radius: var(--r-xs); }
body.drawer-open .rows:has([aria-expanded="true"]) .row:not([aria-expanded="true"]) { opacity: .45; }

/* ---------- events: open in place ---------- */
.group-h { font: 500 var(--t-md)/1 var(--f-label); color: var(--c-ink-3); margin: 30px 0 10px; display: flex; gap: 10px; align-items: baseline; }
.group-h b { font: 600 22px/1 var(--f-sans); letter-spacing: -0.02em; color: var(--c-ink); }
.ev { border-bottom: 1px solid var(--c-line-2); }
.ev:first-of-type { border-top: 1px solid var(--c-line); }
.ev-head { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto 18px; gap: 16px; align-items: baseline; width: 100%; min-height: var(--tap); padding: 18px 8px; border: 0; background: none; text-align: left; cursor: pointer; }
.ev-head:hover { background: var(--c-plane-2); }
.ev-head .who { font: 600 var(--t-base)/1.3 var(--f-label); }
.ev-head .what { font-weight: 500; font-size: var(--t-lg); }
.ev-head .what small { display: block; margin-top: 4px; font-weight: 400; color: var(--c-ink-3); font-size: var(--t-base); }
.ev-head .ch { font-weight: 600; white-space: nowrap; }
.ev-head .chev { align-self: center; }
.ev-head[aria-expanded="true"] .chev { transform: rotate(90deg); }
.ev-body { padding: 0 8px 22px 108px; color: var(--c-ink-2); display: grid; gap: 12px; font-size: var(--t-lg); }
.ev-body p { max-width: 66ch; }
/* Out: the figure leads in ink, the agency's headline backs it, and what the
   report is drops a step to a muted line under them. */
.ev-head .ev-res { font-variant-numeric: tabular-nums; }
.ev-head .ev-res + .pill { margin-left: 10px; }
.ev-result { color: var(--c-ink); font-variant-numeric: tabular-nums; }
.ev-result.is-pending { color: var(--c-ink-2); }
.ev-src { color: var(--c-ink-2); }
.ev-body .ev-why { color: var(--c-ink-3); font-size: var(--t-base); }
/* A released report's deeper read: one row per figure, the label a step down. */
.ev-facts { display: grid; gap: 6px; margin: 0; max-width: 74ch; }
.ev-facts > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 12px; }
.ev-facts dt { font: 500 var(--t-sm)/1.5 var(--f-label); color: var(--c-ink-3); }
.ev-facts dd { margin: 0; color: var(--c-ink-2); font-size: var(--t-base); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .ev-facts > div { grid-template-columns: 1fr; gap: 0; } }
/* What the read lacks: in view, and quiet. The shared fold's gold summary is for a section's method. */
.ev-missing { color: var(--c-ink-3); font-size: var(--t-base); max-width: 74ch; }
.ev-missing > summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: flex-start; gap: 6px; padding: 10px 0; box-sizing: border-box; list-style: none; }
.ev-missing > summary::-webkit-details-marker { display: none; }
.ev-missing > summary .ic { flex: none; width: 16px; height: 16px; margin-top: 3px; transition: transform .15s; }
.ev-missing[open] > summary .ic { transform: rotate(90deg); }
.ev-missing > summary:hover { color: var(--c-ink-2); }
.ev-missing ul { display: grid; gap: 6px; margin: 0 0 4px 22px; padding: 0; list-style: none; }
.ev-missing b { font-weight: 500; color: var(--c-ink-2); }
@media (prefers-reduced-motion: reduce) { .ev-missing > summary .ic { transition: none; } }
.quiet { color: var(--c-ink-3); font-size: var(--t-base); padding: 16px 8px 0; }

/* ---------- questions: answer first ---------- */
.qs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--c-line); }
.qcard { display: flex; flex-direction: column; gap: 12px; padding: 22px 22px 20px 0; border-right: 1px solid var(--c-line-2); min-width: 0; }
.qcard + .qcard { padding-left: 22px; }
.qcard:last-child { border-right: 0; }
.qcard h3 { font: 600 var(--t-lg)/1.3 var(--f-sans); color: var(--c-ink-3); }
.q-answer { font: var(--w-display) 22px/1.22 var(--f-sans); letter-spacing: -0.015em; color: var(--c-ink); text-wrap: pretty; }
.q-fig { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.q-pill { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: var(--r-pill); border: 1.5px solid var(--c-gold-light); font: 600 var(--t-base)/1 var(--f-sans); }
.q-pill.up { border-color: color-mix(in srgb, var(--c-pos) 60%, transparent); color: var(--c-pos); }
.q-pill.down { border-color: color-mix(in srgb, var(--c-neg) 55%, transparent); color: var(--c-neg); }
.q-note { font-size: var(--t-base); color: var(--c-ink-3); }
.qcard .textlink { margin-top: auto; }

/* ---------- dossier ---------- */
.dhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding-top: 24px; }
.dhead .name { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; font: 400 var(--t-xl)/1.3 var(--f-sans); color: var(--c-ink-2); }
.dhead .dh-state { color: var(--c-ink-3); font-size: var(--t-base); }
.tabs { display: flex; gap: 6px; margin-top: 26px; border-bottom: 1px solid var(--c-line); overflow-x: auto; scrollbar-width: none; }
.tabs a { min-height: 46px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; text-decoration: none; color: var(--c-ink-3); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--c-ink); }
.tabs a[aria-current="page"] { color: var(--c-ink); border-bottom-color: var(--c-gold); }
.tabs .legacy-mark { font: 500 var(--t-xs)/1 var(--f-label); color: var(--c-ink-3); }
/* The phone's view selector (pages/tabs.js): under 640 px it replaces the row, which clipped its labels. */
.tabsel { display: none; }
@media (max-width: 640px) {
  .tabs:has(.tabsel) { border-bottom: 0; overflow: visible; }
  .tabs:has(.tabsel) > a { display: none; }
  .tabsel { display: flex; align-items: center; gap: 10px; position: relative; width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--c-line-2); border-radius: var(--r-md); background: var(--c-raised); }
  .tabsel:focus-within { outline: 2px solid var(--c-focus); outline-offset: 2px; }
  .tabsel-k { flex: none; font: 500 var(--t-xs)/1 var(--f-label); color: var(--c-ink-3); }
  .tabsel select { appearance: none; -webkit-appearance: none; flex: 1; min-width: 0; min-height: 46px; padding: 0 28px 0 0; border: 0; background: transparent; color: var(--c-ink); font: 600 var(--t-lg)/1.2 var(--f-sans); cursor: pointer; }
  .tabsel select:focus-visible { outline: 0; }
  .tabsel::after { content: ''; position: absolute; right: 18px; top: calc(50% - 6px); width: 7px; height: 7px; border-right: 2px solid var(--c-ink-2); border-bottom: 2px solid var(--c-ink-2); transform: rotate(45deg); pointer-events: none; }
}
.answers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--c-line); margin-top: 32px; }
.answer { display: block; padding: 0; text-align: left; border: 0; border-right: 1px solid var(--c-line-2); background: none; cursor: pointer; min-height: 220px; transition: background-color var(--d), opacity var(--d); }
.answer:last-child { border-right: 0; }
.answer:hover { background: var(--c-plane-2); }
.answer[aria-expanded="true"] { background: var(--c-gold-wash); }
.answer-in { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 22px 22px 18px; }
.answer:first-child .answer-in { padding-left: 0; }
.answer .q { font: 500 var(--t-base)/1.3 var(--f-label); color: var(--c-ink-3); }
.answer .a { font: var(--w-display) 26px/1.12 var(--f-sans); letter-spacing: -0.02em; }
.answer .because { color: var(--c-ink-2); font-size: var(--t-base); line-height: 1.5; }
.answer .go { margin-top: auto; color: var(--c-gold-ink); font-weight: 600; font-size: var(--t-base); display: inline-flex; align-items: center; gap: 6px; }
body.drawer-open .answers:has([aria-expanded="true"]) .answer:not([aria-expanded="true"]) { opacity: .45; }
.chip-tag { display: flex; width: max-content; align-items: center; min-height: 28px; padding: 0 10px; margin: 2px 0 8px; border-radius: var(--r-pill); border: 1px solid var(--c-line); font: 600 var(--t-md)/1 var(--f-label); color: var(--c-ink); }
.views { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--c-line); margin-top: 28px; }
.view { padding: 20px 24px 18px 0; display: grid; gap: 6px; }
.view + .view { padding-left: 24px; border-left: 1px solid var(--c-line-2); }
.view .n { font: 600 30px/1 var(--f-sans); letter-spacing: -0.03em; }
.view .n small { font-size: var(--t-md); color: var(--c-ink-3); font-weight: 500; letter-spacing: 0; }
.view p { color: var(--c-ink-2); font-size: var(--t-base); }
.reconcile { margin-top: 14px; padding: 16px 0 0; border-top: 1px solid var(--c-line-2); color: var(--c-ink-2); font-size: var(--t-lg); max-width: 78ch; }
.reconcile b { color: var(--c-ink); }
.more { border-top: 1px solid var(--c-line); margin-top: 18px; }
.more details { border-bottom: 1px solid var(--c-line-2); }
.more summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; cursor: pointer; font-weight: 600; padding: 0 6px; }
.more summary::-webkit-details-marker { display: none; }
.more summary small { color: var(--c-ink-3); font-weight: 400; margin-right: 10px; font-size: var(--t-base); }
.more details[open] summary .chev { transform: rotate(90deg); }
.more .inner { padding: 0 6px 22px; color: var(--c-ink-2); max-width: 82ch; }

/* ---------- key/value and tables ---------- */
.kv { display: grid; grid-template-columns: repeat(var(--kv, 4), minmax(0, 1fr)); gap: 0 24px; margin: 6px 0; }
.kv > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--c-line-2); min-width: 0; }
.kv dt { font: 500 var(--t-md)/1.25 var(--f-label); color: var(--c-ink-3); } .kv dd { margin: 0; font-weight: 600; font-size: var(--t-lg); color: var(--c-ink); }
.kv dd.note { font-weight: 400; font-size: var(--t-base); color: var(--c-ink-2); }
table.t { width: 100%; border-collapse: collapse; font-size: var(--t-base); }
table.t th { font: 500 var(--t-md)/1.2 var(--f-label); color: var(--c-ink-3); padding: 10px 8px; border-bottom: 1px solid var(--c-line); text-align: right; }
table.t td { padding: 12px 8px; border-bottom: 1px solid var(--c-line-2); text-align: right; }
table.t th:first-child, table.t td:first-child { text-align: left; }
/* by content (ui/align.js): figures right, words left, whatever the column's place */
table.t th.l, table.t td.l { text-align: left; } table.t th.n, table.t td.n { text-align: right; }
.tscroll { overflow-x: auto; position: relative; }   /* a visually hidden label in a far column (.sr is absolute) escaped the box and widened a phone's page by 335 px (market hours, 2026-10-19) */
/* A table wider than its box says so (investor audit, 2026-10-27): every wide table on a phone (Insiders, Analysts,
   Scan, Investing's factors) scrolled sideways with nothing to say it did, and read as cut off. The words are the
   ones Home's wide panels use; ui/align.js marks the box, and the line stays put while the table moves under it. */
.tscroll[data-wide]::before { content: "Scroll sideways for every column."; display: block; position: sticky; left: 0; margin-bottom: 6px; font: 500 var(--t-xs)/1.3 var(--f-label); color: var(--c-ink-3); }
@media (pointer: fine) and (min-width: 720px) { .tscroll[data-wide]::before { content: none; } }
/* On a phone a table's first column (the name) kept wrapping to a word a line; it keeps a readable width and the table scrolls inside its box. */
@media (max-width: 640px) { .tscroll .t:not(.contracts):not(.scen):not(.chw-table):not(.cmp-t) td:first-child, .tscroll .t:not(.contracts):not(.scen):not(.chw-table):not(.cmp-t) th:first-child { min-width: 9.5em; } }
ul.plain { margin: 0; padding-left: 18px; } ul.plain li { margin-bottom: 7px; }

/* ---------- drawer: one inspector for every object ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.drawer-scrim { position: absolute; inset: 0; background: var(--c-scrim); opacity: 0; transition: opacity var(--m-panel) var(--ease-out); pointer-events: none; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--c-raised); border-left: 1px solid var(--c-line); box-shadow: var(--sh-sheet); display: flex; flex-direction: column; transform: translateX(28px); opacity: 0; transition: transform var(--m-panel) var(--ease-drawer), opacity var(--m-panel) var(--ease-out); pointer-events: auto; }
.drawer:not(.is-open) .drawer-panel, .drawer:not(.is-open) .drawer-scrim { transition-duration: var(--m-exit); pointer-events: none; }   /* leaving is faster, and a leaving panel takes no clicks or taps */
.drawer.is-open .drawer-panel { transform: none; opacity: 1; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 16px 14px 28px; border-bottom: 1px solid var(--c-line-2); }
.drawer-kicker { font: 500 var(--t-md)/1 var(--f-label); color: var(--c-ink-3); margin: 6px 0 8px; }
.drawer-head h2 { font: var(--w-display) 26px/1.1 var(--f-sans); letter-spacing: -0.02em; outline: none; }
.drawer-body { padding: 18px 28px 48px; overflow-y: auto; flex: 1; display: grid; gap: 16px; align-content: start; font-size: var(--t-lg); }
.drawer-body h3 { font: 600 var(--t-lg)/1.3 var(--f-sans); margin-top: 6px; }
.drawer-body p { color: var(--c-ink-2); }
.drawer-body .kv { --kv: 2; }
.icon-btn { width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--c-ink-2); flex: none; }
.icon-btn:hover { background: var(--c-plane-2); color: var(--c-ink); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }

/* ---------- palette ---------- */
.palette { position: fixed; inset: 0; z-index: 80; }
.palette-scrim { position: absolute; inset: 0; background: var(--c-scrim); }
.palette-panel { position: relative; margin: 12vh auto 0; width: min(640px, calc(100vw - 32px)); background: var(--c-raised); border-radius: var(--r-xl); border: 1px solid var(--c-line); box-shadow: var(--sh-sheet); overflow: hidden; }
.palette-panel input { width: 100%; height: 60px; border: 0; border-bottom: 1px solid var(--c-line-2); background: none; padding: 0 22px; font: 500 var(--t-xl)/1 var(--f-sans); outline: none; }
.palette-list { padding: 8px; max-height: min(56vh, calc(var(--vvh, 100dvh) - 12vh - 84px)); overflow-y: auto; }   /* a tablet's keyboard too */
.palette-note { margin: 0; padding: 10px 20px; border-top: 1px solid var(--c-line-2); font-size: var(--t-md); color: var(--c-ink-2); }
.palette-item { display: grid; grid-template-columns: 26px minmax(0, auto) minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 0 12px; border: 0; border-radius: var(--r-md); background: none; text-align: left; cursor: pointer; font-size: var(--t-lg); color: var(--c-ink); }
.palette-item small { color: var(--c-ink-3); font-size: var(--t-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-lead { color: var(--c-ink-3); font-size: var(--t-xs); text-align: center; display: inline-grid; place-items: center; } .pal-lead svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; } .pal-main { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-tag { font: 500 var(--t-xs)/1 var(--f-label); color: var(--c-ink-3); border: 1px solid var(--c-line); border-radius: var(--r-xs); padding: 3px 6px; }
.palette-group { margin: 10px 12px 4px; font: 600 var(--t-sm)/1 var(--f-label); color: var(--c-ink-3); }
.palette-foot { display: flex; gap: 16px; margin: 0; padding: 8px 18px; border-top: 1px solid var(--c-line-2); font-size: var(--t-sm); color: var(--c-ink-3); }
.palette-foot kbd, .pal-tag { font-family: var(--f-label); } .palette-foot kbd { border: 1px solid var(--c-line); border-radius: var(--r-xs); padding: 1px 5px; margin-right: 3px; }
@media (max-width: 860px) { .palette-foot { display: none; } .palette-item { grid-template-columns: 22px minmax(0, 1fr) auto; } .palette-item small { grid-column: 2; grid-row: 2; padding-bottom: 6px; }
  /* a phone: the sheet sits at the top and its list ends above the keyboard */
  .palette-panel { margin: max(8px, env(safe-area-inset-top, 0px)) auto 0; width: calc(100vw - 16px); }
  .palette-list { max-height: calc(var(--vvh, 100dvh) - 60px - 24px - env(safe-area-inset-top, 0px)); overscroll-behavior: contain; } }
.palette-item:hover, .palette-item:focus-visible, .palette-item[aria-selected="true"] { background: var(--c-plane-2); }
.palette-item small { color: var(--c-ink-3); font-size: var(--t-md); }

/* ---------- Milo ---------- */
/* The 2026-10-20 redesign (owner's brief, from an approved sketch): a compact header with Milo beside his name;
   under it what Milo receives and Response settings, the five personas always on show, the conversation with most
   of the height and its own scroll, and the composer pinned at the foot. Optic's own type, surfaces and controls;
   gold only for the send control (the view's main action) and for focus. */
.drawer-panel.milo-panel { width: min(var(--milo-w, 560px), 100vw); }
.milo-panel .drawer-head { align-items: center; gap: 8px; padding: 10px 10px 10px 20px; }
.milo-panel .drawer-acts { display: flex; align-items: center; gap: 2px; }
.milo-panel .drawer-acts .icon-btn.is-on { background: var(--c-active); color: var(--c-ink); }
.milo-panel .drawer-acts .icon-btn:disabled, .milo-panel .drawer-acts .icon-btn[aria-disabled="true"] { opacity: .45; cursor: default; }
/* clip, not hidden: nothing (a scrollIntoView, a focused control) can scroll the header and controls out of place */
.milo-panel .drawer-body { display: flex; flex-direction: column; min-height: 0; overflow: hidden; overflow: clip; padding: 0; gap: 0; }
.milo { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.milo-chrome { flex: none; display: grid; }
/* what Milo receives, the data's freshness and the disclosure; Response settings at the right */
/* the context bar: what Milo receives and Response settings on one line, the data line across the whole width under
   them (it was squeezed into the space beside the button) */
.milo-ctx { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 12px; padding: 6px 16px 8px 20px; border-bottom: 1px solid var(--c-line-2); }
.milo-ctx-l { min-width: 0; display: contents; }
.milo-ctx-pick { grid-column: 1; grid-row: 1; justify-self: start; min-width: 0; max-width: calc(100% + 8px); margin-left: -8px; } .milo-ctx-pick > .milo-ctx-btn { margin-left: 0; }   /* the picker's own edge carries the -8px, so its name is never cut for it */ .milo-ctx > .milo-set-btn { grid-column: 2; grid-row: 1; } .milo-ctx-meta { grid-column: 1 / -1; grid-row: 2; }
.milo-ctx-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; max-width: 100%; padding: 0 8px; margin-left: -8px; border-radius: var(--r-ctl); cursor: pointer; list-style: none; font: 600 var(--t-md)/1.2 var(--f-label); color: var(--c-ink); }
.milo-ctx-btn::-webkit-details-marker { display: none; }
.milo-ctx-btn:hover, .milo-ctx-pick[open] > .milo-ctx-btn { background: var(--c-sunk); }
.milo-ctx-btn .ic { width: 14px; height: 14px; transform: rotate(90deg); color: var(--c-ink-3); }
.milo-ctx-now { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-body.milo-ctx-menu { min-width: 280px; max-width: min(360px, calc(100vw - 32px)); padding: 6px; display: grid; gap: 2px; }
.milo-ctx-opt { display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: var(--tap); padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--c-ink); text-align: left; cursor: pointer; font: inherit; }
.milo-ctx-opt:hover, .milo-ctx-opt:focus-visible { background: var(--c-sunk); outline: none; }
.milo-ctx-opt .ic, .milo-ctx-gap { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.milo-ctx-opt b { display: block; font-weight: 600; font-size: var(--t-md); line-height: 1.3; }
.milo-ctx-opt small { display: block; margin-top: 2px; font-size: var(--t-sm); line-height: 1.35; color: var(--c-ink-3); }
.milo-ctx-meta { margin: 0; font-size: var(--t-sm); line-height: 1.35; color: var(--c-ink-3); }
/* the Milo Context Bar (Handoff 6): "Researching", then the ticker and timeframe in ink and the rest of the line in
   ink-2, as the summary of the menu that changes it, with Remove beside it; one line, cut with an ellipsis */
.milo-rs { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 2px; min-width: 0; margin-left: -8px; }
/* beside the page (a docked panel is about 440 px) the bar needs the whole width to say more than the ticker: it takes
   the first line, and Response settings moves down beside the data line. A phone keeps one line for both, the bar
   collapsed to the ticker and timeframe, so nothing pushes the box further down there. */
@media (min-width: 861px) and (min-height: 521px) {
  .milo-ctx.has-rs > .milo-ctx-l > .milo-rs { grid-column: 1 / -1; }
  .milo-ctx.has-rs > .milo-set-btn { grid-row: 2; }
  .milo-ctx.has-rs > .milo-ctx-l > .milo-ctx-meta { grid-column: 1; }
}
.milo-rs-lab { flex: none; padding-left: 8px; font: 500 var(--t-xs)/1.2 var(--f-label); color: var(--c-ink-3); }
.milo-rs .milo-ctx-pick { margin-left: 0; max-width: 100%; min-width: 0; }
.milo-rs-btn { max-width: 100%; }
.milo-rs-now { min-width: 0; } .milo-rs-now b { font-weight: 600; color: var(--c-ink); }
.milo-rs-rest { font-weight: 500; color: var(--c-ink-2); }
.milo-rs-chg { flex: none; margin-left: 4px; font: 500 var(--t-sm)/1.2 var(--f-sans); color: var(--c-ink-3); }
.milo-rs-btn:hover .milo-rs-chg, .milo-rs-pick[open] .milo-rs-chg { color: var(--c-ink); }
.milo-narrow .milo-rs-chg { display: none; }   /* the chevron stays, and the summary is still named Change */
.milo-rs-x { width: 36px; height: 36px; } .milo-rs-x svg { width: 16px; height: 16px; }
.milo-rs-back { min-height: 36px; margin-left: 4px; font-size: var(--t-sm); font-weight: 500; text-decoration: underline; text-decoration-color: var(--c-line); text-underline-offset: 3px; color: var(--c-ink-2); white-space: nowrap; }
.milo-rs.is-general .milo-ctx-pick { margin-left: 0; }
.milo-rs-err { grid-column: 1 / -1; margin: 2px 0 0; font-size: var(--t-sm); line-height: 1.4; color: var(--c-ink-2); }
.menu-body.milo-ctx-menu { max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain; }
.milo-rs-detail { display: grid; gap: 6px; padding: 6px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--c-line-2); }
.milo-rs-detail .menu-help { margin: 0; }
.milo-rs-h { font-weight: 600; color: var(--c-ink-2); }
.milo-rs-dl { display: grid; gap: 4px; margin: 0; }
.milo-rs-dl > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 8px; font-size: var(--t-sm); line-height: 1.4; }
.milo-rs-dl dt { color: var(--c-ink-3); } .milo-rs-dl dd { margin: 0; color: var(--c-ink); overflow-wrap: anywhere; }
.milo-rs-focus { display: grid; gap: 2px; margin: 2px -10px 0; } .milo-rs-focus .t-label { margin: 4px 10px 2px; }
.milo .milo-about.milo-for[role="note"] { color: var(--c-ink-2); }
.milo-info-btn { position: relative; display: inline-grid; place-items: center; vertical-align: middle; width: 28px; height: 28px; margin: -6px 0 -4px 2px; border: 0; border-radius: 50%; background: none; color: var(--c-ink-3); cursor: pointer; }
.milo-info-btn::after { content: ""; position: absolute; inset: -8px; }   /* a 44 px target without stretching the line */
.milo-info-btn .ic { width: 15px; height: 15px; }
.milo-info-btn:hover, .milo-info-btn[aria-expanded="true"] { background: var(--c-sunk); color: var(--c-ink); }
.milo-set-btn { flex: none; gap: 8px; color: var(--c-ink-2); } .milo-set-btn .ic { width: 16px; height: 16px; }
.milo-set-btn[aria-expanded="true"] { background: var(--c-active); color: var(--c-ink); }
.milo-info { display: grid; gap: 6px; padding: 10px 20px 12px; border-bottom: 1px solid var(--c-line-2); font-size: var(--t-sm); line-height: 1.45; color: var(--c-ink-2); } .milo-info p { margin: 0; }
.milo-moved { margin: 0; padding: 8px 20px; border-bottom: 1px solid var(--c-line-2); background: var(--c-sunk); font-size: var(--t-sm); line-height: 1.45; color: var(--c-ink-2); }
/* Response settings: a popover under the context bar (a sheet on a phone) */
.milo-sheet-scrim { display: none; }
.milo-settings { position: absolute; z-index: 8; top: calc(100% - 2px); right: 16px; width: min(360px, calc(100% - 32px)); max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 10px; padding: 10px 16px 14px; background: var(--c-raised); border: 1px solid var(--c-line); border-radius: var(--r-lg); box-shadow: var(--sh-pop); }
.milo-set-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-right: -10px; }
.milo-set-head h3 { margin: 0; font: 600 var(--t-base)/1.3 var(--f-sans); outline: none; }
.milo-level { display: grid; gap: 6px; } .milo-level select { min-height: 40px; } .milo-level .t-label, .milo-hz .t-label { margin: 0; }
.milo-hz { display: grid; gap: 6px; justify-items: start; }
.milo-lens-blurb { margin: 0; font-size: var(--t-sm); line-height: 1.4; color: var(--c-ink-3); }
.milo-pp-foot { font-size: var(--t-sm); color: var(--c-ink-2); } .milo-pp-foot ul { margin: 2px 0 6px; } .milo-pp-foot li { margin: 2px 0; }
.milo-settings .asof { margin: 0; }
/* the personas, always on show: one track, the chosen one in the active fill with a check and heavier type */
/* the Optic Persona: its name and the menu of the five on one line; the menu spans the panel, so a persona's line
   about what it does is read in full */
.milo-persona { position: relative; display: flex; align-items: center; gap: 10px; padding: 4px 16px 4px 20px; border-bottom: 1px solid var(--c-line-2); }
.milo-persona.is-loading { min-height: 45px; }
.milo-pp-lab { margin: 0; flex: none; }
.milo-persona .milo-pp-pick { position: static; min-width: 0; } .milo-pp-btn { margin-left: 0; }
.menu-body.milo-pp-menu { left: 12px; right: 12px; top: calc(100% - 2px); min-width: 0; max-width: 440px; max-height: min(60vh, 460px); overflow-y: auto; overscroll-behavior: contain; padding: 6px; display: grid; gap: 2px; }
.milo-block { margin: 8px 20px; }
/* the conversation: most of the height, its own scroll */
.milo-log-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.milo-log { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: 18px; padding: 16px 20px 20px; }
.milo-latest { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--c-line); border-radius: var(--r-ctl); background: var(--c-raised); color: var(--c-ink); box-shadow: var(--sh-pop); cursor: pointer; font: 600 var(--t-sm)/1 var(--f-label); }
.milo-latest .ic { width: 15px; height: 15px; } .milo-latest[hidden] { display: none; }
.milo-history { display: grid; gap: 10px; }
.milo-hist-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; } .milo-hist-head h3 { margin: 0; font: 600 var(--t-base)/1.3 var(--f-sans); outline: none; }
.milo-history ul { margin: 0; padding-left: 0; border-top: 1px solid var(--c-line-2); } .milo-history li { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--c-line-2); }
.milo-history li.is-now { background: var(--c-sunk); }
.milo-hist-open { flex: 1; min-width: 0; display: grid; text-align: left; gap: 2px; padding: 8px 4px; min-height: var(--tap); border: 0; background: none; color: var(--c-ink); font: inherit; cursor: pointer; }
.milo-hist-open span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.milo-history .asof { margin: 0; }
/* answers on the panel's own surface; the reader's questions in a quiet block at the right */
.milo-msg { display: grid; gap: 6px; min-width: 0; }
.milo-who { margin: 0; font: 600 var(--t-sm)/1 var(--f-label); color: var(--c-ink-3); }
.milo-you { justify-items: end; }
.milo-you .milo-bubble { max-width: 85%; padding: 10px 14px; border: 1px solid var(--c-line-2); border-radius: var(--r-lg) var(--r-lg) var(--r-xs) var(--r-lg); background: var(--c-sunk); color: var(--c-ink); font-size: var(--t-base); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.milo-bot .milo-bubble { min-width: 0; font-size: var(--t-base); line-height: 1.6; color: var(--c-ink); overflow-wrap: anywhere; }
.milo-bubble p { margin: 0 0 10px; } .milo-bubble p:last-child { margin-bottom: 0; }
.milo-bubble .milo-li { display: block; padding-left: 14px; position: relative; } .milo-bubble .milo-li::before { content: ""; position: absolute; left: 3px; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--c-ink-3); }
.milo-bubble .milo-li + br { display: none; }   /* each item is its own line already; the line break after it left a gap */
.milo-bubble .milo-oli { padding-left: 22px; } .milo-bubble .milo-oli::before { content: none; } .milo-bubble .milo-n { position: absolute; left: 0; color: var(--c-ink-3); font-variant-numeric: tabular-nums; }
.milo-bubble .milo-h { display: block; margin: 6px 0 2px; font-size: var(--t-lg); }
.milo-bubble .milo-host { color: var(--c-ink-3); font-size: var(--t-sm); }   /* where a model-written link goes (SEC-05) */
.milo-bubble a { color: var(--c-ink); text-decoration: underline; text-underline-offset: 2px; }
.milo-bubble code { padding: 1px 4px; border-radius: var(--r-xs); background: var(--c-sunk); font-size: .92em; }
.milo-code { margin: 0 0 10px; padding: 10px; border-radius: var(--r-md); background: var(--c-sunk); overflow-x: auto; font-size: var(--t-sm); white-space: pre; }
.milo-tbl { margin: 2px 0 10px; overflow-x: auto; border: 1px solid var(--c-line-2); border-radius: var(--r-md); }
.milo-tbl table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.milo-tbl th, .milo-tbl td { padding: 6px 10px; border-bottom: 1px solid var(--c-line-2); text-align: left; white-space: nowrap; }
.milo-tbl th { background: var(--c-plane-2); color: var(--c-ink-2); font-weight: 600; } .milo-tbl tr:last-child td { border-bottom: 0; } .milo-tbl td.n { text-align: right; }
/* the answer still arriving: the finished paragraphs keep the gap under them, the arriving one follows it */
.milo-bubble .milo-settled p:last-child { margin-bottom: 10px; } .milo-status { margin: 4px 0 0; color: var(--c-ink-3); font-size: var(--t-md); }
.milo-src { display: inline-flex; align-items: center; min-height: 24px; padding: 0 7px; margin: 0 2px; border-radius: var(--r-xs); border: 1px solid var(--c-line); background: var(--c-raised); color: var(--c-ink-2); font: 500 var(--t-xs)/1 var(--f-label); text-decoration: none; vertical-align: 1px; cursor: pointer; }
.milo-src:hover { border-color: var(--c-ink-3); color: var(--c-ink); }
.milo-chart { margin: 8px 0; } .milo-chart-plot { min-height: 120px; }
.milo-act { border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 10px 12px; margin: 8px 0; background: var(--c-raised); } .milo-act p { margin: 0 0 6px; }
.milo-act-what { font-weight: 600; } .milo-act-sub { font-size: var(--t-md); color: var(--c-ink-3); } .milo-act-off { color: var(--c-ink-3); font-size: var(--t-md); }
.milo-act-result { font-size: var(--t-md); } .milo-act-result:empty { display: none; }
/* follow-ups the answer offers, as rows; sources and the answer's actions after it, quieter than the text */
.milo-ups { display: grid; margin-top: 2px; border-top: 1px solid var(--c-line-2); }
.milo-up { display: block; width: 100%; min-height: 40px; padding: 8px 2px; border: 0; border-bottom: 1px solid var(--c-line-2); background: none; color: var(--c-ink-2); font: 400 var(--t-sm)/1.4 var(--f-sans); text-align: left; cursor: pointer; }
.milo-up:hover { background: var(--c-sunk); color: var(--c-ink); }
.milo-foot { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 2px 12px; }
.milo-src-all { flex: 1 1 200px; min-width: 0; font-size: var(--t-sm); }
.milo-src-all > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; list-style: none; cursor: pointer; color: var(--c-ink-2); font-weight: 500; }
.milo-src-all > summary::-webkit-details-marker { display: none; }
.milo-src-all > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform var(--d); }
.milo-src-all[open] > summary::before { transform: rotate(45deg); }
.milo-src-all > summary:hover { color: var(--c-ink); }
.milo-src-body { display: grid; gap: 8px; padding: 2px 0 6px 14px; } .milo-src-body .t-label { margin: 0 0 2px; } .milo-src-body ul { margin: 0; } .milo-src-body small { font-size: inherit; }
.milo-sources { display: flex; flex-wrap: wrap; gap: 2px 12px; } .milo-sources .t-label { flex-basis: 100%; }
.milo-acts { display: flex; gap: 2px; margin-left: auto; }
.milo-act-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 8px; border: 0; border-radius: var(--r-ctl); background: none; color: var(--c-ink-2); cursor: pointer; font: 500 var(--t-sm)/1 var(--f-sans); }
.milo-act-btn .ic { width: 15px; height: 15px; } .milo-act-btn:hover { background: var(--c-sunk); color: var(--c-ink); }
.milo-note { margin: 0; font-size: var(--t-md); color: var(--c-ink-2); padding: 8px 10px; border-radius: var(--r-md); background: var(--c-sunk); }
.gen-note, .milo-gen { margin: 0; font-size: var(--t-sm); line-height: 1.4; color: var(--c-ink-3); }
/* "Explain it for X" sits in a text's meta line (ui/states.js reExplain), at that line's size, not a body link's */
.re-explain { font-size: inherit; min-height: 32px; }
@media (pointer: coarse), (max-width: 860px) { .re-explain { min-height: var(--tap); } }
/* the drawer's own paragraph colour (.drawer-body p) is not Milo's: an answer's text is ink, each note keeps its own */
.milo .milo-bubble p { color: inherit; }
.milo .milo-who, .milo .milo-about, .milo .milo-gen, .milo .milo-assumed, .milo .milo-lens-blurb, .milo .milo-ctx-meta, .milo .milo-attached, .milo .milo-allow { color: var(--c-ink-3); }
.milo .milo-ended { color: var(--c-warn); }
.milo .milo-hello-say, .milo .milo-moved, .milo .milo-note, .milo .milo-can-ask { color: var(--c-ink-2); }
.milo-ended { margin: 0; font-size: var(--t-md); color: var(--c-warn); } .milo-assumed { margin: 0; font-size: var(--t-md); color: var(--c-ink-3); }
/* Scout, Milo's mascot (components/scout.js and the sprites in /scout/, the classic app's own, made by
   optic-brand/scout/render_scout.py). The classic rules in v2's tokens: two layers per figure, ::after the pose
   (one row of poses, picked through --scout-x, which scout.js sets from the sheet it measured) and ::before the scarf's tail in the wind (12 frames,
   looped only while scout.js marks him is-windy: on screen, in a visible tab, motion set to Full). The box keeps
   its aspect ratio, so nothing moves when the sprite arrives. 2x and 3x sprites, chosen by the browser. */
.scout { --scout-x: 0%; display: block; flex: none; position: relative; aspect-ratio: 288 / 380; }
.scout::before, .scout::after { content: ""; position: absolute; inset: 0; background-repeat: no-repeat; background-position: 0 0; }
:root {
  /* How many frames the pose sheet holds, and the step between two of them. components/scout.js overrides
     both on <html> from the sheet the browser really loaded; these are what a page whose script has not run
     uses, and they must match FRAMES in optic-brand/scout/render_scout.py. */
  --scout-frames: 4300%;
  --scout-step: 2.3810%;
}
/* --scout-frames and --scout-step are set on <html> by components/scout.js from the sheet the browser really
   loaded. The count lives in four files that deploy separately and are each cached four hours with no version
   in the URL, so a stale one against a fresh one slices him wrong; the figures in here are only the fallback
   for a page where the script has not run. */
.scout::after { background-size: var(--scout-frames, 4300%) 100%; background-position-x: var(--scout-x);
  background-image: url("/scout/scout-full@2x.webp");
  background-image: -webkit-image-set(url("/scout/scout-full@2x.webp") 2x, url("/scout/scout-full@3x.webp") 3x);
  background-image: image-set(url("/scout/scout-full@2x.webp") 2x, url("/scout/scout-full@3x.webp") 3x); }
.scout::before { background-size: 1200% 100%;
  background-image: url("/scout/scout-full-tail@2x.webp");
  background-image: -webkit-image-set(url("/scout/scout-full-tail@2x.webp") 2x, url("/scout/scout-full-tail@3x.webp") 3x);
  background-image: image-set(url("/scout/scout-full-tail@2x.webp") 2x, url("/scout/scout-full-tail@3x.webp") 3x); }
/* The dip components/scout.js uses to change scene: out fast, back a little slower, so a laptop
   becoming a tablet is a transition and not a cut. Only ever applied at Full or Subtle motion. */
.scout::after { transition: opacity 165ms ease-out; }
.scout.is-swap::after { opacity: .18; transition-duration: 90ms; }   /* dipped, not blanked: an 88px hole in the header reads as a fault */
.scout.is-windy::before { animation: scout-wind 1200ms steps(12, jump-none) infinite; }
@keyframes scout-wind { from { background-position-x: 0%; } to { background-position-x: 100%; } }
.scout-compact { aspect-ratio: 144 / 156; }
.scout-compact::after {
  background-image: url("/scout/scout-compact@2x.webp");
  background-image: -webkit-image-set(url("/scout/scout-compact@2x.webp") 2x, url("/scout/scout-compact@3x.webp") 3x);
  background-image: image-set(url("/scout/scout-compact@2x.webp") 2x, url("/scout/scout-compact@3x.webp") 3x); }
.scout-compact::before {
  background-image: url("/scout/scout-compact-tail@2x.webp");
  background-image: -webkit-image-set(url("/scout/scout-compact-tail@2x.webp") 2x, url("/scout/scout-compact-tail@3x.webp") 3x);
  background-image: image-set(url("/scout/scout-compact-tail@2x.webp") 2x, url("/scout/scout-compact-tail@3x.webp") 3x); }
/* his head on the Ask Milo button, as on the classic one: the bust sprite clipped to a disc, blinking through the
   sprite's own lid frames twice in 11 s; still under reduced motion or with his motion set to Still */
.scout-badge { position: relative; display: block; flex: none; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; }
.scout-badge-fig { position: absolute; left: -1.8%; top: 7.8%; width: 126.4%; height: 136.9%; background-repeat: no-repeat; background-size: var(--scout-frames, 4300%) 100%; background-position: 0% 0;
  background-image: url("/scout/scout-compact@2x.webp");
  background-image: -webkit-image-set(url("/scout/scout-compact@2x.webp") 2x, url("/scout/scout-compact@3x.webp") 3x);
  background-image: image-set(url("/scout/scout-compact@2x.webp") 2x, url("/scout/scout-compact@3x.webp") 3x);
  animation: scout-badge-blink 11s step-end infinite; }
@keyframes scout-badge-blink {
  0% { background-position-x: 0%; } 36% { background-position-x: var(--scout-step, 2.3810%); } 36.32% { background-position-x: calc(var(--scout-step, 2.3810%) * 2); } 36.77% { background-position-x: var(--scout-step, 2.3810%); } 37.13% { background-position-x: 0%; }
  93% { background-position-x: var(--scout-step, 2.3810%); } 93.32% { background-position-x: calc(var(--scout-step, 2.3810%) * 2); } 93.77% { background-position-x: var(--scout-step, 2.3810%); } 94.13% { background-position-x: 0%; }
  95.22% { background-position-x: var(--scout-step, 2.3810%); } 95.54% { background-position-x: calc(var(--scout-step, 2.3810%) * 2); } 95.99% { background-position-x: var(--scout-step, 2.3810%); } 96.35% { background-position-x: 0%; } 100% { background-position-x: 0%; } }
:root[data-scout-motion="still"] .scout-badge-fig, :root[data-motion="reduce"] .scout-badge-fig { animation: none; }
@media (prefers-reduced-motion: reduce) { .scout-badge-fig { animation: none; } }
/* the welcome: the whole figure above the question, a button that opens his guide menu (no fill, no hover pill;
   a focus ring for the keyboard and a target well over 44 px); then the starters as plain rows */
.milo-opening { display: grid; justify-items: center; gap: 6px; padding: 4px 0; text-align: center; }
.milo-hello { position: relative; display: flex; justify-content: center; align-items: flex-start; gap: 10px; }
.milo .milo-hello-h { margin: 8px 0 0; font: 600 var(--t-2xl)/1.2 var(--f-sans); letter-spacing: -0.015em; text-wrap: balance; color: var(--c-ink); }
.milo-hello-say { margin: 0; font-size: var(--t-base); line-height: 1.45; color: var(--c-ink-2); text-wrap: balance; }
/* his hello: a speech bubble beside his head, its tail pointing left at him (owner, 2026-10-22) */
.milo .milo-hi { position: relative; flex: none; margin: 6px 0 0; padding: 8px 14px; border-radius: var(--r-lg); background: var(--c-sunk); color: var(--c-ink); font: 500 var(--t-lg)/1.35 var(--f-sans); white-space: nowrap; }
.milo-hi::before { content: ''; position: absolute; top: 50%; left: -5px; width: 10px; height: 10px; background: inherit; border-radius: 0 0 0 2px; transform: translateY(-50%) rotate(45deg); }
/* the guide menu opens under him, not under the row his bubble widened */
.milo-hello > .scout-menu { left: 44px; }
.scout-btn { flex: none; display: block; width: 88px; padding: 0; border: 0; border-radius: var(--r-md); background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.scout-btn .scout { width: 100%; }
.scout-btn:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.scout-menu { position: absolute; z-index: 5; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); min-width: 15rem; padding: 6px; display: grid; gap: 2px; background: var(--c-raised); border: 1px solid var(--c-line); border-radius: var(--r-md); box-shadow: var(--sh-pop); text-align: left; }
.scout-menu[hidden] { display: none; }
.scout-mi { display: flex; align-items: center; gap: 10px; min-height: var(--tap); width: 100%; padding: 6px 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--c-ink); font: 400 var(--t-base)/1.3 var(--f-sans); text-align: left; cursor: pointer; }
.scout-mi:hover, .scout-mi:focus-visible { background: var(--c-sunk); outline: none; }
.scout-mi[role="menuitemradio"]::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--c-ink-3); }
.scout-mi[aria-checked="true"]::before { border-color: var(--c-gold); background: var(--c-gold); }
.scout-menu-sep { height: 1px; margin: 4px 0; background: var(--c-line); }
.scout-menu-lab { margin: 0; padding: 4px 10px 0; font: 500 var(--t-sm)/1.3 var(--f-label); color: var(--c-ink-3); }
.milo-can-ask { margin: 4px 0 0; padding: 8px 12px; border-radius: var(--r-md); background: var(--c-sunk); color: var(--c-ink-2); text-align: left; }
.milo-starters { width: 100%; margin: 12px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--c-line-2); text-align: left; }
.milo-starters li { border-bottom: 1px solid var(--c-line-2); }
.milo-start { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: var(--tap); padding: 10px 4px; border: 0; background: none; color: var(--c-ink); font: 400 var(--t-base)/1.4 var(--f-sans); text-align: left; cursor: pointer; }
.milo-start .ic { width: 16px; height: 16px; color: var(--c-ink-3); }
.milo-start:hover { background: var(--c-sunk); } .milo-start:hover .ic { color: var(--c-ink); }
.milo-start:focus-visible { outline: 2px solid var(--c-focus); outline-offset: -2px; }
.milo-examples { width: 100%; margin-top: 8px; display: grid; gap: 6px; text-align: left; } .milo-examples .t-label { margin: 0; }
.milo-ex { display: block; width: 100%; min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--c-line); border-radius: var(--r-ctl); background: transparent; color: var(--c-ink-2); font: 400 var(--t-base)/1.4 var(--f-sans); text-align: left; cursor: pointer; }
.milo-ex:hover { border-color: var(--c-ink-3); color: var(--c-ink); }
@media (max-width: 640px) { .scout-btn { width: 76px; } }
/* where the conversation is short (a phone, a small window) the menu opens in the flow under him, so the log's
   scrolling can bring all of it into view; laid over the log, it was cut off at the log's edge */
@media (max-width: 640px), (max-height: 760px) { .milo-hello { flex-wrap: wrap; } .scout-menu { position: static; order: 3; flex-basis: 100%; min-width: 0; box-shadow: none; transform: none; } }
/* the composer, pinned: a field that grows to a limit, with its send control inside it */
.milo-form { flex: none; display: grid; gap: 6px; padding: 10px 16px 12px; border-top: 1px solid var(--c-line-2); background: var(--c-raised); }
.milo-compose { display: flex; align-items: flex-end; gap: 8px; padding: 5px 5px 5px 14px; border: 1px solid var(--c-line); border-radius: var(--r-lg); background: var(--c-sunk); }
.milo-compose:focus-within { border-color: var(--c-ink-3); box-shadow: 0 0 0 1px var(--c-ink-3); }
.milo-compose textarea { flex: 1; min-width: 0; min-height: 34px; max-height: 160px; padding: 7px 0; border: 0; background: none; color: var(--c-ink); resize: none; overflow-y: hidden; font: 400 var(--t-base)/1.45 var(--f-sans); outline: none; }
.milo-compose textarea::placeholder { color: var(--c-ink-3); }
.milo-send, .milo-stop { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-ctl); cursor: pointer; }
.milo-send { border: 0; background: var(--c-gold); color: var(--c-on-gold); }
.milo-send:hover:not(:disabled) { opacity: .9; } .milo-send:disabled { opacity: .4; cursor: default; }
.milo-compose:has(textarea:placeholder-shown) .milo-send:not(:disabled) { opacity: .55; }   /* nothing to send yet */
.milo-stop { border: 1px solid var(--c-line); background: var(--c-raised); color: var(--c-ink); }
.milo-send .ic { width: 18px; height: 18px; stroke-width: 2.2; } .milo-stop .ic { width: 14px; height: 14px; fill: currentColor; }
.milo-send:focus-visible, .milo-stop:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.milo-send[hidden], .milo-stop[hidden] { display: none; }
.milo-form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; min-height: 18px; }
.milo-attached { display: inline-flex; align-items: center; gap: 6px; min-width: 0; margin: 0; font-size: var(--t-sm); color: var(--c-ink-3); }
.milo-attached .ic { width: 14px; height: 14px; }
.milo-attached span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.milo-allow { margin: 0; font-size: var(--t-sm); color: var(--c-ink-3); }
.milo-limit { margin: 4px 0 0; font-size: var(--t-sm); color: var(--c-ink-2); }
.milo-form[data-state="sending"] .milo-allow, .milo-form[data-state="streaming"] .milo-allow { color: var(--c-ink-2); }
@media (pointer: coarse) {
  .milo-send, .milo-stop { width: var(--tap); height: var(--tap); }
  .milo-act-btn, .milo-ctx-btn, .milo-up, .milo-src-all > summary, .milo-latest, .milo-pp-opt { min-height: var(--tap); }
  .milo-rs-x { width: var(--tap); height: var(--tap); } .milo-rs-back { min-height: var(--tap); }
  .milo-compose textarea { min-height: var(--tap); padding: 11px 0; }
}
/* a phone: the whole screen, inside its safe areas, the composer above the keyboard (the panel is the part of the
   screen the keyboard leaves); Response settings rise as a sheet; the personas in two rows of full-size targets */
@media (max-width: 860px) {
  .drawer-panel.milo-panel { top: var(--vvt, 0px); bottom: auto; left: 0; width: 100%; height: var(--vvh, 100dvh); max-height: var(--vvh, 100dvh); border-radius: 0; padding-top: env(safe-area-inset-top, 0px);
    /* opaque from the first frame and rising 16 px, not a fade: a fade showed its text over the page's for two or three
       frames (motion check, 2026-10-24); .drawer.is-open puts it in place */
    transform: translateY(16px); opacity: 1; }
  .milo-panel .drawer-head { padding: 6px max(6px, env(safe-area-inset-right, 0px)) 6px max(16px, env(safe-area-inset-left, 0px)); }
  .milo-ctx, .milo-persona, .milo-info, .milo-moved, .milo-log { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .milo-ctx { padding-right: max(8px, env(safe-area-inset-right, 0px)); }
  .milo-form { padding: 8px max(12px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
  .milo-compose textarea { font-size: var(--t-lg); }   /* 16 px: iOS zooms into a smaller field on focus */
  .milo-lens-blurb { display: none; }   /* as the classic panel does on a phone: the controls stay, the lines go */
  .milo-settings .milo-lens-blurb { display: block; }
  .milo-set-btn { width: var(--tap); min-width: var(--tap); min-height: var(--tap); padding: 0; justify-content: center; }
  .milo-set-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .milo-rs-rest, .milo-rs-chg { display: none; }   /* AAPL · Daily, and the chevron that opens the rest */
  .menu-body.milo-ctx-menu { max-height: calc(var(--vvh, 100dvh) - 160px); }
  .menu-body.milo-pp-menu { top: auto; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); max-width: none; max-height: calc(var(--vvh, 100dvh) - 160px); }   /* low on the screen, as the context menu is */
  .milo-sheet-scrim { display: block; position: fixed; inset: 0; z-index: 7; background: var(--c-scrim); }
  .milo-settings { position: fixed; z-index: 8; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 78%; padding: 12px max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); border-radius: var(--r-xl) var(--r-xl) 0 0; border-width: 1px 0 0; box-shadow: var(--sh-sheet); }
  .milo-settings .seg button { min-height: var(--tap); }
}
/* a short screen (a phone on its side): the conversation keeps its room; the personas stay, in one row */
@media (max-height: 520px) {
  .milo-ctx-meta > span { display: none; }
  /* the info button beside the picker, the data line's words hidden */
  .milo-ctx { grid-template-columns: auto minmax(0, 1fr) auto; padding-top: 2px; padding-bottom: 2px; } .milo-ctx-pick { max-width: 70vw; } .milo-ctx-meta { grid-column: 2; grid-row: 1; } .milo-ctx > .milo-set-btn { grid-column: 3; }
  .milo-panel .drawer-head { padding-top: 2px; padding-bottom: 2px; } .milo-form-foot { display: none; }   /* what is attached is named in the context bar too */
  .milo-persona { padding-top: 0; padding-bottom: 0; } .menu-body.milo-pp-menu { max-height: 70vh; }
  .milo-lens-blurb { display: none; }
  .scout-btn { width: 52px; } .milo-hello-h { margin-top: 2px; font-size: var(--t-xl); } .milo .milo-hi { margin-top: 2px; padding: 4px 12px; font-size: var(--t-base); }
  .milo-log { gap: 12px; padding-top: 10px; padding-bottom: 12px; }
}
/* a small phone upright (an iPhone SE's Safari is 375 x 549): the conversation had 36 px after an answer, one line.
   The subtitle and the attached line go (the context bar names what is attached), the example question waits for a
   taller screen and the persona row loses its padding; the data line and every control stay (post-demo Phase 07) */
@media (max-width: 860px) and (max-height: 600px) {
  .milo-form-foot, .milo-suggest-slot { display: none; }
  .milo-persona { padding-top: 0; padding-bottom: 0; }
}

/* ---------- states: loading, empty, stale, error ---------- */
.sk { position: relative; overflow: hidden; background: var(--c-plane-2); border-radius: var(--r-md); }
.sk::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c-raised) 70%, transparent), transparent); transform: translateX(-100%); animation: sk 1.1s infinite; }
@keyframes sk { to { transform: translateX(100%); } }

/* ---------- the shared activity line (ui/motion.js): thin, gold, only while there is real work ---------- */
/* the page's: under the top bar while a section still shows its skeleton, shown after 220 ms so a fast load never flashes */
.page-line { position: fixed; top: 0; left: 0; right: 0; z-index: 45; height: 2px; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity var(--m-exit) ease-out; }
.page-line.is-on { opacity: 1; transition-duration: var(--m-content); }
/* Milo's, inside an answer from Send until it is complete, stopped or failed */
.activity { display: block; position: relative; height: 2px; margin: 10px 0 2px; overflow: hidden; border-radius: 2px; background: var(--c-line-2); }
.page-line::before, .activity::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 32%; background: var(--c-gold); transform: translateX(-100%); }
.page-line.is-on::before, .activity::before { animation: activity-glide 1.15s linear infinite; }
@keyframes activity-glide { to { transform: translateX(320%); } }
/* still, not gone: with reduced motion the line stands at full width and says the same thing */
@media (prefers-reduced-motion: reduce) {
  .page-line::before, .activity::before { animation: none !important; transform: none; width: 100%; opacity: .55; }
}
:root[data-motion="reduce"] .page-line::before, :root[data-motion="reduce"] .activity::before { animation: none !important; transform: none; width: 100%; opacity: .55; }

/* ---------- the Dossier tab bar moving to the new tab (ui/motion.js tabsAfter) ---------- */
.tabs { position: relative; }
/* the question just sent: one short entrance (ui/milo.js marks it for a single paint) */
.milo-sofar { margin: 6px 0 0; font-size: var(--t-sm); color: var(--c-ink-3); }

.milo-you.is-new { animation: milo-sent var(--m-content) var(--ease-out); }
@keyframes milo-sent { from { opacity: 0; transform: translateY(4px); } }
.tab-ink { position: absolute; bottom: -1px; height: 2px; background: var(--c-gold); transform-origin: left center; pointer-events: none; }
.tabs.is-moving a[aria-current="page"] { border-bottom-color: transparent; }

/* ---------- a control's own feedback: immediate, small ---------- */
.seg button, .chip { transition: transform var(--m-press) var(--ease-out); }
.seg button:active:not(:disabled), .chip:active:not(:disabled) { transform: scale(.98); }
.sk-line { height: 14px; margin: 8px 0; } .sk-chart { min-height: 220px; } .sk-row { height: 56px; margin-bottom: 2px; border-radius: 0; }
.state { padding: 22px 24px; border: 1px dashed var(--c-line); border-radius: var(--r-3); display: grid; gap: 8px; justify-items: start; background: color-mix(in srgb, var(--c-raised) 60%, transparent); }
.state p { color: var(--c-ink-2); max-width: 62ch; }
.state .t-h3 { color: var(--c-ink); }
.state.err { border-style: solid; border-color: color-mix(in srgb, var(--c-neg) 40%, var(--c-line)); }
.state.err .t-h3::before { content: "!"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 8px; border-radius: 50%; background: var(--c-neg); color: #fff; font: 600 var(--t-sm)/1 var(--f-sans); vertical-align: 1px; }
/* inline flow, so a note with bold or links inside reads as one sentence */
.stale { position: relative; display: block; padding: 10px 14px 10px 32px; border-radius: var(--r-2); background: color-mix(in srgb, var(--c-warn) 12%, transparent); color: var(--c-ink); font-size: var(--t-base); }
.stale::before { content: ""; position: absolute; left: 14px; top: calc(10px + 0.75em - 4px); width: 8px; height: 8px; border-radius: 50%; background: var(--c-warn); }
.asof { font-size: var(--t-md); color: var(--c-ink-3); }
/* A price's delay label (core/delays.js), beside the price it describes and kept on every screen size: small, legible,
   in tabular figures. A stale price says "Stale" in words; the colour only repeats it. */
.qlabel { font-variant-numeric: tabular-nums; }
.qlabel.is-stale { color: var(--c-warn); font-weight: 500; }
.qrow { display: block; font-size: var(--t-xs); color: var(--c-ink-3); white-space: normal; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 8px); background: var(--c-scene); color: var(--c-on-scene); padding: 12px 18px; border-radius: var(--r-pill); font-size: var(--t-base); opacity: 0; pointer-events: none; transition: opacity var(--d), transform var(--d) var(--ease); z-index: 90; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- onboarding ---------- */
.welcome { position: relative; overflow: hidden; margin-top: 18px; border-radius: var(--r-xl); background: var(--c-scene); color: var(--c-on-scene); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 480px; }
.welcome .copy { position: relative; z-index: 2; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.welcome .kicker { font: 500 var(--t-md)/1 var(--f-label); color: var(--c-gold-light); }
.welcome h1 { font: var(--w-display) clamp(40px, 4.4vw, 64px)/1.02 var(--f-sans); letter-spacing: var(--track-display); text-wrap: balance; }
.welcome p { color: var(--c-on-scene-2); font-size: var(--t-xl); max-width: 42ch; }
.welcome form { display: flex; gap: 10px; max-width: 520px; flex-wrap: wrap; }
.welcome .field { flex: 1 1 260px; background: rgba(244, 239, 229, .08); border-color: rgba(244, 239, 229, .22); }
.welcome .field input { color: var(--c-on-scene); }
.welcome .field input::placeholder { color: var(--c-on-scene-2); }
.welcome .field svg { stroke: var(--c-on-scene-2); }
.welcome .btn-light { background: var(--c-on-scene); color: var(--c-scene); border-color: var(--c-on-scene); min-height: 48px; }
.welcome :focus-visible { outline-color: var(--c-gold-light); }
.welcome .art { position: relative; margin: 0; min-height: 320px; }
.welcome .art svg { position: absolute; inset: 4% 2%; width: 96%; height: 92%; }
.art-cap { position: absolute; right: clamp(16px, 3vw, 36px); bottom: clamp(16px, 3vw, 30px); z-index: 2; display: flex; gap: 10px; align-items: baseline; font: 500 var(--t-md)/1.2 var(--f-label); color: var(--c-on-scene-2); }
.art-cap span { color: var(--c-gold-light); } .art-cap b { color: var(--c-on-scene); font: 600 var(--t-xl)/1 var(--f-sans); }
.starters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--c-line); }
.starter { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 16px 0; border: 0; border-right: 1px solid var(--c-line-2); background: none; text-align: left; cursor: pointer; min-width: 0; }
.starter + .starter { padding-left: 18px; }
.starter:last-child { border-right: 0; }
.starter:hover { background: var(--c-plane-2); }
.starter .st-top { display: flex; justify-content: space-between; align-items: baseline; }
.starter .spark { width: 100%; height: 44px; }
.starter .follow { font-weight: 600; font-size: var(--t-base); color: var(--c-gold-ink); }
.starter[aria-pressed="true"] .follow { color: var(--c-pos); }
.paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--c-line); }
.path { padding: 20px 22px 18px 0; border-right: 1px solid var(--c-line-2); display: flex; flex-direction: column; gap: 8px; }
.path + .path { padding-left: 22px; } .path:last-child { border-right: 0; }
.path p { color: var(--c-ink-2); font-size: var(--t-base); }
.modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mode { display: flex; flex-direction: column; gap: 4px; padding: 16px; text-align: left; border-radius: var(--r-3); border: 1px solid var(--c-line); background: transparent; cursor: pointer; min-height: 88px; }
.mode b { font-weight: 600; } .mode span { font-size: var(--t-base); color: var(--c-ink-3); }
.mode[aria-checked="true"] { border-color: var(--c-gold-light); background: var(--c-gold-wash); }
.flag { display: inline-block; font: 500 var(--t-sm)/1.3 var(--f-label); color: var(--c-ink-2); border: 1px solid var(--c-line); border-radius: var(--r-sm); padding: 2px 6px; }

/* ---------- sign-in ---------- */
.signin { max-width: 460px; margin: 64px auto 0; display: grid; gap: 16px; }
.signin .field { border-radius: var(--r-2); }
.form-error { color: var(--c-neg); font-size: var(--t-base); }

/* ---------- phone ---------- */
@media (max-width: 1100px) {
  .mstrip { --n: 4; }
  .row-head, .row { --cols: minmax(150px, 1.4fr) 110px 120px 90px 20px; }
  .row .spark-cell, .row-head .spark-cell { display: none; }
  .qs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .qcard:nth-child(2) { border-right: 0; } .qcard:nth-child(3) { padding-left: 0; } .qcard:nth-child(n+3) { border-top: 1px solid var(--c-line-2); }
  .answers { grid-template-columns: 1fr 1fr; } .answer:nth-child(2) { border-right: 0; } .answer:nth-child(3) .answer-in { padding-left: 0; } .answer:nth-child(n+3) { border-top: 1px solid var(--c-line-2); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .rail { display: none; }
  .topbar { padding: 10px 16px; gap: 8px; }
  .topbar .brand-sm { display: grid; place-items: center; }
  .search-btn { flex: 1; } .search-btn kbd { display: none; }
  .mstrip { display: flex; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .mstrip > * { flex: 0 0 auto; min-width: 112px; padding-right: 18px; }
  .scene { grid-template-columns: 1fr; border-radius: var(--r-xl); }
  .scene .lens { border-right: 0; border-bottom: 1px solid rgba(244, 239, 229, .08); min-height: 220px; padding: 18px 6px 10px 14px; }
  .row-head { display: none; }
  .row { --cols: minmax(0, 1fr) auto 18px; gap: 4px 12px; padding: 16px 4px; }
  .row .c2 { grid-column: 2; grid-row: 1; }
  .row .c3 { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; font-weight: 500; color: var(--c-ink-3); font-size: var(--t-base); }
  .row .c4 { grid-column: 2; grid-row: 2; font-size: var(--t-base); }
  .row .chev { grid-column: 3; grid-row: 1; }
  .ev-head { grid-template-columns: 62px minmax(0, 1fr) auto 16px; padding: 16px 4px; }
  .ev-body { padding: 0 4px 20px; }
  .qs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; border-top: 0; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
  .qcard, .qcard + .qcard { flex: 0 0 82%; scroll-snap-align: start; padding: 18px; border: 1px solid var(--c-line); border-radius: var(--r-xl); }
  .qcard:last-child { border-right: 1px solid var(--c-line); }
  .answers { grid-template-columns: 1fr; }
  .answer, .answer:nth-child(n) { border-right: 0; border-top: 1px solid var(--c-line-2); min-height: 0; }
  .answer:first-child { border-top: 0; }
  .answer-in, .answer:first-child .answer-in, .answer:nth-child(3) .answer-in { padding: 18px 2px; }
  .views { grid-template-columns: 1fr; } .view + .view { padding-left: 0; border-left: 0; border-top: 1px solid var(--c-line-2); }
  .kv { --kv: 2 !important; }   /* beats a page's inline --kv (instrument tiles at Large text were 43px wide) */
  /* compact company header on phones: name, price and change on two lines */
  .dhead { padding-top: 12px; gap: 12px; }
  .dhead .t-display { font-size: 40px; }
  .dhead .acts { width: 100%; flex-wrap: nowrap; justify-content: stretch; }
  .dhead .acts > .btn { flex: 1 1 0; min-width: 0; } .dhead .acts > .acts-milo { flex-grow: 1.4; }
  .dhead .acts > .lib-save { flex: 1 1 0; min-width: 0; } .dhead .acts > .lib-save > .btn { flex: 1 1 auto; min-width: 0; }
  .tabs { margin-top: 16px; }
  /* onboarding: headline and search first, a short illustration after */
  .welcome { grid-template-columns: 1fr; min-height: 0; border-radius: var(--r-xl); }
  .welcome .copy { padding: 26px 20px 20px; gap: 16px; }
  .welcome h1 { font-size: 40px; }
  .welcome .art { min-height: 150px; height: 150px; }
  .welcome .art svg { inset: 0; width: 100%; height: 100%; }
  .art-cap { left: 20px; right: auto; bottom: 10px; font-size: var(--t-md); }
  .starters { grid-template-columns: 1fr 1fr; } .starter, .starter + .starter { padding: 16px 12px 14px 0; border-right: 0; } .starter:nth-child(odd) { border-right: 1px solid var(--c-line-2); } .starter:nth-child(even) { padding-left: 12px; }
  .paths, .modes { grid-template-columns: 1fr; }
  .path, .path + .path { padding: 16px 0; border-right: 0; border-bottom: 1px solid var(--c-line-2); }
  .drawer-scrim { pointer-events: auto; } .drawer.is-open .drawer-scrim { opacity: 1; }
  .drawer-panel { top: auto; left: 0; width: 100%; height: 88vh; border-radius: var(--r-xl) var(--r-xl) 0 0; border-left: 0; transform: translateY(32px); }
  .drawer-head { padding-left: 20px; } .drawer-body { padding: 16px 20px 40px; }
  .drawer-panel.is-form { height: min(88vh, var(--vvh, 100dvh)); max-height: var(--vvh, 100dvh); }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: color-mix(in srgb, var(--c-raised) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--c-line-2); padding: 4px 4px max(8px, env(safe-area-inset-bottom));
    /* its full height before its buttons arrive: the shell mounts it empty and the route paints it, and empty it was
       13px tall, so every load grew it 54px upward (motion check 2026-10-24: top 831 to 777, part of a 0.58 shift) */
    min-height: calc(55px + 4px + max(8px, env(safe-area-inset-bottom))); }
  .tabbar a, .tabbar button { min-width: 0; overflow-wrap: anywhere; text-align: center; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; font: 500 var(--t-sm)/1 var(--f-sans); color: var(--c-ink-3); border: 0; background: none; cursor: pointer; }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
  .tabbar [aria-current="page"] { color: var(--c-ink); font-weight: 600; } .tabbar [aria-current="page"] svg { stroke: var(--c-gold); }
}

/* ---------- tab set: the rest of a page, one step away ---------- */
.tabset-wrap { margin-top: 18px; }
.tabset { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--c-line); }
.tabset [role=tab] { flex: none; min-height: var(--tap); padding: 0 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--c-ink-3); font: 500 var(--t-base)/1 var(--f-sans); cursor: pointer; white-space: nowrap; }
.tabset [role=tab]:hover { color: var(--c-ink); }
.tabset [role=tab][aria-selected="true"] { color: var(--c-ink); border-bottom-color: var(--c-gold); }
.tabpanel { padding: 22px 0 6px; display: grid; gap: 14px; align-content: start; }
.tabpanel:focus-visible { outline-offset: 6px; }
.tabpanel > p, .tabpanel li { max-width: 78ch; }

/* ---------- readings: a compact row of labelled figures ---------- */
.readings { display: grid; grid-template-columns: repeat(var(--rn, 5), minmax(0, 1fr)); border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line-2); margin-top: 26px; }
.rd { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 14px 0; min-width: 0; }
.rd + .rd { padding-left: 18px; border-left: 1px solid var(--c-line-2); }
.rd .k { font: 500 var(--t-md)/1.25 var(--f-label); color: var(--c-ink-3); }
.rd .v { font: 600 var(--t-2xl)/1.1 var(--f-sans); letter-spacing: -0.02em; }
.rd .d { font-size: var(--t-md); color: var(--c-ink-2); line-height: 1.4; }
.rd.main .v { font-size: 34px; }

/* ---------- bars ---------- */
.bars { display: block; width: 100%; height: auto; overflow: visible; }
.bars:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 4px; border-radius: var(--r-xs); }
.bars .zero { stroke: var(--c-line); }
.bars .bar.pos { fill: var(--c-ink); opacity: .78; }
.bars .bar.neg { fill: var(--c-ink-3); opacity: .5; }
.bars .bar.on { fill: var(--c-gold); opacity: 1; }
.bars .ax { fill: var(--c-ink-3); font: 500 var(--t-chart)/1 var(--f-sans); font-variant-numeric: tabular-nums; }
.bars .mk { stroke: var(--c-gold); stroke-width: 1.5; stroke-dasharray: 3 3; }
.bars .mk-t { fill: var(--c-gold-ink); font: 600 var(--t-chart)/1 var(--f-label); }
.hbars { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: minmax(90px, 180px) minmax(0, 1fr) minmax(70px, auto); gap: 12px; align-items: center; font-size: var(--t-base); }
.hb-track { height: 8px; border-radius: var(--r-xs); background: var(--c-sunk); overflow: hidden; }
.hb-fill { display: block; height: 100%; background: var(--c-gold); border-radius: var(--r-xs); }
.hb-v { text-align: right; font-weight: 600; }
.hb-n { grid-column: 1 / -1; font-size: var(--t-md); color: var(--c-ink-3); }

@media (max-width: 860px) {
  /* two columns that wrap: the row used to scroll sideways inside its card, clipping a label with no sign
     that more was there */
  .readings { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
  .rd { padding: 10px 0; }
  .rd.main { grid-column: 1 / -1; }
  .rd + .rd { padding-left: 0; border-left: 0; border-top: 1px solid var(--c-line-2); }
  .rd .v { font-size: var(--t-lead); } .rd.main .v { font-size: 26px; }
  .rd .d { font-size: var(--t-md); }
  .hbars li { grid-template-columns: minmax(80px, 120px) minmax(0, 1fr) 60px; }
}
.chart .ov { fill: none; stroke-width: 1.5; stroke-linejoin: round; }
.chart .ov.o1 { stroke: var(--c-gold); } .chart .ov.o2 { stroke: var(--c-ink-3); stroke-dasharray: 5 4; } .chart .ov.o3 { stroke: var(--c-ink-3); stroke-width: 1; opacity: .6; }
.legend-line { display: flex; flex-wrap: wrap; gap: 16px; font-size: var(--t-md); color: var(--c-ink-3); margin-top: 6px; }
.legend-line i { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--c-chart-ink); margin-right: 6px; vertical-align: middle; }
.legend-line i.o1 { border-color: var(--c-gold); } .legend-line i.o2 { border-top: 2px dashed var(--c-ink-3); } .legend-line i.o3 { border-color: var(--c-ink-3); opacity: .6; }

/* ---------- sortable table ---------- */
table.st th { white-space: nowrap; }
table.st th.n, table.st td.n { text-align: right; }
table.st th:not(.n), table.st td:not(.n) { text-align: left; }
.th-sort { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; min-width: 28px; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.th-sort:hover { color: var(--c-ink); } th.n .th-sort { justify-content: flex-end; }
.th-sort .ic { width: 14px; height: 14px; }
table.st tbody tr:hover { background: var(--c-plane-2); }
table.st td a { text-decoration: none; font-weight: 600; } table.st td a:hover { text-decoration: underline; }
@media (max-width: 860px) { table.st .ph-hide { display: none; } }
/* legal */
.legal { padding: 18px clamp(20px, 4vw, 56px) 32px; border-top: 1px solid var(--c-line-2); font-size: var(--t-md); color: var(--c-ink-3); max-width: var(--page); box-sizing: border-box; }
/* Not laid out until the first page draws into #main. With an empty #main it sat under the top bar, filling a
   phone's screen, and every page load pushed it away: layout shift 0.14 to 0.22 on desktop and 0.58 to 0.63 on
   phones, from this footer alone (motion check 2026-10-24). Arriving under the page is not a shift. */
#main:empty + .legal { display: none; }
/* ...and while a page is still loading, its short skeleton left the footer in view, so the content arriving pushed
   it off: layout shift 0.10 to 0.22 on Markets, Compare and Earnings, from the footer alone (Phase 09-10 measure).
   The page area is at least a screen tall, so the footer starts below the fold and stays there. */
#main { min-height: calc(100vh - var(--topbar-h, 72px)); min-height: calc(100dvh - var(--topbar-h, 72px)); }
@media (max-width: 860px) { .legal { padding: 16px 16px 110px; } }
.legal p { margin: 0 0 8px; max-width: 90ch; } .legal .textlink { font-size: var(--t-md); min-height: 32px; }
@media (pointer: coarse), (max-width: 860px) { .legal .textlink { min-height: var(--tap); } }
.legal-full p { line-height: 1.5; }
.legal-slot:empty { display: none; }
.legal-area { margin: 20px 0 0; padding: 12px 14px; border-radius: var(--r-2); background: var(--c-plane-2, var(--c-sunk)); font-size: var(--t-md); line-height: 1.5; color: var(--c-ink-2); max-width: 90ch; }
.legal-milo { font-size: var(--t-sm); color: var(--c-ink-3); } .legal-milo summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; gap: 4px; } .legal-milo p { margin: 4px 0 0; line-height: 1.45; }
.build-new { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-radius: var(--r-3); background: var(--c-raised); border: 1px solid var(--c-line); box-shadow: 0 16px 40px rgba(20, 18, 15, .18); }
.build-new p { margin: 0; font-weight: 500; }
@media (max-width: 860px) { .build-new { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); width: calc(100vw - 32px); justify-content: space-between; } }
.legal-switch { font-size: var(--t-sm); } .legal-switch span { color: var(--c-ink-3); }
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: var(--t-sm); margin: 6px 0 0; }
/* Terms and Privacy (pages/legalpages.js) */
.legal-doc { max-width: 72ch; }
.legal-doc h2 { margin: 28px 0 8px; font-size: var(--t-xl); }
.legal-doc p, .legal-doc li { color: var(--c-ink-2); line-height: 1.6; }
.legal-doc ul { padding-left: 20px; display: grid; gap: 6px; }
.legal-draft { margin: 14px 0 6px; padding: 12px 14px; border-left: 3px solid var(--c-warn); background: var(--c-plane-2); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--c-ink); max-width: 72ch; }
.legal-fill { padding: 0 4px; border-radius: var(--r-xs); background: var(--c-gold-wash); color: var(--c-ink); }
/* shell: collapse, session, status, offline */
.shell.is-tight { --rail: 76px; }
.shell.is-tight .rail { padding: 22px 10px 18px; }
.shell.is-tight .rail-row > span, .shell.is-tight .rail-sec, .shell.is-tight .brand-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shell.is-tight .rail-row { justify-content: center; padding: 0; }
.shell.is-tight [data-v2-rail-collapse] svg { transform: rotate(180deg); }
.session-chip { display: inline-flex; align-items: center; gap: 6px; font: 500 var(--t-sm)/1.2 var(--f-label); color: var(--c-ink-3); margin-right: 8px; white-space: nowrap; }
/* the comma travels with the part that can be hidden, so a narrow bar never ends on one */
.session-chip .sc-next { margin-left: -6px; }
.session-chip:empty { display: none; }
@media (max-width: 1100px) { .session-chip .sc-next { display: none; } }
@media (max-width: 860px) { .session-chip { display: none; } }
.app-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.offline-bar { position: fixed; z-index: 70; top: env(safe-area-inset-top, 0px); left: 0; right: 0; padding: 8px max(16px, env(safe-area-inset-left, 0px)); background: var(--c-scene); color: var(--c-on-scene); font-size: var(--t-md); text-align: center; }

/* a failure inside a panel is the panel's content, not a second card (editorial pass) */
.dchart > .state.err, .ws-body > .state.err, .op-sec .state.err { border: 0; background: none; padding: 0; box-shadow: none; }
/* Milo: what an answer was about, and a plain flag when the page now open is another symbol's (task 12) */
.milo-about { margin: 0; font-size: var(--t-sm); color: var(--c-ink-3); }
.milo-about.is-other b { color: var(--c-ink); font-weight: 600; }
/* Milo's width grip, on the panel's left edge (desktop; on a phone the panel is a bottom sheet) */
.milo-grip { position: absolute; left: -5px; top: 0; bottom: 0; width: 10px; cursor: col-resize; z-index: 2; touch-action: none; }
.milo-grip::after { content: ''; position: absolute; left: 4px; top: 50%; width: 2px; height: 44px; margin-top: -22px; border-radius: 2px; background: var(--c-ink-3); opacity: 0; transition: opacity var(--d); }
.milo-grip:hover::after, .milo-grip:focus-visible::after, .milo-grip.is-dragging::after { opacity: 1; }
.milo-grip:focus-visible { outline: 2px solid var(--c-focus); outline-offset: -2px; }
@media (max-width: 860px) { .milo-grip { display: none; } }
/* oscillator charts (RSI, MACD): level lines, a histogram from zero and a marked crossing */
.chart .ref { stroke: var(--c-ink-3); stroke-width: 1; stroke-dasharray: 4 4; opacity: .75; } .chart .ref.mid { opacity: .45; }
.chart .hbar.up { fill: color-mix(in srgb, var(--c-pos) 45%, transparent); } .chart .hbar.down { fill: color-mix(in srgb, var(--c-neg) 45%, transparent); }
.chart .pin circle { fill: var(--c-plane); stroke-width: 2; } .chart .pin.up circle { stroke: var(--c-pos); } .chart .pin.down circle { stroke: var(--c-neg); }

/* ---------- figures across periods (ui/bars.js groupedBars, periodLines, bridgeBars, stackedBars; 2026-10-20) */
.bars .grid { stroke: var(--c-chart-grid); stroke-width: 1; }
.gbar.s1, .pdot.s1 { fill: var(--c-s1); } .gbar.s2, .pdot.s2 { fill: var(--c-s2); } .gbar.s3, .pdot.s3 { fill: var(--c-s3); }
.gbar.s0 { fill: var(--c-ink-3); }
.gbar.hollow { fill: none; stroke-width: 1.5; stroke-dasharray: 3 2; } .gbar.hollow.s1 { stroke: var(--c-s1); } .gbar.hollow.s2 { stroke: var(--c-s2); } .gbar.hollow.s3 { stroke: var(--c-s3); } .gbar.hollow.s0 { stroke: var(--c-ink-3); }
.gbar.step-out { fill: var(--c-s2); } .gbar.step-in { fill: var(--c-s1); }
.gbars .gbar.on, .sbars .gbar.on, .bbars .gbar.on { stroke: var(--c-ink); stroke-width: 1.5; }
.pline { fill: none; stroke-width: 2; stroke-linejoin: round; } .pline.s1 { stroke: var(--c-s1); } .pline.s2 { stroke: var(--c-s2); } .pline.s3 { stroke: var(--c-s3); }
.pdot { stroke: var(--c-raised); stroke-width: 2; } .pdot.on { r: 5.5; }
.bars .vlab { fill: var(--c-ink-2); font: 600 var(--t-chart)/1 var(--f-sans); font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--c-raised); stroke-width: 3px; }
.bars .ax-sub { font-weight: 600; } .bars .ax-sub.beat { fill: var(--c-ink-2); } .bars .ax-sub.miss { fill: var(--c-ink-2); }
.bars .ref { stroke: var(--c-ink-3); stroke-dasharray: 4 4; } .bars .ref-t { fill: var(--c-ink-2); font: 600 var(--t-chart)/1 var(--f-label); paint-order: stroke; stroke: var(--c-raised); stroke-width: 3px; }
.bars .gap-mark { stroke: var(--c-ink-3); stroke-dasharray: 2 2; }
.bars .join { stroke: var(--c-ink-3); stroke-dasharray: 2 2; }
.chart-tip .tip-row { display: flex; align-items: center; gap: 6px; margin-top: 3px; } .chart-tip .tip-row b { margin-left: auto; padding-left: 10px; }
.chart-tip .sw, .legend-line i.sw { display: inline-block; width: 10px; height: 10px; border: 0; border-radius: 2px; margin-right: 6px; vertical-align: -1px; flex: none; }
.sw.s1 { background: var(--c-s1); } .sw.s2 { background: var(--c-s2); } .sw.s3 { background: var(--c-s3); } .sw.s0 { background: var(--c-ink-3); }
.sw.hollow, .legend-line i.sw.hollow { background: none; border: 1.5px dashed currentColor; } .sw.hollow.s1 { border-color: var(--c-s1); } .sw.hollow.s2 { border-color: var(--c-s2); } .sw.hollow.s3 { border-color: var(--c-s3); } .sw.hollow.s0 { border-color: var(--c-ink-3); }
@media (prefers-reduced-motion: no-preference) { .gbar, .pdot { transition: stroke var(--d); } }
/* a term explained where it is used (ui/term.js): the word, underlined with dots, opens a short definition */
.term { display: inline; padding: 0; margin: 0; border: 0; background: none; color: inherit; font: inherit; text-align: inherit; cursor: help; text-decoration: underline dotted var(--c-ink-3); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
/* New to Markets (Phase 05): a marked term's short definition sits beside it, quieter than the sentence it is in */
.term-inline { color: var(--c-ink-2); }
.term:hover, .term[aria-expanded="true"] { text-decoration-color: var(--c-ink); }
.term:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; border-radius: 2px; }
.term-pop { position: absolute; z-index: 90; display: grid; gap: 6px; padding: 12px 14px; background: var(--c-raised); color: var(--c-ink-2); border: 1px solid var(--c-line); border-radius: var(--r-lg); box-shadow: var(--sh-pop); font-size: var(--t-md); line-height: 1.45; text-align: left; }
.term-pop p { margin: 0; } .term-pop-h { color: var(--c-ink); font-weight: 600; }
.term-pop-ex span { color: var(--c-ink-3); font-weight: 600; }
.term-pop-x { justify-self: end; min-height: var(--tap); padding: 0 12px; margin: -4px -6px -6px 0; border: 0; border-radius: var(--r-ctl); background: none; color: var(--c-ink); font: 600 var(--t-md)/1 var(--f-sans); cursor: pointer; }
/* a score's line (ui/score.js): a thin track filled to the score, green or red by its side, grey between; a signed
   score fills out from a middle line. The figure beside it says the value. */
.sline { display: block; position: relative; height: 6px; margin-top: 8px; max-width: 280px; border-radius: 2px; background: var(--c-sunk); box-shadow: inset 0 0 0 1px var(--c-line-2); overflow: hidden; }
.sline i { display: block; height: 100%; border-radius: 2px; background: var(--c-ink-3); }
.sline.is-up i { background: var(--c-pos); } .sline.is-down i { background: var(--c-neg); }
.sline.is-none { background: none; box-shadow: none; border: 1px dashed var(--c-line); }
.sline-signed { display: grid; grid-template-columns: 1fr 2px 1fr; background: none; box-shadow: none; overflow: visible; }
.sline-signed .sl-half { display: flex; height: 100%; background: var(--c-sunk); box-shadow: inset 0 0 0 1px var(--c-line-2); border-radius: 2px; overflow: hidden; } .sline-signed .sl-neg { justify-content: flex-end; }
.sline-signed .sl-mid { display: block; height: 10px; margin-top: -2px; background: var(--c-ink-3); border-radius: 2px; }
.term-pop-x:hover { background: var(--c-sunk); }
.term-pop-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; } .term-pop-acts .term-pop-x { margin: 0; }
.term-pop-milo { min-height: var(--tap); }
/* the hover and focus preview (B9.1): the same words, no controls, out of the way of the pointer */
.term-tip { position: absolute; z-index: 89; display: grid; gap: 4px; padding: 10px 12px; background: var(--c-raised); color: var(--c-ink-2); border: 1px solid var(--c-line); border-radius: var(--r-lg); box-shadow: var(--sh-pop); font-size: var(--t-sm); line-height: 1.45; pointer-events: none; }
.term-tip p { margin: 0; }
/* Figure registry (Handoff 1, ui/figure.js): a financial figure printed from the registry is the control that
   defines it, underlined with dots like a term, so there is no info icon after every number. Its panel is the
   term's popover in sections; on a phone it is a sheet from the bottom with the page still in view above it. */
.fig { display: inline; padding: 0; margin: 0; border: 0; background: none; color: inherit; font: inherit; font-variant-numeric: tabular-nums; text-align: inherit; cursor: help; text-decoration: underline dotted var(--c-ink-3); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.fig:hover, .fig[aria-expanded="true"] { text-decoration-color: var(--c-ink); }
.fig:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; border-radius: 2px; }
.fig.is-missing, .fig-missing { color: var(--c-ink-3); }
/* the registry could not be read: each figure says its definition is missing (core/figures.js sets the flag) */
:root[data-fig-registry="failed"] .fig:not(.fig-name)::after { content: " (definition unavailable)"; color: var(--c-ink-3); font-size: var(--t-xs); text-decoration: none; }
/* one column that may shrink below its longest word: an XBRL tag (RevenueFromContractWithCustomerExcluding...) set the
   grid's width and clipped every line at a phone's edge */
.fig-pop { grid-template-columns: minmax(0, 1fr); gap: 8px; max-height: min(70vh, 640px); overflow: auto; overscroll-behavior: contain; }
.fig-pop p, .fig-pop small { overflow-wrap: anywhere; }
.fig-pop p { margin: 0; } .fig-pop .fig-h { color: var(--c-ink); font-weight: 600; }
.fig-sym { margin-left: 4px; color: var(--c-ink-3); font: 600 var(--t-sm)/1 var(--f-label); }
.fig-v { color: var(--c-ink); font-size: var(--t-xl); font-weight: 600; font-variant-numeric: tabular-nums; }
.fig-v small { margin-left: 6px; color: var(--c-ink-3); font-size: var(--t-sm); font-weight: 400; }
.fig-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.fig-badge { display: inline-block; padding: 2px 8px; border: 1px solid var(--c-line); border-radius: var(--r-xs); color: var(--c-ink-2); font: 500 var(--t-xs)/1.5 var(--f-label); }
.fig-def { color: var(--c-ink); } .fig-def.is-missing, .fig-why { color: var(--c-ink-2); }
.fig-sec { display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid var(--c-line-2); }
.fig-k { color: var(--c-ink-3); font: 600 var(--t-xs)/1.4 var(--f-label); }
.fig-sym-line { color: var(--c-ink-2); font-family: var(--f-label); }
.fig-ins { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fig-ins li { display: grid; gap: 1px; } .fig-ins b { color: var(--c-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.fig-ins small, .fig-meta, .fig-note { color: var(--c-ink-3); font-size: var(--t-sm); }
.fig-pop a { color: var(--c-ink); text-decoration: underline; }
.fig-pop .fig-retry { margin-left: 6px; }
.fig-pop.is-sheet { position: fixed; top: auto; right: 0; bottom: 0; left: 0; max-height: 72vh; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: var(--r-xl) var(--r-xl) 0 0; }

/* the search's own way out, for a phone with no Escape key (beginner brief item 12) */
.palette-top { display: flex; align-items: center; gap: 8px; padding-right: 10px; border-bottom: 1px solid var(--c-line-2); } .palette-panel .palette-top input { flex: 1; min-width: 0; border-bottom: 0; }
.palette-x { flex: none; min-height: var(--tap); padding: 0 12px; border: 0; border-radius: var(--r-ctl); background: none; color: var(--c-ink); font: 600 var(--t-md)/1 var(--f-sans); cursor: pointer; }
.palette-x:hover { background: var(--c-sunk); } .palette-x:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 1px; }
/* search as TradingView lays it out (owner, 2026-10-21), squared: a large box with Clear and close, the filter row,
   then symbol rows with the logo, the symbol, the name and the kind of listing; the typed letters in gold */
.palette-panel { width: min(760px, calc(100vw - 32px)); }
.palette-top { gap: 6px; padding: 0 8px 0 18px; } .palette-panel .palette-top input { height: 64px; padding: 0 4px; }
.pal-glass { display: inline-grid; place-items: center; color: var(--c-ink-2); } .pal-glass svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.palette-clear { flex: none; min-height: var(--tap); padding: 0 10px; border: 0; border-radius: var(--r-ctl); background: none; color: var(--c-ink-3); font: 500 var(--t-md)/1 var(--f-sans); cursor: pointer; }
.palette-clear:hover { color: var(--c-ink); background: var(--c-sunk); } .palette-clear:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 1px; }
.pal-div { flex: none; width: 1px; height: 24px; background: var(--c-line); }
.palette-top input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }   /* Clear is the one way to empty it */
.palette-x { display: inline-grid; place-items: center; width: var(--tap); padding: 0; } .palette-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.palette-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--c-line-2); }
.sym-row { display: grid; grid-template-columns: 30px minmax(64px, max-content) minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.palette-item.sym-row { grid-template-columns: 30px minmax(64px, max-content) minmax(0, 1fr) auto auto; min-height: 54px; padding: 0 14px; border-radius: 0; border-bottom: 1px solid var(--c-line-2); }
.sym-logo { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: var(--c-sunk); color: var(--c-ink-3); font: 600 var(--t-sm)/1 var(--f-label); }
.sym-logo::before { content: attr(data-l); } .sym-logo.has-img { background: var(--c-logo-bg); } .sym-logo.has-img::before { content: none; }
.sym-logo img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); object-fit: contain; }
.sym-sym { font: 600 var(--t-lg)/1.2 var(--f-label); color: var(--c-ink); white-space: nowrap; }
.sym-name { color: var(--c-ink-2); font-size: var(--t-lg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sym-kind { color: var(--c-ink-3); font-size: var(--t-md); white-space: nowrap; }
.sym-row b { color: var(--c-gold); font-weight: inherit; }
@media (max-width: 560px) {
  .palette-item.sym-row, .sym-row { grid-template-columns: 28px minmax(52px, max-content) minmax(0, 1fr) auto; gap: 10px; }
  .palette-item.sym-row .pal-tag { display: none; } .sym-name, .sym-sym { font-size: var(--t-base); } .sym-kind { font-size: var(--t-sm); }
  .palette-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .palette-filters::-webkit-scrollbar { display: none; }
}
.milo-guest { display: grid; gap: var(--s-2); margin: 0; padding: 12px 20px 14px; border-bottom: 1px solid var(--c-line-2); background: var(--c-sunk); }
.milo .milo-guest p { margin: 0; color: var(--c-ink-2); font-size: var(--t-md); line-height: 1.45; } .milo .milo-guest b { color: var(--c-ink); }
.milo .milo-guest-sub { font-size: var(--t-sm); color: var(--c-ink-3); }
.milo-form[hidden] { display: none; }
/* a figure in an answer, drawn from Optic's data (ui/finfigs.js) */
.milo-fig { margin: 10px 0; padding: 12px 14px; border: 1px solid var(--c-line-2); border-radius: var(--r-lg); background: var(--c-plane-2); display: grid; gap: 8px; }
.milo-fig figcaption { display: grid; gap: 4px; } .milo .milo-fig p { margin: 0; }
.milo .milo-fig-h { font-weight: 600; color: var(--c-ink); } .milo .milo-fig .fv-unit { font-size: var(--t-sm); color: var(--c-ink-3); }
.milo .milo-fig-none { color: var(--c-ink-3); font-size: var(--t-sm); }

/* ---------- the Dossier header stays in view (the classic app's sticky .sec-head): ticker, price and tabs under the
   top bar while a long tab scrolls; jumps to a section land below both (scroll padding from measured heights) ---------- */
html { scroll-padding-top: calc(var(--topbar-h, 72px) + var(--dstick-h, 0px) + var(--secidx-h, 0px) + 8px); }
@media (min-width: 641px) and (min-height: 561px) {
  .dstick { position: sticky; top: var(--topbar-h, 72px); z-index: 20; background: var(--c-plane); box-shadow: 0 1px 0 var(--c-line-2); }
  .dstick .dhead { padding-top: 14px; }
}
@media (max-width: 640px), (max-height: 560px) { html { scroll-padding-top: calc(var(--topbar-h, 60px) + 8px); } }

/* ---------- the More sheet: each page with what it is for; quiet rows (the gold hover is the sidebar's alone) ---------- */
.more-list { display: grid; gap: 14px; }
.more-group { display: grid; }
.more-glab { margin: 0 0 4px; font: 500 var(--t-sm)/1.3 var(--f-label); color: var(--c-ink-3); }
.more-row { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 8px 10px; border-radius: var(--r-md); color: var(--c-ink); text-decoration: none; }
.more-row:hover { background: var(--c-sunk); }
.more-row:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.more-row svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--c-ink-2); stroke-width: 1.7; }
.more-lab { display: grid; gap: 2px; min-width: 0; font-size: var(--t-lg); }
.more-lab small { font-size: var(--t-sm); color: var(--c-ink-2); }
.more-row .legacy { margin-left: auto; }

/* ---------- unread alerts: a bell on the top bar only when something is unread, a count on the phone bar's Watchlist ---------- */
.topbar-bell { position: relative; color: var(--c-ink); }
.topbar-bell svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.bell-n, .tab-n { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--c-ink); color: var(--c-plane); font: 600 var(--t-xs)/18px var(--f-sans); text-align: center; font-variant-numeric: tabular-nums; }
.tabbar a, .tabbar button { position: relative; }
.tab-n { top: 2px; right: calc(50% - 22px); }

/* ---------- measuring on the shared charts (docs/frontend-v2/CHART-GESTURES.md) ---------- */
.chart-wrap.can-measure svg.chart { touch-action: pan-y; }                 /* a vertical swipe still scrolls the page */
/* a held finger measures: iOS must not select the axis text or open its callout and loupe instead */
.chart-wrap.can-measure { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; padding-bottom: 18px; }
/* while a finger is on any chart (html.pc-touching, set by ui/chart.js and ui/pricechart.js) nothing on the page is
   selectable: iOS's long press selects the nearest text and shows its loupe, whatever the chart itself allows */
html.pc-touching, html.pc-touching * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }   /* room for the Measure button below the price labels */
.chart-wrap.is-measuring svg.chart { touch-action: none; cursor: crosshair; }
.chart .ms { pointer-events: none; }
.chart .ms-band { fill: var(--c-ink-2); opacity: .14; }
.chart .ms-edge { stroke: var(--c-ink-2); stroke-width: 1.2; opacity: .75; }
.chart .ms-dot { fill: var(--c-ink); stroke: var(--c-raised); stroke-width: 2; }
.chart-measure { position: absolute; right: 0; bottom: 0; width: var(--tap); height: var(--tap); display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--r-md); background: none; color: var(--c-ink-3); cursor: pointer; opacity: 0; }
.chart-measure svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.chart-wrap:hover .chart-measure, .chart-measure:focus-visible, .chart-measure[aria-pressed="true"] { opacity: 1; }
.chart-measure:hover { background: var(--c-sunk); color: var(--c-ink); }
.chart-measure[aria-pressed="true"] { background: var(--c-active); color: var(--c-ink); }
.chart-measure:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
@media (hover: none) { .chart-measure { opacity: 1; } }

/* Milo, 2026-10-24 (motion proposal): the silence notice, what is attached, and a report on one answer */
.milo-quiet { margin: 8px 0 0; font-size: var(--t-sm); color: var(--c-warn); }
.milo-parts { margin: 2px 0 0; font-size: var(--t-sm); }
.milo-ctx .milo-parts > summary { min-height: 32px; font-weight: 500; color: var(--c-ink-2); }   /* beats pages.css's gold .more-inline summary */
.milo-parts-l { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; gap: 2px; }
.milo-parts-l li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; padding: 0 2px; border-bottom: 1px solid var(--c-line-2); color: var(--c-ink-2); }
.milo-parts-l li.is-off span { color: var(--c-ink-3); text-decoration: line-through; }
.milo-parts-l .textlink { min-height: 32px; font-size: var(--t-sm); }
.milo-parts-none { margin: 2px 0 0; font-size: var(--t-sm); color: var(--c-ink-3); }
.milo-report { display: grid; gap: 8px; margin: 10px 0 0; padding: 12px; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-sunk); }
.milo-report label { font-size: var(--t-md); font-weight: 500; color: var(--c-ink); }
.milo-report textarea { width: 100%; min-height: 72px; resize: vertical; padding: 8px 10px; border: 1px solid var(--c-line); border-radius: var(--r-ctl); background: var(--c-raised); color: var(--c-ink); font: 400 var(--t-md)/1.45 var(--f-sans); }
.milo-report .asof { margin: 0; }
.milo-report-err { margin: 0; font-size: var(--t-sm); color: var(--c-neg); }
.milo-report-done { margin: 10px 0 0; font-size: var(--t-sm); color: var(--c-ink-2); }
/* Explain this indicator (Handoff 7): the reading Milo was sent, as the chart computed it, above the answer; the
   price data and the definition's source below it */
.milo-ex { display: grid; gap: 4px; margin: 6px 0 2px; padding: 10px 12px; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-sunk); }
.milo-ex p { margin: 0; }
.milo-ex-h { font: 600 var(--t-md)/1.3 var(--f-label); color: var(--c-ink); } .milo-ex-h span { font-weight: 500; color: var(--c-ink-2); }
.milo-ex-v { font-size: var(--t-lg); font-weight: 600; line-height: 1.35; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.milo-ex-v span { font-size: var(--t-sm); font-weight: 400; color: var(--c-ink-3); }
.milo-ex.is-off .milo-ex-v { font-size: var(--t-md); font-weight: 500; }
.milo-ex-d { font-size: var(--t-sm); line-height: 1.45; color: var(--c-ink-2); }
.milo-ex-note { font-size: var(--t-sm); line-height: 1.4; color: var(--c-ink-3); }
.milo-ex-src { margin: 8px 0 0; font-size: var(--t-sm); line-height: 1.4; color: var(--c-ink-3); }
/* a short screen (an iPhone SE's Safari is 549 px tall): the attached list scrolls in a strip rather than push the
   conversation off the screen */
@media (max-height: 760px) { .milo-parts-l { max-height: 112px; overflow-y: auto; } .milo-parts .asof { display: none; } }

/* the keyboard shortcuts (ui/shortcuts.js): key caps at the left, what they do beside them */
.shortcuts { display: grid; gap: 20px; }
.shortcuts h3 { margin: 0 0 6px; }
.sc-list { margin: 0; display: grid; gap: 0; }
.sc-list > div { display: grid; grid-template-columns: minmax(112px, auto) 1fr; gap: 12px; align-items: center; min-height: 36px; border-bottom: 1px solid var(--c-line-2); }
.sc-list dt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.sc-list dd { margin: 0; font-size: var(--t-md); color: var(--c-ink-2); }
.sc-list kbd { font-family: var(--f-label); color: var(--c-ink); background: var(--c-sunk); }
/* ---------------- long pages (ui/sections.js; Classic parity B3, 2026-10-21) ---------------- */
/* a folded section is its heading line alone: its summary and its actions come back when it opens */
.section.is-folded > :not(h2):not(.section-head) { display: none !important; }
.section.is-folded > .section-head > :not(h2):not(div:has(> h2)) { display: none !important; }
.section.is-folded .section-sub { display: none; }
.section.is-folded > h2, .section.is-folded > .section-head { margin-bottom: 0; }
h2.sec-head { cursor: pointer; }
.sec-fold { float: right; width: var(--ctl-sm); height: var(--ctl-sm); margin: -7px -8px -7px 8px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--r-ctl); background: none; color: var(--c-ink-3); cursor: pointer; }
.sec-fold svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sec-fold:hover { background: var(--c-sunk); color: var(--c-ink); }
.sec-fold:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.section.is-folded .sec-fold svg { transform: rotate(-90deg); }
@media (pointer: coarse) { .sec-fold { width: var(--tap); height: var(--tap); margin: -11px -10px -11px 8px; } }
.sec-tag { color: var(--c-ink-3); font: 500 var(--t-sm)/1 var(--f-label); vertical-align: middle; }
/* the strip: section names to jump to, then Expand all, Collapse all and Panels */
.sec-index { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; padding: 4px 0; background: var(--c-plane); border-bottom: 1px solid var(--c-line-2); }
.sec-index.sec-only-bulk { justify-content: flex-end; border-bottom: 0; }
@media (min-width: 641px) and (min-height: 561px) { .sec-index:not(.sec-only-bulk) { position: sticky; top: calc(var(--topbar-h, 72px) + var(--dstick-h, 0px)); z-index: 5; } }
.sec-list { display: flex; gap: 2px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sec-list::-webkit-scrollbar { display: none; }
.sec-chip { flex: none; min-height: var(--ctl-sm); padding: 0 10px; border: 0; border-bottom: 2px solid transparent; border-radius: var(--r-sm) var(--r-sm) 0 0; background: none; color: var(--c-ink-3); font: 500 var(--t-md)/1 var(--f-sans); white-space: nowrap; cursor: pointer; }
.sec-chip:hover { color: var(--c-ink); }
.sec-chip[aria-current="location"] { color: var(--c-ink); border-bottom-color: var(--c-gold); }
.sec-chip:focus-visible { outline: 2px solid var(--c-focus); outline-offset: -2px; }
.sec-bulk { display: flex; gap: 4px; flex: none; align-items: center; }
@media (pointer: coarse) { .sec-chip { min-height: var(--tap); } }
@media (max-width: 640px) { .sec-index { flex-wrap: wrap; } .sec-bulk { width: 100%; justify-content: flex-end; } }
/* sideways strips (ui/strips.js): an arrow at an edge while there is more that way, taking no room */
.strip-edge { position: sticky; z-index: 2; flex: none; align-self: stretch; width: 32px; min-height: 32px; display: grid; place-items: center; padding: 0; border: 0; background: var(--strip-bg, var(--c-plane)); color: var(--c-ink-2); cursor: pointer; }
.strip-edge.strip-start { left: calc(0px - var(--strip-pl, 0px)); margin-right: -32px; }
.strip-edge.strip-end { right: calc(0px - var(--strip-pr, 0px)); margin-left: -32px; }
.strip-edge svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.strip-edge:hover { color: var(--c-ink); }
.strip-edge, .sec-fold, .sec-chip { -webkit-tap-highlight-color: transparent; }
[data-strip="1"].is-dragging { cursor: grabbing; user-select: none; }
/* insider and Congress tables: capped in height, their header kept in view as the rows scroll (B3.8) */
#fin-ownership .tscroll, #fin-congress .tscroll, .ins-page .tscroll { max-height: min(62vh, 560px); overflow: auto; }
#fin-ownership .tscroll thead th, #fin-congress .tscroll thead th, .ins-page .tscroll thead th { position: sticky; top: 0; z-index: 1; background: var(--c-raised); }

/* ---------------- Milo docked beside the page (ui/milo.js layout; Classic parity B4a, 2026-10-21) ---------------- */
.drawer.drawer-milo { z-index: 59; }   /* another drawer (evidence, the account sheet) opens over Milo */
.drawer.is-docked .drawer-scrim { display: none; }
.drawer.is-docked .drawer-panel { box-shadow: none; }
html.milo-docked .stage { margin-right: var(--milo-dock-w, 0px); }
@media (prefers-reduced-motion: no-preference) { html.milo-docked .stage { transition: margin-right var(--d) var(--ease); } }
/* docked, the page is narrower than the window: the window-width rules for 1240 and 1100 px are taken from the width
   the page has (html.eff-1240, html.eff-1100, set by ui/milo.js), so it lays out as a window that wide would */
html.eff-1100 .session-chip .sc-next { display: none; }
html.eff-1100 .mstrip { --n: 4; }
html.eff-1100 .row-head, html.eff-1100 .row { --cols: minmax(150px, 1.4fr) 110px 120px 90px 20px; }
html.eff-1100 .row .spark-cell, html.eff-1100 .row-head .spark-cell { display: none; }
html.eff-1100 .qs { grid-template-columns: repeat(2, minmax(0, 1fr)); } html.eff-1100 .qcard:nth-child(2) { border-right: 0; } html.eff-1100 .qcard:nth-child(3) { padding-left: 0; } html.eff-1100 .qcard:nth-child(n+3) { border-top: 1px solid var(--c-line-2); }
html.eff-1100 .answers { grid-template-columns: 1fr 1fr; } html.eff-1100 .answer:nth-child(2) { border-right: 0; } html.eff-1100 .answer:nth-child(3) .answer-in { padding-left: 0; } html.eff-1100 .answer:nth-child(n+3) { border-top: 1px solid var(--c-line-2); }
/* above Milo's box: the Options follow-ups and the example, each a quiet button that drafts (B4a.4) */
.milo-suggest-slot:empty { display: none; }
.milo-suggest { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 0 6px; }
.milo-suggest .btn { white-space: normal; text-align: left; justify-content: flex-start; height: auto; min-height: var(--ctl-sm); padding: 6px 10px; }
.milo-eg { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; font-size: var(--t-sm); color: var(--c-ink-2); }
.milo-eg > span { min-width: 0; }
.milo-eg .btn { flex: none; }
/* attachments (B4b): the clip at the box's start, the tiles above it, and the panel lit while files are dragged on */
.milo-attach { flex: none; align-self: flex-end; width: var(--ctl-sm); height: var(--ctl-sm); display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--r-ctl); background: none; color: var(--c-ink-3); cursor: pointer; }
.milo-attach svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.milo-attach:hover { background: var(--c-sunk); color: var(--c-ink); } .milo-attach:disabled { opacity: .45; cursor: default; }
.milo-attach:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
@media (pointer: coarse) { .milo-attach { width: var(--tap); height: var(--tap); } }
.milo-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; padding: 0; list-style: none; }
.milo-file { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 4px 4px 6px; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-sunk); }
.milo-file img, .milo-file-kind { width: 32px; height: 32px; flex: none; border-radius: var(--r-xs); object-fit: cover; }
.milo-file-kind { display: grid; place-items: center; background: var(--c-raised); color: var(--c-ink-2); font: 600 var(--t-xs)/1 var(--f-label); }
.milo-file-meta { display: grid; min-width: 0; }
.milo-file-name { font-size: var(--t-sm); color: var(--c-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.milo-file-size { font-size: var(--t-xs); color: var(--c-ink-3); }
.milo-file.is-bad { border-color: var(--c-neg); } .milo-file.is-bad .milo-file-size { color: var(--c-neg); }
.milo-files-note { margin: 0 0 6px; font-size: var(--t-xs); color: var(--c-ink-3); }
.milo.is-drop .milo-form { outline: 2px dashed var(--c-focus); outline-offset: 2px; border-radius: var(--r-md); }
.milo-sent-files { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin: 4px 0 0; font-size: var(--t-xs); color: var(--c-ink-3); }
.milo-sent-files svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.milo-not-sent { margin: 6px 0 0; font-size: var(--t-sm); color: var(--c-ink-2); }
/* web search, Deep research and the modes (B4c): one quiet row above the box */
.milo-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 6px; }
.milo-tools .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.milo-web[aria-pressed="true"] { background: var(--c-active); color: var(--c-ink); }
.milo-deep.is-suggested { box-shadow: inset 0 0 0 1px var(--c-line); color: var(--c-ink); }
.milo-modes .menu-body { top: auto; bottom: calc(100% + 6px); width: min(360px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; display: grid; gap: 2px; padding: 8px; }   /* the row sits on the box: the menu opens upward */
.milo-mode { display: grid; gap: 2px; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--c-ink); text-align: left; cursor: pointer; font: inherit; }
.milo-mode b { font-weight: 600; font-size: var(--t-md); } .milo-mode span { font-size: var(--t-sm); color: var(--c-ink-3); }
.milo-mode:hover { background: var(--c-sunk); } .milo-mode:focus-visible { outline: 2px solid var(--c-focus); outline-offset: -2px; }
@media (pointer: coarse) { .milo-tools .btn { min-height: var(--tap); } .milo-mode { min-height: var(--tap); } }
/* Save under a question (B4d) */
.milo-you-acts { display: flex; justify-content: flex-end; margin: 2px 0 0; }
.milo-save { min-height: 28px; padding: 0 8px; border: 0; border-radius: var(--r-sm); background: none; color: var(--c-ink-3); font: 500 var(--t-xs)/1 var(--f-sans); cursor: pointer; }
.milo-save:hover:not(:disabled) { background: var(--c-sunk); color: var(--c-ink); } .milo-save:disabled { cursor: default; color: var(--c-ink-3); }
.milo-save:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 1px; }
@media (pointer: coarse) { .milo-save { min-height: var(--tap); padding: 0 12px; } }


/* Advice policy (2026-10-29): the server's line for a question that asked for a personal decision, and the
   note under an answer a sentence was removed from. Quiet, on the panel's own surface, never a banner. The line
   on an answer that read the reader's linked accounts (audit M1, 2026-11-11) is the same kind of note. */
.milo-policy, .milo-amended, .milo-linked { margin: 6px 0 0; font-size: var(--t-sm); color: var(--c-ink-2); }
.milo-amended { margin-top: 8px; }

/* The knowledge-level slider (ui/levelslider.js, post-demo Phase 05): five steps on a quiet, squared track, the
   chosen step an ink thumb (the active fill was too faint to see on the track), the level named beside it, and the
   focus ring the one gold. Ticks mark the five positions; the ends are named under them. */
.lvl { display: grid; gap: 8px; max-width: 620px; }
.lvl-label { font: 600 var(--t-md)/1.3 var(--f-label); color: var(--c-ink); }
.lvl-row { display: flex; align-items: flex-start; gap: 14px; }
.lvl-track { position: relative; flex: 1; min-width: 0; }
.lvl-in { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: var(--tap); margin: 0; background: transparent; cursor: pointer; }
.lvl-in::-webkit-slider-runnable-track { height: 6px; border-radius: 2px; background: var(--c-sunk); border: 1px solid var(--c-line); }
.lvl-in::-moz-range-track { height: 6px; border-radius: 2px; background: var(--c-sunk); border: 1px solid var(--c-line); }
.lvl-in::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: var(--r-sm); background: var(--c-ink); border: 2px solid var(--c-plane); box-shadow: 0 0 0 1px var(--c-line); }
.lvl-in::-moz-range-thumb { width: 18px; height: 18px; border-radius: var(--r-sm); background: var(--c-ink); border: 2px solid var(--c-plane); box-shadow: 0 0 0 1px var(--c-line); }
.lvl-in:focus { outline: none; }
.lvl-in:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.lvl-in:focus-visible::-moz-range-thumb { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.lvl-ticks { position: absolute; left: 11px; right: 11px; top: calc(var(--tap) / 2 + 7px); display: flex; justify-content: space-between; pointer-events: none; }
.lvl-ticks i { width: 1px; height: 6px; background: var(--c-ink-3); }
.lvl-ends { display: flex; justify-content: space-between; margin-top: 6px; font-size: var(--t-xs); color: var(--c-ink-3); }
.lvl-now { flex: none; min-width: 8.5em; padding-top: 13px; font: 600 var(--t-md)/1.2 var(--f-label); color: var(--c-ink); }
.lvl-blurb { margin: 0; font-size: var(--t-base); color: var(--c-ink-2); }
.lvl-prev { margin: 0; font-size: var(--t-sm); color: var(--c-ink-2); }
.lvl-prev .t-label { margin-right: 6px; }
@media (max-width: 640px) {
  .lvl-row { flex-direction: column; align-items: stretch; gap: 0; }
  .lvl-now { order: -1; min-width: 0; padding-top: 0; }
}

/* ---------------- Milo's companion ----------------
   One figure at the top of the panel for the whole conversation. He sits in the drawer's header, a sibling of
   the scrolling log, so streaming, redrawing the log and replacing a finished answer never touch him. The
   stage is a fixed box: a prop or a raised arm changes what is drawn inside it, never the height of the
   header, so the conversation below never jumps. */
.milo-panel .drawer-head { position: relative; justify-content: center; padding: 8px 16px 8px; }
.milo-panel .drawer-acts { position: absolute; top: 8px; right: 8px; }
.milo-co { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 0 136px; }
.milo-co-stage { display: grid; place-items: center; width: 88px; height: 116px; }
.milo-co-stage .scout-full { width: 88px; }
.milo-co-stage .scout-btn { display: block; border: 0; background: none; padding: 0; cursor: pointer; border-radius: var(--r-md); }
.milo-co-stage .scout-btn:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 3px; }
.milo-co-say { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.milo-panel .drawer-head .milo-co-name { font: 600 var(--t-lg)/1.2 var(--f-sans); letter-spacing: -0.01em; margin: 0; outline: none; }
.milo-co-status { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.milo-co-status > b { font: 500 var(--t-sm)/1.3 var(--f-label); color: var(--c-gold-ink); }
.milo-co-status > i { font-style: normal; font-size: var(--t-xs); line-height: 1.3; color: var(--c-ink-3);
  max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.milo-co-status > i:empty { display: none; }
/* Resting, he is not working: the status reads Ready and wants no accent. */
.milo-co[data-doing="idle"] .milo-co-status > b { color: var(--c-ink-3); font-weight: 400; }
.milo-co[data-doing="error"] .milo-co-status > b { color: var(--c-down, var(--c-ink-2)); }
/* The answer landing: one quiet gold breath on the status, once. */
.milo-co[data-doing="complete"] .milo-co-status > b { animation: milo-co-done 900ms var(--ease-out, ease-out) 1; }
@keyframes milo-co-done { 0% { opacity: .5; } 40% { opacity: 1; } 100% { opacity: 1; } }

/* A short panel, and phones, take the compact arrangement: the same figure beside his name instead of above
   it, so the conversation keeps the room. */
@media (max-height: 720px), (max-width: 480px) {
  .milo-panel .drawer-head { padding: 8px 12px; }
  /* The controls sit at the right, so the compact row clears them rather than centring under them: on a
     375 px screen a centred row ran 10 px under the close button (measured 2026-11-03). Save conversation
     (Handoff 5) made the controls four buttons, 182 px, so the clearance grew by one button (44 px). */
  .milo-co { flex-direction: row; align-items: center; gap: 10px; padding: 0 148px 0 4px; max-width: 100%; }
  .milo-co-say { min-width: 0; max-width: 100%; }
  .milo-co-name, .milo-co-status > b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .milo-co-stage { width: 58px; height: 77px; }
  .milo-co-stage .scout-full { width: 58px; }
  .milo-co-say { align-items: flex-start; }
  .milo-co-status { align-items: flex-start; }
  .milo-co-status > i { max-width: 22ch; }
}
@media (max-height: 560px) {
  .milo-co-stage { width: 48px; height: 63px; }
  .milo-co-stage .scout-full { width: 48px; }
}
:root[data-motion="reduce"] .milo-co-status > b, :root[data-motion="reduce"] .milo-co-status > i { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .milo-co-status > b { animation: none !important; } }
/* His guide hangs under him in the header, not over the conversation. */
.milo-panel .drawer-head { overflow: visible; }
.milo-panel .drawer-head .scout-menu { position: absolute; top: calc(100% - 6px); left: 50%; transform: translateX(-50%); z-index: 3; }
@media (max-height: 720px), (max-width: 480px) { .milo-panel .drawer-head .scout-menu { left: 12px; transform: none; } }

/* Period line (Handoff 2, ui/period.js): a statement or segment block's period under its title. Badges are words in
   squared tags (the period type, the accounting basis), never colour; the line wraps under the title on a phone. */
.period-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; max-width: 100%; margin-top: 6px; color: var(--c-ink-2); font-size: var(--t-sm); }
.pbadges { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pbadge { display: inline-block; padding: 1px 7px; border: 1px solid var(--c-line); border-radius: var(--r-xs); color: var(--c-ink-2); font: 500 var(--t-xs)/1.5 var(--f-label); white-space: nowrap; }
.period-what { min-width: 0; color: var(--c-ink); overflow-wrap: anywhere; }
.period-line.is-unavailable .period-what { color: var(--c-ink-2); }
.period-filing { min-width: 0; overflow-wrap: anywhere; }
.period-note { margin: 4px 0 0; color: var(--c-ink-2); font-size: var(--t-sm); }
th .pbadge, dt .pbadge, .k .pbadge { margin-left: 6px; vertical-align: 1px; }
.fin-end .pbadge { margin: 2px 0 0; }
/* the filing a period was read from: an inline link in the line's own type, not the standalone .textlink control */
.period-link { color: var(--c-ink); text-decoration: underline; text-decoration-color: var(--c-line); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.period-link:hover { text-decoration-color: currentColor; }
/* ---------- the Save control (ui/library.js, Handoff 5) ---------- */
/* a toggle like Watch: Saved is the active fill, never gold; a failure says so beside it, in words, with Retry */
.lib-save { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.lib-save-btn svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.lib-err { font-size: var(--t-sm); color: var(--c-neg); }
.lib-err .textlink { font-size: inherit; }
.lib-form { display: grid; gap: 12px; margin-top: 12px; }
.lib-field { display: grid; gap: 6px; }
.lib-form-err { margin: 0; font-size: var(--t-sm); color: var(--c-neg); }
.lib-del { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--c-line-2); }

