/* Citadence: editorial look. Paper, ink, and a red pencil for annotations. */

:root {
  --paper: #f5f1e8;
  --paper-deep: #ece6d8;
  --card: #fffdf8;
  --ink: #16181d;
  --ink-soft: #3b404b;
  --ink-faint: #5d6370;
  --rule: #d9d1bf;
  --pencil: #b3261e;
  --pencil-soft: #f6dcd6;
  --marker: #f3dd92;
  --night: #14213a;
  --night-text: #efe9dc;
  --night-soft: #b9c1d0;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1160px;
  --gutter: clamp(20px, 5vw, 40px);
  --radius: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img, svg { max-width: 100%; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--radius);
  text-decoration: none; transition: top .2s var(--ease);
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--pencil); outline-offset: 3px; border-radius: 3px; }

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

.eyebrow {
  font: 500 12.5px/1.4 var(--mono);
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--pencil);
  margin-bottom: 18px;
}

.section-title { font-size: clamp(30px, 4vw, 44px); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 241, 232, .92);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.wordmark {
  font: 500 25px/1 var(--serif); text-decoration: none; letter-spacing: -0.015em;
  display: inline-flex; align-items: flex-start;
}
.wordmark sup { font: 500 11px/1 var(--mono); color: var(--pencil); margin-left: 2px; margin-top: 1px; }
.wordmark-small { font-size: 21px; }
nav { margin-left: auto; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: 15px; color: var(--ink-soft); text-decoration: none;
  padding: 10px 0; display: inline-block;
  background: linear-gradient(var(--pencil), var(--pencil)) no-repeat left 78% / 0 1px;
  transition: background-size .25s var(--ease), color .2s;
}
.nav-links a:hover { color: var(--ink); background-size: 100% 1px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  background: var(--ink); color: var(--paper);
  font: 500 16px/1 var(--sans); text-decoration: none;
  border-radius: var(--radius); border: 1px solid var(--ink);
  transition: background .2s var(--ease), transform .2s var(--ease);
  cursor: pointer;
}
.btn:hover { background: #2a2e37; }
.btn:active { transform: translateY(1px); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-light { background: var(--paper); color: var(--night); border-color: var(--paper); }
.btn-light:hover { background: #fff; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px;
  font-weight: 500; text-decoration: none; color: var(--ink);
}
.link-arrow::after { content: "→"; transition: transform .2s var(--ease); }
.link-arrow:hover::after { transform: translateX(3px); }

/* Hero */
.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 8vw, 112px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.06; letter-spacing: -0.02em; }
.lede { margin-top: 24px; font-size: 19px; line-height: 1.6; color: var(--ink-soft); max-width: 36em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 34px; }
.fine { margin-top: 18px; font-size: 14px; color: var(--ink-faint); }

/* Answer card */
.answer-card {
  margin: 0; background: var(--card);
  border: 1px solid var(--rule); border-radius: 10px;
  box-shadow: 0 1px 0 rgba(22, 24, 29, .04), 0 18px 40px -24px rgba(22, 24, 29, .28);
  padding: 22px 24px 18px;
  position: relative;
}
.answer-head {
  display: flex; justify-content: space-between; gap: 12px;
  font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint);
  padding-bottom: 14px; border-bottom: 1px dashed var(--rule);
}
.answer-head .engine { color: var(--ink); }
.question {
  margin: 18px 0 16px auto; width: fit-content; max-width: 88%;
  background: var(--paper-deep); border-radius: 14px 14px 4px 14px;
  padding: 10px 14px; font-size: 15.5px; line-height: 1.45;
}
.answer-body { font-size: 15.5px; line-height: 1.55; color: var(--ink-soft); }
.answer-body ol { margin: 10px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.answer-body strong { color: var(--ink); font-weight: 600; }
.answer-body sup { font: 500 10px/0 var(--mono); color: var(--ink-faint); margin-left: 2px; }
.sources {
  display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px;
  font: 400 12.5px/1.4 var(--mono); color: var(--ink-faint);
}
.margin-note {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 18px; padding: 12px 14px;
  background: var(--pencil-soft); border-left: 3px solid var(--pencil); border-radius: 0 var(--radius) var(--radius) 0;
  color: #5e1611;
}
.margin-note p { font: italic 400 17px/1.4 var(--serif); }
.margin-note strong { font-style: normal; font-weight: 600; }
.note-mark { font: 600 14px/1.6 var(--sans); color: var(--pencil); }
.answer-card figcaption, .report-card figcaption {
  margin-top: 14px; font-size: 13px; line-height: 1.5; color: var(--ink-faint);
}

/* The shift */
.shift { border-top: 1px solid var(--rule); padding: clamp(64px, 8vw, 104px) 0; }
.shift .section-title { max-width: 18em; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 48px; border-top: 1px solid var(--ink); }
.three-col article { padding: 26px 28px 0 0; }
.three-col article + article { padding-left: 28px; border-left: 1px solid var(--rule); }
.three-col h3 { font-size: 23px; }
.three-col p { margin-top: 12px; color: var(--ink-soft); }

/* How */
.how { background: var(--paper-deep); padding: clamp(64px, 8vw, 104px) 0; }
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.steps li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; padding: 28px 0; border-top: 1px solid var(--rule); }
.step-no { font: 500 14px/1.9 var(--mono); color: var(--pencil); }
.steps h3 { font-size: 24px; }
.steps p { margin-top: 10px; color: var(--ink-soft); }

/* Report */
.report { padding: clamp(64px, 8vw, 104px) 0; }
.report-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); align-items: start; }
.report-list { margin: 32px 0 0; }
.report-list div { display: grid; grid-template-columns: minmax(0, 10.5em) minmax(0, 1fr); gap: 20px; padding: 16px 0; border-top: 1px solid var(--rule); }
.report-list div:last-child { border-bottom: 1px solid var(--rule); }
.report-list dt { font-weight: 600; }
.report-list dd { margin: 0; color: var(--ink-soft); }

.report-card {
  margin: 0; background: var(--card); border: 1px solid var(--rule); border-radius: 10px;
  padding: 24px; box-shadow: 0 18px 40px -26px rgba(22, 24, 29, .3);
  position: sticky; top: 96px;
}
.report-card-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em;
}
.tag { color: var(--pencil); border: 1px solid currentColor; border-radius: 99px; padding: 5px 9px; }
.report-card table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 15px; }
.report-card th, .report-card td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.report-card thead th { font: 500 11.5px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); }
.report-card tbody th { font-weight: 500; }
.report-card td:last-child { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.bar {
  display: inline-block; vertical-align: middle; width: 72px; height: 6px; margin-right: 10px;
  background: linear-gradient(var(--ink), var(--ink)) no-repeat left / var(--v) 100%, var(--paper-deep);
  border-radius: 3px;
}
.finding { margin-top: 20px; padding: 16px; background: var(--paper); border-radius: var(--radius); }
.finding-label { font: 500 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--pencil); }
.finding-title { margin-top: 10px; font: 500 20px/1.3 var(--serif); }
.finding-proof { margin-top: 10px; font-size: 14.5px; color: var(--ink-soft); padding-left: 12px; border-left: 2px solid var(--rule); }

/* Principles */
.principles { background: var(--night); color: var(--night-text); padding: clamp(64px, 8vw, 104px) 0; }
.rules { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.rules li { padding: 26px 0; border-top: 1px solid rgba(239, 233, 220, .22); }
.rules h3 { font-size: 24px; }
.rules p { margin-top: 10px; color: var(--night-soft); }

/* Fit */
.fit { padding: clamp(56px, 7vw, 88px) 0; border-bottom: 1px solid var(--rule); }
.fit-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px 64px; align-items: baseline; }
.fit p { font-size: 19px; color: var(--ink-soft); }

/* FAQ */
.faq { padding: clamp(64px, 8vw, 104px) 0; }
.faq-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px 64px; }
.faq-list { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  min-height: 60px; padding: 14px 0;
  font: 500 20px/1.35 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font: 400 18px/1 var(--sans);
  border: 1px solid var(--rule); transition: transform .25s var(--ease), background .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); background: var(--paper-deep); }
.faq summary:hover::after { background: var(--paper-deep); }
.faq details p { padding: 0 44px 20px 0; color: var(--ink-soft); }

/* CTA */
.cta { background: var(--night); color: var(--night-text); padding: clamp(56px, 7vw, 88px) 0; }
.cta-row { display: flex; justify-content: space-between; align-items: center; gap: 28px 48px; flex-wrap: wrap; }
.cta h2 { font-size: clamp(32px, 4vw, 46px); }
.cta p { margin-top: 10px; color: var(--night-soft); font-size: 18px; }

/* Footer */
.site-footer { padding: 32px 0 40px; font-size: 14px; color: var(--ink-faint); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.footer-row .wordmark { color: var(--ink); margin-right: auto; }
.footer-row a { color: var(--ink-soft); text-underline-offset: 3px; }

/* Reveal (only when JS runs; content is visible without it) */
.js .reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .report-grid, .fit-row, .faq-wrap { grid-template-columns: minmax(0, 1fr); }
  .report-card { position: static; }
  .steps, .rules { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  nav { margin-left: auto; }
  .three-col { grid-template-columns: minmax(0, 1fr); border-top: 0; margin-top: 32px; }
  .three-col article, .three-col article + article { padding: 22px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .three-col article:first-child { border-top: 1px solid var(--ink); }
  .report-list div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .steps li { grid-template-columns: 44px minmax(0, 1fr); }
  .lede { font-size: 18px; }
}
@media (max-width: 420px) {
  body { font-size: 16px; }
  .answer-card, .report-card { padding: 18px 16px; }
  .question { max-width: 100%; }
  .faq details p { padding-right: 0; }
  .btn-small { padding: 0 14px; }
  .report-card thead th { font-size: 10.5px; letter-spacing: .04em; padding-right: 8px; }
  .report-card th, .report-card td { padding-right: 8px; }
  .report-card td:last-child { padding-right: 0; }
  .bar { width: 44px; margin-right: 8px; }
}
