/* =========================================================================
   FlySys Swiss PFD — Swiss / International Typographic Style
   White space, a strict grid, one red accent, precise type. No shadows.
   Type: B612 / B612 Mono — Airbus' cockpit typeface (SIL OFL), as used
   in the app itself.
   ========================================================================= */

@font-face {
  font-family: "B612"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/B612-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "B612"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/B612-Italic.ttf") format("truetype");
}
@font-face {
  font-family: "B612"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/B612-Bold.ttf") format("truetype");
}
@font-face {
  font-family: "B612"; font-style: italic; font-weight: 700; font-display: swap;
  src: url("../fonts/B612-BoldItalic.ttf") format("truetype");
}
@font-face {
  font-family: "B612 Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/B612Mono-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "B612 Mono"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/B612Mono-Bold.ttf") format("truetype");
}

:root {
  /* Swiss palette: pure black + white + red. No gray. */
  --ink:        #000000;   /* text & rules               */
  --ink-soft:   #000000;   /* secondary text (size/weight gives hierarchy, not colour) */
  --line:       #000000;   /* black hairlines            */
  --paper:      #ffffff;   /* background                 */
  --paper-2:    #ffffff;   /* no gray bands              */
  --red:        #cc0000;   /* Swiss red                  */
  --max:        1200px;    /* content max width          */
  --measure:    64rem;     /* body copy fills the content column */
  --gutter:     clamp(20px, 5vw, 64px);
  --t-fast:     .18s ease;
}

/* ---- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: "B612", "Helvetica Neue", Arial, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  font-size: 17px;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

/* ---- Layout helpers ---------------------------------------------------- */
.wrap   { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section{ padding-block: clamp(34px, 4.5vw, 60px); }
.section--alt { background: var(--paper-2); }

/* A reusable 12-column grid */
.grid { display: grid; gap: clamp(24px, 4vw, 56px); }
@media (min-width: 760px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 760px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* ---- Type scale -------------------------------------------------------- */
.display {
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
}
h1, .h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); line-height: 1.05; letter-spacing: -0.015em; font-weight: 700; }
h2, .h2 { font-size: clamp(1.45rem, 3.2vw, 2.2rem); line-height: 1.1; letter-spacing: -0.01em; font-weight: 700; }
h3, .h3 { font-size: 1.15rem; line-height: 1.25; font-weight: 700; }
.lead   { font-size: clamp(1.05rem, 1.8vw, 1.35rem); color: var(--ink-soft); max-width: 46rem; }
p       { max-width: var(--measure); }

.eyebrow {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--red); }
/* a leading reference tag, e.g. "§2.1" or "REV C" */
.eyebrow .ref { color: var(--red); }

.muted  { color: var(--ink-soft); }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: 0.92rem; font-weight: 700;
  padding: 0.85em 1.5em;
  border: 2px solid var(--ink);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--red); border-color: var(--red); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* =========================================================================
   "Under construction" banner
   ========================================================================= */
.construction {
  display: flex; align-items: center; justify-content: center; gap: 0.8em; flex-wrap: wrap;
  background: var(--ink); color: #fff;
  font-size: 0.78rem; letter-spacing: 0.03em;
  padding: 8px 16px; text-align: center;
  border-bottom: 2px solid var(--red);
}
.construction__tag {
  background: var(--red); color: #fff; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; padding: 2px 8px; font-size: 0.68rem;
}
@media (max-width: 520px) { .construction span:not(.construction__tag) { display: none; } }

/* =========================================================================
   Header / Nav
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 0.6em; font-weight: 700; letter-spacing: -0.01em; line-height: 1; }
.brand .logo { height: 30px; width: auto; display: block; }
.brand .name { display: flex; align-items: baseline; gap: 0.4em; }
.brand small { font-weight: 400; color: var(--ink-soft); letter-spacing: 0.04em; }

.nav-links { display: flex; gap: clamp(14px, 2vw, 30px); list-style: none; align-items: center; }
.nav-links a {
  font-size: 1.02rem; font-weight: 600; position: relative; padding-block: 4px;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform var(--t-fast);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--ink); }

/* Menu button: a "Menu" label + ≡ icon (not everyone reads the hamburger as a
   menu); both swap to "Close" + × when open, driven by aria-expanded (toggled
   by the inline handler). font-size:0 hides the literal ≡ text node so only the
   pseudo-elements render; gap is in rem so it survives that. */
.nav-toggle {
  display: none; align-items: center; gap: 0.45rem;
  background: none; border: 0; font-size: 0;
  line-height: 1; padding: 6px 4px; margin-right: -4px; cursor: pointer; color: var(--ink);
}
.nav-toggle::before { content: "Menu"; font-size: 1.05rem; font-weight: 600; letter-spacing: 0.01em; }
.nav-toggle::after  { content: "\2261"; font-size: 1.9rem; }
.nav-toggle[aria-expanded="true"]::before { content: "Close"; }
.nav-toggle[aria-expanded="true"]::after  { content: "\00D7"; }

@media (max-width: 1080px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; inset: 68px 0 auto 0; flex-direction: column; align-items: flex-start;
    gap: 0; background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; border-top: 1px solid var(--line); }
  .nav-links a { display: block; width: 100%; padding: 16px 0; font-size: 1.2rem; }
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero { padding-block: clamp(32px, 5vw, 56px) clamp(32px, 5vw, 56px); }
.hero .display { max-width: 22ch; }
.hero .lead { margin-top: 1.4rem; }
.hero .btn-row { margin-top: 2.4rem; }

/* =========================================================================
   Stat band
   ========================================================================= */
.stats { display: grid; gap: 1px; background: var(--line); grid-template-columns: repeat(2, 1fr); border-block: 1px solid var(--line); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--paper); padding: 32px clamp(16px, 3vw, 32px); }
.stat .num { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
.stat .lbl { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); margin-top: 6px; }

/* =========================================================================
   Feature cards
   ========================================================================= */
.feature { padding-top: 18px; border-top: 1px solid var(--line); }
.feature .idx { font-size: 0.74rem; color: var(--red); font-weight: 700; letter-spacing: 0.1em; }
.feature h3 { margin: 8px 0 8px; font-size: 1.02rem; }
.feature p  { color: var(--ink-soft); font-size: 0.97rem; }

/* Spec / definition lists */
.specs { display: grid; gap: 0; }
.spec-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  padding: 18px 0; border-top: 1px solid var(--line); align-items: baseline;
}
.spec-row:last-child { border-bottom: 1px solid var(--line); }
.spec-row dt { font-weight: 700; }
.spec-row dd { color: var(--ink-soft); }

/* =========================================================================
   Split section (text + media)
   ========================================================================= */
.split { display: grid; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } }
/* opt-in vertical centring for short text beside tall media */
.split--center { align-items: center; }

/* =========================================================================
   Document layout — marginal section index (rail) + content column.
   Structure comes from alignment to a grid, not from full-width rules.
   ========================================================================= */
.doc { display: grid; gap: 14px; }
@media (min-width: 820px) {
  .doc { grid-template-columns: 168px 1fr; column-gap: clamp(28px, 5vw, 64px); }
}
.doc__rail {
  font-size: 1.05rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  line-height: 1.25;
}
.doc__rail::before {
  content: ""; display: block; width: 48px; height: 4px; background: var(--red); margin-bottom: 14px;
}
.doc__rail .no { color: var(--red); }
.doc__rail small {
  display: block; margin-top: 8px; font-weight: 400; font-size: 0.8rem;
  letter-spacing: 0.02em; text-transform: none; color: var(--ink-soft);
}
@media (min-width: 820px) { .doc__rail { position: sticky; top: 84px; align-self: start; } }
/* On phones the rail stacks above the body — make it read clearly as the
   SECTION heading, bigger than any feature card / sub-item below it. */
@media (max-width: 819px) {
  .doc__rail { font-size: 1.3rem; letter-spacing: 0.03em; line-height: 1.2; }
  .doc__rail::before { width: 56px; height: 4px; margin-bottom: 12px; }
  .doc__rail small { font-size: 0.84rem; margin-top: 6px; letter-spacing: 0.02em; }
}
.doc__body > :first-child { margin-top: 0; }
/* Grid/flex items default to min-width:auto, which lets a wide child (e.g. a
   diagram with min-width:600px) inflate the whole column and push the page
   past the viewport on phones. Floor them at 0 so the figure scrolls inside
   instead of widening the layout. */
.doc__body, .doc__rail { min-width: 0; }
.split > * { min-width: 0; }

/* Table of contents — a designed index grid (not a plain ruled table) */
.toc { list-style: none; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 640px) {
  .toc { grid-template-columns: 1fr 1fr; }
  /* a lone last cell spans the full width — no empty half-cell */
  .toc > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.toc > li { background: var(--paper); }
.toc a {
  display: block; height: 100%; padding: 22px clamp(16px, 2.5vw, 28px);
  transition: background var(--t-fast), color var(--t-fast);
}
.toc a:hover { background: var(--ink); color: var(--paper); }
.toc__n { font-family: "B612 Mono", monospace; color: var(--red); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.12em; }
.toc__t { display: block; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; margin: 0.35rem 0 0.4rem; }
.toc__d { display: block; font-size: 0.92rem; }
.split--rev > :first-child { order: 2; }
@media (max-width: 859px) { .split--rev > :first-child { order: 0; } }
.media-frame {
  background:
    repeating-linear-gradient(45deg, var(--paper) 0 11px, rgba(204,0,0,0.07) 11px 22px);
  border: 1px dashed rgba(204,0,0,0.45);
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
}
.media-frame::after {
  content: attr(data-label);
  font-family: "B612 Mono", monospace; font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-soft);
  background: var(--paper); padding: 6px 12px; border: 1px solid var(--line);
}

/* =========================================================================
   Forms
   ========================================================================= */
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.field input, .field textarea {
  font: inherit; padding: 14px 16px; border: 1.5px solid var(--line); background: var(--paper);
  transition: border-color var(--t-fast);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(26px, 4vw, 44px); font-size: 0.9rem; }
.site-footer .muted { max-width: none; }
.site-footer a:hover { color: var(--red); }
.foot-bottom { margin-top: clamp(18px, 3vw, 32px); padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--ink-soft); font-size: 0.82rem; }
@media (max-width: 759px) {
  .site-footer .brand + .muted { margin-top: 6px; }
  .foot-bottom { font-size: 0.78rem; }
}

/* =========================================================================
   Motion & interaction — kept restrained (Swiss, not circus)
   ========================================================================= */

/* Scroll-reveal: content fades + rises as it enters view (added by JS) */
.reveal { opacity: 0; transform: translateY(16px); will-change: opacity, transform; }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Scroll-spy: the rail label of the section in view lights up */
.doc__rail { transition: color var(--t-fast); }
.doc__rail::before { transition: width var(--t-fast), background var(--t-fast); }
.doc__rail.spy::before { width: 64px; }
.doc__rail.spy { color: var(--ink); }

/* Reading-progress bar — thin red line pinned to the very top */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  z-index: 100; pointer-events: none;
}

/* =========================================================================
   Technical / datasheet components
   ========================================================================= */

/* Mono helper for data, codes, coordinates */
.mono { font-family: "B612 Mono", monospace; }

/* A measured figure frame: header strip + tick ruler + body + caption.
   Reads like a plate in an avionics manual. */
.figure { border: 1px solid var(--ink); background: var(--paper); transition: border-color var(--t-fast); }
.figure:hover { border-color: var(--red); }
.figure__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px; border-bottom: 1px solid var(--ink);
  font-family: "B612 Mono", monospace; font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase;
}
.figure__head .ref { color: var(--red); }
.figure__body { padding: clamp(14px, 3vw, 28px); }
.figure__body--shot { padding: 0; background: #000; line-height: 0; position: relative; container-type: inline-size; }
.shot { width: 100%; height: auto; display: block; cursor: zoom-in; }

/* Lightbox — click a capture to view it large */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 16px;
  background: rgba(0,0,0,0.92); cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox__stage { flex: 1 1 0%; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.lightbox img,
.lightbox__video { max-width: 100%; max-height: 100%; display: block; border: 0; }
/* Fill the stage like a screenshot: scale up to the viewport, aspect preserved.
   width/height 100% give a definite box before metadata loads; object-fit keeps
   the frame undistorted. */
.lightbox__video { width: 100%; height: 100%; object-fit: contain; }
/* Annotated photo plate (image + numbered markers) enlarged together */
.lightbox__plate { position: relative; width: min(1200px, 100%, 118vh); aspect-ratio: 1152 / 720; border: 0; container-type: inline-size; }
.lightbox__plate img { width: 100%; height: auto; max-width: none; max-height: none; border: 0; }
/* Markers scale with the plate width (cqw), so they stay proportional to the
   image in any orientation instead of ballooning with the viewport. */
.lightbox__plate .marker { width: 2.6cqw; font-size: 1.45cqw; border-width: max(1px, 0.16cqw); }
/* diagrams & equations open onto a white panel (black-on-white content) */
.lightbox__panel { background: #fff; padding: clamp(18px, 3vw, 44px); width: min(1180px, 100%); max-height: 100%; overflow: auto; }
/* Once enlarged, the whole overlay (and its contents) means "click to shrink".
   !important so it beats multi-class rules like .math.block { cursor: zoom-in }. */
.lightbox, .lightbox * { cursor: zoom-out !important; }
.lightbox__panel svg { width: 100%; height: auto; display: block; }
.lightbox__panel .math.block { font-size: clamp(1.4rem, 3vw, 2.3rem); margin: 0; }
/* Two-step zoom for raster figures: fit -> natural size with panning. */
.lightbox__stage.zoomed { overflow: auto; align-items: flex-start; justify-content: flex-start; }
.lightbox__stage.zoomed img.zoomable { max-width: none; max-height: none; }
.lightbox img.zoomable { cursor: zoom-in !important; }
.lightbox__stage.zoomed img.zoomable { cursor: zoom-out !important; }
.diag, .arch, .pfd-live, .math.block, .shotvid { cursor: zoom-in; }

/* ---- Axis primer: roll / pitch / yaw — interactive 3D (model-viewer) -- */
.axis-fig .figure__head { min-height: 3.3rem; }
.axis-fig .figure__body { background: #ffffff; padding: 0; position: relative; }
.acviewer { width: 100%; height: 240px; display: block; background: #ffffff; --progress-bar-color: transparent; --progress-bar-height: 0px; }
.lightbox__hint {
  flex: 0 0 auto; text-align: center;
  font-family: "B612 Mono", monospace; font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: #fff;
}

/* Small numbered callouts keyed to a legend — kept in empty areas / edges so
   they never cover a reading. */
.marker {
  position: absolute; transform: translate(-50%, -50%);
  width: 2.5cqw; aspect-ratio: 1; border-radius: 50%;
  background: rgba(204,0,0,0.92); color: #fff; font-weight: 700;
  font-family: "B612 Mono", monospace; font-size: 1.4cqw;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  border: 1px solid #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* On phones/older tablets, block diagrams would shrink their labels to a few
   pixels. Instead keep a legible minimum width and scroll horizontally. */
/* Don't clip diagram labels that sit near the viewBox edge */
.diag, .arch { overflow: visible; }
/* Make the whole diagram box react (cursor + click), not just the painted
   shapes — otherwise the empty white interior swallows hover/clicks. */
.diag, .arch { pointer-events: bounding-box; }

/* Signal flow along block-diagram connectors (opt-in via .flowdiag).
   Connectors carry a marker-end; boxes (rect) and text are untouched.
   The dashes are ALWAYS shown (they read as "flow"); only the marching
   animation is dropped under reduced-motion — so the lines never go solid. */
.flowdiag line[marker-end], .flowdiag path[marker-end] {
  stroke-dasharray: 5 4;
  animation: dsflow 0.85s linear infinite;
}
@keyframes dsflow { to { stroke-dashoffset: -9; } }
/* Offset (hard-iron) vector: thin, dashed, marching red arrow */
.cvec { stroke-dasharray: 5 4; animation: dsflow 0.7s linear infinite; }

/* Hero attitude video (the real instrument, when supplied) */
.shotvid { display: block; width: 100%; height: auto; }

@media (max-width: 760px) {
  .figure__body:not(.figure__body--shot) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .diag, .arch { min-width: 600px; }
}
.figure__cap {
  padding: 11px 14px; border-top: 1px solid var(--line);
  font-size: 0.95rem; color: var(--ink-soft); line-height: 1.55;
}
.figure__cap b { color: var(--ink); font-weight: 700; }

/* Annotation list — numbered callouts that pair with a figure */
.annotations { display: grid; gap: 0; margin-top: 1.25rem; }
.annotations .row {
  display: grid; grid-template-columns: 2.2em 1fr auto; gap: 12px; align-items: baseline;
  padding: 11px 0; border-top: 1px solid var(--line);
  font-family: "B612 Mono", monospace; font-size: 0.82rem;
}
.annotations .row:last-child { border-bottom: 1px solid var(--line); }
.annotations .n { color: var(--red); font-weight: 700; }
.annotations .v { color: var(--ink-soft); white-space: nowrap; }

/* Datasheet table — dotted leaders, mono values, right-aligned units */
.datasheet { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.datasheet caption {
  text-align: left; font-family: "B612 Mono", monospace; font-size: 0.7rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
  padding-bottom: 10px; border-bottom: 2px solid var(--ink); margin-bottom: 0;
}
.datasheet th, .datasheet td { padding: 13px 0 13px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.datasheet tbody tr { transition: box-shadow var(--t-fast); }
.datasheet tbody tr:hover { box-shadow: inset 4px 0 0 var(--red); }
.datasheet tbody tr:hover th { color: var(--red); padding-left: 12px; transition: padding var(--t-fast), color var(--t-fast); }
.datasheet th { text-align: left; font-weight: 700; width: 42%; }
.datasheet td { font-family: "B612 Mono", monospace; color: var(--ink-soft); }
.datasheet td .u { color: var(--ink); }
.datasheet a { border-bottom: 1px solid var(--line); }
.datasheet a:hover { color: var(--red); border-color: var(--red); }

/* Small status / revision chip */
.chip {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: "B612 Mono", monospace; font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 4px 9px; border: 1px solid var(--line); color: var(--ink-soft);
}
.chip::before { content: ""; width: 6px; height: 6px; background: var(--red); border-radius: 50%; }

/* Feature index tags in mono for a technical feel. Stat numbers stay in the
   proportional face — mono spaces out decimals like "8.1" into "8 . 1". */
.feature .idx { font-family: "B612 Mono", monospace; }

/* ---- Code -------------------------------------------------------------- */
code {
  font-family: "B612 Mono", "SF Mono", Consolas, monospace;
  font-size: 0.86em; background: var(--paper-2); padding: 0.1em 0.4em; border-radius: 3px;
}

/* ---- Math (KaTeX) ------------------------------------------------------ */
/* Display equations: block, with horizontal scroll on narrow screens
   instead of breaking the layout — important on phones / older tablets. */
/* Formulas in pure black, a touch larger than body copy */
.math { color: #000; }
.math.block {
  display: block; margin: 1.3rem 0; padding: 4px 2px;
  overflow-x: auto; overflow-y: hidden;
  font-size: 1.18rem;
}
.eq {
  border-left: 2px solid var(--line); padding: 4px 0 4px 18px; margin: 1.3rem 0;
}
.eq .katex { color: #000; }
.eq .lbl {
  font-family: "B612 Mono", monospace; font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; display: block;
}

/* ---- Utilities --------------------------------------------------------- */
.mt-0{margin-top:0}.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.6rem}.mt-4{margin-top:2.4rem}
