@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@100,400..800&family=IBM+Plex+Mono:wght@500;600&family=Inter+Tight:wght@400;500;600;700&display=swap');

:root {
  --ink: #14292f;
  --ink-2: #294047;
  --muted: #60757a;
  --frost: #f3f7f5;
  --paper: #fcfdfb;
  --line: #cddbd7;
  --blue: #195c70;
  --blue-deep: #103e4c;
  --teal: #2f7c75;
  --copper: #a84f2b;
  --copper-soft: #f6e5dc;
  --lime: #d9e7c2;
  --danger: #9c3f35;
  --warning: #996213;
  --success: #2a7655;
  --shadow: 0 22px 70px rgba(20, 41, 47, .1);
  --shadow-small: 0 10px 32px rgba(20, 41, 47, .08);
  --radius: 18px;
  --shell: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(20,41,47,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,41,47,.028) 1px, transparent 1px),
    var(--frost);
  background-size: 32px 32px;
  font: 17px/1.62 "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #ef9d65; outline-offset: 3px; }
.skip-link { position: fixed; top: 10px; left: 10px; transform: translateY(-160%); z-index: 1000; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 8px; }
.skip-link:focus { transform: none; }
.shell { width: min(var(--shell), calc(100% - 36px)); margin-inline: auto; }
.mono, .eyebrow, .label, .tag, .metric small { font-family: "IBM Plex Mono", monospace; letter-spacing: .07em; text-transform: uppercase; }
.eyebrow { margin: 0 0 14px; color: var(--copper); font-size: .72rem; font-weight: 600; }
.display, h1, h2, h3 { font-family: "Archivo", ui-sans-serif, sans-serif; font-stretch: normal; text-wrap: balance; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 24px; font-size: clamp(2.75rem, 6.4vw, 5.8rem); line-height: .98; letter-spacing: -.038em; }
h2 { margin-bottom: 18px; font-size: clamp(2rem, 4.2vw, 3.9rem); line-height: 1.05; letter-spacing: -.028em; }
h3 { margin-bottom: 10px; font-size: 1.3rem; line-height: 1.22; letter-spacing: -.014em; }
.lede { max-width: 760px; color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.34rem); }
.muted { color: var(--muted); }

.site-header { position: relative; z-index: 20; padding: 18px 0; background: rgba(243,247,245,.92); border-bottom: 1px solid rgba(205,219,215,.8); backdrop-filter: blur(18px); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: "Archivo", ui-sans-serif, sans-serif; font-weight: 750; line-height: 1.15; text-decoration: none; letter-spacing: -.014em; }
.brand-mark { position: relative; width: 30px; height: 30px; border: 7px solid var(--blue); border-radius: 50%; }
.brand-mark::after { content: ""; position: absolute; width: 9px; height: 9px; right: -9px; top: 4px; background: var(--copper); border-radius: 2px; }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: .92rem; font-weight: 650; }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--blue); }
.nav-toggle { display: none; padding: 7px 10px; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 8px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 11px 18px; color: #fff; background: var(--blue); border: 1px solid var(--blue); border-radius: 10px; font-weight: 750; text-decoration: none; box-shadow: 0 8px 20px rgba(25,92,112,.14); transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); background: var(--blue-deep); box-shadow: 0 12px 26px rgba(25,92,112,.22); }
.button.secondary { color: var(--ink); background: transparent; border-color: var(--line); box-shadow: none; }
.button.copper { background: var(--copper); border-color: var(--copper); }
.button.small { min-height: 38px; padding: 7px 12px; font-size: .88rem; }

.hero { overflow: hidden; padding: clamp(62px, 9vw, 124px) 0 70px; background: var(--paper); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr); align-items: center; gap: clamp(40px, 7vw, 92px); }
.hero h1 em { color: var(--blue); font-style: normal; }
.hero-copy { max-width: 690px; color: var(--ink-2); font-size: clamp(1.12rem, 2vw, 1.35rem); }
.action-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 28px; color: var(--muted); font-size: .82rem; }
.trust-row span::before { content: "✓"; margin-right: 7px; color: var(--success); font-weight: 800; }

.loop-board { position: relative; aspect-ratio: 1; min-height: 440px; display: grid; place-items: center; background: #e6eeeb; border: 1px solid var(--line); border-radius: 40% 40% 40% 14%; box-shadow: var(--shadow); }
.loop-ring { position: relative; width: 74%; aspect-ratio: 1; border: 20px solid var(--blue); border-radius: 50%; box-shadow: inset 0 0 0 7px rgba(255,255,255,.7), 0 0 0 7px rgba(255,255,255,.7); }
.loop-ring::before { content: ""; position: absolute; inset: 20%; border: 2px dashed rgba(20,41,47,.28); border-radius: 50%; }
.loop-center { position: absolute; inset: 31%; display: grid; place-items: center; padding: 18px; text-align: center; color: #fff; background: var(--ink); border-radius: 50%; box-shadow: 0 16px 32px rgba(20,41,47,.24); }
.loop-center strong { display: block; font: 700 1.55rem/1.08 "Archivo"; }
.loop-center span { color: #b7cbc8; font-size: .74rem; }
.loop-node { position: absolute; z-index: 2; width: 110px; padding: 9px 8px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-small); font: 600 .72rem/1.25 "IBM Plex Mono"; text-align: center; text-transform: uppercase; }
.loop-node:nth-child(2) { top: -38px; left: 50%; transform: translateX(-50%); }
.loop-node:nth-child(3) { right: -62px; top: 30%; }
.loop-node:nth-child(4) { right: -28px; bottom: 1%; }
.loop-node:nth-child(5) { bottom: -42px; left: 36%; }
.loop-node:nth-child(6) { left: -58px; bottom: 22%; }
.loop-node:nth-child(7) { left: -42px; top: 13%; }
.loop-pulse { position: absolute; z-index: 3; width: 20px; height: 20px; top: 8%; right: 20%; background: var(--copper); border: 5px solid var(--paper); border-radius: 50%; box-shadow: 0 0 0 4px rgba(197,103,61,.25); animation: pulse 2.4s ease-in-out infinite; }

.section { padding: clamp(72px, 9vw, 118px) 0; }
.section.paper { background: var(--paper); border-block: 1px solid var(--line); }
.section.dark { color: #edf6f3; background: var(--ink); }
.section.dark .lede, .section.dark .muted { color: #aac0be; }
.section.dark .eyebrow { color: #ef9d65; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 42px; }
.section-heading > div { max-width: 780px; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { position: relative; padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-small); }
.card p:last-child { margin-bottom: 0; }
.card .label { color: var(--copper); font-size: .68rem; }
.dark .card { color: var(--ink); }
.bottleneck { overflow: hidden; min-height: 230px; display: flex; flex-direction: column; justify-content: space-between; }
.bottleneck::after { content: attr(data-letter); position: absolute; right: -8px; bottom: -52px; color: rgba(25,92,112,.08); font: 800 10rem/.8 "Archivo"; }
.bottleneck a { position: relative; z-index: 1; font-weight: 750; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.essay-card { display: flex; flex-direction: column; min-height: 310px; }
.essay-card .tag-row { margin-bottom: 38px; }
.essay-card h3 { font-size: 1.8rem; }
.essay-card .essay-meta { margin-top: auto; padding-top: 22px; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { display: inline-flex; padding: 5px 8px; color: var(--blue); background: #e7f0ef; border-radius: 5px; font-size: .63rem; font-weight: 600; }

.signal-strip { display: grid; grid-template-columns: 1.3fr repeat(3, .7fr); gap: 1px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); }
.signal-strip > div { min-height: 156px; padding: 24px; background: var(--paper); }
.signal-strip .signal-intro { background: var(--blue); color: #fff; }
.signal-strip .metric { color: var(--ink); }
.metric strong { display: block; margin-top: 18px; font: 750 2.6rem/1.05 "Archivo"; }
.metric small { color: var(--muted); font-size: .66rem; }

.form-card { padding: clamp(28px, 5vw, 52px); background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label, legend { font-weight: 700; font-size: .9rem; }
input, select, textarea { width: 100%; padding: 12px 13px; color: var(--ink); background: #fff; border: 1px solid #b7cac5; border-radius: 9px; }
textarea { min-height: 126px; resize: vertical; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.form-status { min-height: 24px; margin: 12px 0 0; font-weight: 650; }
.form-status[data-state="success"] { color: var(--success); }
.form-status[data-state="error"] { color: var(--danger); }
.fine-print { color: var(--muted); font-size: .78rem; }

.article-hero { padding: 74px 0 46px; background: var(--paper); border-bottom: 1px solid var(--line); }
.article-hero h1 { max-width: 980px; font-size: clamp(2.7rem, 6.2vw, 5.35rem); }
.article-visual { margin: 34px 0 44px; }
.article-visual img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 48px rgba(20,41,47,.12); }
.article-visual figcaption { margin-top: 10px; color: var(--muted); font-size: .86rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: .86rem; }
.article-layout { display: grid; grid-template-columns: 190px minmax(0, 720px) 220px; justify-content: center; gap: 42px; padding: 64px 0 100px; }
.article-body { min-width: 0; }
.article-body h2 { margin-top: 54px; font-size: clamp(2rem, 4vw, 3rem); }
.article-body h3 { margin-top: 34px; }
.article-body p, .article-body li { color: var(--ink-2); }
.article-body blockquote { margin: 34px 0; padding: 24px 26px; color: var(--ink); background: var(--copper-soft); border-left: 5px solid var(--copper); border-radius: 0 12px 12px 0; font: 650 1.18rem/1.55 "Archivo"; }
.article-body table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: .9rem; }
.article-body th, .article-body td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line); }
.article-body th { color: var(--muted); font-family: "IBM Plex Mono"; font-size: .7rem; text-transform: uppercase; }
.toc, .article-aside { position: sticky; top: 24px; align-self: start; font-size: .82rem; }
.toc a { display: block; margin: 10px 0; color: var(--muted); text-decoration: none; }
.article-aside { padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.source-list { padding-left: 20px; font-size: .86rem; }
.inline-cta { margin: 44px 0; padding: 28px; color: #fff; background: var(--blue-deep); border-radius: 16px; }

.archive-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin: 28px 0; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-button { padding: 8px 12px; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 999px; font-weight: 700; }
.filter-button[aria-pressed="true"] { color: #fff; background: var(--blue); border-color: var(--blue); }

.scorecard-shell { max-width: 900px; margin: 0 auto; }
.score-progress { position: sticky; top: 0; z-index: 10; padding: 12px 0; background: rgba(243,247,245,.95); backdrop-filter: blur(10px); }
.progress-track { height: 9px; overflow: hidden; background: #dbe5e2; border-radius: 999px; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--copper); transition: width .25s ease; }
.question-group { display: none; padding: 34px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-small); }
.question-group.active { display: block; }
.question { padding: 20px 0; border-bottom: 1px solid var(--line); }
.question:last-child { border-bottom: 0; }
.question fieldset { margin: 0; padding: 0; border: 0; }
.choice-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
.choice-row label { display: grid; place-items: center; min-height: 48px; padding: 8px; background: var(--frost); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.choice-row label:has(input:checked) { color: #fff; background: var(--blue); border-color: var(--blue); }
.choice-row input { position: absolute; opacity: 0; width: 1px; }
.score-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.result-panel { display: none; }
.result-panel.active { display: block; }
.result-score { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 28px; }
.result-badge { width: 132px; aspect-ratio: 1; display: grid; place-items: center; color: #fff; background: var(--copper); border: 10px solid var(--copper-soft); border-radius: 50%; font: 800 2.7rem/1 "Archivo"; }

.resource-calculator { padding: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.calculator-output { margin-top: 18px; padding: 18px; background: #e7f0ef; border-radius: 10px; }
.calculator-output strong { display: block; font: 800 2.3rem/1.05 "Archivo"; }

.site-footer { padding: 48px 0; color: #b8cbc7; background: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 40px; }
.site-footer a { color: #d8e7e4; }
.site-footer .fine-print { color: #b8cbc7; }
.footer-links { display: grid; gap: 8px; align-content: start; }

.notice { padding: 13px 16px; color: var(--ink-2); background: var(--lime); border-left: 4px solid var(--success); border-radius: 7px; }
.notice.warning { background: #f8ecd2; border-color: var(--warning); }
.empty-state { padding: 28px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 12px; }
.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; }

@keyframes pulse { 0%, 100% { transform: scale(.82); opacity: .7; } 50% { transform: scale(1.15); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .loop-board { width: min(600px, 100%); margin: 0 auto; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .signal-strip { grid-template-columns: repeat(3, 1fr); }
  .signal-strip .signal-intro { grid-column: 1 / -1; }
  .article-layout { grid-template-columns: minmax(0, 720px) 210px; }
  .toc { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 16px; background-size: 24px 24px; }
  .nav-toggle { display: inline-flex; }
  .nav-links { position: absolute; top: 66px; right: 18px; left: 18px; display: none; flex-direction: column; align-items: stretch; padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .hero { padding-top: 58px; }
  .loop-board { min-height: 330px; border-radius: 32% 32% 32% 12%; }
  .loop-ring { border-width: 14px; }
  .loop-node { width: 82px; font-size: .58rem; }
  .loop-node:nth-child(3) { right: -50px; }
  .loop-node:nth-child(6) { left: -48px; }
  .section-heading { align-items: start; flex-direction: column; }
  .grid-2, .grid-3, .grid-4, .form-grid, .footer-grid, .signal-strip { grid-template-columns: 1fr; }
  .signal-strip .signal-intro { grid-column: auto; }
  .article-layout { display: block; padding-top: 40px; }
  .article-aside { position: static; margin-top: 40px; }
  .choice-row { grid-template-columns: repeat(5, minmax(46px,1fr)); overflow-x: auto; }
  .question-group { padding: 22px 18px; }
  .result-score { grid-template-columns: 1fr; }
  .score-actions { flex-direction: column-reverse; }
  .score-actions .button { width: 100%; white-space: normal; text-align: center; }
}
