:root {
  --ink: #0b1f33;
  --ink-2: #18384a;
  --paper: #f4f7f8;
  --white: #ffffff;
  --line: #cbd8dc;
  --muted: #5d6f78;
  --teal: #1fc7b4;
  --teal-dark: #087f78;
  --orange: #ff7448;
  --orange-soft: #ffe3d9;
  --max: 1200px;
  --shadow: 0 18px 50px rgba(11, 31, 51, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Aptos, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea, select { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.demo-bar {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem;
  color: var(--ink);
  background: var(--orange-soft);
  border-bottom: 1px solid #ffc9b8;
  font-size: 0.82rem;
  line-height: 1.35;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
  min-height: 80px;
  padding: 0.85rem max(1.25rem, calc((100vw - var(--max)) / 2));
  background: rgba(244, 247, 248, 0.94);
  border-bottom: 1px solid rgba(203, 216, 220, 0.85);
  backdrop-filter: blur(16px);
}
.wordmark { display: inline-flex; align-items: center; gap: 0.75rem; font-weight: 780; line-height: 1.05; letter-spacing: -0.02em; text-decoration: none; }
.wordmark small { display: block; margin-top: 0.22rem; color: var(--muted); font-size: 0.66rem; font-weight: 650; letter-spacing: 0.11em; text-transform: uppercase; }
.wordmark-mark { display: grid; place-items: center; width: 2.7rem; aspect-ratio: 1; color: var(--paper); background: var(--ink); border-radius: 50% 50% 50% 12%; font-size: 0.86rem; letter-spacing: -0.05em; }
.primary-nav { display: flex; align-items: center; gap: 1.35rem; font-size: 0.92rem; font-weight: 650; }
.primary-nav a { text-decoration: none; }
.primary-nav a:not(.nav-cta):hover, .primary-nav a[aria-current="page"] { color: var(--teal-dark); }
.nav-cta { padding: 0.68rem 1rem; color: var(--white); background: var(--ink); border-radius: 999px; }
.nav-cta:hover { background: var(--ink-2); }
.menu-button { display: none; width: 44px; height: 44px; padding: 0.7rem; background: transparent; border: 1px solid var(--line); border-radius: 50%; }
.menu-button > span:not(.sr-only) { display: block; height: 2px; margin: 4px 0; background: var(--ink); }

main { overflow: hidden; }
.page-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 4rem;
  max-width: var(--max);
  min-height: 440px;
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) 1.25rem clamp(3rem, 6vw, 5rem);
}
.page-hero::before {
  content: "";
  position: absolute;
  top: 10%;
  right: -12%;
  width: 36vw;
  max-width: 500px;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(31, 199, 180, 0.15), rgba(31, 199, 180, 0) 68%);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; max-width: 850px; }
.eyebrow { display: inline-block; margin-bottom: 1rem; color: var(--teal-dark); font-size: 0.77rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 580; line-height: 1.06; letter-spacing: -0.035em; }
h1 { max-width: 920px; font-size: clamp(3.1rem, 7.5vw, 6.7rem); }
.page-hero:not(:has(+ .hero-dashboard)) h1 { max-width: 920px; font-size: clamp(2.8rem, 6.5vw, 5.9rem); }
.hero-copy > p { max-width: 720px; margin: 1.6rem 0 0; color: var(--ink-2); font-size: clamp(1.12rem, 2vw, 1.38rem); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-rail { display: grid; grid-template-columns: auto 4rem auto 4rem auto; align-items: center; gap: 0.65rem; padding-bottom: 1rem; color: var(--muted); font-size: 0.72rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; writing-mode: vertical-rl; }
.hero-rail i { width: 1px; height: 4rem; background: var(--line); }
.meta-line { display: flex; gap: 1rem; margin-top: 1.5rem; color: var(--muted); font-size: 0.9rem; }
.meta-line span + span::before { content: "·"; margin-right: 1rem; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.72rem 1.15rem; border: 1px solid transparent; border-radius: 999px; font-size: 0.92rem; font-weight: 750; text-decoration: none; cursor: pointer; }
.button-primary { color: var(--ink); background: var(--teal); }
.button-primary:hover { background: #55dfcf; }
.button-dark { color: var(--white); background: var(--ink); }
.button-dark:hover { background: var(--ink-2); }
.button-outline, .button-quiet { background: transparent; border-color: var(--line); }
.button-outline:hover, .button-quiet:hover { border-color: var(--ink); }
.text-link { color: var(--teal-dark); font-weight: 750; }

.hero-dashboard {
  position: relative;
  z-index: 2;
  max-width: calc(var(--max) - 2.5rem);
  margin: -1rem auto 1rem;
  padding: 1rem;
  color: var(--white);
  background: var(--ink);
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
}
.dash-head, .dash-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.55rem 0.5rem; color: #b9cbd3; font-size: 0.82rem; }
.dash-head > div { color: var(--white); font-weight: 700; }
.status-dot { display: inline-block; width: 0.55rem; height: 0.55rem; margin-right: 0.55rem; background: var(--teal); border-radius: 50%; box-shadow: 0 0 0 4px rgba(31, 199, 180, 0.13); }
.dash-grid { display: grid; grid-template-columns: 0.75fr 0.75fr 1.5fr; gap: 1px; overflow: hidden; background: #2b4554; border: 1px solid #2b4554; border-radius: 1rem; }
.dash-grid > div { min-height: 150px; padding: 1.35rem; background: #102c3d; }
.dash-grid span { display: block; color: #b9cbd3; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.dash-grid strong { display: block; margin: 0.35rem 0 0.2rem; font-family: Georgia, serif; font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 500; letter-spacing: -0.05em; }
.dash-grid small { color: #9bb0b9; }
.mix { display: flex; gap: 0.2rem; height: 0.75rem; margin: 2.3rem 0 1rem; }
.mix i { display: block; border-radius: 999px; }
.mix i:nth-child(1) { background: var(--teal); }
.mix i:nth-child(2) { background: var(--orange); }
.mix i:nth-child(3) { background: #97aab4; }
.dash-foot a { color: var(--teal); }

.section { max-width: var(--max); margin: 0 auto; padding: clamp(4.5rem, 9vw, 8rem) 1.25rem; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1fr 0.7fr; gap: 3rem; align-items: end; margin-bottom: 3rem; }
.section-head .eyebrow { grid-column: 1 / -1; margin-bottom: -1.75rem; }
.section-head h2, .split h2, .bridge-band h2, .related h2, .scenario h2, .form-layout h2, .note h2 { font-size: clamp(2.2rem, 4.4vw, 4rem); }
.section-head > p { margin: 0; color: var(--muted); font-size: 1.08rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card-grid .card:nth-child(4), .card-grid .card:nth-child(5) { grid-column: span 1; }
.card { display: flex; flex-direction: column; min-height: 270px; padding: 1.6rem; background: var(--white); border: 1px solid var(--line); border-radius: 1.1rem; transition: transform 180ms ease, box-shadow 180ms ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.7rem; }
.card h3 a { text-decoration: none; }
.card p { color: var(--muted); }
.card .text-link { margin-top: auto; }
.split { display: grid; grid-template-columns: 0.8fr 1fr; gap: clamp(3rem, 8vw, 8rem); align-items: start; }
.split p { color: var(--muted); }
.numbered { border-top: 1px solid var(--ink); }
.numbered > div { display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.numbered span { color: var(--orange); font-size: 0.76rem; font-weight: 800; }
.numbered p { margin: 0; color: var(--ink); }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { position: relative; padding: 0.8rem 0 0.8rem 2rem; border-bottom: 1px solid rgba(203,216,220,0.65); }
.checklist li::before { content: ""; position: absolute; top: 1.35rem; left: 0; width: 0.72rem; height: 0.35rem; border-left: 2px solid var(--teal-dark); border-bottom: 2px solid var(--teal-dark); transform: rotate(-45deg); }
.bridge-band { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; max-width: none; padding-left: max(1.25rem, calc((100vw - var(--max)) / 2)); padding-right: max(1.25rem, calc((100vw - var(--max)) / 2)); color: var(--white); background: var(--ink); border: 0 !important; }
.bridge-band .eyebrow { color: var(--teal); }
.bridge-band .checklist li { border-color: #355061; }
.bridge-band .checklist li::before { border-color: var(--orange); }
.resource-list { border-top: 1px solid var(--ink); }
.resource-row { display: grid; grid-template-columns: 1fr auto; gap: 2rem; padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.resource-row h3 { margin: 0.5rem 0; font-size: clamp(1.55rem, 3vw, 2.4rem); }
.resource-row h3 a { text-decoration: none; }
.resource-row p { max-width: 760px; margin: 0; color: var(--muted); }
.resource-meta { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; color: var(--muted); font-size: 0.82rem; }
.tag { display: inline-block; color: var(--teal-dark); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.tag-warm { padding: 0.28rem 0.55rem; color: #8b321d; background: var(--orange-soft); border-radius: 999px; }
.section-action { margin-top: 2rem; text-align: center; }
.related { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.related > div { max-width: 760px; }
.related p { color: var(--muted); }
.scenario { display: grid; grid-template-columns: 1fr 0.8fr; gap: 5rem; align-items: start; }
.scenario p { color: var(--muted); font-size: 1.08rem; }
.scenario-list { padding: 1.3rem; background: var(--white); border: 1px solid var(--line); border-radius: 1rem; }
.note { max-width: calc(var(--max) - 2.5rem); margin-bottom: 5rem; padding: 2rem; background: #e1f5f2; border: 1px solid #abdcd5 !important; border-radius: 1rem; }
.note h2 { font-size: 2rem; }
.note p { margin-bottom: 0; }

.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.2rem 0; font-family: Georgia, serif; font-size: 1.3rem; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; display: grid; place-items: center; flex: 0 0 auto; width: 2rem; height: 2rem; border: 1px solid var(--line); border-radius: 50%; font-family: sans-serif; font-size: 1rem; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { max-width: 800px; padding: 0 3rem 1.2rem 0; color: var(--muted); }

.article-shell { display: grid; grid-template-columns: minmax(0, 760px) 260px; gap: clamp(3rem, 8vw, 7rem); max-width: var(--max); margin: 0 auto; padding: 1rem 1.25rem 7rem; }
.article-body { font-size: 1.06rem; }
.article-body h2, .prose h2 { margin: 3.3rem 0 1rem; font-size: clamp(1.9rem, 3.5vw, 2.8rem); }
.article-body h2:first-child, .prose h2:first-child { margin-top: 0; }
.article-body p, .prose p { color: #334f5e; }
.article-body .checklist { margin: 1.5rem 0; }
.article-body .checklist li { color: #334f5e; }
.article-aside { position: sticky; top: 115px; align-self: start; padding: 1.2rem; background: var(--white); border-top: 4px solid var(--orange); box-shadow: var(--shadow); }
.article-aside p { color: var(--muted); font-size: 0.9rem; }
.article-aside .aside-title { color: var(--ink); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.article-aside a { color: var(--teal-dark); font-weight: 700; }
.formula, .legal-status { margin: 2rem 0; padding: 1.4rem; background: var(--ink); color: var(--white); border-radius: 1rem; }
.formula span, .legal-status span { color: var(--teal); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.formula strong { display: block; margin: 0.5rem 0; font-family: Georgia, serif; font-size: 1.4rem; }
.formula p, .legal-status p { margin-bottom: 0; color: #c3d2d9; }
.legal-status { border-left: 5px solid var(--orange); }
.sources { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.sources h2 { margin-top: 0; font-size: 1.5rem; }
.sources li { margin: 0.45rem 0; }
.sources a { color: var(--teal-dark); }
.small { font-size: 0.82rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--white); }
th, td { padding: 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.prose { max-width: 780px; }

.form-layout { display: grid; grid-template-columns: 0.75fr 1fr; gap: clamp(3rem, 8vw, 7rem); align-items: start; }
.form-layout > div > p { color: var(--muted); }
.demo-form { padding: clamp(1.4rem, 4vw, 2.5rem); background: var(--white); border: 1px solid var(--line); border-radius: 1.2rem; box-shadow: var(--shadow); }
.field { display: grid; gap: 0.4rem; margin-bottom: 1rem; }
.field label { font-size: 0.88rem; font-weight: 750; }
.field input, .field textarea, .field select { width: 100%; min-height: 48px; padding: 0.7rem 0.8rem; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 0.55rem; }
.field textarea { resize: vertical; }
.form-status { min-height: 1.5rem; margin-bottom: 0; color: var(--teal-dark); font-weight: 700; }
.centered { text-align: center; }

.site-footer { padding: 5rem max(1.25rem, calc((100vw - var(--max)) / 2)) 2rem; color: var(--white); background: #061522; }
.footer-main { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 3rem; padding-bottom: 4rem; }
.footer-wordmark small { color: #9eb1ba; }
.footer-wordmark .wordmark-mark { color: var(--ink); background: var(--teal); }
.footer-main > div:first-child p { max-width: 290px; color: #9eb1ba; }
.footer-main h2 { margin-bottom: 1rem; color: #8fa4ae; font-family: inherit; font-size: 0.72rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-main > div:not(:first-child) a { display: block; margin: 0.45rem 0; color: #dce5e8; text-decoration: none; }
.footer-main a:hover { color: var(--teal); }
.footer-bottom { display: flex; justify-content: space-between; gap: 2rem; padding-top: 1.5rem; color: #8fa4ae; border-top: 1px solid #223746; font-size: 0.8rem; }
.footer-bottom p:last-child { display: flex; gap: 1rem; }

@media (max-width: 900px) {
  .menu-button { display: block; }
  .primary-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; align-items: stretch; padding: 1rem 1.25rem 1.5rem; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .primary-nav[data-open="true"] { display: grid; }
  .primary-nav a { padding: 0.55rem 0; }
  .primary-nav .nav-cta { padding: 0.8rem 1rem; text-align: center; }
  .hero-rail { display: none; }
  .page-hero { display: block; min-height: 390px; }
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid > div:last-child { grid-column: 1 / -1; }
  .section-head, .split, .bridge-band, .scenario, .form-layout, .article-shell { grid-template-columns: 1fr; }
  .section-head .eyebrow { margin-bottom: -1.5rem; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .article-aside { position: static; order: -1; }
  .footer-main { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-main > div:last-child { grid-column: 2 / -1; }
}

@media (max-width: 620px) {
  .demo-bar { display: block; text-align: center; }
  .demo-bar span { display: block; }
  .site-header { min-height: 70px; }
  .wordmark { font-size: 0.92rem; }
  .wordmark-mark { width: 2.35rem; }
  .page-hero { min-height: 0; }
  h1, .page-hero:not(:has(+ .hero-dashboard)) h1 { font-size: clamp(2.65rem, 14vw, 4.2rem); }
  .dash-head, .dash-foot { align-items: flex-start; flex-direction: column; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-grid > div:last-child { grid-column: auto; }
  .section-head { display: block; }
  .section-head .eyebrow { margin-bottom: 1rem; }
  .card-grid { grid-template-columns: 1fr; }
  .card { min-height: 220px; }
  .resource-row { grid-template-columns: 1fr; }
  .resource-meta { align-items: flex-start; flex-direction: row; }
  .related { align-items: flex-start; flex-direction: column; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-main > div:first-child, .footer-main > div:last-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}

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