/* Line Spectrum: light theme is an absorption plate, dark theme an emission plate. */

@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/assets/fonts/schibsted-grotesk-latin.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@property --marker-at {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

:root {
  color-scheme: light;
  --glass: #F3F4F5;
  --surface: #FFFFFF;
  --ink: #121417;
  --ink-2: #4A4F57;
  --rule: #C6CBD1;
  --rule-soft: #DDE0E4;
  --sodium: #F2B400;
  --sodium-press: #D99F00;
  --on-sodium: #121417;
  --band: var(--sodium);
  --band-ink: #121417;
  --line-selected: #121417;
  --marker-fill: #121417;
  --select-bg: #121417;
  --select-ink: #F3F4F5;
  --column-lit: #FFF4CC;
  --check-border: #121417;
  --alert: #9E1C0B;
  --focus: #121417;

  --font: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(20px, 4.5vw, 64px);
  --content: 1312px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-settle: cubic-bezier(0.34, 1.32, 0.52, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --glass: #0F1113;
    --surface: #1A1C1F;
    --ink: #ECE8DF;
    --ink-2: #A9ADB3;
    --rule: #2E3237;
    --rule-soft: #24272B;
    --band: #1A1C1F;
    --band-ink: #ECE8DF;
    --line-selected: #F2B400;
    --marker-fill: #F2B400;
    --select-bg: #ECE8DF;
    --select-ink: #121417;
    --column-lit: #2A2411;
    --check-border: #2E3237;
    --alert: #FF8A78;
    --focus: #ECE8DF;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --glass: #0F1113;
  --surface: #1A1C1F;
  --ink: #ECE8DF;
  --ink-2: #A9ADB3;
  --rule: #2E3237;
  --rule-soft: #24272B;
  --band: #1A1C1F;
  --band-ink: #ECE8DF;
  --line-selected: #F2B400;
  --marker-fill: #F2B400;
  --select-bg: #ECE8DF;
  --select-ink: #121417;
  --column-lit: #2A2411;
  --check-border: #2E3237;
  --alert: #FF8A78;
  --focus: #ECE8DF;
}

/* Base */

*, *::before, *::after { box-sizing: border-box; }

html { scrollbar-color: var(--ink-2) var(--glass); scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--glass);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--ink);
  text-rendering: optimizeLegibility;
}

::selection { background: var(--sodium); color: #121417; }

[hidden] { display: none !important; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon { width: 20px; height: 20px; display: block; }
.icon-sm { width: 18px; height: 18px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.btn-sm { min-height: 44px; padding: 0 18px; font-size: 0.9375rem; }

.btn-primary { background: var(--sodium); color: var(--on-sodium); }
.btn-primary:hover { background: var(--sodium-press); }

.btn-quiet {
  background: transparent;
  color: inherit;
  box-shadow: inset 0 0 0 1px currentColor;
}
.btn-quiet:hover { box-shadow: inset 0 0 0 2px currentColor; }

.btn[disabled] {
  background: var(--rule-soft);
  color: var(--ink-2);
  cursor: not-allowed;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  min-height: 44px;
  font: inherit;
  font-size: 0.9375rem;
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  cursor: pointer;
}

/* Header (shared partial markup) */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--glass);
  border-bottom: 1px solid var(--rule);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo-mark { display: block; width: 32px; height: 32px; flex-shrink: 0; }
.brand-logo-mark svg { width: 100%; height: 100%; display: block; }
.brand-mark-marker { fill: var(--marker-fill); }
.brand-name { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: inset 0 -2px 0 transparent;
  transition: box-shadow 160ms var(--ease-out);
}

.nav-link:hover,
.nav-link.active { box-shadow: inset 0 -2px 0 var(--ink); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.theme-switch { display: flex; box-shadow: inset 0 0 0 1px var(--rule); }

.theme-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--ink-2);
  border: 0;
  cursor: pointer;
}

.theme-btn:hover { color: var(--ink); }
.theme-btn.active { background: var(--select-bg); color: var(--select-ink); }

.mobile-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  background: transparent;
  color: var(--ink);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--rule);
  cursor: pointer;
}

@media (max-width: 900px) {
  .mobile-nav-toggle { display: grid; }
  .site-header nav { position: static; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--glass);
    border-bottom: 1px solid var(--rule);
  }
  .nav-links.is-open { display: flex; }
  .nav-link { width: 100%; font-size: 1.0625rem; }
}

@media (max-width: 640px) {
  .nav-actions .btn { display: none; }
  .nav-container { gap: 12px; }
  .nav-actions { gap: 8px; }
}

/* First viewport: copy, readiness check, and the scale band */

.fold {
  display: grid;
  grid-template-columns: minmax(var(--gutter), 1fr) minmax(0, 712px) minmax(0, 600px) minmax(var(--gutter), 1fr);
  grid-template-areas:
    ". copy check ."
    "rail rail rail rail";
}

@media (min-width: 1024px) {
  .check { min-height: 440px; }
}

@media (min-width: 1024px) and (min-height: 760px) {
  .fold { min-height: calc(100svh - 73px); grid-template-rows: 1fr auto; align-items: center; }
}

.hero-copy {
  grid-area: copy;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(32px, 4vw, 52px) clamp(32px, 5vw, 72px) 40px 0;
}

.hero-copy h1 {
  font-size: clamp(2.25rem, 3.4vw + 0.75rem, 3.75rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 15ch;
}

.hero-lede {
  font-size: clamp(1.0625rem, 0.5vw + 0.95rem, 1.1875rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34em;
}

.hero-facts {
  list-style: none;
  padding: 0;
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
}

/* Readiness check */

.check {
  grid-area: check;
  align-self: start;
  margin: clamp(32px, 4vw, 52px) 0 40px;
  padding: 28px;
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--check-border);
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-margin-top: 96px;
}

.check-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 0.875rem;
}

.check-step { font-weight: 700; white-space: nowrap; }
.check-hint { color: var(--ink-2); }

.check-meter { height: 3px; background: var(--rule-soft); }
.check-meter span {
  display: block;
  height: 100%;
  width: calc(var(--progress, 0) * 100%);
  background: var(--ink);
  transition: width 320ms var(--ease-out);
}

.check-q {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.check-q legend,
.check-result h2,
.check-sent h2 {
  padding: 0;
  margin-bottom: 14px;
  font-size: 1.625rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.check-q:focus { outline: none; }
.check-q:focus-visible legend { text-decoration: underline; text-underline-offset: 0.2em; }

.check-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.opt {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 12px 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--rule);
  font-size: 0.9375rem;
  line-height: 1.35;
  cursor: pointer;
  transition: box-shadow 140ms var(--ease-out), background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.opt input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.opt:hover { box-shadow: inset 0 0 0 1px var(--ink); }

.opt:has(input:checked) {
  background: var(--select-bg);
  color: var(--select-ink);
  box-shadow: inset 0 0 0 2px var(--select-bg);
  font-weight: 700;
}

.opt:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.check.is-done .check-nav,
.check.is-done .check-status,
.check.is-done .check-meter { display: none; }

.check-nav {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.check-result dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 20px;
  margin-bottom: 14px;
}

.check-result dt { color: var(--ink-2); font-size: 0.9375rem; }
.check-result dd { font-weight: 700; }

.check-reason { color: var(--ink-2); font-size: 1rem; margin-bottom: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.9375rem; font-weight: 700; }

.field input {
  min-height: 48px;
  padding: 0 14px;
  font: inherit;
  font-weight: 400;
  font-size: 1rem;
  color: var(--ink);
  background: var(--glass);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--ink-2);
}

.field input::placeholder { color: var(--ink-2); }
.field input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.field input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--alert); }

.check-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 14px; }

.check-error { color: var(--alert); font-size: 0.9375rem; font-weight: 500; }
.check-error:empty { display: none; }

.check-sent p { color: var(--ink-2); margin-bottom: 18px; }

.check.is-live .check-q,
.check.is-live .check-result,
.check.is-live .check-sent { display: none; }

.check.is-live [data-current] { display: block; }

.check:not(.is-live) .check-nav,
.check:not(.is-live) .check-status,
.check:not(.is-live) .check-meter,
.check:not(.is-live) .check-result-summary,
.check:not(.is-live) .check-sent { display: none; }

.check:not(.is-live) .check-q + .check-q { margin-top: 12px; }

.check.is-sending [type="submit"] { opacity: 0.7; cursor: progress; }

/* The rail */

.rail {
  grid-area: rail;
  background: var(--band);
  color: var(--band-ink);
  box-shadow: inset 0 1px 0 var(--rule);
}

.rail-inner {
  padding-top: 22px;
  padding-bottom: 26px;
}

.rail-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  font-size: 0.9375rem;
  font-weight: 700;
}

.rail-readout { font-weight: 500; }

.rail-scale {
  --line: var(--band-ink);
  container-type: inline-size;
  position: relative;
  height: 196px;
  margin-top: 12px;
}

/* The marker keeps clear air above the lines: it points at the scale, never joins it. */
.rail-marker {
  position: absolute;
  top: 4px;
  left: calc(var(--marker-at) * 100%);
  width: 28px;
  height: 25px;
  transform: translateX(-50%);
  color: var(--marker-fill);
}

.rail-scale { --marker-at: 0; transition: --marker-at 720ms var(--ease-settle); }

.rail-marker svg { width: 100%; height: 100%; display: block; overflow: visible; }

.rail-marker polygon {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 3;
  stroke-dasharray: 5 4;
  stroke-linejoin: miter;
  transition: fill 260ms var(--ease-out), stroke-dasharray 260ms var(--ease-out);
}

.rail-scale[data-state="settled"] .rail-marker polygon {
  fill: currentColor;
  stroke-dasharray: none;
}

.rail-scale.is-calibrating { animation: calibrate 1500ms var(--ease-out) 300ms backwards; }

@keyframes calibrate {
  0% { --marker-at: 0; }
  55% { --marker-at: 1; }
  100% { --marker-at: 0; }
}

.rail-tiers { list-style: none; margin: 0; padding: 0; }

.rail-tier {
  position: absolute;
  top: 44px;
  left: calc(var(--at) * 100%);
  height: 104px;
  width: 0;
}

.rail-line,
.rail-line::after {
  position: absolute;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.rail-line { left: -1px; top: 0; }

.rail-line::after {
  content: '';
  left: 6px;
  top: -14px;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 320ms var(--ease-out) 260ms;
}

.rail-tier.is-selected .rail-line { background: var(--line-selected); }
.rail-tier.is-selected .rail-line::after { background: var(--line-selected); transform: scaleY(1); top: 0; }

.rail-label {
  position: absolute;
  top: 2px;
  left: 18px;
  display: flex;
  flex-direction: column;
  white-space: nowrap;
  font-size: 0.875rem;
  line-height: 1.35;
  text-decoration: none;
}

.rail-label strong { font-size: 1rem; font-weight: 800; }
.rail-name { font-weight: 700; margin-bottom: 2px; }
.rail-label:hover strong { text-decoration: underline; text-underline-offset: 0.2em; }

.rail-tier.is-selected .rail-label strong,
.rail-tier.is-selected .rail-name { font-size: 1.125rem; font-weight: 800; letter-spacing: -0.01em; }

:root[data-theme="dark"] .rail-tier.is-selected .rail-label { color: var(--sodium); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rail-tier.is-selected .rail-label { color: var(--sodium); }
}

.rail-tier--end .rail-label { left: auto; right: 18px; text-align: right; align-items: flex-end; }

.rail-axis {
  position: absolute;
  top: 148px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
}

.rail-axis::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 0;
  width: calc(100% + 1px);
  height: 10px;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / 12));
}

.rail-axis span {
  position: absolute;
  top: 20px;
  left: calc(var(--at) * 100%);
  transform: translateX(-50%);
  font-size: 0.875rem;
  font-weight: 500;
}

.rail-axis span:first-child { transform: none; }
.rail-axis span:last-child { transform: translateX(-100%); }

@media (max-width: 720px) {
  .rail-scale { height: 112px; }
  .rail-marker { top: 0; width: 24px; height: 21px; }
  .rail-tier { top: 32px; height: 38px; }
  .rail-line::after { top: -8px; }
  .rail-axis { top: 70px; }
  .rail-axis::after { height: 7px; }
  .rail-axis span { top: 12px; font-size: 0.8125rem; }
  .rail-label { top: 0; left: 13px; }
  .rail-tier--end .rail-label { right: 13px; }
  .rail-label span { display: none; }
  .rail-label strong,
  .rail-tier.is-selected .rail-label strong { font-size: 0.8125rem; }
}

/* Sections */

.section { padding-block: clamp(64px, 8vw, 112px); border-top: 1px solid var(--rule); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 16px 48px;
  align-items: end;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.section-head h2 {
  font-size: clamp(1.875rem, 2.2vw + 1rem, 2.625rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-wrap: balance;
  max-width: 22ch;
}

.section-head p { color: var(--ink-2); max-width: 40em; }

@media (max-width: 860px) {
  .section-head { grid-template-columns: minmax(0, 1fr); }
}

/* Deliverables matrix */

.tier-switch { display: none; gap: 0; margin-bottom: 16px; box-shadow: inset 0 0 0 1px var(--rule); }

.tier-switch button {
  flex: 1;
  min-height: 44px;
  background: transparent;
  color: var(--ink);
  border: 0;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}

.tier-switch button[aria-pressed="true"] { background: var(--select-bg); color: var(--select-ink); font-weight: 700; }

.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.45;
}

.matrix th,
.matrix td {
  text-align: left;
  vertical-align: top;
  padding: 16px 20px;
  border-top: 1px solid var(--rule);
  transition: background-color 420ms var(--ease-out);
}

.matrix thead th { border-top: 2px solid var(--ink); padding-top: 18px; vertical-align: bottom; }

.matrix thead th[data-tier] { width: 24%; }

.matrix .tier-name { display: block; font-size: 1.125rem; font-weight: 800; letter-spacing: -0.01em; }
.matrix .tier-terms { display: block; font-size: 0.9375rem; font-weight: 500; color: var(--ink-2); margin-top: 4px; }

.matrix tbody th { font-weight: 500; padding-left: 0; }

.matrix .is-none { color: var(--ink-2); }

.matrix [data-tier].is-lit { background: var(--column-lit); }
.matrix thead [data-tier].is-lit { box-shadow: inset 0 4px 0 var(--surface), inset 0 6px 0 var(--line-selected); }

@media (max-width: 720px) {
  .tier-switch { display: flex; }
  .matrix thead th:first-child { display: none; }
  .matrix [data-tier]:not(.is-shown) { display: none; }
  .matrix thead th[data-tier] { width: auto; padding-left: 0; }
  .matrix tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .matrix thead tr { grid-template-columns: minmax(0, 1fr); }
  .matrix th, .matrix td { padding: 14px 12px 14px 0; }
  .matrix [data-tier].is-lit { background: transparent; }
}

/* Engagements */

.engagements {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 64px);
}

.engagement {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 24px;
  border-top: 2px solid var(--ink);
}

.engagement h3 { font-size: 1.5rem; line-height: 1.2; font-weight: 800; letter-spacing: -0.015em; }
.engagement .scope { font-size: 0.9375rem; font-weight: 700; color: var(--ink-2); }
.engagement p { color: var(--ink-2); max-width: 36em; }
.engagement a { font-weight: 700; margin-top: 4px; align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; }

.reference-line {
  margin-top: clamp(32px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  font-size: 1.125rem;
  font-weight: 700;
}

@media (max-width: 860px) {
  .engagements { grid-template-columns: minmax(0, 1fr); }
}

/* How it works */

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}

.steps h3 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.steps h3::before { content: counter(step) '. '; color: var(--ink-2); }
.steps p { color: var(--ink-2); }

@media (max-width: 860px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
}

/* Close */

.close {
  border-top: 1px solid var(--rule);
  padding-block: clamp(64px, 8vw, 104px);
}

.close-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}

.close h2 {
  font-size: clamp(2rem, 2.8vw + 1rem, 3rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

.close p { color: var(--ink-2); margin-top: 14px; }
.close-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Footer (shared partial markup) */

.site-footer { border-top: 1px solid var(--rule); padding-block: 56px 32px; font-size: 0.9375rem; }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 32px 48px;
}

.footer-brand p { color: var(--ink-2); margin-top: 14px; max-width: 32em; }

.footer-column h4 { font-size: 0.9375rem; font-weight: 700; margin: 0 0 10px; }
.footer-column ul { list-style: none; margin: 0; padding: 0; }
.footer-column a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--ink-2);
  text-decoration: none;
}
.footer-column a:hover { color: var(--ink); text-decoration: underline; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
}

.footer-bottom p { margin: 0; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

/* ===== Inner pages ===== */

/* Page head: breadcrumb, title, lede, meta */

.page-head { padding-block: clamp(40px, 5vw, 72px) clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--rule); }
.page-head + .section, .page-head + .rail + .section { border-top: 0; }
article > .page-head + .section { padding-top: clamp(40px, 5vw, 64px); }

.crumbs ol { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 0.9375rem; color: var(--ink-2); }
.crumbs li + li::before { content: '/'; margin-inline: 10px; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); }

.page-title {
  font-size: clamp(2.125rem, 3vw + 1rem, 3.5rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 20ch;
}

.page-lede { margin-top: 18px; font-size: clamp(1.0625rem, 0.5vw + 0.95rem, 1.25rem); line-height: 1.5; color: var(--ink-2); max-width: 40em; }

.page-meta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 0.9375rem; color: var(--ink-2); }

.page-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

/* Key facts strip */

.spec-strip {
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border-top: 2px solid var(--ink);
}

.spec-strip > div { padding: 16px 20px 0 0; }
.spec-strip > div + div { padding-left: 20px; box-shadow: inset 1px 0 0 var(--rule); }
.spec-strip dt { font-size: 0.875rem; color: var(--ink-2); }
.spec-strip dd { margin: 4px 0 0; font-size: 1.375rem; font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; }

@media (max-width: 560px) {
  .spec-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec-strip > div,
  .spec-strip > div + div { padding: 14px 12px 14px 0; box-shadow: inset 0 -1px 0 var(--rule); }
  .spec-strip > div:nth-child(even) { padding-left: 12px; box-shadow: inset 1px 0 0 var(--rule), inset 0 -1px 0 var(--rule); }
}

/* Static scale band on tier pages (reuses the homepage rail markup) */

.rail--static { margin-top: 40px; }

.sub-head { margin: clamp(40px, 5vw, 64px) 0 20px; font-size: 1.375rem; line-height: 1.2; font-weight: 800; letter-spacing: -0.015em; }

/* Two-column layout: main column plus aside */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.layout > aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; }

@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .layout > aside { position: static; }
}

/* Long-form reading */

.prose { max-width: 70ch; font-size: 1.125rem; line-height: 1.65; }
.prose > * + * { margin-top: 1.1em; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2.2em; font-size: 1.75rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.prose h3 { margin-top: 1.8em; font-size: 1.25rem; line-height: 1.25; font-weight: 800; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--ink-2); }
.prose strong { font-weight: 700; }
.prose code {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.875em;
  padding: 0.1em 0.35em;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.prose pre {
  overflow-x: auto;
  padding: 18px 20px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--rule);
  font-size: 0.875rem;
  line-height: 1.6;
}
.prose pre code { padding: 0; background: none; box-shadow: none; font-size: inherit; }
.prose blockquote {
  margin-inline: 0;
  padding: 4px 0 4px 20px;
  box-shadow: inset 1px 0 0 var(--ink);
  font-size: 1.25rem;
  line-height: 1.5;
  font-weight: 500;
}
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-top: 1px solid var(--rule); }
.prose thead th { border-top: 2px solid var(--ink); font-weight: 700; }

.table-wrap { overflow-x: auto; }

/* Note: an outlined panel, never a side stripe */

.note {
  padding: 20px 22px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.note > * + * { margin-top: 0.6em; }
.note-title { font-size: 1rem; font-weight: 800; }
.note--risk .note-title { color: var(--alert); }

/* Diagrams (Mermaid) */

.diagram {
  margin: 0;
  padding: clamp(16px, 3vw, 32px);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--rule);
  overflow-x: auto;
}
.diagram .mermaid { display: flex; justify-content: center; min-width: 560px; }
.diagram figcaption { margin-top: 16px; font-size: 0.9375rem; color: var(--ink-2); }

/* Spec list: ruled rows, term left, detail right */

.spec-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }

.spec-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 12px 48px;
  padding-block: 24px;
  border-bottom: 1px solid var(--rule);
}

.spec-row h3 { font-size: 1.25rem; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }
.spec-row p { color: var(--ink-2); }
.spec-row ul { margin: 10px 0 0; padding-left: 1.2em; }
.spec-row li + li { margin-top: 4px; }

@media (max-width: 760px) {
  .spec-row { grid-template-columns: minmax(0, 1fr); }
}

/* Generic data table (comparisons) */

.data-table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.45; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 14px 20px 14px 0; border-top: 1px solid var(--rule); }
.data-table thead th { border-top: 2px solid var(--ink); font-size: 1.0625rem; font-weight: 800; }
.data-table tbody th { font-weight: 500; }
.data-table .is-us { background: var(--column-lit); padding-left: 16px; }
.data-table .is-none { color: var(--ink-2); }

/* FAQ */

.faq { border-top: 2px solid var(--ink); max-width: 860px; }

.faq details { border-bottom: 1px solid var(--rule); }

.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 20px 48px 20px 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::before,
.faq summary::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  width: 16px;
  height: 2px;
  background: var(--ink);
  transition: transform 200ms var(--ease-out);
}

.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.faq details > :not(summary) { padding-bottom: 20px; color: var(--ink-2); max-width: 68ch; }

/* Link list: related notes */

.link-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }

.link-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 8px 40px;
  padding-block: 20px;
  border-bottom: 1px solid var(--rule);
}

.link-list a { font-size: 1.125rem; font-weight: 700; line-height: 1.35; text-decoration: none; }
.link-list a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.link-list p { color: var(--ink-2); }

@media (max-width: 760px) {
  .link-list li { grid-template-columns: minmax(0, 1fr); }
}

/* Entries: blog and catalog listings */

.entries { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }

.entry {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr) auto;
  gap: 8px 40px;
  align-items: baseline;
  padding-block: 28px;
  border-bottom: 1px solid var(--rule);
}

.entry-meta { font-size: 0.9375rem; color: var(--ink-2); }
.entry h2, .entry h3 { font-size: 1.375rem; line-height: 1.2; font-weight: 800; letter-spacing: -0.015em; }
.entry h2 a, .entry h3 a { text-decoration: none; }
.entry h2 a:hover, .entry h3 a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
.entry p { margin-top: 8px; color: var(--ink-2); max-width: 62ch; }
.entry-facts { font-size: 0.9375rem; font-weight: 700; white-space: nowrap; text-align: right; }
.entry-facts span { display: block; font-weight: 500; color: var(--ink-2); }
.entry .entry-facts { margin-top: 0; color: var(--ink); }

@media (max-width: 860px) {
  .entry { grid-template-columns: minmax(0, 1fr); }
  .entry-meta { order: 2; }
  .entry-facts { order: 3; }
  .entry-facts { text-align: left; white-space: normal; }
}

.tags { margin-top: 10px; font-size: 0.875rem; color: var(--ink-2); }

/* Filter bar (catalog) */

.filter-bar { display: flex; flex-wrap: wrap; margin-bottom: 24px; box-shadow: inset 0 0 0 1px var(--rule); width: max-content; max-width: 100%; }

.filter-btn {
  min-height: 44px;
  padding: 0 18px;
  background: transparent;
  color: var(--ink);
  border: 0;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}

.filter-btn:hover { box-shadow: inset 0 -2px 0 var(--ink); }
.filter-btn.active { background: var(--select-bg); color: var(--select-ink); font-weight: 700; }

/* Aside panel (related tier, engagement facts) */

.panel {
  padding: 24px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--rule);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel h2, .panel h3 { font-size: 1.125rem; line-height: 1.25; font-weight: 800; }
.panel dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; font-size: 0.9375rem; }
.panel dt { color: var(--ink-2); }
.panel dd { margin: 0; font-weight: 700; }
.panel p { font-size: 0.9375rem; color: var(--ink-2); }

/* Forms (contact) */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .field--wide { grid-column: 1 / -1; }

.field select,
.field textarea {
  font: inherit;
  font-weight: 400;
  font-size: 1rem;
  color: var(--ink);
  background: var(--glass);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--ink-2);
}

.field select { min-height: 48px; padding: 0 12px; }
.field textarea { min-height: 140px; padding: 12px 14px; resize: vertical; }
.field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Small screens: fold order is copy, rail, check */

@media (max-width: 1023px) {
  .fold {
    grid-template-columns: var(--gutter) minmax(0, 1fr) var(--gutter);
    grid-template-areas:
      ". copy ."
      "rail rail rail"
      ". check .";
  }
  .hero-copy { padding-right: 0; padding-bottom: 28px; }
  .hero-facts { margin-top: 4px; }
  .check { margin: 28px 0 0; }
}

@media (max-width: 560px) {
  .hero-copy { padding-top: 24px; padding-bottom: 20px; gap: 14px; }
  .hero-copy h1 { font-size: 2rem; }
  .hero-facts { display: none; }
  .rail-inner { padding-top: 14px; padding-bottom: 16px; }
  .rail-caption > span:first-child { display: none; }
  .rail-scale { height: 96px; margin-top: 6px; }
  .check { margin-top: 20px; padding: 20px; gap: 14px; }
  .check-options { grid-template-columns: minmax(0, 1fr); }
  .opt { min-height: 56px; }
  .check-q legend, .check-result h2, .check-sent h2 { font-size: 1.375rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0ms !important;
    animation: none !important;
  }
}
