:root {
  --shell: #f4f1e8;
  --paper: #fbfaf6;
  --midnight: #141b26;
  --midnight-2: #202a39;
  --slate: #465264;
  --muted: #626a65;
  --line: #d8d3c7;
  --line-dark: #334054;
  --cobalt: #3451ff;
  --cobalt-dark: #243bd0;
  --lime: #b9f65a;
  --amber: #f0a85a;
  --coral: #c94e5d;
  --white: #fff;
  --display: Georgia, "Times New Roman", ui-serif, serif;
  --sans: "Aptos", "Segoe UI Variable", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --wide: min(1360px, calc(100vw - 48px));
  --plate: min(1120px, calc(100vw - 48px));
  --read: 740px;
  --shadow: 0 24px 80px rgba(20, 27, 38, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--midnight);
  background: var(--shell);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E");
}
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; }
a { color: inherit; text-decoration-color: rgba(52, 81, 255, .45); text-underline-offset: .18em; }
a:hover { text-decoration-color: currentColor; }
p, li { max-width: 70ch; }
h1, h2, h3 { margin: 0; line-height: 1.04; text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 500; letter-spacing: -.035em; }
h3 { font-weight: 650; letter-spacing: -.02em; }
code { font-family: var(--mono); font-size: .88em; }
::selection { background: var(--lime); color: var(--midnight); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 4px; }
[id] { scroll-margin-top: 108px; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: .7rem 1rem;
  background: var(--lime);
  color: var(--midnight);
  font-weight: 750;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.kicker {
  margin: 0 0 .85rem;
  color: var(--cobalt-dark);
  font: 700 .72rem/1.2 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(185, 246, 90, .13); }

/* Header and brand */
.site-header {
  position: relative;
  z-index: 90;
  border-bottom: 1px solid rgba(20, 27, 38, .13);
  background: rgba(244, 241, 232, .9);
  backdrop-filter: blur(18px);
}
.header-inner {
  width: var(--wide);
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--midnight);
  text-decoration: none;
}
.brand-mark { position: relative; width: 39px; height: 36px; flex: 0 0 39px; }
.brand-mark__roof { position: absolute; inset: 9px 2px 1px; background: var(--midnight); clip-path: polygon(50% 0, 100% 38%, 100% 100%, 0 100%, 0 38%); }
.brand-mark__door { position: absolute; z-index: 2; width: 7px; height: 12px; right: 10px; bottom: 1px; background: var(--shell); }
.brand-mark__signal { position: absolute; z-index: 3; left: 0; top: 5px; width: 25px; height: 13px; border-left: 3px solid var(--cobalt); border-bottom: 3px solid var(--cobalt); transform: skewX(42deg); }
.brand-mark__signal::after { content: ""; position: absolute; width: 7px; height: 7px; right: -4px; bottom: -5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px var(--midnight); }
.brand-type { display: grid; font-size: .92rem; line-height: 1; letter-spacing: -.015em; }
.brand-type strong { font-size: 1.02rem; }
.brand-type span { color: var(--slate); margin-top: .2rem; }
.site-nav { display: flex; align-items: center; gap: .45rem; }
.site-nav a { padding: .6rem .85rem; color: var(--slate); font-size: .88rem; font-weight: 700; text-decoration: none; border-radius: 999px; }
.site-nav a:hover { color: var(--midnight); background: var(--white); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.nav-toggle span:not(.sr-only) { display: block; width: 17px; height: 2px; margin: 4px auto; background: var(--midnight); transition: transform .2s ease; }

/* Home hero */
.home-hero {
  width: var(--wide);
  min-height: min(790px, calc(100vh - 82px));
  margin: 0 auto;
  padding: 28px 0 76px;
  position: relative;
  display: grid;
  align-items: end;
  overflow: clip;
}
.hero-image-wrap { position: absolute; inset: 28px 0 76px 31%; overflow: hidden; border-radius: 2px; background: var(--midnight); box-shadow: var(--shadow); }
.hero-image-wrap::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(20,27,38,.72) 0, rgba(20,27,38,.1) 44%, rgba(20,27,38,.08)), linear-gradient(0deg, rgba(20,27,38,.36), transparent 55%); }
.hero-image-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: 54% center; filter: saturate(.82) contrast(1.03); }
.hero-copy { position: relative; z-index: 3; width: min(720px, 58vw); padding: 58px 58px 46px 0; color: var(--midnight); }
.hero-copy::before { content: ""; position: absolute; z-index: -1; inset: 0 -25% 0 -20vw; background: linear-gradient(90deg, var(--shell) 0%, var(--shell) 68%, rgba(244,241,232,.92) 82%, transparent 100%); }
.hero-copy .kicker span { display: inline-flex; padding: .5rem .65rem; color: var(--midnight); background: var(--lime); }
.hero-copy h1 { max-width: 770px; font-size: clamp(3.6rem, 6.2vw, 7.35rem); line-height: .9; }
.hero-copy > p:not(.kicker) { max-width: 590px; margin: 1.8rem 0 0; color: var(--slate); font-size: clamp(1.05rem, 1.5vw, 1.28rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .75rem 1.1rem; border: 1px solid var(--midnight); font-size: .85rem; font-weight: 750; text-decoration: none; }
.button--primary { color: var(--white); background: var(--midnight); }
.button--primary:hover { background: var(--cobalt); border-color: var(--cobalt); }
.button--ghost { background: rgba(244,241,232,.62); }
.button--ghost:hover { background: var(--white); }
.hero-stats { display: flex; gap: 0; margin: 3.2rem 0 0; }
.hero-stats div { min-width: 130px; padding-right: 1.4rem; margin-right: 1.4rem; border-right: 1px solid var(--line); }
.hero-stats div:last-child { border-right: 0; }
.hero-stats dt { font: 700 1.05rem/1 var(--mono); }
.hero-stats dd { margin: .42rem 0 0; color: var(--muted); font-size: .75rem; }
.hero-signal { position: absolute; z-index: 2; display: flex; align-items: center; gap: .45rem; padding: .42rem .6rem; color: var(--white); background: rgba(20,27,38,.78); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(9px); font: 650 .65rem/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.hero-signal i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(185,246,90,.15); }
.hero-signal--one { top: 25%; right: 27%; }
.hero-signal--two { top: 54%; left: 59%; }
.hero-signal--three { bottom: 12%; right: 8%; }

/* Home systems */
.principles { width: var(--wide); margin: 0 auto; padding: 120px 0; display: grid; grid-template-columns: .85fr 1.15fr; gap: 8vw; border-top: 1px solid var(--line); }
.principles h2 { max-width: 580px; font-size: clamp(2.6rem, 4.7vw, 5.5rem); }
.principles ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--midnight); }
.principles li { display: grid; grid-template-columns: 52px 1fr; gap: 1rem; padding: 1.35rem 0; border-bottom: 1px solid var(--line); }
.principles li > span { padding-top: .2rem; color: var(--cobalt); font: 700 .72rem/1 var(--mono); }
.principles li strong { font-size: 1.05rem; }
.principles li p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.guide-map { padding: 120px max(24px, calc((100vw - 1360px) / 2)); color: var(--white); background: var(--midnight); }
.section-head { display: grid; grid-template-columns: 1fr .62fr; align-items: end; gap: 4rem; margin-bottom: 64px; }
.section-head .kicker { color: var(--lime); }
.section-head h2 { max-width: 760px; font-size: clamp(2.8rem, 5vw, 5.5rem); }
.section-head > p { margin: 0 0 .5rem; color: #b8c2cf; }
.guide-grid { display: grid; grid-template-columns: repeat(12, 1fr); border-top: 1px solid var(--line-dark); }
.guide-card { position: relative; grid-column: span 4; min-height: 410px; padding: 32px 30px; border-right: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); overflow: hidden; }
.guide-card:nth-child(3), .guide-card:nth-child(6) { border-right: 0; }
.guide-card:nth-child(n+7) { grid-column: span 3; }
.guide-card:nth-child(10) { border-right: 0; }
.guide-card::before { content: ""; position: absolute; width: 170px; height: 170px; right: -70px; top: -70px; border: 1px solid var(--line-dark); border-radius: 50%; transition: transform .45s ease, border-color .45s ease; }
.guide-card:hover::before { transform: scale(1.3); border-color: var(--cobalt); }
.guide-card__signal { display: flex; justify-content: space-between; gap: 2rem; color: var(--lime); font: 700 .75rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.guide-card__signal small { color: #aeb8c7; font: inherit; }
.guide-card h3 { max-width: 440px; margin-top: 5rem; font: 500 clamp(1.65rem, 2.4vw, 2.45rem)/1.05 var(--display); }
.guide-card h3 a { text-decoration: none; }
.guide-card h3 a::after { content: ""; position: absolute; inset: 0; }
.guide-card > p { max-width: 43ch; margin: 1.2rem 0 0; color: #aeb8c7; font-size: .9rem; }
.guide-card__read { position: absolute; bottom: 27px; left: 30px; color: var(--white); font-size: .78rem; font-weight: 750; }
.guide-card__read span { color: var(--lime); margin-left: .4rem; }
.guide-card--measure .guide-card__signal { color: var(--amber); }
.guide-card--protect .guide-card__signal { color: #ff8491; }
.guide-card--connect .guide-card__signal, .guide-card--voice .guide-card__signal { color: #78a3ff; }
.guide-card--respond .guide-card__signal { color: #ffb44a; }
.guide-card--interface .guide-card__signal { color: #d2b1ff; }

.issue-cover { width: var(--wide); margin: 0 auto; padding: 30px 0 110px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: clamp(36px, 6vw, 92px); align-items: center; }
.issue-cover__image { margin: 0; background: var(--ink); box-shadow: 0 32px 80px rgba(20,27,38,.16); }
.issue-cover__image img { display: block; width: 100%; height: auto; aspect-ratio: 1440 / 788; object-fit: cover; }
.issue-cover__image figcaption { padding: 14px 18px 16px; color: #b6c0cd; font: 700 .68rem/1.45 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.issue-cover__copy h2 { max-width: 11ch; margin: 1rem 0 1.4rem; font: 500 clamp(2.7rem, 4.4vw, 5rem)/.98 var(--display); }
.issue-cover__copy > p:not(.kicker) { max-width: 40ch; color: var(--muted); }
.issue-cover__copy .text-link { display: inline-flex; margin-top: 1.8rem; }
.system-plate { width: var(--wide); margin: 0 auto; padding: 130px 0; display: grid; grid-template-columns: .72fr 1.28fr; gap: 7vw; align-items: center; }
.system-plate__copy h2 { font-size: clamp(3rem, 5vw, 5.6rem); }
.system-plate__copy > p:not(.kicker) { color: var(--slate); }
.text-link { display: inline-flex; gap: .6rem; margin-top: 1rem; font-size: .86rem; font-weight: 750; text-decoration: none; border-bottom: 1px solid var(--midnight); }
.text-link span { color: var(--cobalt); }
.system-plate__diagram { display: grid; grid-template-columns: 1fr 32px 1fr 32px 1fr 32px 1fr; align-items: center; padding: 38px 30px; color: var(--white); background: var(--midnight); box-shadow: var(--shadow); }
.system-plate__diagram > div { min-height: 120px; display: flex; flex-direction: column; justify-content: center; gap: .35rem; }
.system-plate__diagram > div span { color: var(--lime); font: 700 .7rem/1 var(--mono); }
.system-plate__diagram > div small { color: #aab4c2; font-size: .7rem; }
.system-plate__diagram > i { height: 1px; background: var(--cobalt); position: relative; }
.system-plate__diagram > i::after { content: ""; position: absolute; width: 5px; height: 5px; right: 0; top: -2px; border-radius: 50%; background: var(--lime); }
.system-plate__diagram .system-plate__recovery span { color: var(--amber); }

/* Guide hero and technical plate */
.reading-progress { position: fixed; z-index: 120; top: 0; left: 0; width: 100%; height: 3px; pointer-events: none; }
.reading-progress span { display: block; width: 100%; height: 100%; background: var(--lime); transform: scaleX(0); transform-origin: left center; will-change: transform; }
.article-hero { padding: 84px 24px 190px; color: var(--white); background: var(--midnight); overflow: hidden; position: relative; }
.article-hero::before { content: ""; position: absolute; width: 560px; height: 560px; right: -130px; bottom: -340px; border: 1px solid var(--line-dark); border-radius: 50%; box-shadow: 0 0 0 80px rgba(52,81,255,.05), 0 0 0 160px rgba(52,81,255,.025); }
.article-hero__inner { width: var(--plate); margin: 0 auto; position: relative; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; margin-bottom: 4rem; color: #adb7c4; font: 650 .71rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.breadcrumb a { color: inherit; }
.guide-code { display: flex; align-items: center; gap: .6rem; margin: 0 0 1.4rem; color: #b9c1cd; font: 700 .72rem/1 var(--mono); letter-spacing: .15em; text-transform: uppercase; }
.guide-code span { color: var(--lime); }
.article-hero h1 { max-width: 1020px; font-size: clamp(3.4rem, 6.2vw, 7.2rem); line-height: .94; }
.article-lede { max-width: 760px; margin: 2rem 0 0; color: #c8d0db; font-size: clamp(1.05rem, 1.5vw, 1.28rem); }
.review-line { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1rem; margin-top: 2.2rem; color: #aeb8c5; font: 650 .72rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.review-line strong { color: var(--white); }
.review-line > span:not(.status-dot) { padding-left: 1rem; border-left: 1px solid var(--line-dark); }
.technical-plate { position: relative; z-index: 3; width: var(--plate); margin: -112px auto 0; padding: 0; background: var(--paper); box-shadow: var(--shadow); }
.technical-plate__viewport { overflow-x: auto; overscroll-behavior-inline: contain; background: var(--paper); scrollbar-gutter: stable; }
.technical-plate img { width: 100%; height: auto; }
.technical-plate figcaption { display: grid; grid-template-columns: 110px 1fr; gap: 1.2rem; margin: 0; padding: 1.05rem 1.2rem; color: var(--slate); border-top: 1px solid var(--line); font-size: .78rem; line-height: 1.5; }
.technical-plate figcaption > span { color: var(--cobalt-dark); font: 700 .7rem/1.5 var(--mono); letter-spacing: .1em; }
.technical-plate figcaption > div { max-width: 78ch; }
.technical-plate__hint { display: none; margin-top: .65rem; color: var(--muted); font-size: .72rem; }
.technical-plate__open { display: inline-flex; align-items: center; min-height: 44px; margin-top: .55rem; color: var(--cobalt-dark); font: 750 .72rem/1.3 var(--mono); letter-spacing: .04em; }

/* Article structure */
.article-layout { width: var(--plate); margin: 100px auto 0; display: grid; grid-template-columns: 250px minmax(0, var(--read)); gap: clamp(55px, 8vw, 120px); align-items: start; }
.toc { position: sticky; top: 32px; align-self: start; font-size: .75rem; }
.toc-inner { padding: 1.1rem 0 0; border-top: 2px solid var(--midnight); }
.toc-inner > p { margin: 0 0 .85rem; font: 750 .68rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.toc nav { display: grid; }
.toc nav a { position: relative; padding: .42rem .2rem .42rem .8rem; color: var(--muted); line-height: 1.35; text-decoration: none; border-left: 1px solid var(--line); }
.toc nav a::before { content: ""; position: absolute; width: 3px; inset: 0 auto 0 -2px; background: transparent; }
.toc nav a:hover, .toc nav a.is-active { color: var(--midnight); }
.toc nav a.is-active::before { background: var(--cobalt); }
.toc-source { display: flex; align-items: center; gap: .55rem; margin-top: 1rem; padding-top: 1rem; color: var(--slate); border-top: 1px solid var(--line); text-decoration: none; }
.toc-source .status-dot { width: 6px; height: 6px; }
.article-body { min-width: 0; }
.article-body p { margin: .85rem 0 1.25rem; color: #394454; }
.article-body ul:not(.signal-list) { padding-left: 1.2rem; }
.bench-answer { position: relative; margin-bottom: 90px; padding: 34px 38px; color: var(--white); background: var(--midnight); border-left: 5px solid var(--lime); box-shadow: 0 20px 60px rgba(20,27,38,.12); }
.bench-answer .kicker { color: var(--lime); }
.bench-answer h2 { font: 500 2rem/1.05 var(--display); }
.bench-answer > p:last-child { margin-bottom: 0; color: #d3d9e2; font-size: 1.02rem; }
.bench-answer code { color: var(--lime); }
.article-section, .source-desk, .faq-section { position: relative; margin: 0 0 92px; padding-top: 1.3rem; border-top: 1px solid var(--midnight); }
.section-index { position: absolute; top: 1.75rem; left: -54px; color: var(--cobalt); font: 700 .7rem/1 var(--mono); }
.article-section > h2, .source-desk > h2, .faq-section > h2 { margin-bottom: 1.55rem; font-size: clamp(2.25rem, 4vw, 3.7rem); }
.article-section > h3 { margin: 2rem 0 .8rem; font-size: 1.2rem; }
.note { margin: 2rem 0; padding: 1.2rem 1.3rem; color: #313a47; background: #e8e4d8; border-left: 4px solid var(--amber); font-size: .9rem; }
.note strong { color: var(--midnight); }
.signal-list { list-style: none; margin: 2rem 0; padding: 0; border-top: 1px solid var(--line); }
.signal-list li { display: grid; grid-template-columns: 130px 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.signal-list li span { color: var(--cobalt-dark); font: 700 .75rem/1.5 var(--mono); text-transform: uppercase; }
.signal-list li strong { font-size: .95rem; }
.checklist { margin: 2.2rem 0; padding: 1.5rem; background: var(--paper); border: 1px solid var(--line); }
.checklist h3 { margin-bottom: .85rem; font: 700 .75rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.checklist ul { list-style: none; margin: 0; padding: 0 !important; }
.checklist li { position: relative; padding: .62rem 0 .62rem 2rem; border-top: 1px solid var(--line); font-size: .87rem; }
.checklist li::before { content: "✓"; position: absolute; left: .2rem; color: var(--cobalt); font-weight: 800; }
.metric-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin: 2rem 0; color: var(--white); background: var(--midnight); }
.metric-strip div { padding: 1.2rem; border-right: 1px solid var(--line-dark); }
.metric-strip div:last-child { border-right: 0; }
.metric-strip strong, .metric-strip span { display: block; }
.metric-strip strong { color: var(--lime); font: 700 1.05rem/1 var(--mono); }
.metric-strip span { margin-top: .45rem; color: #acb7c5; font-size: .72rem; }
.table-wrap { max-width: 100%; margin: 2rem 0; overflow-x: auto; border: 1px solid var(--line); background: var(--paper); }
.table-scroll-hint { display: none; margin: 1.4rem 0 -.9rem; color: var(--muted); font: 700 .72rem/1.4 var(--mono); letter-spacing: .03em; }
table { width: 100%; border-collapse: collapse; min-width: 660px; font-size: .8rem; }
caption { padding: .9rem 1rem; text-align: left; color: var(--midnight); font: 700 .74rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
th, td { padding: .75rem .85rem; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
thead th { color: var(--white); background: var(--midnight); border-color: var(--line-dark); }
tbody th { color: var(--cobalt-dark); }

/* Code and decision tool */
.code-panel { position: relative; margin: 2rem 0; color: #e8edf5; background: var(--midnight); border: 1px solid var(--line-dark); box-shadow: 0 18px 50px rgba(20,27,38,.12); }
.code-panel figcaption { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .75rem .7rem 1rem; border-bottom: 1px solid var(--line-dark); }
.code-panel figcaption span { color: var(--lime); font: 700 .68rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.copy-button { min-width: 44px; min-height: 44px; padding: .42rem .62rem; color: var(--white); background: transparent; border: 1px solid #536177; cursor: pointer; font-size: .68rem; font-weight: 750; }
.copy-button:hover { color: var(--midnight); background: var(--lime); border-color: var(--lime); }
.code-panel pre { margin: 0; padding: 1.35rem; max-height: 520px; overflow: auto; color: #dde6f2; font: .76rem/1.7 var(--mono); tab-size: 2; }
.mode-lab { margin: 2rem 0; padding: 1.5rem; background: var(--paper); border: 1px solid var(--line); }
.mode-lab__intro h3 { font: 500 1.7rem/1.08 var(--display); }
.mode-lab__intro > p:last-child { font-size: .86rem; }
.mode-choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem; margin: 1.3rem 0; padding: 0; border: 0; }
.mode-choices label { position: relative; display: block; cursor: pointer; }
.mode-choices input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mode-choices label > span { min-height: 112px; display: flex; flex-direction: column; justify-content: center; padding: .85rem; background: var(--shell); border: 1px solid var(--line); }
.mode-choices strong, .mode-choices small { display: block; }
.mode-choices strong { font-size: .82rem; }
.mode-choices small { margin-top: .28rem; color: var(--muted); font-size: .72rem; }
.mode-choices input:checked + span { color: var(--white); background: var(--midnight); border-color: var(--midnight); box-shadow: inset 0 0 0 2px var(--lime); }
.mode-choices input:checked + span small { color: #bcc5d0; }
.mode-choices input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.mode-result { display: grid; grid-template-columns: 10px 1fr; gap: .8rem; align-items: start; padding: 1rem; background: #e6eadb; }
.mode-result .status-dot { margin-top: .4rem; background: var(--cobalt); }
.mode-result small, .mode-result strong { display: block; }
.mode-result small { color: var(--muted); font: 700 .64rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.mode-result strong { margin-top: .25rem; font-size: 1.15rem; }
.mode-result p { margin: .3rem 0 0; font-size: .78rem; }

/* Planning calculators */
.calculator { margin: 2.2rem 0; padding: 1.5rem; background: var(--paper); border: 1px solid var(--line); }
.calculator__intro h3 { margin-top: .35rem; font: 500 1.7rem/1.08 var(--display); }
.calculator__intro > p:last-child { margin-top: .6rem; font-size: .86rem; }
.calculator__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.2rem; margin: 1.4rem 0 0; }
.calculator-field label { display: block; margin-bottom: .35rem; font-size: .82rem; font-weight: 750; }
.calculator-field input, .calculator-field select { width: 100%; min-height: 44px; padding: .55rem .7rem; color: var(--midnight); background: var(--shell); border: 1px solid var(--line); border-radius: 0; font: 600 .95rem/1.3 var(--mono); }
.calculator-field select { font-family: inherit; font-weight: 600; }
.calculator-field input:focus-visible, .calculator-field select:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.calculator-field input[aria-invalid="true"] { border-color: #a4232b; box-shadow: inset 0 0 0 1px #a4232b; }
.calculator-field__hint { margin: .38rem 0 0; color: var(--muted); font-size: .74rem; line-height: 1.5; }
.calculator__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.calculator__actions .button { min-height: 44px; }
.calculator-errors { margin-top: 1.2rem; padding: .9rem 1.1rem; color: #6d1219; background: #f6e2e0; border-left: 4px solid #a4232b; font-size: .82rem; }
.calculator-errors[hidden] { display: none; }
.calculator-errors__title { margin: 0 0 .35rem; font-weight: 750; }
.calculator-errors ul { margin: 0; padding-left: 1.1rem !important; }
.calculator-result { margin-top: 1.4rem; padding: 1.2rem 1.3rem; color: var(--white); background: var(--midnight); }
.calculator-result[hidden] { display: none; }
.calculator-result__eyebrow { margin: 0; color: var(--lime); font: 700 .64rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.calculator-result__headline { margin: .5rem 0 0; color: var(--white); font: 500 1.45rem/1.18 var(--display); }
.calculator-result__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 1.15rem 0 0; border-top: 1px solid var(--line-dark); }
.calculator-result__grid > div { display: flex; flex-direction: column; gap: .2rem; padding: .7rem .9rem .7rem 0; border-bottom: 1px solid var(--line-dark); }
.calculator-result__grid dt { color: #acb7c5; font-size: .74rem; }
.calculator-result__grid dd { margin: 0; color: var(--lime); font: 700 .95rem/1.3 var(--mono); }
.calculator-result__note { margin: 1rem 0 0; color: #c2ccd8; font-size: .76rem; line-height: 1.65; }
.calculator__fallback { margin: 1.2rem 0 0; padding: 1rem 1.1rem; color: #313a47; background: #e8e4d8; border-left: 4px solid var(--amber); font-size: .82rem; }

/* Sources, FAQ and related */
.source-desk > p { font-size: .9rem; }
.source-desk ul { list-style: none; margin: 1.5rem 0 0; padding: 0 !important; border-top: 1px solid var(--line); }
.source-desk li { border-bottom: 1px solid var(--line); }
.source-desk li a { position: relative; display: grid; grid-template-columns: 1fr 1.3fr; gap: 1rem; padding: 1rem 94px 1rem 0; text-decoration: none; }
.source-desk li strong { color: var(--midnight); font-size: .88rem; }
.source-desk li span { color: var(--muted); font-size: .78rem; }
.source-desk li small { position: absolute; right: 0; top: 1.05rem; color: var(--cobalt-dark); font: 700 .62rem/1.3 var(--mono); text-transform: uppercase; }
.source-desk li a:hover strong { color: var(--cobalt-dark); }
.source-review { color: var(--muted) !important; font-size: .72rem !important; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary { display: grid; grid-template-columns: 1fr 24px; gap: 1rem; align-items: center; padding: 1.05rem 0; list-style: none; cursor: pointer; font-size: .92rem; font-weight: 720; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary span { width: 14px; height: 14px; position: relative; }
.faq-item summary span::before, .faq-item summary span::after { content: ""; position: absolute; background: var(--cobalt); }
.faq-item summary span::before { width: 14px; height: 2px; top: 6px; }
.faq-item summary span::after { width: 2px; height: 14px; left: 6px; transition: transform .2s ease; }
.faq-item[open] summary span::after { transform: rotate(90deg); }
.faq-item div { padding: 0 42px .8rem 0; }
.faq-item div p { margin-top: 0; font-size: .88rem; }
.related-guides { width: var(--wide); margin: 130px auto 0; padding: 80px 0 120px; display: grid; grid-template-columns: .6fr 1.4fr; gap: 7vw; border-top: 1px solid var(--midnight); }
.related-guides h2 { font-size: clamp(2.5rem, 4vw, 4.6rem); }
.related-guides > div { display: grid; }
.related-guides > div a { position: relative; display: grid; grid-template-columns: 150px 1fr 30px; gap: 1.2rem; align-items: center; padding: 1.2rem 0; border-top: 1px solid var(--line); text-decoration: none; }
.related-guides > div a:last-child { border-bottom: 1px solid var(--line); }
.related-guides a span { color: var(--cobalt-dark); font: 700 .66rem/1.4 var(--mono); text-transform: uppercase; }
.related-guides a strong { font-size: .9rem; }
.related-guides a i { color: var(--cobalt); font-style: normal; }

/* Legal and 404 */
.legal-main { min-height: 70vh; }
.legal-article { width: min(880px, calc(100vw - 48px)); margin: 90px auto 140px; }
.legal-article .breadcrumb { margin-bottom: 5rem; color: var(--muted); }
.legal-article > header { max-width: 780px; padding-bottom: 3rem; border-bottom: 1px solid var(--midnight); }
.legal-article h1 { font-size: clamp(3.5rem, 7vw, 7rem); }
.legal-prose { max-width: 720px; margin: 4rem 0 0 auto; }
.legal-prose .lead { color: var(--midnight); font: 500 1.55rem/1.38 var(--display); }
.legal-prose h2 { margin: 3.2rem 0 1rem; font-size: 2rem; }
.legal-prose p { color: var(--slate); }
.policy-date { margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .8rem; }
.not-found-main { min-height: calc(100vh - 82px); display: grid; place-items: center; padding: 80px 24px; }
.not-found { max-width: 780px; text-align: center; }
.not-found h1 { font-size: clamp(3.2rem, 7vw, 6.5rem); }
.not-found > p:not(.kicker) { margin: 1.5rem auto 0; color: var(--slate); }
.not-found .hero-actions { justify-content: center; }
.not-found__signal { width: 250px; height: 82px; margin: 0 auto 3rem; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--white); background: var(--midnight); }
.not-found__signal span { color: var(--lime); font: 700 1.8rem/1 var(--mono); }
.not-found__signal i { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.not-found__signal i:nth-of-type(2) { opacity: .55; }
.not-found__signal i:nth-of-type(3) { opacity: .25; }

/* Footer and utility */
.site-footer { padding: 74px max(24px, calc((100vw - 1360px) / 2)) 28px; color: #d5dbe4; background: var(--midnight); }
.footer-grid { display: grid; grid-template-columns: 1.7fr .65fr .65fr; gap: 5vw; padding-bottom: 64px; }
.site-brand--footer { color: var(--white); }
.site-brand--footer .brand-mark__roof { background: var(--white); }
.site-brand--footer .brand-mark__door { background: var(--midnight); }
.site-brand--footer .brand-type span { color: #aeb8c5; }
.footer-brand > p { color: #aeb8c5; font-size: .85rem; }
.footer-grid > div:not(.footer-brand) { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.footer-label { margin: 0 0 .7rem; color: var(--lime); font: 700 .65rem/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.footer-grid > div:not(.footer-brand) a { color: #c7ced8; font-size: .8rem; text-decoration: none; }
.footer-grid a:hover { color: var(--white); }
.footer-floor { display: flex; justify-content: space-between; gap: 2rem; padding-top: 1.3rem; color: #8996a8; border-top: 1px solid var(--line-dark); font-size: .7rem; }
.footer-floor p { margin: 0; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translate(-50%, 30px); padding: .7rem 1rem; color: var(--white); background: var(--midnight); border: 1px solid var(--line-dark); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; font-size: .75rem; box-shadow: var(--shadow); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Responsive */
@media (max-width: 1000px) {
  :root { --wide: min(calc(100% - 32px), 900px); --plate: min(calc(100% - 32px), 900px); }
  .home-hero { min-height: auto; padding-top: 16px; grid-template-rows: 54vw auto; }
  .hero-image-wrap { position: relative; inset: auto; grid-row: 1; height: 54vw; min-height: 400px; }
  .hero-copy { grid-row: 2; width: 100%; padding: 46px 0 0; }
  .hero-copy::before { display: none; }
  .hero-copy h1 { font-size: clamp(3.6rem, 10vw, 6rem); }
  .hero-signal--one { top: 18%; right: 12%; }
  .hero-signal--two { top: 54%; left: 54%; }
  .principles, .system-plate, .related-guides { grid-template-columns: 1fr; }
  .principles { gap: 4rem; }
  .section-head { grid-template-columns: 1fr; gap: 1.4rem; }
  .issue-cover { grid-template-columns: 1fr; }
  .issue-cover__copy { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; align-items: start; }
  .issue-cover__copy .kicker, .issue-cover__copy .text-link { grid-column: 1 / -1; }
  .guide-card, .guide-card:nth-child(n+7) { grid-column: span 6; }
  .guide-card:nth-child(odd) { border-right: 1px solid var(--line-dark); }
  .guide-card:nth-child(even) { border-right: 0; }
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .toc-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .toc-inner > p { grid-column: 1 / -1; }
  .toc-source { align-self: end; }
  .section-index { position: static; display: block; margin-bottom: .8rem; }
  .related-guides { gap: 3rem; }
}

@media (max-width: 700px) {
  :root { --wide: calc(100% - 28px); --plate: calc(100% - 28px); }
  body { font-size: 16px; }
  .header-inner { min-height: 70px; }
  .site-nav { flex-wrap: wrap; }
  .js .nav-toggle { display: block; }
  .js .site-nav { position: absolute; top: calc(100% + 1px); left: 0; right: 0; display: none; padding: .75rem 14px 1rem; background: var(--shell); border-bottom: 1px solid var(--line); box-shadow: 0 15px 30px rgba(20,27,38,.1); }
  .js .site-nav.is-open { display: grid; }
  .site-nav a { padding: .8rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  .home-hero { grid-template-rows: 68vw auto; padding-bottom: 60px; }
  .hero-image-wrap { height: 68vw; min-height: 310px; }
  .hero-copy h1 { font-size: clamp(3.2rem, 15vw, 5rem); }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
  .hero-stats div { min-width: 0; padding-right: .6rem; margin-right: .6rem; }
  .hero-stats dt { font-size: .8rem; }
  .hero-stats dd { font-size: .64rem; }
  .hero-signal--two { display: none; }
  .principles, .system-plate { padding: 82px 0; }
  .guide-map { padding-top: 80px; padding-bottom: 80px; }
  .issue-cover { padding: 10px 0 80px; }
  .issue-cover__copy { display: block; }
  .issue-cover__copy h2 { max-width: 12ch; }
  .guide-card, .guide-card:nth-child(n+7) { grid-column: 1 / -1; border-right: 0; min-height: 350px; }
  .guide-card h3 { margin-top: 4rem; }
  .system-plate__diagram { grid-template-columns: 1fr; gap: 0; }
  .system-plate__diagram > div { min-height: 82px; }
  .system-plate__diagram > i { width: 1px; height: 24px; margin-left: 4px; }
  .system-plate__diagram > i::after { right: -2px; top: auto; bottom: 0; }
  .article-hero { padding: 56px 14px 120px; }
  .article-hero h1 { font-size: clamp(3.1rem, 14vw, 5rem); }
  .breadcrumb { margin-bottom: 3rem; }
  .review-line { gap: .5rem .65rem; }
  .review-line > span:not(.status-dot) { padding-left: .65rem; }
  .technical-plate { margin-top: -70px; }
  .technical-plate__viewport img { width: 900px; max-width: none; }
  .technical-plate figcaption { grid-template-columns: 1fr; }
  .technical-plate__hint, .table-scroll-hint { display: block; }
  .article-layout { margin-top: 70px; }
  .toc-inner { grid-template-columns: 1fr; }
  .bench-answer { margin-bottom: 72px; padding: 26px 22px; }
  .article-section, .source-desk, .faq-section { margin-bottom: 72px; }
  .article-section > h2, .source-desk > h2, .faq-section > h2 { font-size: 2.5rem; }
  .signal-list li { grid-template-columns: 95px 1fr; }
  .metric-strip { grid-template-columns: 1fr; }
  .metric-strip div { border-right: 0; border-bottom: 1px solid var(--line-dark); }
  .mode-choices { grid-template-columns: 1fr; }
  .calculator { padding: 1.1rem; }
  .calculator__fields, .calculator-result__grid { grid-template-columns: 1fr; }
  .calculator__actions .button { flex: 1 1 auto; }
  .mode-choices label > span { min-height: 88px; }
  .source-desk li a { grid-template-columns: 1fr; padding-right: 0; padding-bottom: 2.4rem; }
  .source-desk li small { left: 0; right: auto; top: auto; bottom: .8rem; }
  .related-guides { margin-top: 90px; padding: 60px 0 90px; }
  .related-guides > div a { grid-template-columns: 1fr 25px; }
  .related-guides a span { grid-column: 1 / -1; }
  .legal-article { width: calc(100vw - 28px); margin-top: 60px; margin-bottom: 90px; }
  .legal-article .breadcrumb { margin-bottom: 3.5rem; }
  .legal-prose { margin-top: 3rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-floor { flex-direction: column; gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  body::before, .site-header, .site-footer, .reading-progress, .toc, .copy-button, .technical-plate__hint, .technical-plate__open, .related-guides, .toast { display: none !important; }
  .article-hero { padding: 0 0 30px; color: #000; background: #fff; }
  .article-hero h1 { font-size: 34pt; }
  .article-lede, .review-line { color: #333; }
  .technical-plate { margin: 0 auto 30px; box-shadow: none; border: 1px solid #ccc; }
  .technical-plate__viewport img { width: 100%; max-width: 100%; }
  .article-layout { display: block; margin-top: 30px; }
  .bench-answer { color: #000; background: #f2f2f2; box-shadow: none; }
  .bench-answer > p:last-child { color: #222; }
  .article-section, .source-desk, .faq-section { break-inside: avoid; margin-bottom: 38px; }
  .code-panel { color: #000; background: #f5f5f5; box-shadow: none; }
  .code-panel pre { color: #111; white-space: pre-wrap; }
  a { color: #000; }
}
