/* Cited.today, shared styles for the secondary pages (about, terms, privacy).
   Same tokens, type and components as landing/index.html. */
:root {
  --canvas: #f4f4f2;
  --paper: #ffffff;
  --ink: #000000;
  --ink-2: rgba(0, 0, 0, 0.64);
  --ink-3: rgba(0, 0, 0, 0.56);
  --rule: rgba(0, 0, 0, 0.1);
  --rule-soft: rgba(0, 0, 0, 0.06);
  --accent: #002fa7;
  --accent-tint: #e9eeff;
  --green: #157a3a;
  --serif: "Newsreader", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --frame: 1200px;
  --gutter: clamp(20px, 4vw, 56px);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 16px 40px -16px rgba(0, 0, 0, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-optical-sizing: auto;
}
::selection { background: var(--accent-tint); color: var(--ink); }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a, button, input { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.frame {
  max-width: var(--frame); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  border-left: 1px solid var(--rule-soft); border-right: 1px solid var(--rule-soft);
}
section { border-top: 1px solid var(--rule); }

.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; font-size: 14px; z-index: 100; }
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 20px; border-radius: 9px;
  font: 500 15px/1 var(--sans); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color 140ms ease-out, border-color 140ms ease-out, transform 100ms ease-out;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #262626; }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: rgba(0, 0, 0, 0.16); }
.btn-secondary:hover { border-color: rgba(0, 0, 0, 0.36); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 8px; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 244, 242, 0.86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav .frame { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.wordmark { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; text-decoration: none; padding: 6px 0; }
.wm-top { font: 500 24px/0.9 var(--serif); letter-spacing: -0.02em; }
.wm-dot, .sig { color: var(--accent); }
.wm-bottom { font: 400 14px/1 var(--serif); letter-spacing: 0.01em; color: var(--ink-2); }
.nav-links { display: flex; gap: 28px; margin-left: 24px; }
.nav-links a { font-size: 15px; color: var(--ink-2); text-decoration: none; padding: 12px 0; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-cta { margin-left: auto; height: 40px; }

/* Page body */
.page .frame { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(64px, 8vw, 112px); }
.page-head { max-width: 760px; }
.page-head h1 { font-size: clamp(36px, 4vw, 56px); line-height: 1.05; }
.page-head .lede { margin-top: 20px; font-size: 19px; color: var(--ink-2); max-width: 52ch; }
.page-meta { margin-top: 14px; font-size: 14px; color: var(--ink-3); }
.prose { max-width: 68ch; margin-top: clamp(40px, 5vw, 64px); }
.prose h2 { font-size: 28px; line-height: 1.15; margin-top: 44px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 21px; line-height: 1.2; margin-top: 28px; font-weight: 500; }
.prose p { margin-top: 14px; color: var(--ink-2); }
.prose p.lead { color: var(--ink); font-size: 18px; }
.prose ul { margin-top: 12px; list-style: disc; padding-left: 22px; color: var(--ink-2); }
.prose li { margin-top: 6px; }
.prose li::marker { color: var(--ink-3); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); }
.prose a:hover { color: var(--accent); }
.prose .rule { border: 0; border-top: 1px solid var(--rule); margin: 40px 0 0; }
.toc { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { font-size: 13.5px; color: var(--ink-2); text-decoration: none; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 999px; }
.toc a:hover { color: var(--ink); border-color: rgba(0, 0, 0, 0.3); }
.placeholder { display: inline-block; padding: 2px 8px; border: 1px dashed rgba(0, 0, 0, 0.3); border-radius: 6px; font-size: 13px; font-weight: 400; color: var(--ink-3); white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }

/* About page */
.about-grid { display: grid; grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; margin-top: clamp(40px, 5vw, 64px); }
.portrait { position: sticky; top: 92px; }
.portrait img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; outline: 1px solid rgba(0, 0, 0, 0.1); outline-offset: -1px; }
.portrait-caption { margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.portrait-caption strong { display: block; font: 500 18px/1.2 var(--serif); color: var(--ink); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: clamp(40px, 5vw, 64px); padding-top: 28px; border-top: 1px solid var(--rule); }
.fact strong { display: block; font: 400 clamp(30px, 3vw, 40px)/1 var(--serif); color: var(--accent); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fact span { display: block; margin-top: 8px; font-size: 14.5px; color: var(--ink-2); max-width: 26ch; }
.timeline { margin-top: 20px; border-top: 1px solid var(--rule); }
.timeline li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule-soft); }
.timeline .year { font: 500 13px/1.6 var(--mono); color: var(--ink-3); }
.timeline strong { display: block; font-weight: 600; }
.timeline p { margin-top: 2px; font-size: 15.5px; }

/* Final CTA strip */
.cta-strip .frame { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding-top: 40px; padding-bottom: 40px; }
.cta-strip h2 { font-size: 28px; line-height: 1.15; }
.cta-strip p { margin-top: 6px; font-size: 15.5px; color: var(--ink-2); }

/* Footer */
.footer { border-top: 1px solid var(--rule); }
.footer .frame { display: flex; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; padding-top: 32px; padding-bottom: 40px; font-size: 14px; color: var(--ink-2); }
.footer-left { max-width: 48ch; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; padding: 12px 0; }
.footer-links a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 960px) {
  .frame { border-left: 0; border-right: 0; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { position: static; max-width: 320px; }
  .facts { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 720px) {
  .nav .frame { flex-wrap: wrap; row-gap: 0; padding-top: 12px; padding-bottom: 10px; min-height: 0; }
  .nav-links { order: 3; width: 100%; margin: 10px 0 0; gap: 20px; overflow-x: auto; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { font-size: 14px; white-space: nowrap; padding: 10px 0; }
  html { scroll-padding-top: 112px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
