/* The shell: the top bar, the navigation rail, the page head, and on a phone
 * the header, the market sheet, the drawer and the tab bar.
 *
 * BASE TYPOGRAPHY LIVES HERE, not in app.css. The deep pages load
 * tokens.css + components.css + shell.css + pages.css and never touch
 * app.css, because none of them draws a candle and the charting rules are
 * dead weight to them. That means shell.css is the FIRST stylesheet on those
 * pages that can set a body font - and when it did not, they rendered in the
 * browser's default serif at default size while the palette applied
 * perfectly, which reads as a page that half-loaded rather than one that was
 * never styled.
 *
 * THIS FILE IS MOBILE-FIRST, AND IT WAS NOT ALWAYS.
 *
 * It used to be a desktop layout with `max-width` patches bolted under it,
 * and that could not be made to work: the top bar was five `flex: none` slots
 * in one row, so its minimum content width was about 900px and at 390px it
 * simply ran off the screen - measured at 270px of overflow on the front page
 * and 654px on the calendar. No amount of tightening fixes a layout whose
 * floor is wider than the device. The bar had to stop being one row.
 *
 * So the base rules below ARE the phone, and every `@media (min-width: …)`
 * adds something back as the screen earns it:
 *
 *     base     header (mark · market button · price), a bottom tab bar, the
 *              market sheet and the drawer off-canvas
 *     720px    the 64px rail returns beside the content and the tab bar goes;
 *              the bar gains the clock caption, search and account, and the
 *              market button opens a menu instead of a sheet
 *     1000px   the view switch rejoins the bar
 *     1180px   the market button unfolds into the six-way switch, and the
 *              clock draws its bands
 *     1240px   the contextual right rail appears
 *     1440px   the ticker, the search label and the wordmark come back
 *
 * Written this way the phone is what you get when a query fails to match,
 * which is the safe direction to fail in. The old file failed the other way:
 * anything that missed a breakpoint got the 900px layout.
 */
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* A phone that rubber-bands the whole document behind a fixed tab bar makes
   * the bar look detached. Contain it. */
  overscroll-behavior-y: none;
}
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font); }
a { color: inherit; }

:root {
  --topbar-h: 64px;
  --navbar-h: 60px;
  --rail-w: 64px;
  /* Home-indicator clearance on iOS; zero everywhere else. */
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* THE PAGE HUE (spec 2026-09-27 §5): which page you are on, in the chrome
 * only - the head's light, the headline's fade, the card edges, the lit rail
 * icon and the lasers. shell.js writes the page tag (shellModel.pageKey) on
 * every mount; each key reads its --p-* token here (TRX.hues.page names the
 * same one) and designsystem.test.js holds every app page to a key. Never on
 * a value, never a status, never a direction. */
html[data-page="overview"] { --page-hue: var(--p-overview); }
html[data-page="deep"] { --page-hue: var(--p-deep); }
html[data-page="cot"] { --page-hue: var(--p-cot); }
html[data-page="calendar"] { --page-hue: var(--p-calendar); }
html[data-page="economy"], html[data-page="policy"] { --page-hue: var(--p-macro); }
html[data-page="guard"] { --page-hue: var(--p-guard); }
html[data-page="method"] { --page-hue: var(--p-method); }

/* Anything that can be tapped gets a target a thumb can actually hit. 44px is
 * the platform guidance; 40 is the floor used for the dense chip rows, where
 * a taller control would push the content it describes off the screen. */
button, a, select, input, [role="button"] { touch-action: manipulation; }

/* --------------------------------------------------------------- topbar */

/* On a phone the bar is ONE row carrying three things: who we are, which
 * market, and the price with its age. Everything else a desktop bar holds -
 * the view switch, search, the account, the clock - has a better home on a
 * phone: the tab bar, the drawer, and the market sheet. The page's own
 * filters (COT's categories, the calendar's impact) are not up here at any
 * width any more; they live in the page head beside the title they filter. */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  height: var(--topbar-h); padding: 0 16px;
  background: linear-gradient(180deg, rgba(38, 45, 52, .72), rgba(20, 24, 28, .86));
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

/* min-height and min-width rather than padding: the mark is 26px and a 26px
 * tap target is short of what a thumb can reliably hit. The bar is 60px tall,
 * so the 40x40 is there without moving the mark - it stays on the bar's
 * edge and the target grows rightward. That growth is not free: wherever the
 * wordmark is hidden the brand is 14px wider than its mark, and everything
 * after it in the bar sits 14px further right (measured clean at all 13
 * widths). */
.brand { display: flex; align-items: center; gap: 10px; flex: none; min-height: 40px; min-width: 40px;
         font-size: 17px; font-weight: 600; letter-spacing: -.02em;
         text-decoration: none; color: var(--ink); }
.brand__mark { width: 26px; height: 26px; color: var(--accent); flex: none; }
.brand__tile { fill: var(--bg-card); stroke: rgba(255, 255, 255, .1); }
/* The wordmark is the first thing to go. The mark alone still says where you
 * are, and on a phone the room it frees is what lets the market button and
 * the price share one row. Identity is worth less here than either of the
 * two facts beside it. */
.brand span { display: none; }

/* Views are ANCHORS, not buttons. `/#overview` from `/#deep` is a hash change
 * in the same document; the same href from cot.html is a page load. One
 * element covers both, with no JavaScript and no cross-page special case.
 *
 * Hidden on a phone - the tab bar at the bottom carries them, where a thumb
 * can reach. Two controls for one destination is one too many. */
.tviews { display: none; flex: none; }

/* ------------------------------------------------------- market controls */

/* Three controls, CSS shows one: the six-way row (>= 1180), the folded
 * "Gold ▾" button that opens a menu (720-1179), and on a phone the same
 * button opening the bottom sheet. Picked by id, because `.btn` sets its own
 * display and an id is what outranks it without an !important. */
.tmkts { display: none; flex: none; }
.tmkt { height: 40px; padding: 0 14px; gap: 6px; font-size: 15px; flex: none; min-width: 0; }
.tmkt__l { overflow: hidden; text-overflow: ellipsis; }
.tmkt__car { color: var(--ink-3); font-size: 12px; }
#tmktbtn { display: none; }
#phmkt { display: inline-flex; }

/* The lock a signed-out reader sees on every market the server has refused.
 * aria-disabled rather than disabled: the button still answers a click, with
 * the card that says why and how to open it - a control that just goes dead
 * explains nothing. */
.lk { display: inline-flex; margin-left: 6px; color: var(--ink-3); }
.lk svg { width: 12px; height: 12px; }
/* In the six-way row the lock is a corner badge that takes no width. Inline,
 * five locks added ~90px to a bar with none to spare, and the session clock
 * - the one flexible item - was crushed to "LDN close…" (measured at 1440
 * with accounts on, 2026-09-23). The sheet and the menu have the room and
 * keep it inline. */
.tmkts button { position: relative; }
.tmkts .lk { position: absolute; top: 2px; right: 1px; margin: 0; }
.tmkts .lk svg { width: 9px; height: 9px; }
/* Each market's category dot (spec 2026-09-27 §4, TRX.hues.market): in the
 * six-way row it sits in the button's left padding and takes no width, for
 * the same reason the lock does; the sheet and the menu have room for it
 * inline. What kind of market, never which way. */
.tmkts .hue { position: absolute; top: 50%; left: 3px; width: 5px; height: 5px; margin-top: -2.5px; }
[data-mkt][aria-disabled="true"] { color: var(--ink-3); }
[data-mkt][aria-disabled="true"]:hover { color: var(--ink-2); }

/* ------------------------------------------------------------ the quote */

/* The price pill. On a phone it is two right-aligned lines - price, then the
 * change and the age - which is the board's phone header exactly. The age is
 * NOT dropped at this width: a stale feed is the one thing a reader must know
 * before they read the number, and it turns --warn rather than going quiet. */
.tright { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto;
          min-width: 0; }

.pill { display: grid; grid-template-columns: auto auto; column-gap: 6px;
        justify-items: end; align-items: baseline; min-width: 0; }
.quote__sym { display: none; font-family: var(--mono); font-size: 12px; color: var(--ink-3);
              letter-spacing: .02em; }
.quote__price {
  grid-column: 1 / -1;
  font-family: var(--mono); font-size: 17px; font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em; line-height: 1.2;
}
.quote__delta { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums;
                display: flex; gap: 4px; color: var(--ink-2); }
.quote__delta[data-dir="up"] { color: var(--up); }
.quote__delta[data-dir="down"] { color: var(--down); }

/* NAMED `.fdot`, NOT `.dot` - components.css's `.dot` always glows accent
 * ("a measurement stands behind this"); this one is the feed's status
 * light (the --st-* colours) and never glows accent, so
 * sharing the name would make one of the two mean the wrong thing. */
.freshness {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  font-family: var(--mono); font-size: 12px; color: var(--ink-3);
  white-space: nowrap;
}
/* Clipped, never dropped: "offline - Sign in to open other markets" is
 * longer than any pill, and the whole sentence is the element's title. */
.freshness__text { overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
/* A status light with its word (spec 2026-09-27 §3, shell.js
 * setFreshness): green with the age ("price 40s old"; only bitcoin's
 * stream says "live · binance"), grey Closed, yellow with the age when it is
 * stale, red Feed down. The word is always beside the dot. */
.freshness .fdot {
  width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--st-off); box-shadow: 0 0 0 3px var(--st-off-soft);
}
.freshness[data-st="ok"] .fdot { background: var(--st-ok); box-shadow: 0 0 0 3px var(--st-ok-soft); }
.freshness[data-st="warn"] { color: var(--st-warn); }
.freshness[data-st="warn"] .fdot { background: var(--st-warn); box-shadow: 0 0 0 3px var(--st-warn-soft); }
.freshness[data-st="bad"] { color: var(--st-bad); }
.freshness[data-st="bad"] .fdot { background: var(--st-bad); box-shadow: 0 0 0 3px var(--st-bad-soft); }

/* Search and the account live in the drawer on a phone. */
.tsearch, .acct { display: none; }
.tsearch svg { width: 16px; height: 16px; flex: none; }
.tsearch__l, .tsearch__k { display: none; }
.tsearch__k { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }

.acct { align-items: center; }
.acct__in { height: 36px; padding: 0 14px; border-radius: 12px; font-size: 13.5px; }
.acct__av {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: var(--ink-on-accent); font: 600 14px var(--font);
}
.acct__who { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2);
             overflow-wrap: anywhere; }
.acct__who b { color: var(--ink); font-weight: 500; }
.acct__acts { display: flex; flex-direction: column; gap: 8px; }
.acct__btn { width: 100%; height: 40px; border-radius: 12px; font-size: 14px; }
.acct__btn:disabled { opacity: .6; cursor: default; }

/* ---------------------------------------------------------- session clock */

/* Two bands on one fixed 00:00-24:00 UTC timeline.
 *
 * SESSIONS OVERLAP - Tokyo with London, London with New York - and the fills
 * are translucent so an overlap renders as a denser block rather than as one
 * session hiding another. That density IS the information: it is the part of
 * the day two desks are both at work, which is the part traders care about.
 *
 * The measured band is the ONLY thing here in the accent, because tokens.css
 * reserves the accent for "a measurement stands behind this". Band 1 says who
 * is awake, which is a fact about the world and not a measurement of ours, so
 * it stays in neutral ink however tempting it is to brighten it.
 *
 * On a phone the clock is not in the header - three things already share
 * that row - but it is one tap away, at the top of the market sheet, in its
 * LONG form with the bands: "which session is running and how long is left"
 * was asked for directly, it changes on its own, and it is a fact a reader
 * cannot work out from anything else on the screen, so it is moved rather
 * than dropped. */
.tclock { display: none; min-width: 0; }
.clk { display: flex; flex-direction: column; gap: 2px; cursor: default; min-width: 0; }
.clk__bands { display: none; position: relative; height: 21px; }

.clk__band { position: absolute; left: 0; right: 0; top: 0; height: 14px;
             border-radius: 3px; background: var(--bg-inset);
             box-shadow: inset 0 0 0 1px var(--line-soft); overflow: hidden; }
.clk__band--m { top: 17px; height: 4px; border-radius: 2px; }
.clk__s { position: absolute; top: 0; height: 100%;
          display: flex; align-items: center; justify-content: center;
          overflow: hidden; background: color-mix(in srgb, var(--ink-2) 7%, transparent); }
.clk__s[data-open="true"] { background: color-mix(in srgb, var(--ink-2) 20%, transparent); }
/* All four are named, faintly, so the timeline can be read at a glance
 * instead of only through the tooltip. The open one is brighter, which is
 * the difference that carries the information.
 *
 * ALL FOUR ARE NAMED, AT THE TYPE FLOOR'S 11px. A three-letter name is up to
 * 23.8px wide there (LDN; SYD 23.0), and Sydney's first piece - the one its
 * name goes on - is only three hours in the southern winter, an eighth of
 * the day. So the desktop bar's clock is 196px from 1180px (that piece is
 * 24.5px), and at 1440 the bar makes room for it beside an account control
 * (the 1440px block). Each piece is still a size container whose name is
 * drawn only from 24px: a bar squeezed narrower than that drops a name
 * rather than clip it to a stub. The market sheet's clock is wider still. */
.clk__s { container-type: inline-size; }
.clk__s i { display: none; font-style: normal; font-size: 11px; letter-spacing: .05em;
            text-transform: uppercase; color: var(--ink-faint); opacity: .75; }
@container (min-width: 24px) { .clk__s i { display: inline; } }
.clk__s[data-open="true"] i { opacity: 1; color: var(--ink); }

.clk__m { position: absolute; top: 0; height: 100%; border-radius: 2px;
          background: var(--accent); opacity: .55; }

.clk__now { position: absolute; top: 0; bottom: 0; width: 1px;
            background: var(--ink); opacity: .75; }

.clk__cap { font-family: var(--mono); font-size: 12px; color: var(--ink-dim);
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Which of the two captions shows is decided here and nowhere else: the
 * short one in the bar, where it shares a row with everything, and the long
 * one in the sheet, which has the width. */
.clk__long { display: none; }
.clk__short { display: inline; }
.msheet .clk__long { display: inline; }
.msheet .clk__short { display: none; }
.msheet .clk__bands { display: block; }

/* ---------------------------------------------------------------- rail */

/* Sixty-four pixels of icons, and none below 720 - where the tab bar and the
 * drawer carry the same list and a column of icons would cost a sixth of the
 * screen. Built from nav.GROUPS by shell.js; separators between groups. */
.navrail { display: none; }
.ri {
  position: relative;
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); text-decoration: none; background: none; border: 0; cursor: pointer;
  transition: background var(--t-ui), color var(--t-ui);
}
.ri svg { width: 20px; height: 20px; }
.ri:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
/* The page you are on, in its hue: the icon, a faint ground and edge, a
 * soft glow, and a 2px laser at the rail's edge (spec 2026-09-27 §5). */
.ri.on { color: var(--page-hue); background: color-mix(in srgb, var(--page-hue) 10%, transparent);
         box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--page-hue) 32%, transparent), var(--laser-glow); }
.ri.on::before { content: ''; position: absolute; left: -10px; top: 10px; bottom: 10px; width: 2px;
                 border-radius: 0 2px 2px 0; pointer-events: none;
                 background: var(--page-hue); box-shadow: var(--laser-bloom); }
/* A section divider is a short laser, brightest at its middle. */
.rsep { width: 24px; height: 1px; flex: none; margin: 6px 0;
        background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--page-hue) 55%, transparent), transparent);
        box-shadow: 0 0 6px color-mix(in srgb, var(--page-hue) 22%, transparent); }
.rail__foot { margin-top: auto; }

/* ------------------------------------------------------------ page head */

/* The title row of every page that is not a view: the page's name and its
 * as-of stamp, then the page's own filter in the contextual slot. On a phone
 * the slot wraps to its own row and SCROLLS SIDEWAYS: ten COT categories do
 * not fit in 390px and never will, and a row you can swipe keeps every
 * option one tap away where wrapping would cost three lines. With room, the
 * slot sits beside the title - it wraps only when it cannot fit there. */
.pagehead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
            padding: 16px 13px 2px; }
.pagehead:empty { display: none; }
.ph__t { flex: 1 1 auto; min-width: 0; }
.ph__title { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.025em;
             line-height: 1.2; }

/* THE HEAD'S CHROME (spec 2026-09-27 §5), on every page's head and on Deep
 * dive's: a soft light in the page hue behind the title, the title fading
 * from ink into the hue, and a laser underline that one highlight runs
 * along when the page opens. The light and the line are absolutely placed,
 * so the head is exactly as tall as before. */
.pagehead, .deep__head { position: relative; isolation: isolate; }
.pagehead::before, .deep__head::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(55% 150% at 8% 0%, color-mix(in srgb, var(--page-hue) 18%, transparent), transparent);
}
.pagehead::after, .deep__head::after {
  content: ''; position: absolute; height: 1px; pointer-events: none;
  background:
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--page-hue) 35%, var(--ink)), transparent) 140% 0 / 22% 100% no-repeat,
    linear-gradient(90deg, var(--page-hue), color-mix(in srgb, var(--page-hue) 40%, transparent) 55%, transparent);
  box-shadow: var(--laser-bloom);
  animation: laser-sweep 1.2s var(--ease) .15s 1 forwards;
}
.pagehead::after { left: 13px; right: 13px; bottom: -5px; }
.deep__head::after { left: 0; right: 0; bottom: -8px; }
/* The light fills the head down to its laser. Deep dive's head sits inside
 * the stage's padding, so its light reaches out over that padding to the
 * bar and the rail - never past the stage, so it can never scroll. */
.pagehead::before { bottom: -5px; }
.deep__head::before { inset: -14px -16px -8px; }
/* The headline is the width of its words, so the fade ends on the last
 * letter; at its darkest it is 4.5:1 or more on the page (tested). Deep
 * dive's "deep dive" is part of the fade rather than its own grey. */
.ph__title, .deep__title {
  width: fit-content; max-width: 100%;
  background: linear-gradient(90deg, var(--ink) 30%, var(--page-hue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.deep__title .serif { color: transparent; }
/* Deep dive's head is empty until its market answers: no light and no line
 * over nothing - they arrive with the title, and the sweep with them. */
.deep__head:empty::before, .deep__head:empty::after { content: none; }
.asof { margin: 4px 0 0; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.asof:empty { display: none; }

/* What the page is, in a sentence or three, under its head (spec 2026-10-05
 * §6.2). Static HTML outside #main, so a crawler that runs no script reads
 * it and the page script's redraw of #main leaves it alone. Its links name a
 * source or a sister page in running text. */
.pintro { margin: 10px 13px 0; max-width: 110ch; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.pintro a { color: var(--ink); text-underline-offset: 2px; }

.ph__slot {
  flex: 0 1 auto; max-width: 100%; min-width: 0;
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto; overflow-y: hidden; padding: 2px 1px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.ph__slot::-webkit-scrollbar { display: none; }
/* The slot scrolls sideways, so the one ring is drawn inside its controls,
 * where the slot's edge cannot cut it. */
.ph__slot :focus-visible { outline-offset: -2px; }
.ph__slot:empty { display: none; }
/* The slot's own controls are pills (COT's categories, the calendar's
 * impact levels), a button or a link alike. A segmented control put in the
 * slot - the calendar's window, the Macro switch - keeps the seg look from
 * components.css, hence the :not(). On a phone every control in the slot is
 * a thumb's 40px tall; from 720 (a pointer) the pills are 34 and the seg's
 * buttons its own 30. Named, because the room pages.css keeps for a slot
 * that has not been filled yet is worked out from the same heights. */
.ph__slot { --pill-h: 40px; --seg-h: 40px; }
.ph__slot :is(a, button):not(.seg *) {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: var(--pill-h); padding: 0 12px; border: 0; border-radius: 999px; cursor: pointer;
  font: 500 12.5px/1 var(--font); color: var(--ink-2); white-space: nowrap; text-decoration: none;
  background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
.ph__slot .seg :is(a, button) { height: var(--seg-h); }
.ph__slot :is(a, button):not(.seg *):hover { color: var(--ink); }
.ph__slot :is(a, button):not(.seg *)[aria-pressed="true"] {
  color: var(--ink); background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(82, 227, 206, .38);
}
/* A pill for a kind of thing (COT's categories) takes that kind's hue
 * (spec 2026-09-27 §4, TRX.hues): a hue edge and a 10% ground. "All" has
 * none and stays neutral; the pressed pill is the active control, in teal. */
.ph__slot button[data-cat][data-hue]:not([aria-pressed="true"]) {
  background: color-mix(in srgb, var(--hue) 10%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hue) 45%, transparent);
}

/* ------------------------------------------------------------- sections */

/* The dashboard's section toggles - in the Settings popover on a desktop,
 * in the drawer on a phone. One markup, both places. */
.secs { display: flex; flex-direction: column; }
/* 40px rows on a phone (a thumb's target), from 720 as tall as their
 * padding makes them. */
.sec { display: flex; align-items: center; gap: 9px; padding: 9px 15px; min-height: 40px;
       background: none; border: 0; font: inherit; font-size: 13px;
       color: var(--ink-dim); cursor: pointer; text-align: left; width: 100%;
       border-radius: var(--r-sm); }
.sec:hover { background: var(--bg-hover); }
.sec .bx { width: 16px; height: 16px; border-radius: 3px; border: 1px solid var(--line);
           flex: none; display: grid; place-items: center; font-size: 12px;
           color: transparent; line-height: 1; }
.sec[aria-pressed="true"] { color: var(--ink); }
/* The ink on the accent (--ink-on-accent), as on the primary button - both
 * sit on an accent-toned surface and need the same contrast. */
.sec[aria-pressed="true"] .bx { background: var(--accent-dim); border-color: var(--accent-dim);
                                color: var(--ink-on-accent); }
.pop .sec { padding: 8px 6px; }

/* "Customize this page" in the drawer - present, discoverable, out of the way.
 * Small type, but a full 40px row: 12px above and below the 11px label make
 * the target a thumb can hit (it was 35px). */
.cust { margin: 6px 0 10px; }
.cust summary { font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
                color: var(--ink-faint); cursor: pointer; padding: 12px 16px;
                list-style: none; user-select: none; font-weight: 600; }
.cust summary::-webkit-details-marker { display: none; }
.cust summary::before { content: '⚙ '; }
.cust summary:hover { color: var(--ink-dim); }

.sh { font-size: 11px; letter-spacing: .11em; text-transform: uppercase;
      color: var(--ink-faint); padding: 0 16px 6px; font-weight: 600; }
.sempty { font-size: 12px; color: var(--ink-faint); padding: 0 16px; margin: 0 0 8px;
          line-height: 1.5; }
.sstat { font-size: 12px; color: var(--ink-faint); padding: 2px 16px 7px; margin: 0; }
.sstat b { color: var(--ink-dim); }

/* ---------------------------------------------------------- factor board */

/* Deep dive's reference shelf: all 61, collapsed by default. The summary
 * line carries the denominator even while closed. */
.factorboard { padding: 0; }
.fboard summary { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
                  padding: 14px 16px; cursor: pointer; list-style: none; user-select: none; }
.fboard summary::-webkit-details-marker { display: none; }
.fboard summary::after { content: '▾'; margin-left: auto; color: var(--ink-3);
                         transition: transform var(--t-fast); }
.fboard[open] summary::after { transform: rotate(180deg); }
.fboard__t { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.fboard__n { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.fboard__b { padding: 0 0 12px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.facgrid { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 8px; }

.ssearch { width: calc(100% - 32px); margin: 0 16px 6px; background: var(--bg-inset);
           border: 1px solid var(--line); border-radius: var(--r-md); padding: 9px 11px;
           color: var(--ink); font: inherit; font-size: 16px; }
/* 16px is not a style choice: iOS Safari zooms the viewport when a focused
 * input is smaller than that, and the zoom does not come back on blur. */
.ssearch::placeholder { color: var(--ink-faint); }

.grp__h { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 40px;
          padding: 9px 16px; background: none; border: 0; font: inherit;
          font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
          color: var(--ink-faint); cursor: pointer; font-weight: 600; text-align: left; }
.grp__h:hover { color: var(--ink-dim); }
.grp__h .cnt { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-faint);
               background: var(--bg-inset); border: 1px solid var(--line-soft);
               padding: 1px 6px; border-radius: 9px; letter-spacing: 0; }
.car { transition: transform .15s; font-size: 12px; display: inline-block; }
.grp[data-open="false"] .car { transform: rotate(-90deg); }
.grp[data-open="false"] .grp__b { display: none; }
/* A family's category hue (spec 2026-09-27 §4, TRX.hues.family): the header's
 * name in the hue with a 2px edge, its count left in ink. What kind of
 * factor, never whether it helps - a header carries no value. */
.grp[data-hue] > .grp__h { color: var(--hue); box-shadow: inset 2px 0 0 var(--hue); }

/* A factor row. The rail on the left is the earned colour: green when this
 * factor is currently a tailwind for the selected market, red when it is a
 * headwind, and NOTHING when there is no measured link - which is most of
 * them, and is the point. */
/* The 13px inset belongs to the row: on the stripe, as a margin, it pushed the
 * stripe out of its 3px track and across the name's first letter. The name's
 * track is minmax(0, 1fr) because a plain 1fr cannot shrink below the name's
 * full width - a long name was clipped instead of ending in an ellipsis. */
.fac { display: grid; grid-template-columns: 3px minmax(0, 1fr) auto; gap: 8px; align-items: center;
       width: 100%; padding: 7px 16px 7px 13px; background: none; border: 0;
       font: inherit; cursor: pointer; text-align: left; color: inherit; }
.fac:hover { background: var(--bg-hover); }
.fac__rail { width: 3px; height: 24px; border-radius: 2px; background: var(--line); }
.fac[data-eff="up"] .fac__rail { background: var(--up); }
.fac[data-eff="down"] .fac__rail { background: var(--down); }
.fac[data-eff="none"] { opacity: .5; }
.fac[data-eff="refused"] .fac__rail {
  background: repeating-linear-gradient(45deg, var(--warn) 0 2px, transparent 2px 4px); }
.fac__n { font-size: 12.5px; color: var(--ink-dim); overflow: hidden;
          text-overflow: ellipsis; white-space: nowrap; }
/* The family's dot rides inside the name's track, before the name: the row
 * keeps its three tracks, so the stripe stays clear of the name. */
.fac__n > .hue { margin-right: 7px; vertical-align: 1px; }
.fac:hover .fac__n { color: var(--ink); }
.fac__v { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--ink-dim); }
.fac__v i { display: block; font-size: 12px; font-style: normal; }
.fac__v i[data-s="up"] { color: var(--up); }
.fac__v i[data-s="down"] { color: var(--down); }
.fac__v i[data-s="flat"] { color: var(--ink-faint); }

/* ------------------------------------------------------------- tab bar */

/* Five destinations under a thumb. This is the phone's primary navigation.
 *
 * WHY A BAR AND NOT JUST THE DRAWER. Seven destinations, and the two views
 * plus COT and the calendar account for almost every visit. Putting those four
 * one tap away and the rest two taps away is the whole argument; More is not
 * a leftovers bin, it is the deliberate second tier, and nav.js derives its
 * contents so a page added later cannot go missing from it.
 *
 * The label under each icon stays. An icon-only bar looks tidier and asks
 * every reader to learn five glyphs to use the product, which is a cost paid
 * by the newest reader - the one least able to pay it. */
.navbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(var(--navbar-h) + var(--safe-b));
  /* 4px sides and none inside a tab: "Positioning", the longest label, is
   * 61.7px at 12px, and at 320px a tab is 62.4px (it was cut to
   * "Positioni..." in 56.8px). Its title is the fallback for a font that
   * sets it wider. */
  padding: 0 4px var(--safe-b);
  background: linear-gradient(180deg, rgba(38, 45, 52, .72), rgba(20, 24, 28, .86));
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.nvt {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 6px 0;
  background: none; border: 0; font: inherit; cursor: pointer;
  color: var(--ink-3); text-decoration: none;
}
.nvt svg { width: 22px; height: 22px; flex: none; }
.nvt span { font-size: 12px; letter-spacing: 0; line-height: 1;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
            max-width: 100%; }
.nvt:hover { color: var(--ink-dim); }
/* The page you are on, in its hue, with a short laser along the bar's top
 * edge above it (spec 2026-09-27 §5). */
.nvt.on { color: var(--page-hue); }
.nvt.on::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 2px;
                  border-radius: 0 0 2px 2px; pointer-events: none;
                  background: var(--page-hue); box-shadow: var(--laser-bloom); }

/* ----------------------------------------------- scrim, drawer and sheet */

/* The scrim is what makes the drawer and the sheet dismissible without
 * hunting for a close button - tap anything that is not the panel. */
.scrim { position: fixed; inset: 0; z-index: 59; background: rgba(4, 7, 10, 0.55);
         opacity: 0; pointer-events: none; transition: opacity .22s ease; }
.scrim[data-open="true"] { opacity: 1; pointer-events: auto; }

/* Closed panels are `visibility: hidden`, not just moved off-screen: an
 * off-canvas panel that is merely translated is still in the tab order, and
 * a keyboard reader tabs into a menu they cannot see. The visibility change
 * is delayed on close so the slide-out still plays. */
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 60;
  width: min(310px, 86vw);
  transform: translateX(-100%); visibility: hidden;
  transition: transform .22s ease, visibility 0s linear .22s;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  border-right: 1px solid var(--line); background: var(--bg-card);
  padding: 10px 0 calc(24px + var(--safe-b));
}
.drawer[data-open="true"] { transform: none; visibility: visible;
                            transition: transform .22s ease, visibility 0s; }
/* The drawer and the market sheet scroll, and their edges would cut the one
 * ring (components.css) off a row that spans them: inside them it is drawn
 * inside the control. */
.drawer :focus-visible, .msheet :focus-visible { outline-offset: -2px; }
.drawer__head { display: flex; align-items: center; justify-content: space-between;
                padding: 0 8px 8px 16px; }
.drawer__head .brand span { display: inline; }
.xbtn { width: 40px; height: 40px; display: grid; place-items: center; flex: none;
        background: none; border: 0; border-radius: var(--r-md); cursor: pointer;
        color: var(--ink-2); font-size: 24px; line-height: 1; }
.xbtn:hover { color: var(--ink); background: var(--bg-hover); }
.dsearch { width: calc(100% - 32px); margin: 4px 16px 12px; height: 40px;
           justify-content: flex-start; font-size: 14px; border-radius: 12px; padding: 0 14px; }
.dsearch svg { width: 16px; height: 16px; }
.dacct { padding: 0 16px 12px; }
.dacct .acct__in { width: 100%; }
.dgrp { padding: 6px 0; }
.dnav { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 44px;
        font-size: 14px; color: var(--ink-2); text-decoration: none;
        border-left: 2px solid transparent; }
.dnav svg { width: 20px; height: 20px; flex: none; color: var(--ink-3); }
.dnav:hover { background: var(--bg-hover); color: var(--ink); }
.dnav.on { color: var(--page-hue); border-left-color: var(--page-hue);
           background: color-mix(in srgb, var(--page-hue) 10%, transparent); }
.dnav.on svg { color: var(--page-hue); }

/* The market sheet: six markets and the session clock, rising from the tab
 * bar's edge where the thumb already is. */
.msheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  max-height: 80vh; overflow-y: auto; overscroll-behavior: contain;
  border-radius: 20px 20px 0 0; border-width: 1px 0 0;
  padding: 8px 16px calc(18px + var(--safe-b));
  transform: translateY(100%); visibility: hidden;
  transition: transform .26s var(--ease), visibility 0s linear .26s;
}
.msheet[data-open="true"] { transform: none; visibility: visible;
                            transition: transform .26s var(--ease), visibility 0s; }
.msheet__grip { width: 36px; height: 4px; border-radius: 2px; margin: 0 auto 6px;
                background: rgba(255, 255, 255, .18); }
.msheet__head { display: flex; align-items: center; justify-content: space-between; }
.msheet__t { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.msheet__clock { margin: 2px 0 12px; }

.mlist { display: flex; flex-direction: column; gap: 4px; }
.mrow {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px;
  padding: 0 12px; border: 0; border-radius: 12px; cursor: pointer; text-align: left;
  background: none; color: var(--ink); font: 500 15px/1.2 var(--font);
}
.mrow:hover { background: rgba(255, 255, 255, .05); }
.mrow.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.mk__s { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.mrow .lk svg { width: 14px; height: 14px; }
.pop .mrow { min-height: 40px; font-size: 14px; }

/* ----------------------------------------------------------------- main */

.shell, .dash { display: flex; align-items: flex-start; }
/* The page column: the head and the content under it. `min-width: 0` is what
 * lets a wide table inside scroll in its own box instead of widening the
 * column past the viewport. */
.page { flex: 1; min-width: 0; max-width: 1200px; }

/* The page's content. Every page with a #main ends its column with the
 * static site footer (.sitefoot, below), so the room the phone's tab bar
 * covers is the footer's, not this padding's. */
.main { min-width: 0;
        padding: 12px 13px 4px; }
/* While the page's data is on its way #main holds one loading line, and the
 * static footer under it sat in the first screen, to be pushed out of it as
 * the page arrived: the largest layout shift these pages had, 0.2 to 0.9
 * (measure_pages' cls check, plan E Task 10). So until the page arrives the
 * footer is laid out but not painted, and it is first seen where the page
 * leaves it. Keeping a screen's height under the loading line instead made
 * the footer rise into view wherever the page came back short (the
 * calendar on a weekend). Only the loading line is a direct child of #main:
 * a failure's .pempty sits inside a card, and shows the footer.
 *
 * NEVER FOR GOOD. The footer carries the maker's credit and the risk line,
 * which every page must show (spec §8). Without script the rule does not
 * apply at all; with script that never runs (blocked) or never answers,
 * trx-hold shows the footer after 4 s, once - api.js gives up on a request
 * at 20 s and a page that throws draws its failure card, but this does not
 * wait on either. `!important` because the reduced-motion rule
 * (components.css) switches every animation off with !important, and this
 * one moves nothing: it ends a hold. */
@media (scripting: enabled) {
  .main:has(> .pempty:only-child) ~ .sitefoot { visibility: hidden; animation: trx-hold 4s step-end both !important; }
}
/* The one way out of every "laid out but not painted" hold (here, app.css):
 * hidden for the hold's time, then shown for good. It runs once. */
@keyframes trx-hold { from { visibility: hidden; } to { visibility: visible; } }

/* THE SITE FOOTER (spec 2026-10-05 §6.3), static in every app page's HTML
 * but /app/'s: the indexed pages by name, who makes Tradox and the risk
 * line, so a crawler that runs no script follows the links (the rail and the
 * tab bar are written by shell.js). Compact on purpose: from 720 its links
 * are a line of 12px text, and at 1440 the whole footer is two lines under a
 * rule, no taller than the room #main used to keep below its last card -
 * Method had 35px of its 1,800 to spare. On a phone each link is a thumb's
 * 40px, and the padding under it clears the fixed tab bar - without that,
 * the last line would sit under the bar and read as cut off. /app/'s own
 * .footer reuses the nav. */
.sitefoot {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px;
  margin: 0 13px; padding: 8px 0 0;
  padding-bottom: calc(var(--navbar-h) + var(--safe-b) + 20px);
  border-top: 1px solid var(--line-soft);
  font-size: 12px; line-height: 1.5; color: var(--ink-3);
}
.sitefoot p { margin: 0; }
.sitefoot__nav { display: flex; flex-wrap: wrap; column-gap: 4px; margin: 0 -8px; }
.sitefoot__nav a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; min-width: 40px; padding: 0 8px;
  color: var(--ink-2); text-decoration: none;
}
.sitefoot__nav a:hover, .sitefoot__nav a[aria-current="page"] { color: var(--ink); }
.sitefoot__maker a { color: var(--ink-2); }
.sitefoot__maker a:hover { color: var(--ink); }
/* The surface itself (background, border, radius, shadow) is components.css's
 * `.card` - loaded before this file. Only the layout this app needs and the
 * component does not assume - internal padding, the gap between stacked
 * cards - stays here. */
.card { position: relative; padding: 14px 14px; margin-bottom: 12px; }
/* A CARD'S LIT EDGE (spec 2026-09-27 §5): a 1px laser along its top, from
 * the page hue into the measured teal, clear of the rounded corners. It
 * brightens on hover, and one highlight runs along it as it does. Chrome
 * only: it sits on the card's own edge, never on anything the card says. */
.card::before {
  content: ''; position: absolute; top: 0; left: 18px; right: 18px; height: 1px;
  pointer-events: none; opacity: .7;
  background:
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--page-hue) 35%, var(--ink)), transparent) 140% 0 / 22% 100% no-repeat,
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--page-hue) 55%, transparent) 30%,
                    color-mix(in srgb, var(--accent) 45%, transparent) 70%, transparent);
  transition: opacity var(--t-ui) var(--ease), box-shadow var(--t-ui) var(--ease);
}
.card:hover::before { opacity: 1; box-shadow: var(--laser-bloom);
                      animation: laser-sweep .9s var(--ease) 1 forwards; }
.card__h { display: flex; align-items: baseline; gap: 11px; margin-bottom: 12px;
           flex-wrap: wrap; }
.card__h h4 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.card__h p { margin: 0; font-size: 12px; color: var(--ink-faint); flex: 1;
             min-width: 140px; }

/* Every panel carries its caveat in its own box. Honesty that has to be
 * hunted for is not honesty, so there is no page-level disclaimer to hide
 * behind - the claim and its limit are always adjacent. */
.hint { margin-top: 11px; padding: 10px 12px; border-radius: var(--r-md);
        background: var(--bg-inset); border: 1px solid var(--line);
        border-left: 2px solid var(--accent); font-size: 12px;
        color: var(--ink-dim); line-height: 1.6; }
.hint b { color: var(--ink); }
.hint[data-k="warn"] { border-left-color: var(--warn); }
.hint code { font-family: var(--mono); font-size: 12px; }
.note { font-size: 12px; color: var(--ink-faint); margin: 10px 0 0; line-height: 1.6; }
.note b { color: var(--ink-dim); font-weight: 500; }
.pempty { font-size: 12.5px; color: var(--ink-faint); padding: 18px 0; text-align: center; }

/* The deep pages' contextual rail - the empty right side, used. Hidden until
 * there is a right side to use (1240px, below). From there its column is
 * kept from the first paint, empty until the page fills it: a rail that
 * appeared with the data narrowed the page under the reader and re-wrapped
 * every line in it (the cls check, plan E Task 10). A page whose rail has
 * nothing to say hides it (pagerail.js). */
.pagerail { display: none; }

/* The hidden attribute must always win. Without this, any element whose
 * display comes from an id or class rule (#panels display:grid) ignores
 * hidden entirely - the UA stylesheet loses the specificity fight, and
 * "hidden" panels render anyway. */
[hidden] { display: none !important; }

/* ================================================================ 720px */
/* A tablet, or a laptop. The rail sits beside the content, so the tab bar,
 * the drawer and the sheet all go - each of them was the phone's stand-in
 * for something the rail or the bar now shows directly. */
@media (min-width: 720px) {
  :root { --topbar-h: 60px; }

  .navbar, .scrim, .drawer, .msheet { display: none; }
  /* A pointer's rows: as tall as their padding makes them. */
  .sec, .grp__h { min-height: 0; }

  .topbar {
    gap: 12px; padding: 0 14px;
    background: rgba(7, 9, 11, .72);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom-color: var(--line-soft);
  }
  .brand span { display: inline; }

  #phmkt { display: none; }
  #tmktbtn { display: inline-flex; }
  .tmkt { height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 12px; }

  .tclock { display: block; flex: 0 1 190px; }

  .pill { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 14px;
          border-radius: 12px; background: rgba(255, 255, 255, .03);
          box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
  .quote__price { font-size: 15px; line-height: 1; }
  .quote__delta { font-size: 12.5px; }
  .freshness__text { max-width: 150px; }

  .tsearch { display: inline-flex; height: 36px; padding: 0 10px; border-radius: 12px;
             font-size: 13px; gap: 8px; }
  .acct { display: flex; }

  .navrail {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    width: var(--rail-w); flex: none;
    position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h));
    padding: 16px 0 18px; overflow-y: auto; scrollbar-width: none;
    border-right: 1px solid var(--line-soft); background: rgba(7, 9, 11, .5);
  }
  .navrail::-webkit-scrollbar { display: none; }

  .pagehead { padding: 20px 20px 4px; }
  .pagehead::after { left: 20px; right: 20px; }
  .pintro { margin: 12px 20px 0; }
  .ph__slot { --pill-h: 34px; --seg-h: 30px; }
  .deep__head::before { inset: -16px -20px -8px; }   /* the stage's 720px padding (app.css) */
  .main { padding: 12px 20px 4px; }
  /* No tab bar from 720, so no room for one; a pointer's links are a line
   * of text, the names spaced by the gap. */
  .sitefoot { margin: 0 20px; padding-bottom: 16px; }
  .sitefoot__nav { column-gap: 14px; margin: 0; }
  .sitefoot__nav a { min-height: 0; min-width: 0; padding: 0; }
  .facgrid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* =============================================================== 1000px */
/* Room for the view switch in the bar. It stays in the tab bar's place in
 * the reader's head - same two names, same order - but a mouse is up here. */
@media (min-width: 1000px) {
  .tviews { display: inline-flex; }
  .ph__title { font-size: 26px; }
}

/* =============================================================== 1180px */
/* The market button unfolds into the six-way switch, and the clock draws its
 * bands. The wordmark steps aside for the width between here and 1440 - the
 * mark still says where you are. */
@media (min-width: 1180px) {
  .tmkts { display: inline-flex; }
  #tmktbtn { display: none; }
  .tmkts button { padding: 0 10px; }
  .brand span { display: none; }
  /* Wide enough for all four session names (.clk__s): 196px makes Sydney's
   * three-hour first piece 24.5px. The right-hand group's free space pays
   * for it, and the clock is still the one item that gives way when the
   * bar is full. */
  .tclock { flex-basis: 196px; }
  .topbar .clk__bands { display: block; }
  .clk__cap { font-size: 12px; color: var(--ink-faint); }
}

/* =============================================================== 1240px */
@media (min-width: 1240px) {
  /* Sticky at --rail-top (shell.js, fitPagerail): under the bar while it
   * fits the screen, and scrolled with the page to its last line when it
   * does not. Never a fixed-height scroller of its own: that cut a card at
   * the screen's bottom with nothing to say more was below. */
  .pagerail { display: flex; width: 292px; flex: none; position: sticky;
              top: var(--rail-top, var(--topbar-h));
              padding: 20px 18px 40px 0;
              flex-direction: column; gap: 13px; }
  .pagerail .card { margin: 0; }
}

/* =============================================================== 1440px */
/* The board's full bar: wordmark, ticker in the pill, the search label. */
@media (min-width: 1440px) {
  .topbar { gap: 14px; padding: 0 18px; }
  .brand span { display: inline; }
  .tmkts button { padding: 0 12px; }
  .quote__sym { display: inline; }
  .quote__sym:empty { display: none; }
  .tsearch { padding: 0 12px; }
  .tsearch__l, .tsearch__k { display: inline; }
  .card { padding: 15px 17px; }
  /* WITH AN ACCOUNT CONTROL IN THE BAR (accounts on) the full bar runs out
   * of room: "Sign in" squeezed the clock to 141px, too narrow for Sydney's
   * first piece, and "SYD" dropped. The bar re-flows instead: its gaps and
   * edges, the market buttons, the search button and "Sign in" take tighter
   * measures (the market buttons the 1180px bar's), so all four sessions
   * stay named - nothing is hidden. */
  .topbar:has(#acct:not([hidden])) { gap: 12px; padding: 0 14px; }
  .topbar:has(#acct:not([hidden])) .tmkts button { padding: 0 10px; }
  .topbar:has(#acct:not([hidden])) .tright { gap: 8px; }
  .topbar:has(#acct:not([hidden])) .tsearch,
  .topbar:has(#acct:not([hidden])) .acct__in { padding: 0 10px; }
}

/* -------------------------------------------------------- command palette */

/* Ctrl/Cmd-K. The answer to "sixty-one factors do not fit in a nav bar",
 * which is why the space freed in the top bar did not need filling with more
 * links. Navigation only - it goes places, it does not do things. */
.pal { position: fixed; inset: 0; z-index: 100; background: rgba(4, 7, 10, 0.62);
       display: flex; justify-content: center; align-items: flex-start;
       padding-top: 14vh; }
.pal[hidden] { display: none; }

.pal__box { width: min(560px, calc(100vw - 32px));
            background: var(--bg-raised); border: 1px solid var(--line);
            border-radius: var(--r-lg); box-shadow: var(--shadow);
            overflow: hidden; display: flex; flex-direction: column; }

.pal__in { border: 0; border-bottom: 1px solid var(--line); background: transparent;
           color: var(--ink); font: inherit; font-size: 16px;
           padding: 14px 16px; outline: none; }
/* The field fills the box edge to edge and the box clips it, so the one
 * ring (components.css) goes round the box: while the palette is open its
 * field has focus, and the palette is the active control. */
.pal__box:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pal__in::placeholder { color: var(--ink-faint); }

.pal__list { max-height: 46vh; overflow-y: auto; padding: 6px; }
/* The list scrolls a row it tabs to flush against its edge, which would cut
 * the one ring off: inside the list it is drawn inside the row. */
.pal__list :focus-visible { outline-offset: -2px; }
.pal__row { display: flex; align-items: center; justify-content: space-between;
            gap: var(--sp-3); width: 100%; text-align: left;
            background: transparent; border: 0; border-radius: var(--r-sm);
            color: var(--ink-dim); font: inherit; font-size: 13px;
            padding: 10px 10px; cursor: pointer; }
.pal__row:hover { background: var(--bg-hover); color: var(--ink); }
/* The cursor is the accent's one exception-free use here: it marks what Enter
 * will do, which is a fact about this page rather than about the market. */
.pal__row.on { background: var(--accent-soft); color: var(--accent);
               box-shadow: inset 0 0 0 1px var(--accent-line); }
.pal__l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal__k { flex: none; font-size: 11px; color: var(--ink-faint);
          letter-spacing: .04em; text-transform: uppercase; }
.pal__row.on .pal__k { color: var(--accent-dim); }

.pal__none { margin: 0; padding: 18px 12px; color: var(--ink-faint); font-size: 13px; }
.pal__hint { border-top: 1px solid var(--line-soft); padding: 8px 14px;
             font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }
/* The keyboard hint is a lie on a touch device - there is no Ctrl-K to press
 * and no Esc to leave with. */
@media (hover: none) { .pal__hint { display: none; } }

/* ------------------------------------------------------------ motion off */
@media (prefers-reduced-motion: reduce) {
  .drawer, .msheet, .scrim, .car, .ri, .ph__slot :is(a, button) { transition: none; }
}
