
:root {
  --bg: #12110f;
  --bg-raise: #1b1916;
  --bg-soft: #24211c;
  --line: rgba(243, 236, 223, 0.14);
  --line-strong: rgba(243, 236, 223, 0.28);
  --bone: #f4eee4;
  --bone-dim: #cbbfae;
  --muted: #9c9082;
  --heat: #e36b45;
  --cold: #8ebfc8;
  --chemical: #d2a85a;
  --height: #d9d3cb;
  --restricted: #d08984;
  --ok: #b7c7a3;
  --danger: #e36b45;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --serif: "Fraunces", "Noto Serif SC", "Noto Serif TC", "Noto Naskh Arabic", "Times New Roman", serif;
  --sans: "Outfit", "Noto Sans", "Noto Sans SC", "Noto Sans TC", "Noto Sans JP", "Noto Sans KR", "Noto Sans Arabic", "Noto Sans Devanagari", "Noto Sans Hebrew", "Noto Sans Bengali", "Noto Sans Tamil", "Noto Sans Thai", "Segoe UI", sans-serif;
  --cjk-serif: "Noto Serif SC", "Noto Serif TC", "Fraunces", serif;
  --cjk-sans: "Noto Sans SC", "Noto Sans TC", "Noto Sans JP", "Noto Sans KR", "Outfit", sans-serif;
  --measure: 68ch;
  --pad: clamp(1.1rem, 3vw, 2.4rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html[data-reduce="1"] { scroll-behavior: auto; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(227, 107, 69, 0.08), transparent 55%),
    var(--bg);
  color: var(--bone);
  font-family: var(--sans);
  font-weight: 380;
  font-size: 1.05rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

html.cjk body {
  font-family: var(--cjk-sans);
  font-weight: 400;
}

img { max-width: 100%; display: block; }
button, a { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--heat); outline-offset: 3px; }
button { background: none; border: 0; cursor: pointer; }
a { text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--bone);
  color: #1a120c;
  padding: 0.6rem 0.9rem;
  z-index: 20;
}
.skip:focus { top: 1rem; }

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 40;
  background: transparent;
}
.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--heat), #f0c3a4);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--pad);
  background: rgba(18, 17, 15, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}
.nav.scrolled { border-bottom-color: var(--line); }

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  text-decoration: none;
  letter-spacing: 0.16em;
}
.brand strong {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.15rem;
  letter-spacing: 0.22em;
}
html.cjk .brand strong { font-family: var(--cjk-serif); letter-spacing: 0.18em; }
.brand span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.1rem;
}
.nav-links a {
  text-decoration: none;
  color: var(--bone-dim);
  font-size: 0.92rem;
}
.nav-links a:hover { color: var(--bone); }

.lang-pick {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.15rem 0.35rem 0.15rem 0.7rem;
  color: var(--bone);
}
.lang-geo {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--heat);
  min-width: 1.5rem;
}
.lang-pick select {
  appearance: none;
  background: transparent;
  color: var(--bone);
  border: 0;
  font: inherit;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  max-width: 8.6rem;
  padding: 0.28rem 1.15rem 0.28rem 0.15rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--bone-dim) 50%), linear-gradient(135deg, var(--bone-dim) 50%, transparent 50%);
  background-position: calc(100% - 0.55rem) 55%, calc(100% - 0.3rem) 55%;
  background-size: 0.28rem 0.28rem, 0.28rem 0.28rem;
  background-repeat: no-repeat;
}
.lang-pick select option { color: #1a120c; }
html[dir="rtl"] .lang-pick { padding: 0.15rem 0.7rem 0.15rem 0.35rem; }
html[dir="rtl"] .lang-pick select {
  padding: 0.28rem 0.15rem 0.28rem 1.15rem;
  background-position: 0.3rem 55%, 0.55rem 55%;
}
html[lang="ja"] body { font-family: "Noto Sans JP", var(--cjk-sans); }
html[lang="ko"] body { font-family: "Noto Sans KR", var(--cjk-sans); }
html[lang="zh-Hant"] body { font-family: "Noto Sans TC", var(--cjk-sans); }
html[lang="zh-Hant"] .brand strong,
html[lang="zh-Hant"] h1,
html[lang="zh-Hant"] h2,
html[lang="zh-Hant"] h3,
html[lang="zh-Hant"] .pull,
html[lang="zh-Hant"] .axis b,
html[lang="zh-Hant"] .index-card strong,
html[lang="zh-Hant"] td:first-child,
html[lang="zh-Hant"] .sheet a { font-family: "Noto Serif TC", "Noto Sans TC", serif; }
html[dir="rtl"] body { font-family: "Noto Sans Arabic", "Noto Naskh Arabic", "Noto Sans Hebrew", var(--sans); }
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] .pull { letter-spacing: 0; }

.menu-btn {
  display: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  color: var(--bone);
  letter-spacing: 0.04em;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  isolation: isolate;
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(18, 17, 15, 0.18) 0%, rgba(18, 17, 15, 0.18) 35%, rgba(18, 17, 15, 0.92) 100%),
    linear-gradient(90deg, rgba(18, 17, 15, 0.55), transparent 55%);
}
.hero-inner {
  padding: 0 var(--pad) 2.2rem;
  max-width: 1240px;
}
.kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  color: #f6e2d4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 1rem;
}
.kicker i {
  font-style: normal;
  color: var(--heat);
}
h1 {
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(3.4rem, 8.4vw, 7.6rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
  max-width: 11ch;
}
html.cjk h1 {
  font-family: var(--cjk-serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  max-width: 8em;
  line-height: 1.05;
}
h1 em {
  font-style: italic;
  font-weight: 500;
  color: #f2c7b6;
}
.dek {
  max-width: 46rem;
  font-size: 1.18rem;
  color: #f7f1e8;
  margin: 0 0 1.6rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.3rem;
}
.pill {
  border: 1px solid rgba(244, 238, 228, 0.28);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.82rem;
  color: var(--bone);
  background: rgba(18, 17, 15, 0.28);
}
.hero-caption {
  color: var(--bone-dim);
  font-size: 0.82rem;
  max-width: 46rem;
}
.hero-caption a { color: var(--bone); }

.shell { padding: 0 var(--pad); }
.wrap { max-width: 1180px; margin: 0 auto; }
.narrow { max-width: var(--measure); }

.intro {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 3rem;
  padding: 5.5rem 0 3rem;
  border-bottom: 1px solid var(--line);
}
.intro h2, .section-head h2, .chapter h2, .quiz h2 {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 0.8rem;
}
html.cjk .intro h2,
html.cjk .section-head h2,
html.cjk .chapter h2,
html.cjk .quiz h2,
html.cjk .dossier h3 {
  font-family: var(--cjk-serif);
  letter-spacing: -0.02em;
}
.eyebrow {
  color: var(--heat);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 0.8rem;
}
.intro p, .prose p { margin: 0 0 1rem; color: var(--bone-dim); }
.intro p strong, .prose strong { color: var(--bone); font-weight: 560; }

.axes {
  padding: 4rem 0 2rem;
}
.axis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.axis {
  border-top: 1px solid var(--line-strong);
  padding-top: 0.9rem;
}
.axis b {
  display: block;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 540;
  margin-bottom: 0.35rem;
}
html.cjk .axis b { font-family: var(--cjk-serif); font-size: 1.45rem; }
.axis p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
  padding-top: 3.5rem;
}
.section-head p { margin: 0; color: var(--muted); max-width: 36ch; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.3rem 0 1rem;
}
.filters button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  color: var(--bone-dim);
}
.filters button[aria-pressed="true"] {
  background: var(--bone);
  color: #1a120c;
  border-color: var(--bone);
}
.filter-count { color: var(--muted); font-size: 0.9rem; align-self: center; }

.index-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem 1.2rem;
  padding-bottom: 2rem;
}
.index-card {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 0.9rem;
  text-decoration: none;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
  align-items: center;
}
.index-card img {
  width: 7.2rem;
  height: 5.1rem;
  object-fit: cover;
  border-radius: 2px;
}
.index-card small {
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.index-card strong {
  display: block;
  font-family: var(--serif);
  font-weight: 540;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
html.cjk .index-card strong { font-family: var(--cjk-serif); font-size: 1.25rem; }
.index-card em { font-style: normal; color: var(--bone-dim); font-size: 0.92rem; }
.hidden-by-filter { display: none !important; }

.chapter {
  padding: 4.5rem 0 1rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: 4.5rem;
}
.chapter-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}
.chapter h2 {
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  margin: 0;
  max-width: 12ch;
}
.where { color: var(--muted); margin: 0.4rem 0 0; }
.tone {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
}
.chapter[data-tone="heat"] .tone { color: var(--heat); }
.chapter[data-tone="cold"] .tone { color: var(--cold); }
.chapter[data-tone="chemical"] .tone { color: var(--chemical); }
.chapter[data-tone="height"] .tone { color: var(--height); }
.chapter[data-tone="restricted"] .tone { color: var(--restricted); }

.bleed {
  margin: 0;
  position: relative;
}
.bleed img {
  width: 100%;
  max-height: 82vh;
  object-fit: cover;
  border-radius: 2px;
  cursor: zoom-in;
  background: #2a261f;
}
.bleed figcaption, .pair figcaption {
  color: var(--muted);
  font-size: 0.82rem;
  padding-top: 0.45rem;
}
.bleed figcaption a, .pair figcaption a { color: var(--bone-dim); }

.chapter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 0.7fr);
  gap: 2.5rem;
  padding: 1.6rem 0 0.4rem;
}
.prose p { font-size: 1.08rem; }
.pull {
  margin: 1.4rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 2px solid var(--heat);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.25;
  color: var(--bone);
  letter-spacing: -0.03em;
}
html.cjk .pull { font-family: var(--cjk-serif); letter-spacing: -0.02em; }
.chapter[data-tone="cold"] .pull { border-color: var(--cold); }
.chapter[data-tone="chemical"] .pull { border-color: var(--chemical); }
.chapter[data-tone="height"] .pull { border-color: var(--height); }
.chapter[data-tone="restricted"] .pull { border-color: var(--restricted); }
.chapter[data-tone="cold"] .track span { background: var(--cold); }
.chapter[data-tone="chemical"] .track span { background: var(--chemical); }
.chapter[data-tone="heat"] .track span { background: var(--heat); }
.chapter[data-tone="restricted"] .track span { background: var(--restricted); }
@media (min-width: 981px) {
  .sticky-col { position: sticky; top: 5.5rem; align-self: start; }
}

.dossier {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem 1rem 0.4rem;
  align-self: start;
  position: sticky;
  top: 4.6rem;
}
.dossier h3 {
  font-family: var(--serif);
  font-weight: 540;
  margin: 0 0 0.8rem;
  font-size: 1.25rem;
}
.meter { margin-bottom: 0.75rem; }
.meter .row {
  display: flex;
  justify-content: space-between;
  color: var(--bone-dim);
  font-size: 0.86rem;
}
.track {
  height: 3px;
  background: rgba(244, 238, 228, 0.12);
  margin-top: 0.28rem;
}
.track span { display: block; height: 100%; background: var(--bone); }
.facts { list-style: none; padding: 0.4rem 0 0.6rem; margin: 0.4rem 0 0; border-top: 1px solid var(--line); }
.facts li {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.facts span { color: var(--muted); }

.pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin: 1.2rem 0 0.6rem;
}
.pair figure { margin: 0; }
.pair img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: cover;
  cursor: zoom-in;
  background: #2a261f;
}

.refused {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1rem 0 3rem;
}
.refused article {
  border-top: 1px solid var(--line-strong);
  padding-top: 1rem;
}
.refused h3 {
  font-family: var(--serif);
  font-weight: 540;
  font-size: 1.8rem;
  margin: 0 0 0.6rem;
  letter-spacing: -0.03em;
}
html.cjk .refused h3 { font-family: var(--cjk-serif); }
.refused p { color: var(--bone-dim); margin: 0; }

.table-wrap { overflow-x: auto; padding-bottom: 3rem; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
th, td {
  text-align: left;
  padding: 0.8rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--muted);
  font-weight: 480;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
td { color: var(--bone-dim); }
td:first-child { color: var(--bone); font-family: var(--serif); font-size: 1.15rem; }
html.cjk td:first-child { font-family: var(--cjk-serif); }

.quiz { padding: 1rem 0 4rem; }
.q-card {
  border: 1px solid var(--line);
  padding: clamp(1.2rem, 3vw, 2rem);
  background: var(--bg-raise);
  min-height: 22rem;
}
.q-card h3 {
  font-family: var(--serif);
  font-weight: 540;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0.4rem 0 1.2rem;
}
html.cjk .q-card h3 { font-family: var(--cjk-serif); }
.choices { display: grid; gap: 0.55rem; }
.choices button {
  text-align: left;
  border: 1px solid var(--line);
  padding: 0.75rem 0.9rem;
  border-radius: 2px;
  color: var(--bone);
}
.choices button:hover { border-color: var(--bone-dim); }
.choices button.good { border-color: var(--ok); background: rgba(183, 199, 163, 0.08); }
.choices button.bad { border-color: var(--heat); background: rgba(227, 107, 69, 0.08); }
.feedback { color: var(--bone-dim); min-height: 3.2rem; margin: 0.9rem 0; }
.q-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.q-nav button[disabled] { opacity: 0.4; cursor: default; }
.next-btn, .restart-btn {
  border: 1px solid var(--bone);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
}

.sources { padding-bottom: 4rem; }
.sources ol { color: var(--bone-dim); padding-left: 1.2rem; }
.sources a { color: var(--bone); }
.sources li { margin: 0.45rem 0; }

.colophon {
  border-top: 1px solid var(--line);
  padding: 1.4rem var(--pad) 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 7, 6, 0.92);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1200px, 92vw); max-height: 86vh; object-fit: contain; }
.lightbox button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--bone);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
}

.rail {
  position: fixed;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  z-index: 15;
}
.rail a {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: 1px solid var(--bone-dim);
  text-indent: -999px;
  overflow: hidden;
}
.rail a.active { background: var(--heat); border-color: var(--heat); }

.sheet {
  position: fixed;
  inset: 0;
  background: #12110f;
  z-index: 35;
  padding: 5rem var(--pad) 2rem;
  display: none;
  overflow: auto;
}
.sheet.open { display: block; }
.sheet a {
  display: block;
  text-decoration: none;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  letter-spacing: -0.03em;
}
html.cjk .sheet a { font-family: var(--cjk-serif); }

@media (max-width: 980px) {
  .intro, .chapter-grid, .refused, .pair, .index-grid { grid-template-columns: 1fr; }
  .axis-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .dossier { position: static; }
  .rail { display: none; }
  .facts li { grid-template-columns: 6.2rem 1fr; }
  h1 { max-width: none; }
}

@media (max-width: 640px) {
  .axis-grid { grid-template-columns: 1fr; }
  .index-card { grid-template-columns: 5.4rem 1fr; }
  .index-card img { width: 5.4rem; height: 4rem; }
  .hero { min-height: 92svh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

