:root {
  --bg: #080a0d;
  --panel: #111419;
  --elevated: #181c23;
  --inset: #050608;
  --line: rgb(255 255 255 / 0.07);
  --line-strong: rgb(255 255 255 / 0.14);
  --text: #e8eaed;
  --dim: #9aa0a8;
  --faint: #5f6670;
  --accent: #e9a13b;
  --accent-dim: #8a6224;
  --green: #34d399;
  --red: #f87171;
  --sans: "Instrument Sans", ui-sans-serif, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 8%, rgb(233 161 59 / 0.07), transparent 28rem),
    linear-gradient(rgb(255 255 255 / 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.012) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 64px 64px, 64px 64px, auto;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 1000;
  padding: 9px 14px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--inset);
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

.wrap { width: min(1120px, calc(100% - 56px)); margin: 0 auto; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgb(8 10 13 / 0.9);
  backdrop-filter: blur(18px) saturate(1.35);
}
.nav-inner { height: 58px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 650; }
.brand-mark { flex: 0 0 auto; }
.journal-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.journal-label::before { content: ""; width: 1px; height: 24px; background: var(--line-strong); }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 24px; color: var(--dim); font-size: 12.5px; }
.nav-links a { transition: color .15s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-button {
  padding: 7px 13px;
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  background: rgb(233 161 59 / 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
  transition: background .15s ease;
}
.nav-button:hover { background: rgb(233 161 59 / 0.18); }

.progress-track { position: fixed; top: 57px; left: 0; right: 0; z-index: 101; height: 2px; }
.progress-bar { width: 0; height: 100%; background: var(--accent); box-shadow: 0 0 12px rgb(233 161 59 / 0.55); }

.article-hero { padding: clamp(76px, 11vw, 136px) 0 54px; }
.article-hero-inner { max-width: 930px; }
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.breadcrumb::before { content: ""; width: 7px; height: 7px; border: 1px solid currentColor; transform: rotate(45deg); }
.article-hero h1 {
  max-width: 920px;
  margin-top: 26px;
  font-size: clamp(46px, 7.4vw, 88px);
  font-weight: 700;
  letter-spacing: -.048em;
  line-height: .98;
}
.article-hero h1 em { color: var(--accent); font-style: normal; }
.dek { max-width: 710px; margin-top: 28px; color: var(--dim); font-size: clamp(18px, 2.2vw, 22px); line-height: 1.58; }
.byline-row { margin-top: 34px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.byline { color: var(--faint); font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; }
.byline strong { color: var(--text); font-weight: 500; }
.share-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--dim);
  font-size: 11.5px;
  font-weight: 600;
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.share-button:hover { color: var(--text); border-color: var(--accent-dim); transform: translateY(-1px); }

.round-trip {
  position: relative;
  overflow: hidden;
  margin: 18px auto 76px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(145deg, rgb(17 20 25 / 0.98), rgb(5 6 8 / 0.98));
  box-shadow: 0 36px 100px rgb(0 0 0 / 0.38);
}
.round-trip::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 67% 22%, rgb(233 161 59 / 0.08), transparent 28%);
}
.round-trip svg { display: block; width: 100%; height: auto; }
.round-trip figcaption {
  border-top: 1px solid var(--line);
  padding: 14px 22px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.65;
}

.article-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 720px) 1fr;
  gap: 52px;
  align-items: start;
  padding-bottom: 110px;
}
.article-aside { position: sticky; top: 96px; color: var(--faint); font-family: var(--mono); font-size: 9.5px; line-height: 1.7; }
.aside-rule { width: 32px; height: 1px; margin-bottom: 15px; background: var(--accent-dim); }
.aside-value { display: block; margin-top: 5px; color: var(--text); font-size: 14px; }
.aside-item + .aside-item { margin-top: 22px; }

.article-body { min-width: 0; color: #c8cbd0; font-size: 17px; }
.article-body > p { margin-bottom: 25px; }
.article-body > p:first-child::first-letter {
  float: left;
  margin: 10px 10px 0 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 64px;
  line-height: .68;
}
.article-body h2 {
  margin: 68px 0 23px;
  color: var(--text);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -.03em;
}
.article-body h3 { margin: 38px 0 15px; color: var(--text); font-size: 19px; }
.article-body strong { color: var(--text); font-weight: 620; }
.article-body a:not(.share-button) { color: var(--accent); border-bottom: 1px solid var(--accent-dim); }
.article-body blockquote {
  margin: 46px 0;
  padding: 6px 0 6px 26px;
  border-left: 2px solid var(--accent);
  color: var(--text);
  font-size: clamp(23px, 3.5vw, 32px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.35;
}
.article-body blockquote cite { display: block; margin-top: 12px; color: var(--faint); font-family: var(--mono); font-size: 9px; font-style: normal; font-weight: 400; letter-spacing: .11em; text-transform: uppercase; }

.r-definition {
  margin: 38px 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.r-symbol { color: var(--accent); font-family: var(--mono); font-size: 48px; font-weight: 600; line-height: 1; }
.r-definition p { color: var(--dim); font-size: 13.5px; }
.r-definition strong { display: block; margin-bottom: 5px; color: var(--text); font-size: 14px; }

.rule-table-wrap { margin: 34px 0 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.rule-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.rule-table th, .rule-table td { padding: 15px 17px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rule-table tr:last-child td { border-bottom: none; }
.rule-table th { color: var(--faint); font-size: 9px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; }
.rule-table td { color: var(--dim); }
.rule-table td:first-child { color: var(--text); }
.rule-table td:not(:first-child) { color: var(--accent); }
.table-note { margin-bottom: 27px; color: var(--faint); font-size: 11px; line-height: 1.65; }

.evidence-box {
  margin: 40px 0;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background:
    linear-gradient(110deg, rgb(233 161 59 / 0.07), transparent 42%),
    var(--inset);
}
.evidence-kicker { color: var(--accent); font-family: var(--mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.evidence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 18px; }
.evidence-stat { padding-left: 14px; border-left: 1px solid var(--accent-dim); }
.evidence-stat b { display: block; color: var(--text); font-family: var(--mono); font-size: 20px; font-weight: 500; }
.evidence-stat span { display: block; margin-top: 5px; color: var(--faint); font-size: 11px; line-height: 1.55; }
.evidence-disclaimer { margin-top: 20px; color: var(--faint); font-size: 10.5px; line-height: 1.65; }

.safety-list { margin: 30px 0 35px; list-style: none; counter-reset: safety; }
.safety-list li {
  counter-increment: safety;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 13px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}
.safety-list li:last-child { border-bottom: 1px solid var(--line); }
.safety-list li::before { content: "0" counter(safety); color: var(--accent); font-family: var(--mono); font-size: 10px; padding-top: 4px; }
.safety-list strong { display: block; margin-bottom: 3px; font-size: 15px; }
.safety-list span { color: var(--dim); font-size: 14px; }

.closing-question {
  margin-top: 68px;
  padding: 34px;
  border: 1px solid var(--accent-dim);
  border-radius: 14px;
  background: rgb(233 161 59 / 0.055);
}
.closing-question p { color: var(--text); font-size: clamp(21px, 3vw, 28px); font-weight: 600; line-height: 1.35; letter-spacing: -.02em; }
.closing-question .share-button { margin-top: 22px; background: var(--inset); }

.article-tail { align-self: end; color: var(--faint); font-family: var(--mono); font-size: 9px; line-height: 1.7; writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .13em; text-transform: uppercase; }

.risk-note { padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--inset); }
.risk-note p { max-width: 780px; color: var(--faint); font-size: 11px; line-height: 1.7; }
.risk-note strong { color: var(--dim); }

.site-footer { padding: 48px 0 64px; }
.footer-row { display: flex; align-items: center; gap: 16px; color: var(--faint); font-size: 11px; flex-wrap: wrap; }
.footer-row a:hover { color: var(--text); }
.footer-motto { margin-left: auto; font-family: var(--mono); }

/* Blog index */
.journal-hero { padding: clamp(82px, 13vw, 150px) 0 72px; border-bottom: 1px solid var(--line); }
.journal-hero h1 { max-width: 800px; margin-top: 20px; font-size: clamp(48px, 8vw, 92px); line-height: .98; letter-spacing: -.05em; }
.journal-hero p { max-width: 620px; margin-top: 26px; color: var(--dim); font-size: 18px; }
.posts { padding: 70px 0 110px; }
.post-card {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--panel);
  transition: border-color .2s ease, transform .2s ease;
}
.post-card:hover { transform: translateY(-3px); border-color: var(--accent-dim); }
.post-copy { padding: clamp(30px, 6vw, 60px); display: flex; flex-direction: column; align-items: flex-start; }
.post-meta { color: var(--accent); font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; }
.post-card h2 { max-width: 630px; margin-top: 20px; font-size: clamp(34px, 5vw, 56px); line-height: 1.03; letter-spacing: -.04em; }
.post-card p { max-width: 600px; margin-top: 20px; color: var(--dim); font-size: 15px; }
.read-link { margin-top: auto; padding-top: 34px; color: var(--accent); font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; }
.post-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(rgb(255 255 255 / 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.025) 1px, transparent 1px),
    var(--inset);
  background-size: 36px 36px;
}
.move-from, .move-to { font-family: var(--mono); font-size: clamp(28px, 4vw, 45px); font-weight: 600; }
.move-from { color: var(--green); }
.move-to { margin-top: 62px; align-self: flex-end; color: var(--red); }
.move-line { position: absolute; left: 35%; top: 35%; width: 42%; height: 1px; background: var(--accent-dim); transform: rotate(42deg); }
.move-line::after { content: ""; position: absolute; right: -1px; top: -4px; width: 8px; height: 8px; border-right: 1px solid var(--accent); border-bottom: 1px solid var(--accent); transform: rotate(-45deg); }

@media (max-width: 900px) {
  .article-grid { grid-template-columns: minmax(0, 720px); justify-content: center; }
  .article-aside, .article-tail { display: none; }
  .post-card { grid-template-columns: 1fr; }
  .post-visual { min-height: 260px; border-left: none; border-top: 1px solid var(--line); }
}

@media (max-width: 660px) {
  .wrap { width: min(100% - 40px, 1120px); }
  .nav-links { display: none; }
  .journal-label { font-size: 8.5px; }
  .nav-button { margin-left: auto; }
  .article-hero { padding-top: 66px; }
  .article-hero h1 { font-size: clamp(42px, 13vw, 62px); }
  .dek { font-size: 17px; }
  .round-trip { margin-bottom: 54px; border-radius: 12px; }
  .round-trip figcaption { padding: 12px 15px; }
  .article-body { font-size: 16px; }
  .article-body h2 { margin-top: 55px; }
  .r-definition { grid-template-columns: 1fr; }
  .evidence-grid { grid-template-columns: 1fr; }
  .closing-question { padding: 25px; }
  .footer-motto { width: 100%; margin-left: 0; }
  .post-visual { padding: 32px; }
}

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