@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=JetBrains+Mono:wght@700;800&family=Space+Grotesk:wght@600;700;800&display=swap");

:root {
  --ink-900: #070a12;
  --ink-850: var(--ink-900);
  --ink-800: #0e1422;
  --ink-700: #141b2d;
  --ink-600: #1b2438;
  --ink-500: #243149;
  --line: var(--ink-500);
  --line-soft: var(--ink-600);
  --text: #e7ecf5;
  --text-dim: #aab4c8;
  --text-faint: #6c7791;
  --coral: #ff7a59;
  --coral-bright: var(--coral);
  --coral-soft: var(--amber);
  --teal: #46d5c5;
  --teal-dim: var(--teal);
  --amber: #ffce57;
  --violet: #9d7bff;
  --black-alpha-85: rgba(0, 0, 0, .85);
  --white-alpha-02: rgba(255, 255, 255, .022);
  --white-alpha-06: rgba(255, 255, 255, .06);
  --white-alpha-08: rgba(255, 255, 255, .08);
  --white-alpha-10: rgba(255, 255, 255, .1);
  --white-alpha-12: rgba(255, 255, 255, .12);
  --white-alpha-20: rgba(255, 255, 255, .2);
  --ink-alpha-28: rgba(7, 10, 18, .28);
  --ink-alpha-94: rgba(7, 10, 18, .94);
  --ink-alpha-95: rgba(7, 10, 18, .95);
  --header-alpha-82: rgba(11, 15, 26, .82);
  --header-alpha-88: rgba(11, 15, 26, .88);
  --surface-alpha-62: rgba(14, 20, 34, .62);
  --surface-alpha-70: rgba(14, 20, 34, .7);
  --surface-alpha-72: rgba(14, 20, 34, .72);
  --surface-alpha-76: rgba(14, 20, 34, .76);
  --surface-alpha-80: rgba(14, 20, 34, .8);
  --surface-alpha-82: rgba(14, 20, 34, .82);
  --coral-alpha-05: rgba(255, 122, 89, .05);
  --coral-alpha-06: rgba(255, 122, 89, .06);
  --coral-alpha-08: rgba(255, 122, 89, .08);
  --coral-alpha-10: rgba(255, 122, 89, .1);
  --coral-alpha-12: rgba(255, 122, 89, .12);
  --coral-alpha-13: rgba(255, 122, 89, .13);
  --coral-alpha-15: rgba(255, 122, 89, .15);
  --coral-alpha-18: rgba(255, 122, 89, .18);
  --coral-soft-alpha-18: rgba(255, 178, 122, .18);
  --coral-soft-alpha-25: rgba(255, 178, 122, .25);
  --coral-soft-alpha-28: rgba(255, 178, 122, .28);
  --coral-soft-alpha-30: rgba(255, 178, 122, .3);
  --coral-soft-alpha-36: rgba(255, 178, 122, .36);
  --coral-soft-alpha-48: rgba(255, 178, 122, .48);
  --teal-alpha-06: rgba(70, 213, 197, .06);
  --teal-alpha-08: rgba(70, 213, 197, .08);
  --teal-alpha-12: rgba(70, 213, 197, .12);
  --teal-alpha-28: rgba(70, 213, 197, .28);
  --amber-alpha-06: rgba(255, 206, 87, .06);
  --violet-alpha-07: rgba(157, 123, 255, .07);
  --print-background: #fff;
  --print-text: #111;
  --print-link: #1a0dab;
  --print-line: #ddd;
  --print-header: #f5f5f5;
  --print-code: #f8f8f8;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 24px;
  --maxw: 1140px;
  --shadow: 0 18px 50px -22px rgba(0, 0, 0, .85);
  --shadow-soft: 0 14px 40px -24px rgba(255, 122, 89, .58);
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  color-scheme: dark;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
}

/* Improve text rendering for body copy */
p, li, td, figcaption, .callout p, .engage-prompt {
  text-wrap: pretty;
}

/* Prevent faux bold/italic on system fonts */
body {
  font-synthesis: none;
}

body {
  margin: 0;
  background: var(--ink-850);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    radial-gradient(900px 540px at 78% -8%, var(--coral-alpha-13), transparent 60%),
    radial-gradient(760px 520px at 8% 12%, var(--teal-alpha-08), transparent 58%),
    radial-gradient(1000px 700px at 50% 116%, var(--violet-alpha-07), transparent 60%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: .28;
  background-image:
    linear-gradient(var(--white-alpha-02) 1px, transparent 1px),
    linear-gradient(90deg, var(--white-alpha-02) 1px, transparent 1px);
  background-size: 48px 48px;
}

a {
  color: var(--coral-soft);
  text-decoration: none;
}

a:hover {
  color: var(--coral-bright);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select {
  font: inherit;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: .75rem;
  z-index: 50;
  transform: translateY(-160%);
  padding: .7rem 1rem;
  border-radius: 999px;
  background: var(--teal);
  color: var(--ink-900);
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--white-alpha-08);
  background: var(--header-alpha-82);
  backdrop-filter: blur(18px);
}

.nav-shell,
.shell {
  width: min(var(--maxw), calc(100% - 40px));
  margin-inline: auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
}

.brand img {
  border-radius: var(--radius-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.nav-links a {
  padding: .58rem .82rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-dim);
  font-size: .92rem;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  border-color: var(--coral-soft-alpha-28);
  background: var(--coral-alpha-10);
  color: var(--text);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ink-700);
  color: var(--text);
  padding: .55rem .85rem;
  font-weight: 800;
}

.section-pad {
  padding-block: clamp(4.5rem, 8vw, 7.5rem);
}

.section-tight {
  padding-block: 2rem;
}

.hero {
  padding-top: clamp(4.5rem, 8vw, 7rem);
}

.hero-grid,
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.8rem);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.75rem, 6vw, 5.8rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

h3 {
  font-size: clamp(1.12rem, 2vw, 1.45rem);
}

p {
  margin: 0;
  color: var(--text-dim);
}

.hero-text {
  max-width: 620px;
  margin-top: 1.2rem;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions,
.code-card-head,
.footer-grid,
.calculator-fields,
.tool-grid {
  display: flex;
  gap: 1rem;
}

.hero-actions {
  flex-wrap: wrap;
  margin-top: 1.8rem;
}

.button,
.copy-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: .78rem 1.1rem;
  cursor: pointer;
  font-weight: 900;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.button:active,
.copy-button:active {
  transform: translateY(1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--coral), var(--coral-soft));
  color: var(--ink-900);
  box-shadow: var(--shadow-soft);
}

.button-secondary,
.copy-button {
  border: 1px solid var(--coral-soft-alpha-36);
  background: var(--coral-alpha-08);
  color: var(--text);
}

.hero-card,
.price-card,
.tool-panel,
.result-panel,
.code-card,
.comparison-grid article,
.card-grid article,
.stacked-list article,
.calculator,
.fact-grid article {
  border: 1px solid var(--white-alpha-10);
  border-radius: var(--radius);
  background: var(--surface-alpha-76);
  box-shadow: var(--shadow);
}

.hero-card {
  overflow: hidden;
  margin: 0;
}

.hero-card figcaption {
  padding: .9rem 1rem;
  color: var(--text-dim);
  font-size: .9rem;
}

.panel-band {
  border-block: 1px solid var(--white-alpha-06);
  background: var(--ink-alpha-28);
}

.quick-facts h2 {
  margin-bottom: 1.2rem;
}

.quick-answer-card {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--ink-800);
}

.quick-answer-card h2 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--teal);
}

.quick-answer-card ul {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.6;
  font-size: 0.95rem;
  color: var(--text);
}

.intent-strip {
  border-block: 1px solid var(--line-soft);
  background: var(--ink-800);
}

.intent-shell {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  align-items: center;
  gap: 1.2rem;
}

.intent-copy {
  max-width: 460px;
}

.intent-copy h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.intent-copy p:not(.eyebrow) {
  margin-top: .65rem;
}

.intent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.intent-card {
  display: grid;
  min-height: 132px;
  align-content: start;
  gap: .42rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--ink-850);
  padding: .95rem 1rem;
  color: var(--text);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.intent-card:hover,
.intent-card:focus-visible {
  border-color: var(--coral-soft);
  background: var(--ink-700);
  color: var(--text);
  transform: translateY(-1px);
}

.intent-card span {
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.intent-card strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.2;
}

.intent-card small {
  color: var(--text-dim);
  font-size: .84rem;
  line-height: 1.45;
}

.fact-grid,
.pricing-grid,
.card-grid,
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.fact-grid article,
.price-card,
.card-grid article,
.comparison-grid article,
.stacked-list article,
.tool-panel,
.result-panel,
.calculator {
  padding: 1.2rem;
}

.fact-grid strong,
.price-card h3,
.card-grid h3,
.comparison-grid h3,
.stacked-list h3 {
  display: block;
  margin-bottom: .45rem;
  color: var(--text);
}

.fact-grid span {
  color: var(--text-dim);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 1.6rem;
}

.section-heading p,
.split > div > p {
  margin-top: .85rem;
}

.stacked-list {
  display: grid;
  gap: 1rem;
}

.tool-grid {
  align-items: stretch;
}

.tool-panel {
  flex: 1 1 360px;
}

.tool-panel label,
.calculator label {
  display: grid;
  gap: .45rem;
  color: var(--text);
  font-weight: 800;
}

select,
input[type="number"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--ink-900);
  color: var(--text);
  padding: .72rem .8rem;
}

.tool-panel .button {
  margin-top: 1rem;
}

.result-panel {
  flex: 1.2 1 420px;
  min-height: 160px;
  color: var(--text);
  font-size: 1.08rem;
}

.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-card.featured {
  border-color: var(--coral-soft-alpha-48);
  background: var(--coral-alpha-10);
}

.price {
  margin-block: .7rem;
  color: var(--coral-soft);
  font-family: var(--font-display);
  font-size: 2.15rem;
  font-weight: 900;
}

.calculator {
  margin-top: 1rem;
}

.calculator-fields {
  flex-wrap: wrap;
}

.calculator-fields label {
  flex: 1 1 210px;
}

.checkline {
  display: flex !important;
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: .7rem !important;
}

.calculator-result {
  margin-top: 1rem;
  color: var(--text);
  font-weight: 800;
}

.table-wrap,
.comparison-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--white-alpha-10);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--white-alpha-08);
}

th {
  background: linear-gradient(135deg, var(--coral-alpha-18), var(--teal-alpha-12));
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .85rem;
}

td {
  color: var(--text-dim);
}

.steps {
  margin: 1.2rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-dim);
}

.steps li + li {
  margin-top: .55rem;
}

.code-card {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.code-card-head {
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--white-alpha-08);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .88rem;
}

pre {
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow-x: auto;
  padding: 1rem;
  background: var(--ink-900);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .9rem;
  line-height: 1.6;
}

.card-grid,
.comparison-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.risk-list {
  display: grid;
  gap: .9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.risk-list li {
  border-left: 4px solid var(--coral);
  border-radius: var(--radius-sm);
  background: var(--coral-alpha-08);
  color: var(--text);
  padding: .85rem 1rem;
}

.faq-shell {
  max-width: 900px;
}

details {
  border: 1px solid var(--white-alpha-10);
  border-radius: var(--radius);
  background: var(--surface-alpha-72);
  padding: 1rem 1.1rem;
}

details + details {
  margin-top: .8rem;
}

summary {
  cursor: pointer;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 900;
}

details p {
  margin-top: .7rem;
}

.site-footer {
  border-top: 1px solid var(--white-alpha-08);
  padding-block: 2.2rem;
}

.footer-grid {
  align-items: start;
  justify-content: space-between;
}

.footer-grid > div:last-child {
  display: grid;
  gap: .45rem;
  text-align: right;
}

/* ---- flow diagram ---- */
.flow-diagram {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.flow-step {
  flex: 1;
  min-width: 150px;
  border: 1px solid var(--line);
  background: var(--ink-800);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1rem;
  text-align: center;
}

.flow-icon {
  display: block;
  width: 38px;
  height: 38px;
  margin: 0 auto 0.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--coral-soft));
  color: var(--ink-900);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 38px;
  text-align: center;
}

.flow-step h3 {
  font-size: 0.96rem;
  margin-bottom: 0.3rem;
}

.flow-step p {
  font-size: 0.82rem;
}

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--coral-soft);
  font-size: 1.5rem;
  padding: 0 8px;
  flex: none;
}

/* ---- vs columns ---- */
.vs-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.vs-col {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--surface-alpha-76);
}

.vs-fugu { border-top: 3px solid var(--coral); }
.vs-ultra { border-top: 3px solid var(--teal); }

.vs-col h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--ink-700);
  color: var(--text-dim);
  font-weight: 500;
}

/* ---- checklist ---- */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
}

.checklist li {
  padding: 0.35rem 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.checklist li::before {
  content: ">";
  color: var(--coral-soft);
  font-weight: 900;
  margin-right: 0.5rem;
}

/* ---- callout boxes ---- */
.callout {
  border-left: 3px solid var(--coral);
  background: var(--coral-alpha-06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.2rem;
}

.callout-coral { border-left-color: var(--coral); }
.callout-teal { border-left-color: var(--teal); background: var(--teal-alpha-06); }
.callout-amber { border-left-color: var(--amber); background: var(--amber-alpha-06); }

.callout p {
  font-size: 0.95rem;
  color: var(--text-dim);
}

.callout strong {
  color: var(--text);
}

/* ---- timeline steps ---- */
.timeline-steps {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.5rem;
}

.tl-step {
  display: flex;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alpha-72);
  padding: 1.1rem 1.2rem;
  align-items: flex-start;
}

.tl-num {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--coral), var(--coral-soft));
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 0.82rem;
}

.tl-step h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.tl-step p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0;
}

/* ---- glossary ---- */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.glossary-item {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  background: var(--surface-alpha-70);
}

.glossary-item dt {
  font-family: var(--font-mono);
  color: var(--coral-soft);
  font-size: 0.86rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.glossary-item dd {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* ---- toc nav ---- */
.toc-nav {
  columns: 2;
  column-gap: 1.5rem;
}

.toc-nav a {
  display: block;
  padding: 0.45rem 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  border-bottom: 1px solid var(--line-soft);
}

.toc-nav a:hover {
  color: var(--coral-soft);
  padding-left: 6px;
}

/* ---- tag cloud ---- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag-cloud span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  border: 1px solid var(--line);
  background: var(--ink-800);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  transition: 0.15s;
}

.tag-cloud span:hover {
  border-color: var(--coral);
  color: var(--coral-soft);
}

/* ---- takeaway numbers ---- */
.takeaway-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--coral-alpha-18);
  line-height: 1;
  margin-bottom: 0.3rem;
}

/* ---- footer grid improvements ---- */
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.footer-grid strong {
  display: block;
  margin-bottom: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.footer-grid a {
  display: block;
  color: var(--text-dim);
  font-size: 0.88rem;
  padding: 0.3rem 0;
}

.footer-grid a:hover {
  color: var(--coral-soft);
}

.policy-shell {
  max-width: 860px;
}

.policy-shell h1 {
  margin-bottom: 1.2rem;
}

.policy-shell h2 {
  margin-top: 2rem;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.policy-shell p + p,
.policy-shell h2 + p {
  margin-top: .85rem;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy,
  .hero-card,
  .fact-grid article,
  .price-card,
  .card-grid article,
  .comparison-grid article {
    animation: rise-in .55s ease both;
  }

  .hero-card {
    animation-delay: .08s;
  }

  @keyframes rise-in {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--white-alpha-10);
    border-radius: var(--radius);
    background: var(--ink-800);
    padding: .7rem;
  }

  .nav-links.is-open {
    display: flex;
  }

  .hero-grid,
  .split,
  .tool-grid,
  .intent-shell {
    grid-template-columns: 1fr;
    display: grid;
  }

  .fact-grid,
  .pricing-grid,
  .card-grid,
  .comparison-grid,
  .intent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > div:last-child {
    text-align: left;
  }

  .flow-diagram { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); padding: 4px 0; }
  .vs-cols { grid-template-columns: 1fr; }
  .glossary-grid { grid-template-columns: 1fr; }
  .toc-nav { columns: 1; }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .nav-shell,
  .shell {
    width: min(100% - 28px, var(--maxw));
  }

  .section-pad {
    padding-block: 3.6rem;
  }

  .hero {
    padding-top: 2.2rem;
  }

  h1 {
    font-size: clamp(1.65rem, 8.5vw, 2.25rem);
    line-height: 1.12;
  }

  h2 {
    font-size: clamp(1.35rem, 5vw, 1.8rem);
  }

  .hero-text {
    font-size: .95rem;
    margin-top: .75rem;
  }

  .hero-actions,
  .calculator-fields {
    display: grid;
  }

  .hero-actions {
    margin-top: 1rem;
  }

  .button {
    width: 100%;
  }

  .hero-card {
    margin-top: .8rem;
  }

  .hero-card img {
    max-height: 200px;
    object-fit: cover;
  }

  .hero-card figcaption {
    font-size: .75rem;
    padding: .55rem .75rem;
  }

  .eyebrow {
    font-size: .68rem;
    margin-bottom: .5rem;
  }

  .fact-grid,
  .pricing-grid,
  .card-grid,
  .comparison-grid,
  .glossary-grid,
  .intent-grid {
    grid-template-columns: 1fr;
  }

  .intent-shell {
    gap: .9rem;
  }

  .intent-card {
    min-height: auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .toc-nav { columns: 1; }

  /* Mobile: hero grid single column, image second */
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .hero-copy {
    order: 1;
  }

  .hero-card {
    order: 2;
  }

  /* Mobile: quick-facts more compact and prominent */
  .quick-facts {
    border-top: 2px solid var(--line-soft);
    padding-top: 1.2rem;
    margin-top: 0;
  }

  .quick-facts h2 {
    font-size: 1rem;
    margin-bottom: .7rem;
  }

  .fact-grid article {
    padding: .7rem .85rem;
  }

  .fact-grid strong {
    font-size: .78rem;
    margin-bottom: .15rem;
  }

  .fact-grid span {
    font-size: .82rem;
  }

  /* Mobile: inline TOC open by default */
  .inline-toc {
    margin-bottom: .8rem;
  }

  /* Mobile: split layouts become single column */
  .split {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .tool-grid {
    grid-template-columns: 1fr;
    gap: .8rem;
  }
}

/* ============================================================
   READING PROGRESS BAR
   Thin coral-to-teal gradient bar fixed at the very top.
   Uses existing --coral and --teal tokens.
   ============================================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--coral), var(--teal));
  border-radius: 0 2px 2px 0;
  transition: width 0.15s linear;
  pointer-events: none;
}

/* ============================================================
   BACK-TO-TOP FLOATING BUTTON
   Appears after scrolling 600px. Uses existing coral tokens.
   ============================================================ */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 28px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--coral-soft-alpha-30);
  border-radius: 50%;
  background: var(--header-alpha-88);
  backdrop-filter: blur(12px);
  color: var(--coral-soft);
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, background .18s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--coral-alpha-15);
  border-color: var(--coral);
  color: var(--coral-bright);
}

/* Sticky tool promo — desktop only, above back-to-top */
.sticky-tool-promo {
  /* position/size set in JS, CSS provides print hide */
}
@media print {
  .sticky-tool-promo {
    display: none !important;
  }
}

/* ============================================================
   READING TIME BADGE
   Hero meta line. Mono font, teal dot prefix.
   ============================================================ */
.reading-time {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .6rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.reading-time::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

/* ============================================================
   SECTION NAVIGATION (Prev / Next)
   Appears at bottom of long sections to encourage continued reading.
   ============================================================ */
.section-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
}

.section-nav a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: .88rem;
  font-weight: 700;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.section-nav a:hover {
  border-color: var(--coral-soft-alpha-36);
  background: var(--coral-alpha-08);
  color: var(--coral-soft);
}

.section-nav .nav-prev::before {
  content: "\2190\00a0";
}

.section-nav .nav-next::after {
  content: "\00a0\2192";
}

.section-nav-placeholder {
  flex: 0 0 auto;
}

/* ============================================================
   SOCIAL SHARE BUTTONS
   Minimal pill-style share row, appears in footer area.
   ============================================================ */
.share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
}

.share-row .share-label {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-right: .3rem;
}

.share-row button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ink-800);
  color: var(--text-dim);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 700;
  padding: .45rem .9rem;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.share-row button:hover {
  border-color: var(--coral);
  background: var(--coral-alpha-10);
  color: var(--coral-soft);
}

/* ============================================================
   COOKIE CONSENT BANNER
   Fixed bottom, slides up. EU/GDPR aware. Uses existing tokens.
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .8rem 1.5rem;
  padding: .9rem 1.2rem;
  border-top: 1px solid var(--white-alpha-10);
  background: var(--ink-alpha-95);
  backdrop-filter: blur(18px);
  font-size: .85rem;
  color: var(--text-dim);
  transform: translateY(100%);
  transition: transform .35s ease;
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  margin: 0;
  max-width: 580px;
}

.cookie-banner .cookie-actions {
  display: flex;
  gap: .6rem;
}

.cookie-banner button {
  min-height: 38px;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  font-size: .85rem;
  transition: background .18s ease, transform .18s ease;
}

.cookie-banner .cookie-accept {
  background: linear-gradient(135deg, var(--coral), var(--coral-soft));
  color: var(--ink-900);
}

.cookie-banner .cookie-deny {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
}

.cookie-banner .cookie-deny:hover {
  border-color: var(--white-alpha-20);
  color: var(--text);
}

.cookie-banner button:active {
  transform: translateY(1px);
}

/* Reserve space while the fixed consent bar is open so it cannot sit on top
   of the final CTA or footer. The bar is hidden again after a choice. */
body:has(.cookie-banner.is-visible) {
  padding-bottom: 240px;
}

@media (min-width: 641px) {
  body:has(.cookie-banner.is-visible) {
    padding-bottom: 150px;
  }
}

/* Compact consent bar on small screens so it covers less of the first
   viewport. The tap targets stay above the 34px minimum. */
@media (max-width: 640px) {
  .cookie-banner {
    gap: .45rem .8rem;
    padding: .6rem .8rem;
    font-size: .75rem;
    line-height: 1.3;
  }

  .cookie-banner .cookie-actions {
    gap: .4rem;
  }

  .cookie-banner button {
    min-height: 34px;
    padding: .35rem .8rem;
    font-size: .78rem;
  }
}

.consent-settings {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 80;
  min-height: 38px;
  padding: .45rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ink-900);
  color: var(--text-dim);
  cursor: pointer;
  font-size: .75rem;
  font-weight: 700;
}

.consent-settings:hover,
.consent-settings:focus-visible {
  border-color: var(--teal);
  color: var(--text);
}

/* ============================================================
   STICKY TABLE OF CONTENTS (Desktop >=1440px)
   Right sidebar. Thin scrollbar, coral active state.
   ============================================================ */
.sticky-toc {
  position: fixed;
  right: max(calc((100vw - var(--maxw)) / 2 - 260px), 12px);
  top: 100px;
  z-index: 18;
  width: 220px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  display: none;
  border-left: 2px solid var(--line);
  padding-left: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.sticky-toc::-webkit-scrollbar {
  width: 4px;
}

.sticky-toc::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

.sticky-toc a {
  display: block;
  padding: .28rem 0;
  color: var(--text-dim);
  font-size: .76rem;
  font-weight: 600;
  line-height: 1.35;
  transition: color .18s ease, padding-left .18s ease;
  border-bottom: none;
}

.sticky-toc a:hover,
.sticky-toc a.is-active {
  color: var(--coral-soft);
  padding-left: 4px;
}

@media (min-width: 1440px) {
  .sticky-toc {
    display: block;
  }
}

/* ============================================================
   BREADCRUMB NAVIGATION
   Inline breadcrumbs above main content. Uses existing tokens.
   ============================================================ */
.breadcrumb-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  padding-block: .85rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .03em;
}

.breadcrumb-nav a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color .18s ease;
}

.breadcrumb-nav a:hover {
  color: var(--coral-soft);
}

.breadcrumb-nav .breadcrumb-sep {
  color: var(--line);
  user-select: none;
}

.breadcrumb-nav .breadcrumb-current {
  color: var(--text-dim);
  pointer-events: none;
}

/* ============================================================
   RELATED READING — end-of-section recommendation cards
   Shows 2–4 related sections to encourage continued browsing.
   ============================================================ */
.related-reading {
  margin-top: 1.2rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface-alpha-62);
}

.related-reading strong {
  display: block;
  margin-bottom: .65rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.related-reading-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.related-reading-links a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .82rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: .85rem;
  font-weight: 600;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.related-reading-links a:hover {
  border-color: var(--coral-soft-alpha-36);
  background: var(--coral-alpha-08);
  color: var(--coral-soft);
}

.related-reading-links a::after {
  content: "\2192";
  font-size: .82rem;
  opacity: .6;
}

/* ============================================================
   MOBILE BOTTOM QUICK-NAV
   Sticky bottom bar on small screens to jump between sections.
   ============================================================ */
.mobile-quicknav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem .6rem;
  border-top: 1px solid var(--white-alpha-10);
  background: var(--ink-alpha-94);
  backdrop-filter: blur(18px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mobile-quicknav::-webkit-scrollbar {
  display: none;
}

.mobile-quicknav a {
  flex: none;
  padding: .42rem .72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.mobile-quicknav a:hover,
.mobile-quicknav a.is-active {
  border-color: var(--coral-soft-alpha-36);
  background: var(--coral-alpha-10);
  color: var(--coral-soft);
}

.mobile-quicknav .quicknav-top {
  background: var(--teal-alpha-12);
  border-color: var(--teal-alpha-28);
  color: var(--teal);
}

@media (max-width: 1024px) {
  .mobile-quicknav {
    display: flex;
  }

  body {
    padding-bottom: 52px;
  }

  .back-to-top {
    bottom: 64px;
  }

  .cookie-banner {
    bottom: 48px;
  }

  .sticky-tool-promo {
    display: none !important;
  }
}

/* ============================================================
   FEEDBACK WIDGET — "Was this helpful?"
   Lightweight thumbs-up/down at end of main content.
   ============================================================ */
.feedback-widget {
  margin-top: 2rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alpha-70);
  text-align: center;
}

.feedback-widget .fw-question {
  display: block;
  margin-bottom: .7rem;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
}

.feedback-widget .fw-buttons {
  display: flex;
  gap: .7rem;
  justify-content: center;
}

.feedback-widget .fw-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 40px;
  padding: .55rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ink-800);
  color: var(--text-dim);
  cursor: pointer;
  font-weight: 700;
  font-size: .9rem;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.feedback-widget .fw-btn:hover {
  border-color: var(--coral);
  background: var(--coral-alpha-10);
  color: var(--coral-soft);
}

.feedback-widget .fw-btn.is-active {
  border-color: var(--teal);
  background: var(--teal-alpha-12);
  color: var(--teal);
}

.feedback-widget .fw-thanks {
  display: none;
  margin-top: .7rem;
  color: var(--teal);
  font-weight: 700;
  font-size: .92rem;
}

.feedback-widget .fw-thanks.is-visible {
  display: block;
}

/* ============================================================
   SECTION ENGAGEMENT PROMPT — subtle CTA inside long sections
   ============================================================ */
.engage-prompt {
  margin-top: 1.6rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--coral-soft-alpha-18);
  border-left: 3px solid var(--coral);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--coral-alpha-05);
  font-size: .92rem;
  color: var(--text-dim);
  transition: border-color .18s ease, background .18s ease;
}

.engage-prompt:hover {
  border-left-color: var(--coral-bright);
  background: var(--coral-alpha-08);
}

.engage-prompt a {
  font-weight: 700;
}

/* ============================================================
   READING DEPTH MARKERS — subtle section indicators
   Shows which sections have been read in sticky TOC.
   ============================================================ */
.sticky-toc a.is-read {
  color: var(--text-dim);
}

.sticky-toc a.is-read::before {
  content: "\2713\00a0";
  color: var(--teal-dim);
  font-size: .68rem;
}

/* ============================================================
   ENHANCED INTERNAL LINK STYLING
   Inline links within body text get a subtle underline to
   increase CTR on internal navigation.
   ============================================================ */
.shell a[href^="#"]:not(.button):not(.nav-links a):not(.toc-nav a):not(.sticky-toc a):not(.section-nav a):not(.mobile-quicknav a),
.policy-shell a[href^="/"] {
  text-decoration: underline;
  text-decoration-color: var(--coral-soft-alpha-25);
  text-underline-offset: 3px;
}

.shell a[href^="#"]:hover:not(.button):not(.nav-links a):not(.toc-nav a):not(.sticky-toc a):not(.section-nav a):not(.mobile-quicknav a),
.policy-shell a[href^="/"]:hover {
  text-decoration-color: var(--coral-soft);
}

/* ============================================================
   INLINE TABLE OF CONTENTS — collapsible for mobile/tablet
   ============================================================ */
.inline-toc {
  display: none;
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alpha-70);
}

.inline-toc summary {
  cursor: pointer;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .95rem;
}

.inline-toc nav {
  margin-top: .7rem;
  columns: 2;
  column-gap: .8rem;
}

.inline-toc nav a {
  display: block;
  padding: .28rem 0;
  color: var(--text-dim);
  font-size: .82rem;
  border-bottom: 1px solid var(--line-soft);
}

.inline-toc nav a:hover {
  color: var(--coral-soft);
  padding-left: 4px;
}

@media (max-width: 1024px) {
  .inline-toc {
    display: block;
  }
}

@media (max-width: 540px) {
  .inline-toc nav {
    columns: 1;
  }
}



/* ============================================================
   ENHANCED COST CALCULATOR — real-time, comparison, recommendation
   ============================================================ */
.calculator-enhanced {
  margin-top: 1.5rem;
  border: 1px solid var(--white-alpha-12);
  border-radius: var(--radius);
  background: var(--surface-alpha-80);
  padding: 1.4rem;
}

.calculator-enhanced .calc-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: 1.2rem;
}

.calculator-enhanced .calc-header h3 {
  margin: 0;
}

.calculator-enhanced .calc-tabs {
  display: flex;
  gap: .3rem;
}

.calc-tab-btn {
  padding: .35rem .75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: .8rem;
  font-weight: 700;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.calc-tab-btn.is-active {
  border-color: var(--coral);
  background: var(--coral-alpha-15);
  color: var(--coral-soft);
}

.calculator-enhanced .calc-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.calculator-enhanced .calc-inputs {
  display: grid;
  gap: .85rem;
}

.calculator-enhanced .calc-inputs label {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  color: var(--text);
  font-weight: 700;
  font-size: .88rem;
}

.calculator-enhanced .calc-inputs input[type="range"] {
  width: 100%;
  accent-color: var(--coral);
  margin-top: .2rem;
}

.calculator-enhanced .calc-inputs .range-labels {
  display: flex;
  justify-content: space-between;
  font-size: .7rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.calculator-enhanced .calc-inputs .token-display {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ink-900);
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--coral-soft);
  min-width: 100px;
}

.calculator-enhanced .calc-results {
  display: grid;
  gap: .7rem;
  align-content: start;
}

.calculator-enhanced .calc-results[hidden] {
  display: none;
}

.calculator-enhanced .calc-result-card {
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--ink-800);
}

.calculator-enhanced .calc-result-card .result-label {
  display: block;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: .25rem;
}

.calculator-enhanced .calc-result-card .result-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text);
}

.calculator-enhanced .calc-result-card .result-value.highlight {
  color: var(--coral-soft);
}

.calculator-enhanced .calc-result-card .result-note {
  font-size: .78rem;
  color: var(--text-dim);
  margin-top: .15rem;
}

.calculator-enhanced .calc-recommendation {
  margin-top: .8rem;
  padding: .85rem 1rem;
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--teal-alpha-08);
  font-size: .9rem;
  color: var(--text-dim);
}

.calculator-enhanced .calc-recommendation strong {
  color: var(--teal);
}

.calculator-enhanced .calc-comparison-table {
  width: 100%;
  min-width: auto;
  margin-top: .8rem;
  border-collapse: collapse;
}

.calculator-enhanced .calc-comparison-table th,
.calculator-enhanced .calc-comparison-table td {
  padding: .55rem .7rem;
  font-size: .82rem;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}

.calculator-enhanced .calc-comparison-table th {
  background: none;
  color: var(--text-dim);
  font-weight: 700;
}

.calculator-enhanced .calc-comparison-table td {
  color: var(--text-dim);
}

.calculator-enhanced .calc-comparison-table .best-value {
  color: var(--teal);
  font-weight: 700;
}

@media (max-width: 700px) {
  .calculator-enhanced .calc-body {
    display: flex;
    flex-direction: column;
  }

  /* Show the prefilled result before the long form so the tool delivers a
     number on the first screen instead of at the end of 3+ screens of inputs. */
  .calculator-enhanced .calc-results {
    order: -1;
  }

  .calculator-enhanced .calc-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Put the bottom-line estimate first inside the result panel. */
.calculator-enhanced .calc-results .calculator-model {
  order: -2;
}

.calculator-enhanced .calc-results .calculator-total {
  order: -1;
}

/* ============================================================
   TOOL PAGES — shared layout for standalone tools
   ============================================================ */
.tool-page-header {
  text-align: center;
  padding-block: 2.5rem 1.5rem;
}

.tool-page-header h1 {
  margin-inline: auto;
}

.tool-page-header .tool-page-desc {
  max-width: 620px;
  margin: .7rem auto 0;
  color: var(--text-dim);
  font-size: 1.05rem;
}

.tool-shell {
  max-width: 960px;
  margin-inline: auto;
  padding-bottom: 3rem;
}

/* Tool page: slider input */
input[type="range"].tool-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  accent-color: var(--coral);
  cursor: pointer;
}

/* Tool page: result highlight card */
.tool-result-card {
  margin-top: 1.2rem;
  padding: 1.3rem 1.5rem;
  border: 1px solid var(--coral-soft-alpha-28);
  border-left: 4px solid var(--coral);
  border-radius: var(--radius);
  background: var(--surface-alpha-82);
}

.tool-result-card h2 {
  font-size: 1.3rem;
  margin-bottom: .5rem;
}

/* Tool page: step wizard */
.step-wizard {
  display: grid;
  gap: 1.2rem;
}

.step-wizard .wizard-step {
  display: none;
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alpha-76);
}

.step-wizard .wizard-step.is-active {
  display: block;
}

.step-wizard .wizard-step h3 {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .8rem;
}

.step-wizard .step-num {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--coral-soft));
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: .82rem;
}

.step-wizard .wizard-options {
  display: grid;
  gap: .6rem;
}

.step-wizard .wizard-option {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .7rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--ink-800);
  cursor: pointer;
  color: var(--text-dim);
  font-weight: 600;
  font-size: .92rem;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.step-wizard .wizard-option:hover {
  border-color: var(--coral-soft-alpha-36);
  background: var(--coral-alpha-08);
  color: var(--text);
}

.step-wizard .wizard-option.is-selected {
  border-color: var(--coral);
  background: var(--coral-alpha-12);
  color: var(--coral-soft);
}

.step-wizard .wizard-nav {
  display: flex;
  gap: .7rem;
  margin-top: 1rem;
  justify-content: flex-end;
}

.step-wizard .wizard-progress {
  display: flex;
  gap: .35rem;
  margin-bottom: 1rem;
}

.step-wizard .wizard-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background .18s ease;
}

.step-wizard .wizard-dot.is-done {
  background: var(--teal-dim);
}

.step-wizard .wizard-dot.is-current {
  background: var(--coral-soft);
}

/* ============================================================
   SOURCE-BACKED GUIDE CONTENT
   ============================================================ */
.source-status {
  display: grid;
  gap: .45rem;
  padding: 1.1rem 1.2rem 1.25rem;
}

.source-status strong,
.decision-rule strong,
.formula-card strong {
  color: var(--text);
}

.three-model-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.featured-card {
  border-color: var(--teal-dim);
}

.decision-rule,
.formula-card {
  display: grid;
  gap: .65rem;
  margin-top: 1.5rem;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-800);
}

.content-split {
  align-items: start;
  margin-block: 1.5rem;
}

.content-split > div {
  display: grid;
  gap: .65rem;
}

.source-line {
  margin-top: 1rem;
  font-size: .92rem;
}

.guide-grid article {
  display: grid;
  align-content: start;
  gap: .8rem;
}

.guide-grid h3 a {
  color: var(--text);
}

.guide-grid h3 a:hover {
  color: var(--coral-soft);
}

.evaluation-steps {
  padding: 0;
  list-style: none;
}

.article-shell {
  max-width: 900px;
  padding-bottom: 5rem;
}

.article-header {
  display: grid;
  gap: 1.1rem;
  padding-block: clamp(3.5rem, 8vw, 6.5rem) 2.5rem;
}

.article-header h1 {
  max-width: none;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
}

.article-deck {
  max-width: 780px;
  color: var(--text-dim);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.25rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: .78rem;
}

.article-tool-cta {
  margin-top: 1.1rem;
}

.article-toc {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-800);
}

.article-toc strong {
  width: 100%;
  color: var(--text);
}

.article-toc a {
  padding: .38rem .62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: .84rem;
  font-weight: 700;
}

.article-toc a:hover,
.article-toc a:focus-visible {
  border-color: var(--coral-soft);
  color: var(--text);
}

.article-shell > section {
  display: grid;
  gap: 1rem;
  padding-block: 2.75rem;
  border-top: 1px solid var(--line-soft);
}

.article-shell > section h2 {
  font-size: clamp(1.8rem, 4vw, 2.65rem);
}

.article-shell > section h3 {
  line-height: 1.25;
}

.article-shell > section ul,
.article-shell > section ol {
  margin: 0;
  padding-left: 1.3rem;
  color: var(--text-dim);
}

.article-shell > section li + li {
  margin-top: .55rem;
}

.article-shell :not(pre) > code {
  padding: .1rem .35rem;
  border: 1px solid var(--line);
  border-radius: .35rem;
  background: var(--ink-800);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: .88em;
}

.formula-card {
  margin-top: 0;
}

.formula-card p {
  color: var(--text-dim);
}

.source-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-dim);
}

.source-list li + li {
  margin-top: .65rem;
}

.article-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line-soft);
}

.article-next a {
  display: grid;
  gap: .25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-800);
}

.article-next span {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: .74rem;
  text-transform: uppercase;
}

.article-next strong {
  color: var(--text);
}

.pricing-form fieldset {
  display: grid;
  gap: .75rem;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.pricing-form legend {
  padding-inline: .35rem;
  color: var(--coral-soft);
  font-family: var(--font-display);
  font-weight: 800;
}

.calculator-model {
  margin: 0;
  color: var(--text-dim);
}

.calculator-table-wrap {
  min-width: 0;
}

.calculator-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--ink-900);
  color: var(--text-dim);
}

.calculator-total strong {
  color: var(--teal);
  font-family: var(--font-display);
  font-size: 1.65rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.form-error {
  margin: 0;
  padding: .75rem;
  border-left: 3px solid var(--coral);
  background: var(--ink-900);
  color: var(--coral-soft);
}

.tool-explainer,
.formula-card,
.chooser-panel,
.tool-shell > .callout {
  margin-top: 2rem;
}

.tool-explainer > h2 {
  margin-bottom: 1rem;
}

.chooser-panel {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 1.25rem;
  align-items: start;
}

.chooser-form {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-800);
}

.chooser-form label {
  display: grid;
  gap: .4rem;
  color: var(--text);
  font-weight: 700;
}

.chooser-result {
  margin-top: 0;
}

.chooser-result ul,
.decision-rule-list {
  margin-bottom: 0;
  padding-left: 1.25rem;
  color: var(--text-dim);
}

.chooser-result li + li,
.decision-rule-list li + li {
  margin-top: .7rem;
}

.error-page {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
}

.error-code {
  margin-bottom: .5rem;
  color: var(--coral-soft);
  font-size: clamp(3rem, 8vw, 6rem);
}

.error-page > p {
  margin-top: 1rem;
}

.error-actions {
  justify-content: center;
  margin-top: 1.5rem;
}

@media (max-width: 820px) {
  .three-model-grid,
  .article-next,
  .chooser-panel {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   PERFORMANCE — content-visibility for off-screen sections
   Improves rendering speed on long pages.
   ============================================================ */
@media (min-width: 641px) {
  section.section-pad {
    content-visibility: auto;
    contain-intrinsic-size: 500px;
  }

  section.section-pad:first-of-type,
  section.hero,
  section.quick-facts,
  section#toc,
  section#faq {
    content-visibility: visible;
    contain-intrinsic-size: auto;
  }
}

/* ============================================================
   PRINT STYLES
   Clean B&W output. Hide nav/ads/interactive elements.
   ============================================================ */
@media print {
  .site-header,
  .reading-progress,
  .back-to-top,
  .cookie-banner,
  .sticky-toc,
  .share-row,
  .section-nav,
  .nav-toggle,
  .hero-actions,
  .skip-link,
  .tag-cloud,
  .toc-nav,
  .inline-toc,
  .mobile-quicknav,
  .feedback-widget,
  .related-reading,
  .engage-prompt,
  .breadcrumb-nav {
    display: none !important;
  }

  body {
    background: var(--print-background);
    color: var(--print-text);
    font-size: 13pt;
    line-height: 1.5;
  }

  body::before,
  body::after {
    display: none;
  }

  a {
    color: var(--print-link);
    text-decoration: underline;
  }

  h1, h2, h3 {
    color: var(--print-text);
    page-break-after: avoid;
  }

  .section-pad {
    padding-block: 1.5rem;
  }

  .panel-band {
    background: none;
    border-block: 1px solid var(--print-line);
  }

  .card-grid article,
  .price-card,
  .comparison-grid article,
  .stacked-list article,
  .fact-grid article {
    border: 1px solid var(--print-line);
    background: var(--print-background);
    box-shadow: none;
    page-break-inside: avoid;
  }

  table {
    border: 1px solid var(--print-line);
  }

  th {
    background: var(--print-header);
    color: var(--print-text);
  }

  td, th {
    border-bottom: 1px solid var(--print-line);
  }

  pre {
    background: var(--print-code);
    color: var(--print-text);
    border: 1px solid var(--print-line);
  }

  footer {
    border-top: 2px solid var(--print-text);
    padding-top: 1rem;
    margin-top: 2rem;
  }
}

.catalog-grid,
.update-log {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}

.catalog-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.catalog-card,
.update-entry {
  display: grid;
  gap: .7rem;
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alpha-76);
  transition: border-color .18s ease, transform .18s ease, background-color .18s ease;
}

.catalog-card:hover,
.update-entry:hover {
  border-color: var(--teal-alpha-28);
  background: var(--surface-alpha-82);
  transform: translateY(-1px);
}

.catalog-card h3,
.update-entry h3 {
  font-size: 1.15rem;
}

.catalog-card h3 a,
.update-entry h3 {
  color: var(--text);
}

.catalog-meta,
.update-meta {
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.source-check-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem 1.2rem;
  margin-top: 1.1rem;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alpha-70);
  color: var(--text-dim);
  font-size: .92rem;
}

.author-card {
  display: grid;
  gap: .45rem;
  margin-top: 1.2rem;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--teal-alpha-06);
}

@media (max-width: 820px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}

.glossary-list {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 0;
}

.glossary-list dt {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
}

.glossary-list dd {
  margin: .35rem 0 0;
  color: var(--text-dim);
}

.featured-library {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 1rem;
  margin-top: 1.2rem;
}

.featured-main,
.featured-side article {
  display: grid;
  gap: .7rem;
  padding: 1.25rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alpha-76);
  transition: border-color .18s ease, transform .18s ease;
}

.featured-main:hover,
.featured-side article:hover {
  border-color: var(--teal-alpha-28);
  transform: translateY(-1px);
}

.featured-side {
  display: grid;
  gap: 1rem;
}

@media (max-width: 820px) {
  .featured-library {
    grid-template-columns: 1fr;
  }
}
