:root {
  color-scheme: light;
  --ink: #111111;
  --muted: #66635f;
  --paper: #f7f6f2;
  --surface: #efede7;
  --surface-2: #e8e5de;
  --line: #dad7d0;
  --inverse: #ffffff;
  --sand: #ece7dc;
  --sage: #e4e9df;
  --blue: #e2e7ea;
  --grey: #ecebea;
  --shadow: 0 18px 54px rgba(18, 18, 18, .08);
  --radius: 6px;
  --container: 1280px;
  --header-height: 74px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f3f0e9;
  --muted: #aaa69f;
  --paper: #111210;
  --surface: #191a18;
  --surface-2: #22231f;
  --line: #30312d;
  --inverse: #111210;
  --sand: #24221d;
  --sage: #1f251f;
  --blue: #202528;
  --grey: #232321;
  --shadow: 0 18px 54px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 180ms ease, color 180ms ease;
}
body.no-scroll { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  transform: translateY(-140%);
  background: var(--ink);
  color: var(--inverse);
  padding: 10px 14px;
  border-radius: 4px;
}
.skip-link:focus { transform: translateY(0); }

.container { width: min(calc(100% - 48px), var(--container)); margin-inline: auto; }
.section-shell { padding: 68px 0; }
.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}
.brand {
  justify-self: start;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -.065em;
  line-height: 1;
}
.brand-small { font-size: 24px; }
.desktop-nav { display: flex; align-items: stretch; height: 100%; gap: 28px; }
.desktop-nav a {
  position: relative;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 500;
}
.desktop-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--ink);
  transform: translateX(-50%);
  transition: width 160ms ease;
}
.desktop-nav a:hover::after,
.desktop-nav a.active::after { width: 22px; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 6px; }
.icon-button, .menu-button, .close-button { border: 0; background: transparent; cursor: pointer; }
.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.icon-button:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle { position: relative; }
.theme-icon { position: absolute; }
html[data-theme="light"] .theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon { display: none; }

.button {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 600;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}
.button:hover { transform: translateY(-1px); }
.button-dark { border-color: var(--ink); background: var(--ink); color: var(--inverse); }
.button-dark:hover { opacity: .88; }
.button-large { padding: 13px 22px; }

.menu-button { display: none; width: 42px; height: 42px; padding: 9px; }
.menu-button span { display: block; height: 1.5px; background: currentColor; margin: 5px 0; transition: 180ms ease; }
.menu-button.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-button.is-open span:nth-child(2) { opacity: 0; }
.menu-button.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.mobile-nav { display: none; padding: 16px 24px 24px; background: var(--paper); border-bottom: 1px solid var(--line); }
.mobile-nav.is-open { display: grid; }
.mobile-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.mobile-nav a:last-child { border-bottom: 0; }

.eyebrow, .section-kicker {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero { padding-top: 72px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 1fr);
  align-items: center;
  gap: clamp(56px, 8vw, 110px);
}
.hero h1, .about h2, .article-title, .search-panel h2, .legal-page h1 {
  margin: 0;
  font-family: "Manrope", Arial, sans-serif;
  letter-spacing: -.052em;
  line-height: 1;
}
.hero h1 { max-width: 690px; font-size: clamp(50px, 5.6vw, 80px); font-weight: 700; }
.hero-description {
  max-width: 660px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-visual {
  margin: 0;
  overflow: hidden;
  min-height: 370px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.hero-visual svg { width: 100%; height: 100%; min-height: 370px; }

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.section-heading-row h2 { margin: 0; font-size: 18px; font-weight: 700; }
.section-kicker { margin-bottom: 5px; }

.latest-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr .9fr;
  gap: 28px;
  padding-top: 26px;
}
.feature-image { min-height: 330px; overflow: hidden; border-radius: var(--radius); }
.whoop-art {
  position: relative;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 70% 20%, rgba(255,255,255,.14), transparent 26%), #111;
  color: #fff;
}
.whoop-art::after { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(255,255,255,.12); pointer-events: none; }
.whoop-band { position: relative; width: 68%; height: 126px; transform: rotate(-8deg); }
.band-body {
  position: absolute;
  inset: 26px 0;
  border: 2px solid rgba(255,255,255,.75);
  border-radius: 14px;
  background: repeating-linear-gradient(90deg,#232323 0,#232323 6px,#181818 6px,#181818 12px);
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.band-clasp {
  position: absolute;
  left: 39%;
  top: 0;
  display: grid;
  place-items: center;
  width: 96px;
  height: 126px;
  border-radius: 10px;
  background: #0b0b0b;
  border: 1px solid #393939;
  font-size: 11px;
  letter-spacing: .16em;
  font-weight: 800;
}
.whoop-data { position: absolute; right: 28px; bottom: 26px; text-align: right; }
.whoop-data span { display: block; font-size: 10px; letter-spacing: .14em; opacity: .5; }
.whoop-data strong { font-family: "Manrope", sans-serif; font-size: 38px; letter-spacing: -.05em; }

.feature-copy { display: flex; flex-direction: column; padding: 2px 0; }
.meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 12px; }
.pill { color: var(--ink); font-weight: 700; }
.feature-copy h3 { margin: 22px 0 10px; font-family: "Manrope", sans-serif; font-size: clamp(30px, 2.5vw, 42px); letter-spacing: -.045em; line-height: 1.07; }
.feature-copy h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.feature-copy > p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.feature-footer { margin-top: auto; padding-top: 28px; color: var(--muted); font-size: 13px; }
.article-list { border-left: 1px solid var(--line); padding-left: 24px; }
.article-list a { display: block; padding: 0 0 15px; margin: 0 0 15px; border-bottom: 1px solid var(--line); }
.article-list a:last-child { border-bottom: 0; margin-bottom: 0; }
.article-list strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.38; }
.article-list small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.list-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; }
.article-list a:hover strong { text-decoration: underline; text-underline-offset: 3px; }

.explore { padding-top: 20px; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 24px; }
.category-card {
  min-height: 250px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-sand { background: var(--sand); }
.card-green { background: var(--sage); }
.card-blue { background: var(--blue); }
.card-grey { background: var(--grey); }
.category-number { width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 28px; border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); border-radius: 50%; font-size: 10px; font-weight: 700; }
.category-card h3 { margin: 0 0 8px; font-family: "Manrope", sans-serif; font-size: 24px; letter-spacing: -.035em; }
.category-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.category-card > span { margin-top: auto; padding-top: 26px; color: var(--muted); font-size: 12px; }

.about { padding-top: 76px; padding-bottom: 104px; }
.about-grid { display: grid; grid-template-columns: .48fr 1.52fr; gap: 50px; align-items: start; border-top: 1px solid var(--line); padding-top: 70px; }
.about-mark { display: block; margin-top: 6px; font-family: "Manrope", sans-serif; font-size: 64px; font-weight: 800; letter-spacing: -.07em; }
.about h2 { font-size: clamp(38px, 4.7vw, 64px); max-width: 980px; }
.about div > p { max-width: 780px; margin: 28px 0 0; color: var(--muted); font-size: 18px; line-height: 1.7; }
.about em { color: var(--ink); }

.site-footer { border-top: 1px solid var(--line); padding: 30px 0; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 26px; }
.footer-expanded { grid-template-columns: auto 1fr auto auto; }
.footer-inner p { margin: 0; color: var(--muted); font-size: 12px; }
.footer-links { display: flex; align-items: center; gap: 18px; font-size: 12px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--ink); }

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: start center;
  padding: 110px 24px 24px;
  background: rgba(10,10,10,.55);
  backdrop-filter: blur(7px);
}
.search-overlay[hidden] { display: none; }
.search-panel { position: relative; width: min(700px, 100%); padding: 40px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.search-panel h2 { margin-bottom: 24px; font-size: 42px; }
.close-button { position: absolute; top: 16px; right: 20px; font-size: 29px; }
input { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--ink); padding: 0 14px; outline: none; }
input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 8%, transparent); }
.search-results { display: grid; gap: 10px; margin-top: 18px; }
.search-result { display: block; padding: 14px 0; border-top: 1px solid var(--line); }
.search-result strong { display: block; }
.search-result span { color: var(--muted); font-size: 13px; }

/* Article */
.article-hero { padding: 68px 0 20px; }
.article-shell { width: min(calc(100% - 48px), 1120px); margin-inline: auto; }
.article-shell-narrow { max-width: 1040px; }
.back-link { display: inline-flex; margin-bottom: 40px; color: var(--muted); font-size: 13px; font-weight: 600; }
.back-link:hover { color: var(--ink); }
.article-meta { margin-bottom: 18px; }
.article-title { max-width: 980px; font-size: clamp(48px, 7vw, 90px); font-weight: 700; }
.article-deck { max-width: 800px; margin: 26px 0 0; color: var(--muted); font-size: clamp(18px, 1.6vw, 22px); line-height: 1.6; }
.article-rule { margin-top: 42px; border-top: 1px solid var(--line); }
.article-visual { margin-top: 28px; min-height: 430px; border-radius: var(--radius); }
.article-reading-layout { display: grid; grid-template-columns: 180px minmax(0, 720px); gap: 62px; justify-content: center; padding: 60px 0 110px; }
.article-toc { position: sticky; top: 104px; align-self: start; }
.article-toc p { margin: 0 0 12px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.article-toc a { display: block; padding: 7px 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.article-toc a:hover { color: var(--ink); }
.article-body { min-width: 0; }
.article-body > p,
.article-body section > p { margin: 0 0 25px; font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: 1.82; }
.article-lead { font-size: 21px !important; line-height: 1.78 !important; }
.article-body em { color: var(--ink); font-style: italic; }
.article-body section { scroll-margin-top: 106px; margin-top: 62px; }
.article-body h2 { margin: 0 0 22px; font-family: "Manrope", sans-serif; font-size: clamp(29px, 3vw, 39px); line-height: 1.12; letter-spacing: -.04em; }
.article-sources { margin-top: 74px; padding-top: 28px; border-top: 1px solid var(--line); }
.article-sources h3 { margin: 0 0 8px; font-family: "Manrope", sans-serif; font-size: 16px; }
.article-sources > p { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.article-sources ol { margin: 0; padding-left: 18px; }
.article-sources li { margin: 9px 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.article-sources a { text-decoration: underline; text-underline-offset: 3px; }

/* Legal */
.legal-page { padding: 76px 0 110px; }
.legal-page .container { max-width: 820px; }
.legal-page h1 { font-size: clamp(48px, 7vw, 78px); }
.legal-page .updated { margin: 18px 0 44px; color: var(--muted); font-size: 13px; }
.legal-page h2 { margin: 42px 0 12px; font-family: "Manrope", sans-serif; font-size: 25px; letter-spacing: -.03em; }
.legal-page p, .legal-page li { color: var(--muted); font-size: 16px; line-height: 1.75; }
.legal-page a { text-decoration: underline; text-underline-offset: 3px; }

.reveal { opacity: 0; transform: translateY(12px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1060px) {
  .desktop-nav { gap: 19px; }
  .latest-grid { grid-template-columns: 1fr 1fr; }
  .article-list { grid-column: 1 / -1; border-left: 0; padding-left: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .container, .article-shell { width: min(calc(100% - 32px), var(--container)); }
  .desktop-nav { display: none; }
  .header-inner { grid-template-columns: 1fr auto; }
  .menu-button { display: block; }
  .hero { padding-top: 44px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual, .hero-visual svg { min-height: 300px; }
  .latest-grid { grid-template-columns: 1fr; }
  .article-list { grid-column: auto; grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-expanded { grid-template-columns: 1fr 1fr; }
  .footer-links { justify-content: flex-end; }
  .article-reading-layout { grid-template-columns: 1fr; gap: 34px; }
  .article-toc { position: static; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
  .article-toc a { display: inline-block; margin-right: 14px; }
}

@media (max-width: 560px) {
  .section-shell { padding: 52px 0; }
  .hero h1 { font-size: 50px; }
  .hero-actions .button { width: 100%; }
  .feature-image { min-height: 270px; }
  .whoop-band { width: 78%; transform: rotate(-6deg) scale(.9); }
  .article-list { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .category-card { min-height: 220px; }
  .about { padding-bottom: 72px; }
  .about-mark { font-size: 48px; }
  .footer-expanded { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; flex-wrap: wrap; }
  .search-overlay { padding: 76px 14px 14px; }
  .search-panel { padding: 30px 22px; }
  .search-panel h2 { font-size: 34px; }
  .article-title { font-size: 48px; }
  .article-visual { min-height: 300px; }
  .article-reading-layout { padding-top: 42px; }
  .article-body > p, .article-body section > p { font-size: 18px; }
  .article-lead { font-size: 19px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
