/* Cerita Malaysia — warm-paper reading theme, phone first.
   The body type is deliberately large and serif: most readers arrive on a
   phone and are being asked to read long-form history, not skim a feed. */

:root {
  --paper:      #faf6ef;
  --paper-2:    #f2ebdf;
  --ink:        #21201c;
  --ink-soft:   #57534a;
  --ink-faint:  #8b8479;
  --line:       #e0d7c6;
  --gold:       #a8762c;
  --gold-soft:  #c9a34f;
  --deep:       #1f3a34;
  --red:        #a33224;
  --radius:     10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
           "Songti SC", "Noto Serif CJK SC", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
           "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:     #14140f;
    --paper-2:   #1c1b16;
    --ink:       #ece6da;
    --ink-soft:  #b2ab9c;
    --ink-faint: #857e70;
    --line:      #33312a;
    --gold:      #d3a552;
    --gold-soft: #a8823c;
    --deep:      #8fbdb0;
    --red:       #e0705d;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

a { color: inherit; }

.wrap        { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 680px;  margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: -9999px;
}

/* ---------------------------------------------------------------- header */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex; align-items: center; gap: 16px;
  height: 58px;
}

.brand {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; font-weight: 600; letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-mark { color: var(--gold); font-size: 1.1em; }
.brand-name { font-size: 1.02rem; }

.nav {
  display: flex; gap: 18px; margin-left: auto;
  font-size: 0.92rem;
}
.nav a {
  text-decoration: none; color: var(--ink-soft);
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--gold); }

.lang { display: flex; gap: 2px; margin-left: 8px; }
.lang-btn {
  display: inline-block; padding: 4px 9px;
  font-size: 0.8rem; font-weight: 500;
  text-decoration: none; color: var(--ink-faint);
  border: 1px solid transparent; border-radius: 6px;
}
.lang-btn:hover { color: var(--ink); background: var(--paper-2); }
.lang-btn.on {
  color: var(--gold); border-color: var(--line); background: var(--paper-2);
}

@media (max-width: 640px) {
  .head-inner { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 14px; font-size: 0.86rem; }
  .lang { margin-left: auto; }
}

/* ------------------------------------------------------------------ hero */

.hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1200px 320px at 50% -120px,
      color-mix(in srgb, var(--gold) 12%, transparent), transparent);
}
.hero-kicker {
  margin: 0 0 14px; color: var(--gold);
  font-size: 0.9rem; letter-spacing: 0.04em; text-transform: none;
}
.hero-title {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.08; letter-spacing: -0.02em; font-weight: 600;
}
.hero-lede {
  margin: 0 0 28px; max-width: 46ch;
  color: var(--ink-soft); font-size: 1.02rem;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 11px 20px; border-radius: var(--radius);
  text-decoration: none; font-size: 0.95rem; font-weight: 500;
  border: 1px solid transparent; transition: transform .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--deep); color: var(--paper); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #14140f; } }
.btn-ghost { border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { color: var(--ink); border-color: var(--gold-soft); }

/* ------------------------------------------------------- turning points */

.turning-index {
  padding: 24px 0;
  background: var(--deep);
  color: var(--paper);
}
.turning-index-inner {
  display: grid;
  grid-template-columns: minmax(130px, 0.25fr) 1fr;
  gap: 22px;
  align-items: center;
}
.turning-index h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0;
}
.turning-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 8px;
}
.turning-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  border: 2px solid transparent;
  border-radius: 5px;
  color: #17211d;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}
.turning-link:hover { transform: translateY(-2px); border-color: #fffdf5; }
.turning-link--milestone { background: #ffd83d; }
.turning-link--rupture { background: #f06a57; color: #28110e; }
.turning-link-date {
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
}
.turning-link-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}
@media (max-width: 640px) {
  .turning-index-inner { grid-template-columns: 1fr; gap: 12px; }
  .turning-links { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
  .turning-links { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ eras */

.era { padding: 52px 0; border-bottom: 1px solid var(--line); }
.era:last-of-type { border-bottom: 0; }

.era-head { max-width: 640px; margin-bottom: 28px; }
.era-years {
  font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.12em;
  color: var(--gold); margin-bottom: 8px;
}
.era-title {
  margin: 0 0 10px; font-family: var(--serif);
  font-size: clamp(1.5rem, 3.6vw, 2.05rem); font-weight: 600;
  letter-spacing: -0.01em; line-height: 1.2;
}
.era-blurb { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.era-empty {
  color: var(--ink-faint); font-size: 0.92rem; font-style: italic;
  padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius);
}

.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}

.read-controls {
  display: flex;
  justify-content: flex-end;
  margin: 28px 0 -18px;
}
.read-controls-route {
  justify-content: flex-start;
  margin: 0 0 18px;
}
.read-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  color: var(--ink-soft);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.84rem;
  cursor: pointer;
  user-select: none;
}
.read-toggle:hover { border-color: var(--gold-soft); color: var(--ink); }
.read-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--deep);
}

.card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px; text-decoration: none;
  background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--gold-soft); transform: translateY(-2px); }
.card.done:not(.card-turning) {
  border-color: color-mix(in srgb, var(--deep) 48%, var(--line));
  background: color-mix(in srgb, var(--deep) 5%, var(--paper-2));
}
.card.done:not(.card-turning):hover { border-color: var(--deep); }
.card-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.74rem; letter-spacing: 0.06em; color: var(--ink-faint);
}
.card-top .genre { color: var(--gold); }
.card-title {
  margin: 0; font-family: var(--serif); font-size: 1.16rem;
  line-height: 1.28; font-weight: 600;
}
.card-sub { margin: 0; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.45; }
.card-foot {
  margin-top: auto; padding-top: 8px;
  display: flex; gap: 12px; font-size: 0.76rem; color: var(--ink-faint);
}

.card-turning {
  border-width: 2px;
  color: #17211d;
  box-shadow: 0 5px 0 var(--turning-edge);
  transform: translateY(-2px);
}
.card-turning:hover {
  border-color: var(--turning-edge);
  box-shadow: 0 7px 0 var(--turning-edge);
  transform: translateY(-4px);
}
.card-turning--milestone {
  --turning-edge: #176c5a;
  background: #ffd83d;
  border-color: var(--turning-edge);
}
.card-turning--rupture {
  --turning-edge: #7b201c;
  background: #f06a57;
  border-color: var(--turning-edge);
  color: #28110e;
}
.card-turning .card-top,
.card-turning .card-foot,
.card-turning .card-top .genre,
.card-turning .card-sub {
  color: currentColor;
}
.card-turning.done {
  border-color: color-mix(in srgb, var(--deep) 72%, #fffdf5);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--deep) 72%, #fffdf5);
}
.is-hidden-read { display: none !important; }
.turning-date {
  align-self: flex-start;
  padding: 4px 8px;
  background: #fffdf5;
  border: 1px solid currentColor;
  border-radius: 3px;
  color: #171713;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0;
}

.alsosee { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 14px; }
.alsosee a { font-size: 0.85rem; color: var(--ink-soft); text-decoration: none; }
.alsosee a:hover { color: var(--gold); }

/* --------------------------------------------------------------- article */

.page-head { padding: 52px 0 8px; }
.page-head h1 {
  margin: 0 0 12px; font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.15; letter-spacing: -0.02em;
}
.lede { color: var(--ink-soft); margin: 0 0 20px; }

.art-head { padding: 48px 0 4px; }
.art-meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 16px;
}
.art-era { color: var(--gold); text-decoration: none; }
.art-era:hover { text-decoration: underline; }
.art-sep { opacity: .5; }
.art-title {
  margin: 0 0 14px; font-family: var(--serif); font-weight: 600;
  font-size: clamp(2rem, 6vw, 3rem); line-height: 1.12; letter-spacing: -0.022em;
}
.art-sub {
  margin: 0 0 20px; color: var(--ink-soft);
  font-family: var(--serif); font-size: 1.16rem; line-height: 1.5; font-style: italic;
}
.art-facts {
  display: flex; gap: 16px; font-size: 0.8rem; color: var(--ink-faint);
  padding-bottom: 22px; border-bottom: 1px solid var(--line);
}
.draft-flag {
  margin: 16px 0 0; padding: 8px 12px; border-radius: 6px;
  background: color-mix(in srgb, var(--red) 12%, transparent);
  color: var(--red); font-size: 0.84rem;
}

/* ----------------------------------------------------------------- prose */

.prose {
  font-family: var(--serif);
  font-size: 1.14rem;
  line-height: 1.78;
  padding: 30px 20px 10px;
}
.prose p { margin: 0 0 1.15em; }
.prose h2 {
  margin: 2.1em 0 .6em; font-size: 1.5rem; font-weight: 600;
  line-height: 1.25; letter-spacing: -0.012em;
}
.prose h3 { margin: 1.8em 0 .5em; font-size: 1.22rem; font-weight: 600; }
.prose h4 { margin: 1.6em 0 .4em; font-size: 1.06rem; font-weight: 600; color: var(--ink-soft); }
.prose a { color: var(--gold); text-underline-offset: 3px; }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.35em; }
.prose li { margin-bottom: .4em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .88em; background: var(--paper-2); padding: 1px 5px; border-radius: 4px;
}

.prose blockquote {
  margin: 1.6em 0; padding: 2px 0 2px 20px;
  border-left: 3px solid var(--gold-soft);
  color: var(--ink-soft); font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 1.6em 0; }
.prose table {
  width: 100%; border-collapse: collapse;
  font-family: var(--sans); font-size: 0.92rem;
}
.prose th, .prose td {
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose th { font-weight: 600; color: var(--ink-soft); background: var(--paper-2); }

/* ------------------------------------------------- citation superscripts */

/* The reference number sits at the tail of the claim it backs, and links
   straight down to the full source entry. */
sup.cite {
  font-family: var(--sans);
  font-size: 0.62em;
  font-weight: 600;
  line-height: 0;
  margin-left: 2px;
  white-space: nowrap;
  vertical-align: super;
}
sup.cite a {
  color: var(--gold);
  text-decoration: none;
  padding: 0 1px;
}
sup.cite a:hover { text-decoration: underline; }
sup.cite .cite-sep { color: var(--ink-faint); }

/* ---------------------------------------------------- penilaian (verdict) */

.penilaian {
  margin: 2.2em 0;
  padding: 20px 22px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--deep);
  border-radius: var(--radius);
}
.penilaian-tag {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--deep); margin-bottom: 10px;
}
.penilaian p { margin: 0; font-size: 1.04rem; line-height: 1.7; }

/* ------------------------------------------- ringkas (plain-language map) */

.ringkas {
  margin: 2.2em 0;
  padding: 20px 22px;
  background: color-mix(in srgb, var(--gold) 7%, var(--paper));
  border: 1px solid var(--gold-soft);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
}
.ringkas-tag {
  font-family: var(--sans); font-size: 0.76rem; font-weight: 700;
  color: var(--deep); margin-bottom: 12px;
}
.ringkas p { margin: 0; font-size: 1rem; line-height: 1.72; }
.ringkas p + p {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--gold) 22%, transparent);
}

/* ----------------------------------------------------------- quran block */

.quran {
  margin: 2.4em 0; padding: 24px 24px 18px;
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--gold) 6%, transparent);
}
.quran-text {
  margin: 0 0 14px; padding: 0; border: 0;
  font-style: normal; color: var(--ink);
}
.quran-text p {
  margin: 0; font-size: 1.14rem; line-height: 1.85;
}
.quran figcaption { font-family: var(--sans); }
.quran-ref {
  font-size: 0.86rem; font-weight: 600; color: var(--gold);
  padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
}
.quran-tr { font-weight: 400; color: var(--ink-faint); }
.quran-konteks {
  margin-top: 8px; font-size: 0.88rem; line-height: 1.6; color: var(--ink-soft);
}
.quran-konteks .k-label { font-weight: 600; color: var(--ink); }

/* ------------------------------------------------- kelas / vr (the frame) */

/* The classroom and the headset must never be mistaken for each other, or the
   whole device fails: one is where opinions are allowed, the other is where
   only sourced facts are. Light paper vs. dark glass carries that at a glance. */

.skrip { margin: 2.2em 0; border-radius: var(--radius); }
.skrip .ucap, .skrip .lakon { margin: 0 0 .75em; }
.skrip > :last-child { margin-bottom: 0; }
.skrip .nama {
  font-family: var(--sans); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.04em; display: block; margin-bottom: 2px;
}
.skrip .kata { display: block; }

/* the classroom, 2057 */
.kelas {
  padding: 20px 22px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-soft);
}
.kelas .nama  { color: var(--gold); }
.kelas .kata  { font-size: 1.02rem; line-height: 1.75; }
.kelas .lakon { color: var(--ink-soft); font-size: 0.96rem; line-height: 1.7; }

/* inside the headset */
.vr {
  padding: 18px 22px 22px;
  background: #12202b;
  border: 1px solid #24384a;
  color: #dbe6ef;
}
.vr .lakon { color: #9fb3c4; font-size: 0.98rem; line-height: 1.7; }
.vr .kata  { font-size: 1.02rem; line-height: 1.75; }
.vr .nama  { color: #7fb0d6; }
.vr a      { color: #8ecbff; }
.vr sup.cite a { color: #8ecbff; }
.vr sup.cite .cite-sep { color: #6d8496; }

.vr-bar {
  font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: #6d8496;
  padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 1px solid #24384a;
  display: flex; gap: 12px; flex-wrap: wrap;
}
.vr-label  { color: #7fb0d6; font-weight: 600; }
.vr-tahun  { color: #dbe6ef; }
.vr-tempat { color: #9fb3c4; }

/* the classroom assistant: a machine that runs the room. Reads as machine, but
   plainly not the fact layer — it has no authority over what is true. */
.mesin .nama { color: var(--gold); letter-spacing: .08em; }
.mesin .kata {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9rem; color: var(--ink-soft);
}
.vr .mesin .nama { color: #c9a34f; }
.vr .mesin .kata { color: #b9cad8; }

/* the system narrator: it states only what a source backs, and reads like a
   machine so it can never be mistaken for a person with a view */
.vr .sejarah .nama { color: #6d8496; }
.vr .sejarah .kata {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92rem; line-height: 1.7; color: #b9cad8;
}

/* a reconstructed line is an inference. The tag is deliberately loud — it is
   the whole defence against "this site invents historical quotations". */
.avatar .nama { font-style: italic; }
.rekon-tag {
  display: inline-block; margin-bottom: 4px;
  font-family: var(--sans); font-size: 0.64rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #2a1a05; background: #e08c22;
  padding: 2px 7px; border-radius: 3px;
}
.rekon .kata { border-left: 2px solid #e08c22; padding-left: 10px; }
/* merged speaker blocks: same speaker talks multiple consecutive lines.
   The name label appears once; each line is its own paragraph beneath it.
   Single-line speakers still use the original <p class="ucap"> path unchanged. */
.ucap-blok { display: block; }
.ucap-blok .ucap-linii { margin-top: 0; }
.ucap-blok .ucap-baris { margin: 0 0 0.45em; }
.ucap-blok .ucap-baris:last-child { margin-bottom: 0; }
.ucap-blok .ucap-baris .kata { display: block; }
/* rekonstruksi per-line inside a merged block: border on the kata span, not the outer p */
.ucap-blok .ucap-baris.rekon .kata { border-left: 2px solid #e08c22; padding-left: 10px; }

/* ------------------------------------------------------------- gambar */

/* The credit sits under the picture, not in a footnote. A reader has to be able
   to see who made an image and under what licence without leaving the page. */

.gambar { margin: 2.2em 0; }
.gambar img {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--paper-2);
}
.gambar figcaption { margin-top: 10px; font-family: var(--sans); }
.gambar-kapsyen {
  font-size: 0.88rem; line-height: 1.6; color: var(--ink-soft);
}
.gambar-kredit {
  margin-top: 5px; font-size: 0.74rem; color: var(--ink-faint);
  display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline;
}
.gambar-kredit a { color: var(--ink-faint); text-underline-offset: 2px; }
.gambar-kredit a:hover { color: var(--gold); }
.gambar-lesen {
  border: 1px solid var(--line); border-radius: 3px;
  padding: 0 5px; letter-spacing: .02em;
}

/* --------------------------------------------------------------- video */

.video { margin: 2.2em 0; }
.video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--paper-2);
}
.video-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.video figcaption { margin-top: 10px; font-family: var(--sans); }
.video-kapsyen {
  font-size: 0.88rem; line-height: 1.6; color: var(--ink-soft);
}
.video-kredit {
  margin-top: 5px; font-size: 0.74rem; color: var(--ink-faint);
}
.video-kredit a { color: var(--ink-faint); text-underline-offset: 2px; }
.video-kredit a:hover { color: var(--gold); }

/* ---------------------------------------- machine-translation banner */

.mt-banner {
  margin: 0 0 1.6em; padding: 12px 16px;
  background: color-mix(in srgb, #e08c22 12%, transparent);
  border: 1px solid color-mix(in srgb, #e08c22 45%, transparent);
  border-radius: var(--radius);
  font-family: var(--sans); font-size: 0.84rem; line-height: 1.6;
  color: var(--ink-soft);
}
.mt-banner strong { color: var(--ink); font-weight: 600; }
.mt-banner a { color: var(--gold); }

/* --------------------------------------------------------------- sources */

.sources { padding: 28px 20px 10px; margin-top: 24px; border-top: 1px solid var(--line); }

/* ------------------------------------------------------ folded panels */

/* Both the evidence and the AI disclosure sit behind a tap. Most readers never
   open either; the reader who came to check us has to be able to, in one move. */

.disclose {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
}
.disclose[open] { background: transparent; }

.disclose-head {
  list-style: none; cursor: pointer;
  padding: 14px 16px;
  font-family: var(--sans); font-size: 0.92rem; font-weight: 600;
  color: var(--ink);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.disclose-head::-webkit-details-marker { display: none; }
.disclose-head::before {
  content: "▸"; color: var(--gold); font-size: 0.8rem;
  transition: transform .15s ease; display: inline-block;
}
.disclose[open] > .disclose-head::before { transform: rotate(90deg); }
.disclose-head:hover { color: var(--gold); }
.disclose-head:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

.disclose-count {
  font-size: 0.74rem; font-weight: 700; letter-spacing: .04em;
  color: var(--paper); background: var(--gold);
  padding: 1px 8px; border-radius: 20px;
}
.disclose-note {
  flex: 1 1 100%;
  font-weight: 400; font-size: 0.8rem; color: var(--ink-faint);
  padding-left: 22px;
}
.disclose > :not(.disclose-head) { padding-left: 16px; padding-right: 16px; }
.disclose > :last-child { padding-bottom: 16px; }

.disclose-ai .ai-notice { margin: 0; border: 0; background: none; padding-top: 0; }

.src-head {
  margin: 0 0 6px; font-family: var(--serif); font-size: 1.3rem; font-weight: 600;
}
.src-note { margin: 0 0 18px; font-size: 0.84rem; color: var(--ink-faint); }
.src-list { margin: 0; padding-left: 1.5em; }
.src {
  margin-bottom: 18px; font-size: 0.9rem; line-height: 1.55; color: var(--ink-soft);
  scroll-margin-top: 76px;
}
.src:target {
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  border-radius: 5px; padding: 8px 10px; margin-left: -10px;
}
.src-main { display: block; }

/* A citation the reader cannot follow is only decoration, so the whole
   reference is a link — to the document itself where one exists, otherwise to
   a search for the work. */
a.src-ref { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
a.src-ref:hover { color: var(--ink); border-bottom-color: var(--gold); }

.src-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 6px; font-size: 0.78rem;
}
.src-go {
  color: var(--gold); text-decoration: none; font-weight: 500; white-space: nowrap;
}
.src-go:hover { text-decoration: underline; }
.src-hint { color: var(--ink-faint); font-style: italic; }
.src-acc { color: var(--ink-faint); }
.src-flag {
  color: var(--ink-faint); text-decoration: none; margin-left: auto;
  border-bottom: 1px dotted var(--ink-faint); white-space: nowrap;
}
.src-flag:hover { color: var(--red); border-bottom-color: var(--red); }

/* --------------------------------------------- AI disclosure / check-us box */

/* Stating the failure mode plainly is what makes the clickable sources mean
   something — the reader is being asked to audit, not to trust. */
.ai-notice {
  margin: 28px 0 8px; padding: 20px 22px;
  border: 1px solid var(--gold-soft); border-radius: var(--radius);
  background: color-mix(in srgb, var(--gold) 7%, transparent);
}
.ai-notice h3 {
  margin: 0 0 10px; font-family: var(--sans);
  font-size: 0.98rem; font-weight: 600; color: var(--ink); line-height: 1.4;
}
.ai-notice p {
  margin: 0 0 16px; font-family: var(--sans);
  font-size: 0.88rem; line-height: 1.65; color: var(--ink-soft);
}
.ai-notice .btn { font-size: 0.86rem; padding: 9px 16px; }
.ai-notice-lg { margin: 8px 0 32px; }
.ai-notice-lg p { margin-bottom: 0; font-size: 0.92rem; }

.nav-verify { color: var(--gold) !important; }

/* ------------------------------------------------------ correction form */

.banner {
  padding: 14px 18px; border-radius: var(--radius); margin: 0 0 24px;
  font-size: 0.92rem; line-height: 1.55;
}
.banner-ok {
  background: color-mix(in srgb, var(--deep) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--deep) 40%, transparent); color: var(--ink);
}
.banner-err {
  background: color-mix(in srgb, var(--red) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--red) 40%, transparent); color: var(--ink);
}

.report {
  margin: 8px 0 64px; padding: 24px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2);
}
.report-head {
  margin: 0 0 6px; font-family: var(--serif); font-size: 1.3rem; font-weight: 600;
}
.report-ctx {
  margin: 0 0 18px; font-size: 0.86rem; color: var(--ink-soft);
  padding: 8px 12px; border-radius: 6px;
  background: color-mix(in srgb, var(--gold) 10%, transparent);
}
.report label { display: block; margin-bottom: 16px; }
.report .lbl {
  display: block; margin-bottom: 6px;
  font-size: 0.84rem; font-weight: 500; color: var(--ink-soft);
}
.report input[type=email], .report textarea, .report select {
  width: 100%; padding: 10px 12px;
  font-family: inherit; font-size: 0.94rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 7px;
}
.report textarea { resize: vertical; line-height: 1.6; }
.report input:focus, .report textarea:focus, .report select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent);
}
.report button { cursor: pointer; font-family: inherit; }

.admin-entry {
  margin: -6px 0 18px;
  text-align: right;
  font-size: 0.82rem;
}
.admin-entry a {
  color: var(--ink-faint);
  text-decoration: none;
  border-bottom: 1px dotted var(--ink-faint);
}
.admin-entry a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.admin-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.88rem;
}
.admin-meta a { color: var(--ink-soft); text-decoration: none; }
.admin-meta a:hover { color: var(--gold); }
.report-list { display: grid; gap: 14px; margin: 0 0 64px; }
.report-row {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
}
.report-row-top,
.report-target {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.report-row-top {
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--ink-faint);
  font-size: 0.78rem;
}
.report-kind {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
}
.report-target {
  margin-bottom: 10px;
  font-size: 0.9rem;
}
.report-target a {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.05rem;
  text-decoration: none;
}
.report-target a:hover { color: var(--gold); }
.report-target b {
  font-size: 0.72rem;
  color: var(--ink-faint);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.report-message {
  margin: 0;
  white-space: pre-wrap;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.65;
}
.report-contact {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
}
.report-contact a { color: var(--gold); }
.admin-empty {
  margin: 24px 0 64px;
  color: var(--ink-soft);
}

/* Honeypot — off-screen rather than display:none, which some bots detect. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.src-tier {
  display: inline-block; font-family: var(--sans); font-size: 0.66rem;
  font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px; margin-right: 8px;
  vertical-align: 1px; white-space: nowrap;
}
.tier-primary    { background: color-mix(in srgb, var(--deep) 18%, transparent); color: var(--deep); }
.tier-scholarly  { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold); }
.tier-journalism { background: var(--paper-2); color: var(--ink-soft); }
.tier-secondary  { background: var(--paper-2); color: var(--ink-faint); }
.src-link { color: var(--gold); text-decoration: none; margin-left: 4px; }
.src-acc { color: var(--ink-faint); font-size: 0.82em; }

/* ----------------------------------------------------------- related read */

.related-reading {
  margin-top: 34px;
  padding: 30px 20px 12px;
  border-top: 1px solid var(--line);
}
.related-reading-head { margin-bottom: 16px; }
.related-kicker {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}
.related-reading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.related-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--deep);
  border-radius: 6px;
  transition: transform 140ms ease, border-color 140ms ease;
}
.related-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.related-era { color: var(--deep); font-size: 0.76rem; font-weight: 750; }
.related-card strong { font-family: var(--serif); font-size: 1rem; line-height: 1.35; }
.related-subtitle { color: var(--ink-soft); font-size: 0.84rem; line-height: 1.45; }

/* ------------------------------------------------------------- prev/next */

.art-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 18px; padding: 30px 20px 60px;
  border-top: 1px solid var(--line);
}
.pn {
  display: flex; flex-direction: column; gap: 5px;
  min-height: 104px; justify-content: center;
  padding: 17px 18px; text-decoration: none;
  border: 2px solid var(--deep); border-radius: var(--radius);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pn:hover { transform: translateY(-2px); }
.pn-prev { background: var(--paper-2); }
.pn-prev:hover { box-shadow: 0 4px 0 var(--deep); }
.pn-next {
  --pn-edge: #176c5a;
  background: #ffd83d;
  border-color: var(--pn-edge);
  box-shadow: 0 4px 0 var(--pn-edge);
  color: #17211d;
  text-align: right;
}
.pn-next:hover { box-shadow: 0 6px 0 var(--pn-edge); }
.pn-empty { border: 0; background: none; }
.pn-label { font-size: 0.82rem; color: var(--deep); font-weight: 750; letter-spacing: 0; }
.pn-next .pn-label { color: currentColor; }
.pn-title { font-family: var(--serif); font-size: 1.04rem; line-height: 1.35; font-weight: 600; }
@media (max-width: 560px) {
  .related-grid { grid-template-columns: 1fr; }
  .art-nav { grid-template-columns: 1fr; }
  .pn-next { grid-row: 1; }
  .pn-prev { grid-row: 2; }
  .pn-empty { display: none; }
}

/* ------------------------------------------------------- reading path */

.route-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 0 0 22px;
}
.route-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-2);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.2;
}
.route-chip:hover { border-color: var(--gold-soft); }
.route-chip.on {
  border-color: var(--deep);
  box-shadow: inset 3px 0 0 var(--deep);
}
.route-chip b {
  flex: 0 0 auto;
  color: var(--ink-faint);
  font-size: 0.78rem;
  font-weight: 700;
}

.progress { margin: 8px 0 28px; }
.progress-bar {
  height: 6px; background: var(--paper-2); border-radius: 99px; overflow: hidden;
  border: 1px solid var(--line);
}
.progress-bar span {
  display: block; height: 100%; width: 0;
  background: var(--gold); transition: width .35s ease;
}
.progress-text {
  display: flex; justify-content: space-between; align-items: center;
  margin: 8px 0 0; font-size: 0.84rem; color: var(--ink-soft);
}
.linkish {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--ink-faint); font-size: 0.82rem; text-decoration: underline;
  font-family: inherit;
}
.linkish:hover { color: var(--gold); }

.route-section {
  margin: 0 0 44px;
  padding-top: 14px;
  scroll-margin-top: 24px;
}
.route-section-head {
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.route-section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.2;
}
.route-section-head p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}
.route-section-head .route-count {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.path { list-style: none; margin: 0 0 20px; padding: 0; }
.path-item { border-bottom: 1px solid var(--line); }
.path-item.done {
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--deep) 58%, var(--line));
}
.path-item a {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 16px 6px; text-decoration: none;
}
.path-item a:hover { background: var(--paper-2); }
.path-n {
  flex: 0 0 auto; width: 30px; text-align: right;
  font-family: var(--sans); font-size: 0.86rem; color: var(--ink-faint);
  padding-top: 3px;
}
.path-body { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; }
.path-title { font-family: var(--serif); font-size: 1.08rem; line-height: 1.35; }
.path-sub { font-size: 0.88rem; color: var(--ink-soft); }
.path-meta { font-size: 0.76rem; color: var(--ink-faint); margin-top: 2px; }
.path-tick {
  flex: 0 0 auto; color: var(--gold); opacity: 0; font-size: 0.95rem; padding-top: 3px;
}
.path-item.done .path-tick { opacity: 1; }
.path-item.done .path-title { color: var(--ink-soft); }
.related-card.done {
  border-color: color-mix(in srgb, var(--deep) 55%, var(--line));
  background: color-mix(in srgb, var(--deep) 5%, var(--paper-2));
}

@media (max-width: 560px) {
  .route-picker { grid-template-columns: 1fr; }
  .route-chip { min-height: 48px; }
  .route-section-head h2 { font-size: 1.28rem; }
}

/* ---------------------------------------------------------------- footer */

.site-foot {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding: 40px 0 56px;
  margin-top: 40px;
}
.foot-note {
  margin: 0 0 20px; max-width: 68ch;
  font-size: 0.85rem; line-height: 1.65; color: var(--ink-soft);
}
.foot-nav { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 16px; }
.foot-nav a { font-size: 0.86rem; color: var(--ink-soft); text-decoration: none; }
.foot-nav a:hover { color: var(--gold); }
.foot-meta { margin: 0; font-size: 0.78rem; color: var(--ink-faint); }

.corr-none { color: var(--ink-faint); font-style: italic; }

/* ------------------------------------------------------- table of contents */

/* Auto-generated from h2 headings when there are 3 or more.
   Sits between the article header and the body text; subtle, not decorative. */
.toc {
  margin: 20px auto 0;
  width: min(680px, calc(100% - 40px));
  padding: 16px 20px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.toc-title {
  display: block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.toc-list {
  margin: 0;
  padding-left: 0;
  list-style-position: inside;
}
.toc-list li {
  margin-bottom: 6px;
  font-family: var(--sans);
  font-size: 0.93rem;
  line-height: 1.45;
  text-align: center;
}
.toc-list a {
  color: var(--ink-soft);
  text-decoration: none;
}
.toc-list a:hover { color: var(--gold); text-decoration: underline; }

@media (max-width: 640px) {
  .toc {
    width: 100%;
    padding: 12px 14px;
  }
  .toc-list li { font-size: 0.88rem; }
}

/* ------------------------------------------------------ section anchor links */

/* Scroll past the sticky 58 px header so the heading is not hidden. */
.prose h2, .prose h3, .prose h4 {
  scroll-margin-top: 72px;
}

/* The # link is invisible until the heading is hovered or focused.
   No new colour — uses --gold-soft already in the palette. */
.h-anchor {
  display: inline-block;
  margin-left: 0.35em;
  color: var(--gold-soft);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.8em;
  opacity: 0;
  transition: opacity 0.15s ease;
  vertical-align: middle;
}
.prose h2:hover .h-anchor,
.prose h3:hover .h-anchor,
.prose h4:hover .h-anchor,
.h-anchor:focus {
  opacity: 1;
}

