/* NeuralStrike public site — the thin layer over Nocturne.
 *
 * Nocturne (nocturne.css) owns colour, type, spacing and the component
 * classes. This file holds only what a static site needs on top:
 *
 *   1. the self-hosted Inter faces, replacing the design's Google Fonts link
 *   2. the hover states the design canvas carried as `style-hover=` attributes,
 *      which are not a real HTML feature and had to become CSS rules
 *
 * Nothing here restates a Nocturne token. If a value is needed, it comes
 * through var(--*).
 */

/* ─── 1. Inter, self-hosted ──────────────────────────────────────────────
 *
 * Inter v20 is a VARIABLE font: one file covers the whole 400-600 range the
 * design uses, which is why there are two files here (two unicode subsets)
 * rather than six (three weights x two subsets).
 *
 * `font-display: swap` matches what the design asked Google for. Text paints
 * immediately in system-ui and reflows to Inter — on a page this text-heavy,
 * a flash of unstyled text beats a flash of no text.
 *
 * ⚠ DO NOT ADD `<link rel="preload">` FOR THESE. It was tried, and measured:
 * the pages fetched the face TWICE per load — once for the preload, once for
 * the @font-face — and every load logged "preloaded using link preload but not
 * used within a few seconds". Removing the tag took it to exactly one request.
 * The theoretical saving is one round trip on a stylesheet that is already
 * small, inline-free and first in the head; the measured cost was a duplicate
 * download of 48 KB and a console warning on every visit.
 */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── 2. Page base ───────────────────────────────────────────────────────
 * The three-line base the design repeated in each page's <style> block.
 */
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  text-wrap: pretty;
}
a {
  color: var(--color-accent);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover { color: var(--color-accent-300); text-decoration: underline; }

/* The page ground. Both radial washes are the design's, verbatim. */
.ns-page {
  min-height: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 720px at 84% -180px,
      color-mix(in srgb, var(--color-accent-900) 80%, transparent), transparent 60%),
    radial-gradient(1100px 800px at -10% 100%,
      color-mix(in srgb, black 32%, transparent), transparent 55%),
    var(--color-bg);
}
.ns-page-sub {
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 88% -200px,
      color-mix(in srgb, var(--color-accent-900) 70%, transparent), transparent 60%),
    var(--color-bg);
}

/* ─── 3. Navigation ──────────────────────────────────────────────────── */
.ns-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px clamp(16px, 3vw, 40px);
  border-bottom: 1px solid var(--color-divider);
}
.ns-nav-tall { gap: 24px; padding: 18px clamp(20px, 5vw, 72px); }
.ns-nav-sticky {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(10px);
}
.ns-spacer { flex: 1; }

.ns-brand {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text);
}
.ns-nav-tall .ns-brand { font-size: 15px; }
.ns-brand .ns-brand-b { color: var(--color-accent); }
a.ns-brand:hover { color: var(--color-accent); text-decoration: none; }

/* ─── The mark ───────────────────────────────────────────────────────────
 *
 * THE FLIP: two chevrons converging on a level — dealer hedging pinned to the
 * gamma flip. Inlined into the pages rather than loaded from assets/mark.svg
 * so it can take its colour from CSS; the standalone file exists for anywhere
 * that cannot inline it (the favicon, the app header, the social card).
 *
 * ⚠ The geometry is duplicated: here as markup in three pages, and in
 * assets/mark.svg + assets/favicon.svg + webgui/static/img/neuralstrike-mark.svg.
 * That is deliberate — an <img> gets no stylesheet, so a single shared file
 * cannot follow the page's accent — but it means a change to the shape is a
 * change in four places. deploy/tests/test_site.py checks they stay in step.
 */
.ns-lockup { display: inline-flex; align-items: center; gap: 9px; }

.ns-mark { width: 26px; height: 26px; display: block; flex: none; overflow: visible; }
.ns-mark-rule { fill: var(--color-accent); }
.ns-mark-fig {
  fill: none;
  stroke: var(--color-text);
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hero scale. The level is allowed to run past the mark's own box (hence
 * `overflow: visible` above) so it reads as a price level crossing the page
 * rather than an icon sitting on it. */
.ns-hero-mark {
  margin: 0 auto;
  flex: 0 1 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.ns-mark-xl { width: min(240px, 62vw); height: min(240px, 62vw); }
.ns-mark-xl .ns-mark-rule {
  /* The one place the rule earns a fade: at this size it is page furniture as
   * much as mark, and it has to die away rather than stop dead against the
   * hero's radial wash. The reproducible mark keeps its solid rule. */
  fill: url(#ns-rule-fade);
}
.ns-hero-cap {
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 45%, transparent);
}

.ns-navlink {
  font-size: 13.5px;
  white-space: nowrap;
  color: color-mix(in srgb, var(--color-text) 72%, transparent);
}
.ns-navlink:hover { color: var(--color-accent); text-decoration: none; }

.ns-crumb {
  font-size: 13px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.ns-count {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  font-feature-settings: "tnum" 1;
}

/* The design was drawn at desktop width and its nav does not fit a phone.
 * Measured at 375px: the landing nav needs 587px, so the three links and the
 * primary button ran off the right edge — and because .ns-page clips overflow
 * they were not merely awkward but INVISIBLE, taking the page's main call to
 * action with them.
 *
 * The break is put on .ns-spacer, which already sits at exactly the right point
 * on all three pages — after the brand and any breadcrumb, before the links.
 * Given a full-width basis it becomes a zero-height row of its own, so
 * everything after it starts on the next line. One rule, no per-page markup.
 *
 * ⚠ THE BREAK IS AT 960px BECAUSE THAT IS WHERE THE MENU STOPS FITTING, and it
 * has to move whenever the menu gains a word. It sat at 700px while the menu
 * grew: MEASURED with five links and the Tools item, the row's last item ended
 * 837px in, so every viewport from 701 to about 852 (an iPad held upright is
 * 768, 820 or 834) had the Live screens button off the right edge. The Blog
 * link moved that to 887px: off the edge up to about 905. 960 leaves room for
 * a wider scrollbar and for the fallback face before Inter arrives. Between
 * 701 and 960 the menu is two rows (the brand, then the links) and stays
 * pinned; the rule below un-pins it only on a phone. deploy/tests/test_site.py
 * holds the measured width and the words it was measured for. */
@media (max-width: 960px) {
  .ns-nav { flex-wrap: wrap; gap: 10px 14px; }
  .ns-nav .ns-spacer { flex: 0 0 100%; height: 0; }
}
@media (max-width: 700px) {
  /* The one site menu wraps to three rows (~140px) on a 375px phone; pinned, it
   * would hold a sixth of the screen while reading. It scrolls away instead. */
  .ns-nav-sticky { position: relative; }
}
/* The landing's nav settles at three visual rows on a 375px screen — brand,
 * the three links, then the button. Shrinking the link type and the button
 * padding to pull it to two was tried and MEASURED AT NOTHING (141px → 140px,
 * still four rows): the links plus the button need ~349px against 335px of
 * usable width, and 14px is not recoverable from type alone. Reverted rather
 * than left in as CSS that looks like it is doing something. */

/* ─── 4. Buttons ─────────────────────────────────────────────────────────
 *
 * Nocturne's .btn-primary / .btn-ghost already carry hover and active states,
 * so most of the design's `style-hover` on buttons only restated the system.
 * The one variant that genuinely differs is the outlined ghost: the design
 * mutes its border to neutral-700 at rest and lifts it to the accent on hover.
 */
.btn-outline { border-color: var(--color-neutral-700); }
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* THE MARKET GLOW. assets/market-glow.js puts this class on the nav's Live
 * screens button while the US session is open, and takes it off at the close.
 *
 * It is the ONE place on the site whose colour is not the violet accent, and
 * that is the point: the button means something different for six and a half
 * hours a day, and a brighter violet would read as a hover state. The green is
 * the app's own profit green, so the two surfaces speak one vocabulary.
 *
 * Built out of .ns-dot's language -- a colour plus a soft outer box-shadow --
 * rather than a new one. Three shadows: a hairline that firms the edge, a tight
 * halo, and a wide low-opacity bloom that is what actually reads as neon on the
 * dark ground.
 *
 * DELIBERATELY STEADY. .ns-dot pulses and carries a prefers-reduced-motion
 * guard for it; this does not animate, so it needs none. A pulsing button in
 * the nav of every page view would be an advertisement, not a status light.
 *
 * ⚠ These rules must stay AFTER nocturne's .btn-primary. Both are single-class
 * selectors, so the cascade is decided by source order alone, and site.css is
 * the sheet that loads second. */
.ns-market-open {
  --ns-open: #34d399;
  color: var(--ns-open);
  border-color: color-mix(in srgb, var(--ns-open) 72%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--ns-open) 20%, transparent),
    0 0 16px -3px color-mix(in srgb, var(--ns-open) 55%, transparent),
    0 0 40px -10px color-mix(in srgb, var(--ns-open) 45%, transparent);
}
.ns-market-open:hover {
  background: color-mix(in srgb, var(--ns-open) 12%, transparent);
  border-color: var(--ns-open);
}
.ns-market-open:active { background: color-mix(in srgb, var(--ns-open) 22%, transparent); }

/* ─── 5. Shared marks ────────────────────────────────────────────────────
 * The accent eyebrow: a 40px rule, then small uppercase text.
 */
.ns-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.ns-eyebrow::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--color-accent);
  flex: none;
}
.ns-eyebrow-sm { font-size: 12px; }
.ns-eyebrow-sm::before { width: 28px; }

/* The live dot: an accent point with its own glow. */
.ns-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 12px var(--color-accent);
  flex: none;
  animation: ns-pulse 2.8s ease-in-out infinite;
}
@keyframes ns-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* Respect a reduced-motion preference: the dot is decoration, and the design
 * gives it no meaning that its animation carries. */
@media (prefers-reduced-motion: reduce) {
  .ns-dot { animation: none; opacity: 1; }
  * { scroll-behavior: auto !important; }
}

/* A rule that fades at both ends — the system's stated preference over a
 * plain hairline. */
.ns-rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(to right, transparent,
    var(--color-divider) 48px, var(--color-divider) calc(100% - 48px), transparent);
}

/* ─── 6. Landing page ────────────────────────────────────────────────── */
.ns-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 72px);
}
.ns-h1 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  margin-left: -0.06em;
}
.ns-h1 span { display: block; }
.ns-h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 0 0 24px;
}
.ns-h2-sm {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.015em;
}
.ns-lede {
  font-size: 17.5px;
  line-height: 1.65;
  max-width: 56ch;
  color: color-mix(in srgb, var(--color-text) 84%, transparent);
}
.ns-body {
  font-size: 17px;
  line-height: 1.65;
  max-width: 62ch;
  color: color-mix(in srgb, var(--color-text) 82%, transparent);
}
.ns-note {
  font-size: 13.5px;
  line-height: 1.5;
  color: color-mix(in srgb, var(--color-text) 62%, transparent);
}
.ns-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* The one full-bleed saturated band the system permits at page scale. */
.ns-band {
  background:
    radial-gradient(900px 420px at 85% -40%,
      color-mix(in srgb, var(--color-section-glow) 70%, transparent), transparent 64%),
    var(--color-section);
}
.ns-band-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px 28px;
  padding-block: clamp(36px, 5vw, 64px);
}
.ns-stat {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.1;
  margin: 0 0 12px;
  font-feature-settings: "tnum" 1;
}
.ns-stat-label {
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  color: color-mix(in srgb, var(--color-text) 66%, transparent);
}

/* The four numbered steps. */
.ns-steps {
  list-style: none;
  margin: 0 0 clamp(28px, 4vw, 48px);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.ns-step {
  background: var(--color-bg);
  padding: 26px 24px;
  border: 1px solid var(--color-neutral-800);
  border-radius: var(--radius-md);
}
.ns-step-n {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 14px;
  color: var(--color-accent);
  margin: 0 0 14px;
  font-feature-settings: "tnum" 1;
}
.ns-step-t {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.3;
  margin: 0 0 10px;
}
.ns-step-b {
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
  color: color-mix(in srgb, var(--color-text) 74%, transparent);
}

/* The pull-quote with an accent edge. */
.ns-pull {
  font-size: 15.5px;
  line-height: 1.6;
  margin: 0;
  padding-left: 18px;
  border-left: 2px solid var(--color-accent);
  max-width: 58ch;
  color: color-mix(in srgb, var(--color-text) 84%, transparent);
}
.ns-pull strong { color: var(--color-text); font-weight: 500; }

/* The four lenses: title left, description right, hairline between. */
.ns-lens {
  display: flex;
  flex-wrap: wrap;
  gap: 12px clamp(24px, 5vw, 72px);
  align-items: baseline;
  padding: 26px 0;
  border-top: 1px solid var(--color-neutral-800);
}
.ns-lens:last-child { border-bottom: 1px solid var(--color-neutral-800); }
.ns-lens h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
  flex: 1 1 240px;
  min-width: 0;
}
.ns-lens p {
  font-size: 15.5px;
  line-height: 1.65;
  margin: 0;
  max-width: 56ch;
  flex: 2 1 320px;
  min-width: 0;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}

/* The two safety cards. */
.ns-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(20px, 3vw, 32px);
}
.ns-cards .card { padding: 28px; }
.ns-cards h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.25;
  margin: 0 0 12px;
}
.ns-cards p:last-child {
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}

/* The community block. */
.ns-community {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px clamp(24px, 5vw, 64px);
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--color-neutral-800);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--color-accent-900) 40%, transparent), transparent);
}
.ns-community h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(21px, 2.2vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.012em;
  margin: 0 0 10px;
}
.ns-community p {
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
  max-width: 48ch;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}

.ns-foot {
  font-size: 12.5px;
  line-height: 1.7;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}

/* ─── 8. Glossary ────────────────────────────────────────────────────────
 *
 * Definitions are a real <dl>. On a wide screen the term sits in its own left
 * column so the page can be scanned down the terms alone; below 720px that
 * column would squeeze the definition to a ribbon, so the pair stacks.
 */
.gl-wrap { padding-bottom: clamp(48px, 6vw, 88px); }
.gl-head { padding: clamp(32px, 5vw, 56px) 0 clamp(20px, 3vw, 32px); }
.gl-head .ns-eyebrow { margin-bottom: 18px; }
.gl-head h1 { margin-bottom: 16px; }

.gl-toc {
  border-top: 1px solid var(--color-neutral-800);
  border-bottom: 1px solid var(--color-neutral-800);
  padding: 18px 0;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.gl-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px 24px;
}
.gl-toc a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14.5px;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}
.gl-toc a:hover { color: var(--color-accent); text-decoration: none; }

/* The section number. Tabular so the column of them lines up. */
.gl-num {
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--color-accent);
  font-feature-settings: "tnum" 1;
  flex: none;
  min-width: 1.1em;
}

.gl-sec { padding-top: clamp(28px, 4vw, 44px); }
.gl-sec h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(21px, 2.3vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.012em;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-neutral-800);
}
.gl-sec h2 .gl-num { font-size: 14px; }

.gl-p {
  font-size: 15.5px;
  line-height: 1.65;
  max-width: 62ch;
  margin: 0 0 18px;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}

.gl-list { margin: 0; display: grid; gap: 14px 28px; }
.gl-list dt {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  color: var(--color-text);
  line-height: 1.4;
}
.gl-list dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.62;
  max-width: 68ch;
  color: color-mix(in srgb, var(--color-text) 76%, transparent);
}
.gl-list strong { color: var(--color-text); font-weight: 500; }
.gl-list code {
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-text) 8%, transparent);
}

@media (min-width: 721px) {
  /* Term left, definition right — the layout that makes a glossary skimmable. */
  .gl-list { grid-template-columns: minmax(150px, 210px) 1fr; }
  .gl-list dt { grid-column: 1; text-align: right; }
  .gl-list dd { grid-column: 2; }
}

.gl-tablewrap { overflow-x: auto; margin: 4px 0 20px; }
.gl-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 460px;
  font-size: 14.5px;
}
.gl-table th,
.gl-table td {
  text-align: left;
  padding: 9px 14px 9px 0;
  border-bottom: 1px solid var(--color-neutral-800);
  vertical-align: top;
}
.gl-table th {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--color-accent);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.gl-table td { color: color-mix(in srgb, var(--color-text) 78%, transparent); }
.gl-table tr:last-child td { border-bottom: 0; }

.gl-foot {
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 22px;
  border-top: 1px solid var(--color-neutral-800);
}

/* ─── 9. Social links ────────────────────────────────────────────────────
 * Icon-only buttons in the community block. Square, so a row of five reads as
 * a set rather than as five differently-sized words.
 */
.ns-social { display: flex; flex-wrap: wrap; gap: 8px; }
.ns-social .btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border-color: var(--color-neutral-700);
}
.ns-social .btn:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ─── 10. Live page (the Live Desk) ──────────────────────────────────────
 *
 * The picture tiles on a turning wall, then the tool links; each tile a still
 * capture of one published live screen (see the header comment in live.html for why a
 * picture and not an iframe). blog.html, ideas.html and report.html borrow the
 * page frame below (.ns-live-page / -main / -head / -title / -lede / -note).
 *
 * ⚠ THE TILE'S BOX MUST EXIST BEFORE ITS PICTURE DOES. The captures are
 * generated on the serving box and gitignored, so on a fresh deploy — and any
 * time the capture timer is down — the images 404. Every <img> therefore
 * declares width/height AND gets `aspect-ratio` here, so the grid is a page of
 * labelled boxes rather than a collapsed pile of captions. `object-fit: cover`
 * is the other half: a capture whose aspect ever drifts crops instead of
 * letterboxing into a box the rest of the row does not share.
 */
/* The column that lets .ns-live-main take the slack, so the footer sits at the
 * bottom of a short viewport instead of under the last row of tiles. It was an
 * inline style on this page's wrapper while the page was a placeholder. */
.ns-live-page { display: flex; flex-direction: column; }
.ns-live-main {
  flex: 1;
  padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 72px) clamp(40px, 6vw, 80px);
}
.ns-live-head { max-width: 64ch; margin: 0 0 clamp(26px, 4vw, 40px); }
.ns-live-head .ns-eyebrow { margin: 0 0 18px; }
.ns-live-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  margin-left: -0.06em;
}
.ns-live-lede {
  font-size: 16.5px;
  line-height: 1.65;
  max-width: 62ch;
  margin: 0;
  color: color-mix(in srgb, var(--color-text) 80%, transparent);
}

/* The Live Desk layout (2026-10-29, "the wall"): a hero with three group
 * chips, the twelve tiles on a turning 3D ring with the front screen's caption
 * under it, then a row of tool links.
 *
 * TWO LAYOUTS FROM ONE MARKUP. live.html ships the tiles as a plain grid, three
 * group sections each with its heading; that is what a visitor gets with no
 * script. assets/live.js adds .is-on to .ns-wall, and every rule scoped under
 * .ns-wall.is-on below turns the grid into the ring: the sections and their
 * grids become display: contents, so each tile is laid out as a direct child
 * of the ring, which is what preserve-3d needs. The script writes each tile's
 * own rotateY/translateZ and the ring's turn; everything else is here.
 *
 * Design tokens are Nocturne's (assets/nocturne.css): the accent appears as a
 * line or a glow, never as a fill. */
/* The ring is wider than the column it sits in; on a phone its side tiles run
 * off both edges. `clip`, not `hidden`: hidden would make this a scroll
 * container, and the sticky menu inside it would stop sticking. */
.ns-desk-page { overflow-x: clip; }
.ns-desk-main { display: flex; flex-direction: column; gap: 22px; max-width: 1280px; margin: 0 auto; width: 100%; }
/* The footer keeps to the same centred column as the page above it. */
.ns-desk-page .ns-live-foot { max-width: 1280px; margin: 0 auto; width: 100%; }

.ns-desk-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
/* The copy gives way to the chips before the chips wrap under it. */
.ns-desk-hero-copy { flex: 1 1 520px; display: flex; flex-direction: column; gap: 14px; max-width: 680px; }
.ns-desk-hero .ns-live-title { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.04; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
.ns-desk-hero .ns-live-lede { font-size: 15.5px; line-height: 1.6; max-width: 64ch; color: var(--color-neutral-400); text-wrap: pretty; }
.ns-desk-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-300);
}
.ns-desk-sep { color: var(--color-neutral-600); }
/* On a phone the count wraps to its own line, where a leading dot dangles. */
@media (max-width: 480px) { .ns-desk-sep { display: none; } }
.ns-desk-muted { color: var(--color-neutral-400); }
.ns-desk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 12px var(--color-accent); flex: none; }
/* Pulses only while the market glow has lit the menu button: the script puts
 * .ns-market-open on that link, so this needs no script of its own. */
body:has(.ns-market-open) .ns-desk-dot { animation: ns-desk-pulse 2s infinite; }
@keyframes ns-desk-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 55%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Group chips. aria-current marks the group of the screen in front (live.js). */
.ns-desk-jump { display: flex; flex-wrap: wrap; gap: 8px; }
.ns-desk-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--color-neutral-400);
  text-decoration: none;
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.ns-desk-pill .ns-ico { color: var(--color-accent); }
.ns-desk-pill span { color: var(--color-neutral-600); font-variant-numeric: tabular-nums; }
.ns-desk-pill:hover,
.ns-desk-pill:focus-visible { color: var(--color-text); background: var(--color-neutral-900); text-decoration: none; }
.ns-desk-pill[aria-current="true"] {
  color: var(--color-accent-200);
  background: var(--color-accent-900);
  box-shadow: inset 0 0 0 1px var(--color-accent-700), 0 0 18px -6px var(--color-accent);
}
.ns-desk-pill[aria-current="true"] span { color: var(--color-accent-300); }

/* Icons: the inline sprite at the top of live.html. Stroke settings inherit
 * into each <use>, so one rule draws them all in the text colour. */
.ns-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ns-ico {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ns-desk-main section { scroll-margin-top: 80px; }
.ns-desk-main h2 { font-family: var(--font-heading); font-weight: 500; font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }

/* ── The tiles: the plain grid (no script) ── */
.ns-wall-ring { display: flex; flex-direction: column; gap: clamp(40px, 6vw, 60px); margin-top: 18px; }
.ns-desk-group { display: flex; flex-wrap: wrap; gap: 24px 40px; }
.ns-desk-group-head { flex: 1 1 220px; max-width: 280px; display: flex; flex-direction: column; gap: 10px; }
.ns-desk-group-head p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--color-neutral-400); text-wrap: pretty; }
.ns-desk-group-head .ns-desk-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-neutral-500);
}
.ns-desk-kicker .ns-ico { font-size: 20px; color: var(--color-accent); }
.ns-desk-screens {
  flex: 999 1 560px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 14px;
  /* start, not stretch: a tile whose description wraps to more lines is
   * taller, and a stretched neighbour would grow an empty band. */
  align-items: start;
}

/* One tile: a card with the capture on top and its name under it. */
.ns-desk-spot {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px var(--color-neutral-800);
  text-decoration: none;
  transition: box-shadow 0.5s ease;
}
.ns-desk-spot:hover,
.ns-desk-spot:focus-visible { color: var(--color-text); text-decoration: none; box-shadow: 0 0 0 1px var(--color-accent-600); }
.ns-live-tile { display: flex; flex-direction: column; }
.ns-desk-thumb { position: relative; display: block; aspect-ratio: 8 / 5; overflow: hidden; background: var(--color-bg); }
.ns-live-tile img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 8 / 5;          /* the capture viewport, 1600x1000 */
  object-fit: cover;
  object-position: top left;
  background: var(--color-bg);
  pointer-events: none;
  /* ⚠ THE EMPTY STATE IS A REAL STATE, not a transient one. The captures are
     gitignored and written on the serving box, so this page ships referencing
     files that do not exist yet -- and if the capture timer ever stops, it
     goes back to that state on a PUBLIC page.

     Without this, a missing capture renders its alt text spilling across the
     top-left of the tile beside a broken-image icon, which reads as a broken
     site rather than as a screen not captured yet. Transparent text drops the
     spill; `aspect-ratio` above holds the box open at full size either way, so
     what remains is an empty panel over its caption.

     The alt attribute STAYS -- it is still read aloud, and .ns-live-cap
     repeats the same name visually, so nothing is lost to a sighted reader. */
  color: transparent;
}
.ns-desk-screen-text { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px 14px; }
.ns-desk-screen-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ns-live-cap { font-size: 14.5px; font-weight: 500; letter-spacing: -0.01em; }
/* The group's name on the tile is for the wall, where no heading says it. */
.ns-desk-tile-kick { display: none; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent-300); white-space: nowrap; }
.ns-desk-screen-desc { font-size: 13px; line-height: 1.45; color: var(--color-neutral-400); }

/* ── The tiles: the wall (live.js has added .is-on) ── */
.ns-wall { position: relative; display: flex; flex-direction: column; gap: 18px; }
.ns-wall-floor, .ns-wall-caption { display: none; }
.ns-wall.is-on .ns-wall-stage {
  position: relative;
  height: 400px;
  perspective: 1500px;
  perspective-origin: 50% 30%;
  cursor: grab;
  touch-action: pan-y;          /* a vertical swipe still scrolls the page */
  user-select: none;
  -webkit-user-select: none;
}
.ns-wall.is-on .ns-wall-stage:active { cursor: grabbing; }
.ns-wall.is-on .ns-wall-stage:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; border-radius: var(--radius-lg); }
/* The pool of light the ring stands in. */
.ns-wall.is-on::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(1000px, 140vw);
  height: 520px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(closest-side, var(--color-accent-900), transparent);
}
.ns-wall.is-on .ns-wall-floor {
  display: block;
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 10px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--color-accent) 30%, transparent), transparent);
  filter: blur(12px);
  pointer-events: none;
}
.ns-wall.is-on .ns-wall-ring {
  display: block;
  position: absolute;
  inset: 0;
  margin: 0;
  transform-style: preserve-3d;
  will-change: transform;
}
.ns-wall.is-on .ns-desk-group,
.ns-wall.is-on .ns-desk-screens { display: contents; }
.ns-wall.is-on .ns-desk-group-head,
.ns-wall.is-on .ns-desk-screen-desc { display: none; }
.ns-wall.is-on .ns-desk-tile-kick { display: inline; }
.ns-wall.is-on .ns-live-tile {
  position: absolute;
  left: 50%;
  /* The ring's tilt carries the front tile about 70px down from here, and
   * the tiles behind it rise into the space above. */
  top: 10px;
  width: var(--ns-card-w, 300px);
  margin-left: calc(var(--ns-card-w, 300px) / -2);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.ns-wall.is-on .ns-live-tile.is-front { box-shadow: 0 0 0 1px var(--color-accent), 0 0 50px -10px var(--color-accent); }

/* The caption: the front screen's group and place, name and description. */
.ns-wall.is-on .ns-wall-caption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.ns-wall-cap-left { display: flex; align-items: center; gap: 18px; }
.ns-wall-cap-text { display: flex; flex-direction: column; gap: 3px; min-width: min(320px, 55vw); }
.ns-wall-cap-kick { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-neutral-500); font-variant-numeric: tabular-nums; }
.ns-wall-cap-name { font-family: var(--font-heading); font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.ns-wall-cap-desc { font-size: 14px; line-height: 1.5; color: var(--color-neutral-400); }
.ns-wall-round {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  font-size: 17px;
  cursor: pointer;
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-neutral-700);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}
.ns-wall-round:hover { box-shadow: inset 0 0 0 1px var(--color-accent), 0 0 20px -4px var(--color-accent); }
.ns-wall-round:active { background: var(--color-accent-900); }
.ns-wall-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-accent-200);
  box-shadow: inset 0 0 0 1px var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.ns-wall-open:hover,
.ns-wall-open:focus-visible {
  color: var(--color-text);
  background: var(--color-accent-900);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--color-accent-300), 0 0 22px -6px var(--color-accent);
}

@media (max-width: 720px) {
  .ns-wall.is-on .ns-wall-stage { height: 280px; }
  .ns-wall.is-on .ns-live-tile { top: 0; }
  .ns-wall-cap-left { gap: 12px; }
  .ns-wall-cap-name { font-size: 20px; }
}

/* ── Tools: one row of links under the wall ── */
.ns-desk-tools-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--color-neutral-900);
}
.ns-desk-main .ns-desk-tools-label {
  font-family: var(--font-body, inherit);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-neutral-500);
}
.ns-desk-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.ns-desk-tool {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--color-neutral-300);
  box-shadow: inset 0 0 0 1px var(--color-neutral-800);
  text-decoration: none;
  transition: color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.ns-desk-tool .ns-ico { color: var(--color-accent); }
.ns-desk-tool:hover,
.ns-desk-tool:focus-visible {
  color: var(--color-text);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--color-accent), 0 0 16px -4px var(--color-accent);
  transform: translateY(-1px);
}
/* The Strategy Tools link names the three screens it opens. Text, not links:
 * the whole pill is already one. */
.ns-desk-tool-tags { display: inline-flex; flex-wrap: wrap; gap: 0 6px; font-size: 12px; color: var(--color-neutral-500); }
.ns-desk-tool-tags span + span::before { content: "·"; margin-right: 6px; color: var(--color-neutral-600); }

/* A tile plus the views that live under it (Screen.parent). No screen has a
 * parent today; kept so one added to the table has somewhere to go. */
.ns-live-group { display: flex; flex-direction: column; gap: 8px; }
.ns-live-sub { display: flex; flex-wrap: wrap; gap: 6px; }
.ns-live-sub a {
  padding: 5px 11px;
  border: 1px solid var(--color-neutral-800);
  border-radius: 999px;
  background: var(--color-neutral-900);
  font-size: 12.5px;
  line-height: 1.3;
  color: color-mix(in srgb, var(--color-text) 82%, transparent);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.ns-live-sub a:hover,
.ns-live-sub a:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-text);
  text-decoration: none;
}

.ns-desk-note p { margin: 0 0 8px; }
.ns-desk-note .ns-desk-quiet { display: flex; align-items: center; gap: 8px; color: var(--color-neutral-400); }
.ns-desk-quiet .ns-ico { color: var(--color-accent); }

@media (prefers-reduced-motion: reduce) {
  .ns-desk-main *, .ns-desk-main *::before, .ns-desk-main *::after { transition: none !important; animation: none !important; }
  .ns-desk-dot { animation: none !important; }
}
.ns-desk-main .ns-live-note { margin-top: 0; }

.ns-live-note {
  margin: clamp(28px, 4vw, 44px) 0 0;
  max-width: 68ch;
  font-size: 14px;
  line-height: 1.65;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
}
.ns-live-foot { padding: 0 clamp(20px, 5vw, 72px) 40px; }

/* ─── Market report ──────────────────────────────────────────────────────
 *
 * report.html frames reports/latest.html, a self-contained document uploaded
 * after each scheduled report (see that page's header comment). The frame
 * scrolls on its own and is sized to the viewport rather than to its content:
 * matching the content height would need a script, and this site runs none
 * it does not have to.
 */
.ns-report-main { padding-top: clamp(22px, 3.5vw, 44px); }
.ns-report-head { margin-bottom: clamp(18px, 3vw, 28px); }
/* Shorter than the live grid's title: here the page's content is the frame
 * below it, and a hero-sized heading pushes the report under the fold. */
.ns-report-head .ns-live-title { font-size: clamp(26px, 3vw, 38px); margin-bottom: 12px; }
.ns-report-head .ns-live-lede { font-size: 15px; }
.ns-report-links {
  margin: 14px 0 0;
  font-size: 14px;
}
.ns-report-frame {
  display: block;
  width: 100%;
  max-width: 1100px;
  height: max(640px, calc(100vh - 140px));
  border: 1px solid var(--color-neutral-800);
  border-radius: var(--radius-md);
  background: #070a14;             /* the report's own ground, so it never flashes white */
}

/* ─── Trade ideas ────────────────────────────────────────────────────────
 *
 * The home page's strip and ideas.html, both drawn by assets/ideas.js from the
 * generated ideas.json. A card is the posted 1200x675 image under one line of
 * text, in the live grid's tile language.
 *
 * ⚠ [hidden] must win. The strip ships hidden until the script has a card, and
 * a class that sets `display` would otherwise put an empty section on the
 * landing page whenever there is nothing to show.
 */
.ns-ideas-strip[hidden],
.ns-ideas-record[hidden],
.ns-day-picker[hidden],
[data-ideas-empty][hidden] { display: none !important; }

.ns-ideas-strip { padding-top: clamp(48px, 6vw, 88px); }
.ns-ideas-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 28px;
  margin: 0 0 clamp(22px, 3vw, 32px);
}
.ns-ideas-head .ns-eyebrow { margin-bottom: 16px; }
.ns-ideas-head .ns-h2-sm { margin: 0; }

.ns-ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: clamp(14px, 1.6vw, 22px);
  align-items: start;
}
/* min(): a 320px phone has less than a column's minimum, which would overflow. */
.ns-ideas-grid-page { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }

.ns-idea-card {
  display: block;
  border: 1px solid var(--color-neutral-800);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-neutral-900);
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ns-idea-card:hover,
.ns-idea-card:focus-visible {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  color: var(--color-text);
  text-decoration: none;
}
.ns-idea-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;          /* the card, 1200x675 */
  object-fit: cover;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-neutral-800);
  color: transparent;            /* no alt-text spill if a card 404s; see .ns-live-tile img */
}
.ns-idea-meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 11px 14px;
  font-size: 13.5px;
  line-height: 1.35;
  color: color-mix(in srgb, var(--color-text) 82%, transparent);
}
.ns-idea-time {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--color-text) 58%, transparent);
}

.ns-day-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 clamp(18px, 2.5vw, 26px);
}
.ns-day {
  padding: 7px 14px;
  border: 1px solid var(--color-neutral-800);
  border-radius: 999px;
  background: var(--color-neutral-900);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.3;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.ns-day:hover,
.ns-day:focus-visible { border-color: var(--color-accent); color: var(--color-text); }
.ns-day[aria-pressed="true"] {
  border-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 16%, var(--color-neutral-900));
  color: var(--color-text);
}
.ns-ideas-day {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(18px, 2vw, 22px);
  margin: 0 0 16px;
}
.ns-ideas-day:empty { display: none; }

/* How the idea did (ideas.js resultBlock). Up/down are the app's own P&L pair,
 * the same green and red the cards themselves print; the site palette has none. */
.ns-idea-card { --ns-up: #34d399; --ns-down: #f87171; }
.ns-idea-result {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 14px 12px;
  margin-top: -4px;
  font-size: 13px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--color-text) 72%, transparent);
}
.ns-idea-pnl { font-weight: 600; color: var(--color-text); }
.ns-idea-result.is-up .ns-idea-pnl { color: var(--ns-up); }
.ns-idea-result.is-down .ns-idea-pnl { color: var(--ns-down); }
.ns-idea-note {
  font-size: 12px;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
}

/* The page you are on, in the one site menu (every page carries the same menu;
 * aria-current marks the current item instead of the item being left out). */
.ns-navlink[aria-current="page"] {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
/* An eyebrow that carries a count (Options glossary · 199 terms) keeps one type style. */
.ns-eyebrow .ns-count { font-size: inherit; letter-spacing: inherit; color: inherit; }

/* The strip's record line (ideas.js renderRecord): counts, then the closed total
 * in the same P&L green/red as the cards. */
.ns-ideas-strip { --ns-up: #34d399; --ns-down: #f87171; }
.ns-ideas-record {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--color-text) 72%, transparent);
}
.ns-ideas-record-net { font-weight: 600; color: var(--color-text); }
.ns-ideas-record-net.is-up { color: var(--ns-up); }
.ns-ideas-record-net.is-down { color: var(--ns-down); }

/* ─── Blog ───────────────────────────────────────────────────────────────
 *
 * blog.html's list, drawn by assets/blog.js from the generated blog.json, and
 * the one class an ENTRY PAGE needs that report.html does not already define.
 *
 * A card is text only (a title, the day it was published, a summary, a few
 * tags) in the live grid's tile language: the same border, ground, radius and
 * hover as .ns-live-tile and .ns-idea-card, so the three lists read as one site.
 *
 * ⚠ The classes below are written by two files that never import this one:
 * blog.js (every .ns-blog-card*) and services/blog_svc/sitewriter.py
 * (.ns-blog-crumb, on the generated entry pages, which are not in git).
 * deploy/tests/test_site.py pins both directions, so a rename here fails there.
 */
.ns-blog-list {
  display: grid;
  /* min(), as on the ideas grid: a 320px phone has less than a column's
   * minimum, which would overflow. Rows stretch (the default), so the cards in
   * a row share a height however long each summary runs. */
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: clamp(14px, 1.6vw, 22px);
}
.ns-blog-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;                    /* a long unbroken word wraps instead of widening the track */
  padding: clamp(18px, 2vw, 24px);
  border: 1px solid var(--color-neutral-800);
  border-radius: var(--radius-md);
  background: var(--color-neutral-900);
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ns-blog-card:hover,
.ns-blog-card:focus-visible {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  color: var(--color-text);
  text-decoration: none;
}
.ns-blog-card-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.ns-blog-card:hover .ns-blog-card-title,
.ns-blog-card:focus-visible .ns-blog-card-title { color: var(--color-accent); }
.ns-blog-card-date {
  font-size: 12.5px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--color-text) 58%, transparent);
}
.ns-blog-card-summary {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}
.ns-blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;                /* the tags sit on the card's floor in a stretched row */
  padding-top: 4px;
}
.ns-blog-card-tag {
  padding: 3px 10px;
  border: 1px solid var(--color-neutral-800);
  border-radius: 999px;
  background: var(--color-bg);
  font-size: 12px;
  line-height: 1.4;
  color: color-mix(in srgb, var(--color-text) 72%, transparent);
}

/* An entry page's title. Small and held to ONE line: the document in the frame
 * below carries its own large headline, and a second one above it would push
 * the entry under the fold, the same reasoning as .ns-report-head's shorter
 * title. A title too long for the line ends in an ellipsis; it is whole in the
 * framed document and in the tab's title. */
.ns-blog-crumb {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* With no entries the list is an empty grid, and the note below would sit a
 * head's margin plus its own away from the lede. */
.ns-blog-list:empty + .ns-live-note { margin-top: 0; }

/* The frame around a Blog ENTRY, told apart from the market report's by its
 * `sandbox` attribute: every entry frame carries one (it is the second of the
 * three things that keep script out of an entry) and report.html's has none.
 *
 * ⚠ The ground is the browser's own page colour, not the report's dark one.
 * MEASURED, not assumed: an entry that sets no background of its own is
 * transparent inside a frame, so the frame's ground shows through, and such a
 * document's text is the default black. On .ns-report-frame's near-black that
 * was unreadable. `Canvas` is what the same document would have painted behind
 * itself on a tab of its own, so an entry reads here as it was authored. An
 * entry with its own background covers this entirely. */
.ns-report-frame[sandbox] { background: Canvas; }
