/* ==========================================================================
   The Aviation Point — stylesheet
   Full stop identity: white sheet, ink, one periwinkle accent, mono for
   figures. The name is the logo; its full stop is a rivet head.
   Light surfaces for reading; dark only where it earns it (worked
   examples, footer).
   ========================================================================== */

/* Self-hosted variable fonts (SIL OFL), latin + latin-ext subsets as Google
   Fonts cuts them. No request to a third party before consent, and no extra
   origin on the critical path. The latin files are preloaded in <head>. */
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/schibsted-grotesk-latin-ext-v7.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/schibsted-grotesk-latin-v7.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;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-latin-ext-v24.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-latin-v24.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;
}

:root {
  /* Brand */
  --ink: #121413;
  --ink-2: #1B1E1C;
  --ink-3: #2A2E2C;
  --accent: #8A93FF;      /* periwinkle: fills, rules, the dot */
  --accent-ink: #4A52D6;      /* accent as text on white: AA */
  --on-accent: #121413;       /* text on an accent fill */
  --dimple: rgba(18, 20, 19, 0.30);
  --accent-soft: #EEEFFF;

  /* Neutrals */
  --text: #1A1D1B;
  --text-2: #3F4542;
  --muted: #5A615D;           /* 6.2:1 on white */
  --line: #E1E4E1;
  --line-2: #C9CEC9;
  --bg: #FFFFFF;
  --bg-2: #F6F7F5;
  --bg-3: #EDEFED;

  /* Semantic */
  --link: #4A52D6;
  --ok: #1F7A44;
  --ok-soft: #EAF6EE;
  --warn: #9A5B00;
  --warn-soft: #FFF6E5;
  --bad: #B42318;
  --bad-soft: #FDECEA;
  --on-dark: #C7CCC9;
  --on-dark-muted: #8F9692;

  /* Type */
  --font: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Shape */
  --radius: 3px;
  --radius-lg: 4px;
  --shadow-lg: 0 20px 50px -20px rgba(18, 20, 19, 0.35);
  --container: 1160px;
  --measure: 70ch;
  --header-h: 60px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.35rem + 2.2vw, 2.9rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; }
h2 { font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.9rem); letter-spacing: -0.02em; }
h3 { font-size: 1.125rem; }
h4 { font-size: 0.95rem; }
p { margin: 0 0 1em; }
a { color: var(--link); text-decoration: none; text-underline-offset: 0.15em; }
a:hover { text-decoration: underline; }
code, kbd, .mono { font-family: var(--mono); font-size: 0.92em; }
code { background: var(--bg-3); padding: 0.1em 0.4em; border-radius: 4px; color: var(--ink); white-space: nowrap; }
kbd {
  font-size: 0.72rem;
  padding: 2px 6px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--muted);
}
img, svg { max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
::selection { background: rgba(138,147,255,0.25); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(16px, 3vw, 28px); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius);
  font-weight: 600; transition: top .12s ease;
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* ---------- Labels, pills, kickers ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-ink);
}
.kicker::before { content: ""; width: 14px; height: 2px; background: var(--accent); }
.kicker.no-rule::before { display: none; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; border-radius: 2px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em;
  background: var(--bg-3); color: var(--text-2);
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.pill-live { background: var(--ok-soft); color: var(--ok); }
.pill-soon { background: var(--accent-soft); color: var(--accent-ink); }
.pill-off { background: var(--bg-3); color: var(--muted); }
.pill.no-dot::before { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-weight: 600; font-size: 0.9375rem; line-height: 1.2;
  cursor: pointer; text-decoration: none;
  transition: background .12s ease, color .12s ease, border-color .12s ease, transform .12s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-3); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: #7A84FF; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost-light { background: transparent; border-color: rgba(255,255,255,0.28); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.5); }
.btn-sm { padding: 7px 12px; font-size: 0.85rem; }
.arrow-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; color: var(--ink);
}
.arrow-link::after { content: "→"; transition: transform .12s ease; }
.arrow-link:hover { text-decoration: none; color: var(--accent-ink); }
.arrow-link:hover::after { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px -14px rgba(18, 20, 19, 0.35); }
.site-header-inner {
  display: flex; align-items: center; gap: 28px;
  height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; flex: 0 0 auto;
}
.brand:hover { text-decoration: none; }
.brand { gap: 0; align-items: baseline; }
.brand-word {
  font-weight: 800; font-size: 1.2rem; letter-spacing: -0.045em; line-height: 1; white-space: nowrap;
}
/* The full stop, drawn as a rivet head: accent disc, dimple at its centre. */
.brand-dot {
  display: inline-block; width: 0.28rem; height: 0.28rem; margin-left: 0.06rem;
  border-radius: 50%; background: var(--accent); position: relative; flex: 0 0 auto;
}
.brand-dot::after {
  content: ""; position: absolute; left: 36%; top: 36%; width: 28%; height: 28%;
  border-radius: 50%; background: var(--dimple);
}
.site-nav { flex: 1 1 auto; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-block; padding: 8px 10px; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 500; color: var(--text-2);
  position: relative;
}
.site-nav a:hover { color: var(--ink); background: var(--bg-2); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.nav-group { position: relative; }
.nav-group-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 8px 8px 10px; border: 0; border-radius: var(--radius);
  background: none; cursor: pointer; font: inherit;
  font-size: 0.9rem; font-weight: 500; color: var(--text-2); position: relative;
}
.nav-group-btn:hover, .nav-group-btn[aria-expanded="true"] { color: var(--ink); background: var(--bg-2); }
.nav-group-btn .i-chev { width: 14px; height: 14px; transition: transform .15s ease; }
.nav-group-btn[aria-expanded="true"] .i-chev { transform: rotate(180deg); }
.nav-group-btn.is-current { color: var(--ink); font-weight: 600; }
.nav-group-btn.is-current::after {
  content: ""; position: absolute; left: 10px; right: 8px; bottom: -1px;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.site-nav .nav-sub {
  display: none; flex-direction: column; gap: 2px;
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 232px;
  padding: 6px; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.site-nav .nav-group-btn[aria-expanded="true"] + .nav-sub { display: flex; }
.site-nav .nav-sub a { display: block; padding: 8px 10px; white-space: nowrap; }
.site-nav .nav-sub a[aria-current="page"] { background: var(--bg-2); }
.site-nav .nav-sub a[aria-current="page"]::after { display: none; }
/* Desktop: dropdowns and the mega panel open on hover. Nav items stretch
   to the full header height so the pointer never crosses a gap. */
@media (min-width: 901px) {
  .site-nav { align-self: stretch; }
  .site-nav > ul { height: 100%; align-items: stretch; }
  .site-nav > ul > li { display: flex; align-items: center; }
  .site-nav .nav-sub { top: 100%; }
  .site-nav .nav-group:hover > .nav-sub { display: flex; }
  .nav-group:hover > .nav-group-btn { color: var(--ink); background: var(--bg-2); }
  .nav-group:hover > .nav-group-btn .i-chev { transform: rotate(180deg); }
  .nav-mega:hover > .mega, .nav-mega:focus-within > .mega {
    visibility: visible; opacity: 1; transform: none; transition-delay: 0s;
  }
  .nav-mega:hover > a { color: var(--ink); background: var(--bg-2); }
}
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  visibility: hidden; opacity: 0; transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s;
}
.mega-inner { display: grid; grid-template-columns: 260px 1fr; gap: 40px; padding-top: 28px; padding-bottom: 28px; }
.mega-intro { background: var(--bg-2); border-radius: var(--radius); padding: 22px; align-self: start; }
.site-nav a.mega-title {
  display: flex; align-items: center; gap: 4px; padding: 0; margin: 0 0 8px;
  font-weight: 700; font-size: 1.05rem; color: var(--ink); letter-spacing: -0.01em; background: none;
}
.site-nav a.mega-title:hover { color: var(--accent-ink); background: none; }
.site-nav a.mega-title[aria-current="page"]::after { display: none; }
.mega-intro p { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--text-2); }
.mega-title svg, .mega-label svg { width: 14px; height: 14px; flex: 0 0 auto; transition: transform .12s ease; }
.mega-blocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 32px; }
.mega-block-head {
  display: flex; align-items: center; gap: 10px; margin: 0 0 6px;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.mega-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--bg-2); color: var(--ink);
}
.mega-icon svg { width: 17px; height: 17px; }
.mega-block ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-nav .mega-block a { display: block; padding: 8px 10px 8px 40px; margin-left: -10px; }
.site-nav .mega-block a[aria-current="page"]::after { display: none; }
.site-nav .mega-block a[aria-current="page"] { background: var(--bg-2); }
.mega-label { display: flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink); font-size: 0.92rem; }
.mega-block a:hover .mega-label svg, .mega-title:hover svg { transform: translateX(2px); }
.mega-desc { display: block; margin-top: 2px; font-size: 0.82rem; font-weight: 400; color: var(--muted); line-height: 1.4; }
.site-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.search-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 10px 7px 10px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--bg); color: var(--muted); cursor: pointer;
  font-size: 0.85rem; min-width: 190px; text-align: left;
}
.search-btn:hover { border-color: var(--ink); color: var(--ink); }
.search-btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
.search-btn span { flex: 1; }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--bg); color: var(--ink); cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: block; }
.nav-toggle[aria-expanded="true"] .i-menu { display: none; }

@media (max-width: 900px) {
  .site-header-inner { gap: 12px; }
  .nav-toggle { display: inline-flex; }
  .search-btn { min-width: 0; padding: 8px 10px; }
  .search-btn span, .search-btn kbd { display: none; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 8px clamp(16px, 3vw, 28px) 12px;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { display: block; padding: 12px 10px; font-size: 1rem; }
  .site-nav a[aria-current="page"]::after { display: none; }
  .site-nav a[aria-current="page"] { background: var(--bg-2); }
  .mega { display: none; }
  /* Inside the mobile menu a group is a labelled, always-open list. */
  .nav-group-btn {
    display: block; width: 100%; padding: 14px 10px 4px; pointer-events: none; text-align: left;
    background: none; font-family: var(--mono, inherit); font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  }
  .nav-group-btn .i-chev, .nav-group-btn.is-current::after { display: none; }
  .site-nav .nav-sub {
    display: flex; position: static; min-width: 0; padding: 0 0 8px;
    border: 0; border-radius: 0; box-shadow: none; background: none;
  }
  .site-nav .nav-sub a { padding: 12px 10px 12px 18px; white-space: normal; }
}

/* ---------- Search dialog ---------- */
.search-dialog {
  width: min(640px, calc(100vw - 32px));
  margin: 8vh auto 0;
  padding: 0; border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  background: var(--bg); color: var(--text);
  box-shadow: 0 30px 80px -20px rgba(18,20,19,0.5);
}
.search-dialog::backdrop { background: rgba(18,20,19,0.45); backdrop-filter: blur(2px); }
.search-field {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.search-field svg { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.search-field input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 1.05rem; color: var(--text);
}
.search-field input::placeholder { color: var(--muted); }
.search-results { list-style: none; margin: 0; padding: 8px; max-height: min(60vh, 520px); overflow-y: auto; }
.search-group {
  padding: 10px 10px 4px;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.search-item a {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
  padding: 9px 10px; border-radius: var(--radius); color: var(--text);
}
.search-item a:hover, .search-item.is-active a { background: var(--bg-2); text-decoration: none; }
.search-item-title { font-weight: 600; color: var(--ink); }
.search-item-desc { grid-column: 1 / -1; font-size: 0.82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-item-kind { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; align-self: center; }
.search-empty { padding: 20px 12px; color: var(--muted); font-size: 0.9rem; text-align: center; }
.search-foot {
  display: flex; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--line);
  font-size: 0.75rem; color: var(--muted);
}

/* ---------- Home ---------- */
/* Hero: the whole reference. Headline as an answer, then an index of its five parts. */
.home-intro { padding: clamp(36px, 6vw, 72px) 0 clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.home-intro-grid {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px 48px; align-items: end;
  padding-bottom: clamp(28px, 4vw, 44px);
}
.home-intro .kicker { color: var(--muted); margin-bottom: 14px; }
.home-intro h1 {
  font-size: clamp(2.5rem, 1.3rem + 4vw, 4.3rem); line-height: 0.96; letter-spacing: -0.048em;
  margin: 0; max-width: 14ch;
}
.home-intro h1 .brand-dot { width: 0.2em; height: 0.2em; margin-left: 0.04em; }
.home-intro .lead { margin: 0; max-width: 52ch; color: var(--text-2); font-size: 1.08rem; }
.home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 22px; }

.home-index {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
}
.home-index li + li { border-left: 1px solid var(--line); }
.home-index a {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-content: start; height: 100%;
  padding: 14px 16px 18px; color: var(--text); text-decoration: none; transition: background .12s ease;
}
.home-index li:first-child a { padding-left: 0; }
.home-index a:hover { background: var(--bg-2); }
.home-index li:first-child a:hover { background: none; }
.home-index li:first-child a:hover b { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.hi-n { font: 500 0.7rem/1.6 var(--mono); color: var(--muted); }
.hi-c { font: 600 0.85rem/1.3 var(--mono); color: var(--accent-ink); text-align: right; }
.home-index b {
  grid-column: 1 / -1; margin-top: 18px;
  font-size: 1.2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink);
}
.home-index a:hover b::after { content: " \2192"; }
.hi-d { grid-column: 1 / -1; font-size: 0.85rem; line-height: 1.45; color: var(--muted); }
@media (max-width: 980px) {
  .home-intro-grid { grid-template-columns: minmax(0, 1fr); }
  .home-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-index li + li { border-left: 0; }
  .home-index li { border-bottom: 1px solid var(--line); }
  .home-index li:nth-child(even) { border-left: 1px solid var(--line); }
  .home-index li:nth-child(odd) a { padding-left: 0; }
  .home-index li:last-child { grid-column: 1 / -1; border-bottom: 0; }
}
@media (max-width: 520px) {
  .home-index { grid-template-columns: minmax(0, 1fr); }
  .home-index li:nth-child(even) { border-left: 0; }
  .home-index a { padding: 12px 0 14px; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: baseline; }
  .hi-n { grid-area: 1 / 1; }
  .home-index b { grid-area: 1 / 2; margin: 0; font-size: 1.05rem; }
  .hi-c { grid-area: 1 / 3; }
  .hi-d { grid-column: 2 / -1; }
}
.home-calcs { padding-top: clamp(40px, 6vw, 72px); }

/* Tool frame: groups | list | live calculator. Rules, not boxes. */
.app {
  display: grid; grid-template-columns: 196px minmax(0, 290px) minmax(0, 1fr);
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line);
}
.app-side { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 16px 0; border-right: 1px solid var(--line); }
.app-kick, .app-group, .app-panel-top {
  font: 500 0.68rem/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.app-kick { padding: 4px 0 10px; }
.app-cat {
  white-space: nowrap;
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 0;
  border: 0; background: none; text-align: left; font-size: 0.92rem; color: var(--muted); cursor: pointer;
}
.app-cat i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.app-cat span { margin-left: auto; font: 500 0.75rem/1 var(--mono); }
.app-cat:hover { color: var(--ink); }
.app-cat[aria-pressed="true"] { color: var(--ink); font-weight: 700; }
.app-cat[aria-pressed="true"] i { background: var(--accent); }
.app-foot { margin: auto 0 0; padding-top: 18px; font-size: 0.8rem; line-height: 1.5; color: var(--muted); }
.app-foot a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.app-list { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); }
.app-find { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-bottom: 1px solid var(--line); }
.app-find svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.app-find input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font: 400 0.95rem/1 var(--font); padding: 9px 0; outline: none;
}
.app-find:focus-within { box-shadow: inset 0 -2px 0 var(--ink); }
.app-count { font: 500 0.75rem/1 var(--mono); color: var(--muted); }
.app-rows { list-style: none; margin: 0; padding: 0; }
.app-group { padding: 14px 14px 6px; }
.app-row {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.app-row-li:last-child .app-row { border-bottom: 0; }
.app-row:hover { background: var(--bg-2); text-decoration: none; }
.app-row[aria-current="true"] { background: var(--accent-soft); }
.app-ic { color: var(--muted); padding-top: 2px; }
.app-ic svg { width: 17px; height: 17px; display: block; }
.app-row[aria-current="true"] .app-ic { color: var(--ink); }
.app-tt b { display: block; font-weight: 600; font-size: 0.95rem; line-height: 1.3; color: var(--ink); }
.app-tt span { display: block; margin-top: 2px; font: 400 0.74rem/1.45 var(--mono); color: var(--muted); }
.app-empty { padding: 20px 14px; color: var(--muted); font-size: 0.9rem; margin: 0; }

.app-sheet { min-width: 0; padding: 16px 0 20px 24px; }
.app, .app-sheet { scroll-margin-top: calc(var(--header-h) + 8px); }
.app-panel-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.app-panel-top a { color: var(--accent-ink); letter-spacing: 0.06em; }
.app-panel h2 { font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.7rem); letter-spacing: -0.03em; font-weight: 800; margin: 0 0 6px; }
.app-sum { color: var(--muted); font-size: 0.92rem; margin: 0 0 16px; max-width: 64ch; }
.app-panel .calc { margin: 0; }
.app-panel .calc + .calc { margin-top: 20px; }
.app-more { margin: 18px 0 0; font-size: 0.92rem; }

/* Desktop: the list (and the groups) stay under the header and scroll on
   their own, so a calculator lower in the list is a wheel turn away, not a
   page away. Scroll shadows show there is more above or below. */
@media (min-width: 761px) {
  .app-list, .app-side {
    position: sticky; top: var(--header-h); align-self: start;
    max-height: calc(100vh - var(--header-h));
  }
  .app-rows {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
    background:
      linear-gradient(var(--bg) 30%, rgba(255,255,255,0)) top / 100% 28px no-repeat local,
      linear-gradient(rgba(255,255,255,0), var(--bg) 70%) bottom / 100% 28px no-repeat local,
      linear-gradient(rgba(18,20,19,.10), rgba(18,20,19,0)) top / 100% 10px no-repeat scroll,
      linear-gradient(rgba(18,20,19,0), rgba(18,20,19,.10)) bottom / 100% 10px no-repeat scroll;
  }
}
@media (max-width: 1080px) {
  .app { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); }
  .app-side {
    grid-column: 1 / -1; flex-direction: row; gap: 18px; overflow-x: auto; padding: 8px 0;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .app-kick, .app-foot { display: none; }
  .app-cat { width: auto; white-space: nowrap; }
  .app-cat span { margin-left: 4px; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app-list { border-right: 0; border-bottom: 2px solid var(--ink); }
  .app-tt span { display: none; }
  .app-group { padding-top: 10px; }
  .app-row { padding: 9px 2px; }
  .app-find { padding: 6px 2px; }
  .app-sheet { padding: 16px 0 8px; }
}

.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.container > .section-alt {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 48px);
}
.section-head { max-width: 62ch; margin-bottom: 32px; }
.section-head p { color: var(--text-2); font-size: 1.05rem; margin: 0; }
.section-head.row {
  max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.section-head.row > div { max-width: 62ch; }

.index-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.index-list li { border-bottom: 1px solid var(--line); }
.index-list a {
  display: grid; grid-template-columns: 200px minmax(0, 1fr) 72px; gap: 2px 24px; align-items: start;
  padding: 16px 12px; margin: 0 -12px; color: var(--text); text-decoration: none; border-radius: var(--radius);
  transition: background .12s ease;
}
.index-list a:hover { background: var(--bg-2); text-decoration: none; }
.index-kind { grid-column: 1; grid-row: 1 / span 2; padding-top: 4px; font-family: var(--mono); font-size: 0.68rem; line-height: 1.5; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.index-title { grid-column: 2; grid-row: 1; font-weight: 600; color: var(--ink); font-size: 1.02rem; letter-spacing: -0.01em; }
.index-desc { grid-column: 2; grid-row: 2; font-size: 0.9rem; line-height: 1.5; color: var(--text-2); max-width: 75ch; }
.index-more { grid-column: 3; grid-row: 1 / span 2; justify-self: end; align-self: center; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); transition: color .12s ease, transform .12s ease; }
.index-list a:hover .index-more { color: var(--accent-ink); transform: translateX(3px); }
.index-list a:hover .index-title { color: var(--link); }
@media (max-width: 640px) {
  .index-list a { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; margin: 0 -8px; padding: 14px 8px; }
  .index-kind { grid-column: 1 / -1; grid-row: 1; padding-top: 0; }
  .index-title { grid-column: 1; grid-row: 2; }
  .index-desc { grid-column: 1 / -1; grid-row: 3; }
  .index-more { grid-column: 2; grid-row: 2; align-self: baseline; }
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.point { padding-top: 18px; border-top: 2px solid var(--ink); }
.point h3 { font-size: 1.05rem; margin-bottom: 8px; }
.point p { color: var(--text-2); font-size: 0.95rem; margin: 0; }
.point .num { font-family: var(--mono); color: var(--accent-ink); font-size: 0.75rem; letter-spacing: 0.1em; display: block; margin-bottom: 8px; }

.line-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 28px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.line-card:hover { border-color: var(--line-2); box-shadow: 0 12px 30px -22px rgba(18, 20, 19, 0.45); }
.line-card .arrow-link { margin-top: auto; padding-top: 6px; }
.line-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.line-card h3 { margin: 0; font-size: 1.2rem; letter-spacing: -0.02em; }
.line-card p { color: var(--text-2); font-size: 0.95rem; margin: 0; }

/* ---------- Page head (generated pages, catalog, academy) ---------- */
.page-head { background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 20px 0 30px; }
.crumbs { font-size: 0.8rem; color: var(--muted); margin-bottom: 22px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--line-2); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--text-2); }
.page-head h1 { max-width: 22ch; margin-bottom: 14px; }
.page-head .standfirst {
  font-size: clamp(1.02rem, 1rem + 0.3vw, 1.15rem); line-height: 1.55;
  color: var(--text-2); max-width: 66ch; margin-bottom: 20px;
}
.page-head .standfirst strong { color: var(--ink); font-weight: 600; }
.byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px;
  font-size: 0.82rem; color: var(--muted);
  padding-top: 14px; border-top: 1px solid var(--line-2);
  max-width: 66ch;
}
.byline-item { display: inline-flex; align-items: center; gap: 7px; }
.byline-item svg { width: 14px; height: 14px; color: var(--accent-ink); flex: 0 0 auto; }
.byline-label { color: var(--muted); }
.byline a { color: var(--ink); font-weight: 600; }
.byline-cred { color: var(--text-2); }
.byline time { font-family: var(--mono); font-size: 0.75rem; }
.review-warning {
  margin: 16px 0 0; max-width: 66ch;
  background: var(--warn-soft); border: 1px dashed var(--warn); color: var(--warn);
  font-size: 0.85rem; padding: 10px 14px; border-radius: var(--radius);
}
.review-warning code { background: rgba(0,0,0,0.06); }

/* ---------- Page layout: sticky TOC + article ---------- */
.page-body { padding: 40px 0 72px; }
.page-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; align-items: start; }
.page-main { min-width: 0; max-width: 80ch; }
/* Prose keeps a reading measure; tables, tools and cards may use the full column. */
.block-prose, .block-limits, .block-faq, .block-sources, .block-example, .block-callout,
.page-main .table-note, .page-main .calc-note, .block-table > p, .block-calculator > p,
.block-vendors > p, .tech-disclaimer { max-width: var(--measure); }
.page-block { margin-bottom: 52px; scroll-margin-top: calc(var(--header-h) + 20px); }
.page-block:last-child { margin-bottom: 0; }
.page-main h2 { font-size: 1.45rem; margin: 0 0 16px; }
.h-anchor {
  margin-left: 8px; font-family: var(--mono); font-weight: 400; font-size: 0.8em;
  color: var(--line-2); text-decoration: none !important; opacity: 0; transition: opacity .12s ease, color .12s ease;
}
.page-main h2:hover .h-anchor, .h-anchor:focus-visible { opacity: 1; }
.h-anchor:hover { color: var(--accent-ink); }
@media (hover: none) { .h-anchor { display: none; } }
.page-main p { font-size: 1.04rem; line-height: 1.65; color: var(--text-2); }
.page-main strong { color: var(--ink); font-weight: 600; }
.page-main li { color: var(--text-2); }
.page-main a { text-decoration: underline; text-decoration-color: rgba(74,82,214,0.35); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.page-main a:hover { text-decoration-color: currentColor; }

.toc { position: sticky; top: calc(var(--header-h) + 24px); font-size: 0.86rem; }
.toc-label {
  display: block; font-family: var(--mono); font-size: 0.66rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a {
  display: block; padding: 5px 0 5px 14px; margin-left: -1px;
  border-left: 2px solid transparent; color: var(--muted); line-height: 1.35;
}
.toc a:hover { color: var(--ink); text-decoration: none; }
.toc a.is-active { color: var(--ink); border-left-color: var(--accent); font-weight: 500; }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto; margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  /* Shadows appear at an edge only when there is more table to scroll to. */
  background:
    linear-gradient(90deg, var(--bg) 30%, rgba(255,255,255,0)) left / 40px 100% no-repeat local,
    linear-gradient(270deg, var(--bg) 30%, rgba(255,255,255,0)) right / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(18,20,19,0.16), transparent) left / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(18,20,19,0.16), transparent) right / 12px 100% no-repeat scroll,
    var(--bg);
  -webkit-overflow-scrolling: touch;
}
.spec-table, .result-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.spec-table th, .result-table th {
  background: var(--bg-2); color: var(--muted);
  font-family: var(--mono); font-weight: 500; font-size: 0.68rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  text-align: left; padding: 10px 12px; vertical-align: bottom; line-height: 1.3;
  border-bottom: 1px solid var(--line);
}
.result-table th { white-space: nowrap; }
.spec-table td, .result-table td { padding: 10px 12px; border-top: 1px solid var(--line); color: var(--text-2); vertical-align: top; line-height: 1.5; font-variant-numeric: tabular-nums; }
.spec-table tbody tr:first-child td, .result-table tbody tr:first-child td { border-top: 0; }
.spec-table tbody tr:nth-child(even) td { background: rgba(246, 247, 249, 0.7); }
.spec-table tbody tr:hover td { background: var(--accent-soft); }
.spec-table td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
.spec-table td:first-child code, .spec-table td code { font-weight: 500; }
.num { text-align: right; font-family: var(--mono); font-size: 0.88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.num { text-align: right; }
.result-table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table-note { font-size: 0.84rem; color: var(--muted); margin: 0; }
.page-main .table-note { font-size: 0.84rem; color: var(--muted); }
.sw {
  display: inline-block; width: 12px; height: 12px; border-radius: 3px;
  background: var(--sw, #ccc); border: 1px solid rgba(18,20,19,0.25);
  vertical-align: -1px; margin-right: 8px;
}

/* ---------- Calculator ---------- */
.calc {
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 24px;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -32px rgba(18, 20, 19, 0.4);
}
.calc-inputs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px;
  padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line);
}
.calc-field { display: flex; flex-direction: column; gap: 6px; }
.calc-field label { font-size: 0.8rem; font-weight: 600; color: var(--ink); letter-spacing: 0.01em; }
.calc-field select, .calc-field input[type="number"], .calc-field input[type="text"] {
  font-family: var(--font); font-size: 1rem; padding: 10px 12px; min-height: 44px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--bg); color: var(--ink); width: 100%;
  transition: border-color .12s ease;
}
.calc-field select:hover, .calc-field input:hover { border-color: var(--muted); }
.calc-field input[type="number"] { -moz-appearance: textfield; }
.calc-field input[type="number"] { font-family: var(--mono); font-size: 0.92rem; }
.calc-field select:focus, .calc-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field-hint { font-size: 0.76rem; color: var(--muted); }
.calc-units { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.calc-units-label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.calc-units .segmented { width: auto; }
.calc-units .segmented button { font-family: var(--mono); min-width: 56px; min-height: 36px; }
.unit-tag { font-family: var(--mono); font-weight: 500; font-size: 0.72rem; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 6px; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-pill span {
  display: inline-flex; align-items: center; min-height: 40px; font-size: 0.88rem; padding: 8px 14px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--bg); color: var(--text-2); cursor: pointer; transition: all .12s ease;
}
.radio-pill span:hover { border-color: var(--ink); color: var(--ink); }
.radio-pill input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.radio-pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.calc-out-head {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 12px;
}
.calc-results { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.calc-results.is-updated .result-table { animation: result-flash .6s ease; }
@keyframes result-flash { from { box-shadow: 0 0 0 3px rgba(138,147,255,0.28); } to { box-shadow: 0 0 0 3px rgba(138,147,255,0); } }
.calc-results .result-table { margin-bottom: 12px; min-width: 420px; }
.row-note { display: block; font-weight: 400; font-size: 0.78rem; color: var(--muted); white-space: normal; margin-top: 3px; font-family: var(--font); }
.result-table td:first-child { white-space: normal; min-width: 180px; color: var(--ink); }
.result-table td strong { color: var(--ink); }
.calc-note { font-size: 0.84rem; color: var(--muted); margin: 0; }
.page-main .calc-note { font-size: 0.84rem; }
.calc-empty { color: var(--muted); font-style: italic; margin: 0; }
.verdict { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); border-left: 4px solid; font-size: 0.9rem; }
.verdict p { margin: 4px 0 0; font-size: 0.88rem; }
.verdict-pass { background: var(--ok-soft); border-color: var(--ok); }
.verdict-pass strong { color: var(--ok); }
.verdict-warn { background: var(--warn-soft); border-color: var(--warn); }
.verdict-warn strong { color: var(--warn); }
.verdict-fail { background: var(--bad-soft); border-color: var(--bad); }
.verdict-fail strong { color: var(--bad); }

/* ---------- Worked example ---------- */
.worked-example { background: var(--ink); color: var(--on-dark); border-radius: var(--radius-lg); padding: 24px 28px 24px 16px; }
.worked-example ol { margin: 0; padding-left: 26px; }
.worked-example li { margin-bottom: 10px; line-height: 1.6; font-size: 0.95rem; color: var(--on-dark); }
.worked-example li::marker { color: var(--accent); font-family: var(--mono); font-weight: 500; }
.worked-example strong { color: #fff; }
.worked-answer {
  margin: 18px 0 0 10px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.14);
  color: var(--accent) !important; font-weight: 600; font-size: 0.95rem !important;
}

/* ---------- Limits ---------- */
.limits-list { list-style: none; margin: 0; padding: 0; }
.limits-list li {
  position: relative; padding: 0 0 14px 30px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line); font-size: 0.97rem; line-height: 1.6;
}
.limits-list li:last-child { border-bottom: 0; }
.limits-list li::before {
  content: "!"; position: absolute; left: 0; top: 2px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-family: var(--mono); font-weight: 700; font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); margin-bottom: 8px; }
.faq-item summary {
  cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 600; color: var(--ink);
  font-size: 0.97rem; list-style: none; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--bg-2); }
.faq-item[open] { border-color: var(--line-2); }
.faq-item summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 1.15rem; color: var(--accent-ink); line-height: 1;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { border-bottom: 1px solid var(--line); }
.faq-body { padding: 12px 16px 2px; }
.faq-body p { font-size: 0.95rem; }

/* ---------- Sources ---------- */
.source-list { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; counter-reset: src; }
.source-list li {
  position: relative; padding: 0 0 12px 34px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line); color: var(--text-2); line-height: 1.55;
}
.source-list li:last-child { border-bottom: 0; }
.source-list li::before {
  counter-increment: src; content: counter(src, decimal-leading-zero);
  position: absolute; left: 0; top: 2px; font-family: var(--mono); font-size: 0.75rem; color: var(--accent-ink);
}
.source-list a { color: var(--ink); font-weight: 600; }
.source-list strong { color: var(--ink); }

/* ---------- Vendor / affiliate cards ---------- */
.vendor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; margin-bottom: 8px; }
.vendor-card {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 14px 16px; text-decoration: none !important;
  transition: border-color .12s ease, transform .12s ease;
}
.vendor-card:hover { border-color: var(--ink); transform: translateY(-1px); box-shadow: 0 12px 28px -20px rgba(18, 20, 19, 0.45); }
.vendor-card-cat { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.vendor-card-name { font-weight: 600; color: var(--ink); font-size: 0.95rem; line-height: 1.35; }
.vendor-card-vendor { font-size: 0.82rem; color: var(--muted); margin-bottom: 12px; }
.vendor-card-go {
  margin-top: auto; align-self: flex-start;
  padding: 7px 12px; border-radius: var(--radius);
  background: var(--ink); color: #fff; font-size: 0.82rem; font-weight: 600;
  transition: background .12s ease;
}
.vendor-card:hover .vendor-card-go { background: var(--ink-3); }
.disclosure {
  font-size: 0.8rem; color: var(--muted); border-left: 3px solid var(--accent);
  padding: 10px 14px; background: var(--accent-soft); border-radius: 0 var(--radius) var(--radius) 0; margin: 20px 0 0;
}
.page-main .disclosure { font-size: 0.8rem; color: var(--muted); }

/* ---------- Email capture ---------- */
.email-capture {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 28px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center;
}
.email-capture h2 { margin: 0 0 6px; font-size: 1.25rem; }
.email-capture p { font-size: 0.92rem; margin: 0; color: var(--text-2); }
.email-capture-form { display: flex; flex-wrap: wrap; gap: 8px; }
.email-capture-form input[type="email"] {
  flex: 1 1 180px; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 0.95rem;
}
.email-capture-form input[type="email"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.email-note { flex: 1 1 100%; font-size: 0.76rem; color: var(--muted); margin: 0; }
.email-capture .email-note.is-warning { color: var(--warn); }

/* ---------- Related ---------- */
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.related-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 16px 18px; text-decoration: none !important; transition: border-color .12s ease, transform .12s ease;
}
.related-card:hover { border-color: var(--ink); transform: translateY(-1px);  box-shadow: 0 12px 28px -20px rgba(18, 20, 19, 0.45); }
.related-kind { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.related-title { font-weight: 600; color: var(--ink); font-size: 0.98rem; }
.related-desc { font-size: 0.84rem; color: var(--text-2); line-height: 1.45; }

/* ---------- Callout ---------- */
.callout { border-radius: var(--radius); padding: 14px 18px; font-size: 0.94rem; line-height: 1.6; border-left: 4px solid; color: var(--text-2); }
.callout strong { display: inline; }
.callout-info { background: var(--accent-soft); border-color: var(--link); }
.callout-info strong { color: var(--accent-ink); }
.callout-warn { background: var(--warn-soft); border-color: var(--warn); }
.callout-warn strong { color: var(--warn); }

/* ---------- Figure ---------- */
.content-figure { margin: 0; }
.content-figure img { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-2); }
.content-figure figcaption { font-size: 0.84rem; color: var(--muted); line-height: 1.55; margin-top: 10px; }

/* ---------- Mandatory technical disclaimer ---------- */
.tech-disclaimer {
  margin-top: 56px; background: var(--bg-2); border: 1px solid var(--line); border-left: 4px solid var(--ink);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px;
  font-size: 0.84rem; line-height: 1.6; color: var(--text-2);
}
.tech-disclaimer strong { color: var(--ink); }

/* ---------- Hub pages ---------- */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.hub-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px 24px; text-decoration: none !important;
  transition: border-color .12s ease, transform .12s ease;
}
.hub-card:hover { border-color: var(--ink); transform: translateY(-2px);  box-shadow: 0 12px 28px -20px rgba(18, 20, 19, 0.45); }
.hub-card-kicker { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); }
.hub-card-title { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); line-height: 1.25; }
.hub-card-desc { font-size: 0.9rem; color: var(--text-2); line-height: 1.5; }
.hub-card-meta { margin-top: auto; padding-top: 10px; font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }

/* Vendor page: product cards grouped by family, inside the article column. */
.product-group { margin-top: 28px; }
.product-group .dir-group-head { margin-bottom: 12px; }
.product-group-links { font-size: 0.82rem; }
.page-main .product-group .hub-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.page-main a.hub-card { text-decoration: none; }
.hub-group + .hub-group { margin-top: 40px; }
.hub-group-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 14px; color: var(--ink); }
.hub-index-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.hub-index-col h3 { font-size: 0.95rem; font-weight: 600; margin: 0 0 8px; }
.hub-index-col ul { list-style: none; margin: 0; padding: 0; }
.hub-index-col li { break-inside: avoid; padding: 3px 0; font-size: 0.92rem; }
.hub-index-col a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.hub-index-col a:hover { color: var(--accent-ink); border-color: currentColor; }
.hub-empty { color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); padding: 24px; text-align: center; }

/* ---------- Siblings strip ---------- */
.page-siblings { border-top: 1px solid var(--line); background: var(--bg-2); padding: 36px 0 44px; }
.siblings-title { font-size: 0.95rem; margin: 0 0 14px; color: var(--muted); font-weight: 500; }
.siblings-title a { color: var(--ink); font-weight: 600; }
.siblings-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.siblings-list a {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); font-weight: 600; font-size: 0.92rem; text-decoration: none;
  transition: border-color .12s ease;
}
.siblings-list a:hover { border-color: var(--ink); }
.siblings-list .k { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* ---------- Catalog ---------- */
.catalog-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  position: sticky; top: var(--header-h); background: rgba(255,255,255,0.94); backdrop-filter: blur(8px); z-index: 20;
}
.catalog-search { flex: 1 1 260px; position: relative; }
.catalog-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.catalog-search input[type="search"] {
  width: 100%; padding: 10px 12px 10px 38px; border: 1px solid var(--line-2); border-radius: var(--radius);
  font: inherit; font-size: 0.95rem; background: var(--bg); color: var(--ink);
}
.catalog-search input[type="search"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.segmented { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 3px; background: var(--bg-2); gap: 2px; }
.segmented button {
  border: 0; background: transparent; padding: 7px 14px; border-radius: 4px;
  font-weight: 600; font-size: 0.86rem; color: var(--text-2); cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.segmented button:hover:not([aria-pressed="true"]) { color: var(--ink); }
.toolbar-note { font-size: 0.78rem; color: var(--muted); flex: 1 1 100%; margin: 10px 0 20px; max-width: 90ch; }
.catalog-toolbar.is-stuck { border-bottom-color: var(--line-2); box-shadow: 0 10px 20px -18px rgba(18, 20, 19, 0.5); }
@media (max-width: 640px) {
  .catalog-toolbar { gap: 8px; padding: 10px 0; }
  .catalog-search { flex-basis: 100%; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
}
.region-panel.is-hidden { display: none; }
.vendor-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 28px 0 8px; font-size: 0.92rem; color: var(--text-2); }
.vendor-line strong { color: var(--ink); font-size: 1.05rem; }
.vendor-line .mono { font-size: 0.78rem; color: var(--muted); }
.dir-group { margin-top: 26px; }
.dir-group.is-hidden { display: none; }
.dir-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.dir-group-head h3 { margin: 0; font-size: 1.05rem; }
.dir-group-head a { font-size: 0.82rem; }
.dir-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.dir-list li { border-bottom: 1px solid var(--line); }
.dir-list li.is-hidden { display: none; }
.dir-row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center;
  padding: 12px 8px; color: var(--text); text-decoration: none !important; border-radius: var(--radius);
  transition: background .12s ease;
}
.dir-row:hover { background: var(--bg-2); }
.dir-row:hover .dir-name { color: var(--link); }
.dir-name { font-weight: 600; color: var(--ink); font-size: 0.97rem; }
.dir-meta { grid-column: 1; font-size: 0.8rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dir-go { grid-column: 2; grid-row: 1 / span 2; font-size: 0.82rem; font-weight: 600; color: var(--accent-ink); white-space: nowrap; }
.dir-go::after { content: " ↗"; }
.dir-row:hover .dir-go { text-decoration: underline; }
@media (max-width: 640px) {
  /* The CTA moves under the name so long product names keep the full width. */
  .dir-row { grid-template-columns: 1fr; gap: 3px; padding: 12px 4px; }
  .dir-go { grid-column: 1; grid-row: auto; margin-top: 3px; }
}
.filter-empty { margin: 16px 0 0; padding: 18px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); font-size: 0.9rem; text-align: center; }

.status-panel {
  border: 1px dashed var(--line-2); border-radius: var(--radius-lg); padding: 26px 28px;
  display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; align-items: start; background: var(--bg);
}
.status-panel h3 { margin: 0 0 6px; font-size: 1.1rem; grid-column: 2; }
.status-panel .pill { grid-column: 1; grid-row: 1; margin-top: 3px; }
.status-panel p { grid-column: 2; margin: 0 0 8px; color: var(--text-2); font-size: 0.95rem; max-width: 62ch; }
.status-panel .links { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 4px; }
.status-panel .links a { font-weight: 600; color: var(--ink); font-size: 0.9rem; }
@media (max-width: 640px) {
  .status-panel { grid-template-columns: 1fr; }
  .status-panel h3, .status-panel p, .status-panel .links, .status-panel .pill { grid-column: 1; grid-row: auto; }
}

/* ---------- Academy roadmap ---------- */
.roadmap { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.roadmap li { display: grid; grid-template-columns: 120px 1fr; gap: 6px 22px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.roadmap .pill { align-self: start; justify-self: start; margin-top: 3px; }
.roadmap h3 { margin: 0 0 4px; font-size: 1.05rem; }
.roadmap p { margin: 0; color: var(--text-2); font-size: 0.95rem; max-width: 60ch; }
.roadmap .meta { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); margin-bottom: 4px; display: block; }
@media (max-width: 600px) { .roadmap li { grid-template-columns: 1fr; } }
.instructor {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 26px;
}
.instructor-avatar {
  width: 64px; height: 64px; border-radius: 50%; background: var(--bg-3);
  display: flex; align-items: center; justify-content: center; font-family: var(--mono); color: var(--muted); font-size: 0.7rem;
  border: 1px dashed var(--line-2);
}
.instructor h3 { margin: 0 0 4px; font-size: 1.15rem; }
.instructor .creds { font-size: 0.92rem; color: var(--text-2); margin: 0 0 8px; }
.instructor .note { font-size: 0.84rem; color: var(--muted); margin: 0; }
@media (max-width: 520px) { .instructor { grid-template-columns: 1fr; } }

/* ---------- Back to top (site.js adds it on long pages) ---------- */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-2); border-radius: 50%; background: rgba(255,255,255,0.95); color: var(--ink);
  box-shadow: 0 10px 24px -14px rgba(18, 20, 19, 0.5); cursor: pointer;
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s ease, transform .2s ease, border-color .12s ease;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--ink); }
.to-top svg { width: 18px; height: 18px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark-muted); padding: 56px 0 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { max-width: 34ch; font-size: 0.88rem; margin: 0 0 10px; line-height: 1.55; }
.footer-grid h4 { color: #fff; font-family: var(--mono); font-weight: 500; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 6px 0 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: var(--on-dark); font-size: 0.9rem; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: flex-start; padding-top: 22px; font-size: 0.78rem; flex-wrap: wrap; gap: 10px 24px; line-height: 1.5; }
.footer-bottom span:last-child { max-width: 60ch; }
.footer-link { background: none; border: 0; padding: 0; font: inherit; font-size: 0.9rem; color: var(--on-dark); cursor: pointer; }
.footer-link:hover { color: #fff; text-decoration: underline; }

/* Analytics consent banner (site.js §9). Accept and Decline share one style on purpose:
   refusing must be as easy and as visible as accepting. */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300;
  max-width: 560px; margin: 0 auto; padding: 16px 18px;
  display: flex; gap: 12px 18px; align-items: center; flex-wrap: wrap;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line-2);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); font-size: 0.88rem; line-height: 1.5;
}
.consent p { margin: 0; flex: 1 1 280px; }
.consent-actions { display: flex; gap: 8px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Responsive: page layout ---------- */
@media (max-width: 1000px) {
  .page-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { min-width: 0; }
  .toc {
    position: sticky; top: var(--header-h); z-index: 15;
    margin: -40px calc(-1 * clamp(16px, 3vw, 28px)) 30px; padding: 10px clamp(16px, 3vw, 28px);
    background: rgba(255,255,255,0.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
  }
  .toc-label { display: none; }
  .toc ul {
    display: flex; flex-wrap: nowrap; gap: 6px; border-left: 0;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .toc ul::-webkit-scrollbar { display: none; }
  .toc li { flex: 0 0 auto; }
  .toc li:last-child { padding-right: 32px; }
  .toc a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; margin: 0; font-size: 0.8rem; white-space: nowrap; background: var(--bg); }
  .toc a.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }
  .page-block { scroll-margin-top: calc(var(--header-h) + 64px); }
  .page-main { max-width: none; }
}
@media (max-width: 700px) {
  .spec-table th:first-child, .spec-table td:first-child {
    position: sticky; left: 0; z-index: 1; background: var(--bg);
    box-shadow: 1px 0 0 var(--line);
  }
  .spec-table th:first-child { background: var(--bg-2); }
  .spec-table tbody tr:nth-child(even) td:first-child { background: #FAFAF9; }
  .spec-table th, .spec-table td, .result-table th, .result-table td { padding: 9px 10px; }
  .spec-table td + td { min-width: 10ch; }
  .calc-results .result-table { min-width: 0; }
  .result-table td:first-child { min-width: 130px; }
  .page-main p { font-size: 1rem; }
  .worked-example { padding: 20px 18px 20px 8px; }
  .email-capture { grid-template-columns: 1fr; padding: 22px; }
  .calc { padding: 18px 16px; }
  .byline { gap: 6px 14px; }
}

/* ---------- Print: the charts are meant to be printed ---------- */
@media print {
  .consent, .site-header, .site-footer, .toc, .page-siblings, .to-top, .h-anchor, .block-email, .block-vendors,
  .block-related, .catalog-toolbar, .search-dialog, .skip-link, .crumbs { display: none !important; }
  body { background: #fff; color: #000; }
  .page-head { background: #fff; border: 0; padding: 0 0 12px; }
  .page-grid { display: block; }
  .page-main { max-width: none; }
  .page-block { margin-bottom: 24px; break-inside: avoid; }
  .table-wrap { border: 0; }
  .spec-table th { background: #f0f0f0; color: #000; }
  .worked-example { background: #f4f4f4; color: #000; border: 1px solid #ccc; }
  .worked-example li, .worked-example strong { color: #000; }
  .worked-answer { color: #000 !important; }
  a { color: inherit; text-decoration: none; }
  .source-list a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.75em; color: #555; word-break: break-all; }
  .tech-disclaimer { margin-top: 24px; border: 1px solid #000; }
}

/* Catalog: rows that open our own product page, not the seller's. */
.dir-row-internal .dir-go { color: var(--ink); }
.dir-row-internal .dir-go::after { content: " \2192"; }

/* ---------- Data sheets (build/datasheets.py) ---------- */
.ds-figure { margin: 0; border: 1px solid var(--line); background: var(--bg); padding: 16px; }
.ds-dwg { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; }
.ds-figure figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
/* A calculator links straight to a row (#AN4-12): show which one. */
.spec-table tbody tr[id] { scroll-margin-top: 96px; }
.spec-table .nw { white-space: nowrap; }
.spec-table tbody tr:target td { background: var(--accent-soft); box-shadow: inset 0 1px 0 var(--accent), inset 0 -1px 0 var(--accent); }
.spec-table tbody tr:target td:first-child { box-shadow: inset 3px 0 0 var(--accent), inset 0 1px 0 var(--accent), inset 0 -1px 0 var(--accent); }

/* ---------- Visual calculator (build/js/sheet.js) ----------
   A drawing sheet: the answer as a sentence, the controls, a dimensioned
   drawing to scale, readouts, notes and a title block. Rules, not boxes. */
.vcalc { margin: 0; }
/* Height reserved from the page JSON ("reserve") so the sheet drawing in
   does not push the text below it (CLS). Only when scripts run. */
@media (scripting: enabled) { .vcalc[style*="--vcalc-reserve"] { min-height: var(--vcalc-reserve); } }
.vc { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vc-units { margin: 0 0 -4px; }
.vc .vc-answer { font: 800 clamp(1.6rem, 1.1rem + 1.9vw, 2.35rem)/1.08 var(--font); letter-spacing: -0.035em; margin: 0; color: var(--ink); text-wrap: balance; }
.vc-answer mark { background: var(--accent); color: var(--on-accent); padding: 0 .12em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vc-answer mark.vc-bad { background: var(--bad); color: #fff; }
.vc-answer mark.vc-warn { background: #FFD27A; color: var(--ink); }
.vc-dot { display: inline-block; width: .2em; height: .2em; margin-left: .06em; border-radius: 50%; background: var(--accent); box-shadow: inset 0 0 0 .05em var(--dimple); vertical-align: baseline; }
.vc .vc-sub { margin: -6px 0 0; color: var(--muted); font-size: 0.95rem; max-width: 70ch; }
.vc-ctl { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: end; }
.vc-ctl-i[hidden] { display: none; }
.vc-ctl-i:has(.vc-break) { flex-basis: 100%; height: 0; }
.vc-field { display: grid; gap: 7px; }
.vc-lab { font: 500 0.7rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.vc-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--ink); border-radius: 2px; }
.vc-seg button { border: 0; border-left: 1px solid var(--ink); background: var(--bg); color: var(--ink); padding: 9px 13px; min-height: 40px; font: 500 0.86rem/1 var(--mono); cursor: pointer; }
.vc-seg button:first-child { border-left: 0; }
.vc-seg button:hover:not([aria-pressed="true"]) { background: var(--bg-2); }
.vc-seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.vc-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.vc-num { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ink); border-radius: 2px; background: var(--bg); padding: 0 10px; width: 150px; min-height: 40px; }
.vc-num-w { width: 190px; }
.vc-num-t { width: 240px; }
.vc-num-t input { text-transform: uppercase; }
.vc-num:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.vc-num input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 500 0.98rem/1 var(--mono); padding: 9px 0; outline: none; }
.vc-num em { font: 400 0.78rem var(--mono); color: var(--muted); font-style: normal; white-space: nowrap; }
.vc-field select { min-height: 40px; border: 1px solid var(--ink); border-radius: 2px; background: var(--bg); color: var(--ink); font: 500 0.9rem var(--font); padding: 8px 10px; max-width: 100%; }
.vc-btn { min-height: 40px; padding: 9px 14px; border: 1px solid var(--ink); border-radius: 2px; background: var(--ink); color: #fff; font: 600 0.88rem/1 var(--font); cursor: pointer; }
.vc-btn:hover { opacity: .9; }
.vc-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vc-btn-g { background: var(--bg); color: var(--ink); }
.vc-btn-s { min-height: 30px; padding: 5px 9px; font-size: 0.76rem; }
.vc-tag { display: inline-block; font: 600 0.66rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; background: #FFD27A; color: var(--ink); padding: 3px 5px; border-radius: 2px; vertical-align: 1px; }
.vc .vc-lh { font: 700 0.8rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; margin: 22px 0 4px; color: var(--ink); }
.vc-table tfoot th { border-top: 1px solid var(--ink); padding-top: 8px; color: var(--ink); font-weight: 700; }
.vc-chk { display: inline-flex; align-items: center; gap: 9px; font-size: 0.95rem; color: var(--text-2); cursor: pointer; min-height: 40px; }
.vc-chk input { accent-color: var(--ink); width: 18px; height: 18px; }
.vc-out { display: flex; flex-direction: column; min-width: 0; }
.vc-dwg {
  border: 1px solid var(--line); background-color: var(--bg);
  background-image: linear-gradient(rgba(18,20,19,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(18,20,19,.045) 1px, transparent 1px);
  background-size: 12px 12px;
}
.vc-dwg svg { display: block; width: 100%; height: auto; font-family: var(--mono); }
.vc-read { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.vc-read div { padding: 10px 10px 11px 0; min-width: 0; }
.vc-read div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.vc-read dt { font: 500 0.68rem/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.vc-read dd { margin: 5px 0 0; font: 600 1.08rem/1.2 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); overflow-wrap: anywhere; }
.vc-read dd small { display: block; font: 400 0.74rem/1.3 var(--mono); color: var(--muted); margin-top: 3px; }
.vc-verdict { margin-top: 14px; padding: 12px 14px; border-left: 4px solid; font-size: 0.92rem; }
.vc-verdict b { display: block; font-weight: 700; }
.vc .vc-verdict p { margin: 4px 0 0; font-size: 0.9rem; color: var(--text-2); }
.vc-ok { background: var(--ok-soft); border-color: var(--ok); } .vc-ok b { color: var(--ok); }
.vc-warn { background: var(--warn-soft); border-color: var(--warn); } .vc-warn b { color: var(--warn); }
.vc-bad { background: var(--bad-soft); border-color: var(--bad); } .vc-bad b { color: var(--bad); }
.vc-notes { margin: 0; padding: 0; list-style: none; counter-reset: n; font: 400 0.8rem/1.6 var(--mono); color: var(--muted); }
.vc-notes li { counter-increment: n; display: grid; grid-template-columns: 24px minmax(0, 1fr); }
.vc-notes li::before { content: counter(n) "."; color: var(--ink); }
.vc-notes li.vc-h { counter-increment: none; display: block; font-weight: 600; color: var(--ink); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }
.vc-notes li.vc-h::before { content: none; }
.vc-tblock { display: grid; grid-template-columns: 2fr 1.2fr 1fr; border: 1px solid var(--ink); font: 500 0.74rem/1.4 var(--mono); }
.vc-tblock div { padding: 8px 10px; border-left: 1px solid var(--ink); min-width: 0; overflow-wrap: anywhere; color: var(--ink); }
.vc-tblock div:first-child { border-left: 0; }
.vc-tblock small { display: block; color: var(--muted); font-size: 0.62rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2px; }
.vc-pend { color: var(--muted); }
.vc-extra { overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; }
.vc-table { width: 100%; border-collapse: collapse; font: 500 0.82rem/1.4 var(--mono); margin-top: 12px; }
.vc-table th { text-align: left; font-weight: 500; font-size: 0.66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--ink); padding: 6px 8px 6px 0; }
.vc-table td { border-bottom: 1px solid var(--line); padding: 6px 8px 6px 0; font-variant-numeric: tabular-nums; }
.vc-table .num { text-align: right; }
.vc-scroll { overflow-x: auto; max-width: 100%; }
.app-panel .vcalc { margin-top: 4px; }
@media (max-width: 560px) {
  .vc-read { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vc-read div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .vc-read div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .vc-tblock { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .vc-tblock div:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--ink); }
  .vc-tblock div:nth-child(2) { border-left: 0; }
  .vc-num { width: 132px; }
}

/* Links under a decoded part (part-number.js). */
.vc-num-t input::placeholder { text-transform: none; }
.vc-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 14px 0 0; }
@media (max-width: 560px) { .vc-num-t { width: 100%; } }
