/* Lahpet Voices — base styles
   Editorial / community feel.
   Palette: deep teal, palm green, warm cream, terracotta accent. */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f0e6;
  --ink: #1f2a26;
  --ink-soft: #4a5853;
  --line: #d8cfb9;
  --brand: #0f4c4a;
  --brand-dark: #0a3433;
  --brand-soft: #d6e3df;
  --accent: #c0532a;
  --accent-soft: #f4d9c8;
  --highlight: #f4c75b;
  --shadow: 0 18px 40px -22px rgba(15, 76, 74, 0.45);
  --radius: 18px;
  --max: 1120px;
  --measure: 68ch;
  --serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Myanmar flag palette — used sparingly as accent touches */
  --flag-yellow: #f6c14b;
  --flag-green: #3e9d6a;
  --flag-red: #cf3a2e;
  --flag-white: #ffffff;
  --flag-stripe: linear-gradient(90deg, var(--flag-green) 0%, var(--flag-green) 33.33%, var(--flag-yellow) 33.33%, var(--flag-yellow) 66.66%, var(--flag-red) 66.66%, var(--flag-red) 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  color: var(--ink);
  background-color: var(--bg);
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 320'%3E%3Cg fill='none' stroke='%230f4c4a' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(40,30) rotate(-30 20 25)' opacity='0.10'%3E%3Cpath d='M20 4 Q 32 10, 32 20 Q 32 30, 20 36 Q 8 30, 8 20 Q 8 10, 20 4 Z'/%3E%3Cpath d='M20 5 L 20 35'/%3E%3Cpath d='M20 12 L 25 13 M20 12 L 15 13 M20 20 L 26 21 M20 20 L 14 21'/%3E%3C/g%3E%3Cg transform='translate(190,60) rotate(35 18 22)' opacity='0.08'%3E%3Cpath d='M18 4 Q 28 8, 28 18 Q 28 28, 18 32 Q 8 28, 8 18 Q 8 8, 18 4 Z'/%3E%3Cpath d='M18 5 L 18 31'/%3E%3Cpath d='M18 11 L 23 12 M18 11 L 13 12 M18 18 L 24 19 M18 18 L 12 19'/%3E%3C/g%3E%3Cg transform='translate(100,180) rotate(15 16 22)' opacity='0.09'%3E%3Cpath d='M16 4 Q 26 8, 26 16 Q 26 26, 16 30 Q 6 26, 6 16 Q 6 8, 16 4 Z'/%3E%3Cpath d='M16 5 L 16 29'/%3E%3Cpath d='M16 11 L 21 12 M16 11 L 11 12 M16 18 L 22 19 M16 18 L 10 19'/%3E%3C/g%3E%3Cg transform='translate(250,220) rotate(-20 14 18)' opacity='0.07'%3E%3Cpath d='M14 4 Q 22 7, 22 14 Q 22 22, 14 26 Q 6 22, 6 14 Q 6 7, 14 4 Z'/%3E%3Cpath d='M14 5 L 14 25'/%3E%3Cpath d='M14 10 L 19 11 M14 10 L 9 11 M14 16 L 19 17 M14 16 L 9 17'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat;
  background-size: auto, 320px 320px;
  background-attachment: scroll, fixed;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--accent); }

::selection { background: var(--accent-soft); color: var(--brand-dark); }

img {
  max-width: 100%;
  display: block;
  image-rendering: auto;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
}
.hero-art img,
.story-card img,
figure img {
  filter: contrast(1.04) saturate(1.06);
  transition: filter 0.4s ease, opacity 0.5s ease;
}
img[loading="lazy"]:not(.loaded) { opacity: 0; }
img.loaded,
img:not([loading="lazy"]) { opacity: 1; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 0.55em; color: var(--brand-dark); }
h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: 1.4rem; line-height: 1.25; }
h4 { font-size: 1.15rem; line-height: 1.3; }
p { margin: 0 0 1.1em; }
p + p { margin-top: 0; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.eyebrow { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); font-weight: 600; }

/* Skip link */
.skip { position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff; padding: 0.6rem 1rem; z-index: 200; }
.skip:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 0; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; font-family: var(--serif); font-size: 1.45rem; color: var(--brand-dark); font-weight: 600; }
.brand img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.brand small { display: block; font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; }
.brand-lockup { display: inline-block; line-height: 0; }
.brand-lockup img { width: 140px; height: auto; border-radius: 6px; border: 0; display: block; }
@media (max-width: 760px) { .brand-lockup img { width: 110px; } }
.nav-links { display: flex; gap: 1.4rem; align-items: center; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--brand); }
.nav-cta { background: var(--brand); color: #fff !important; padding: 0.55rem 1.1rem; border-radius: 999px; font-size: 0.85rem; }
.nav-cta:hover { background: var(--accent); color: #fff !important; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 0.4rem 0.6rem; font-size: 1.1rem; cursor: pointer; }
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink); transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease; }
.social-link:hover { color: var(--accent); background: var(--bg-soft); transform: translateY(-1px); }
.social-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.social-link svg { display: block; }

@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .nav-links { display: none; position: absolute; top: 100%; right: 1.25rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; flex-direction: column; align-items: flex-start; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
}

/* Hero */
.hero { padding: 4rem 0 3rem; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; }
.hero p.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 38ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.5rem; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: 0.95rem; border: 1px solid transparent; cursor: pointer; transition: transform 0.15s ease, background 0.2s ease; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--brand-dark); border-color: var(--brand-dark); }
.btn-ghost:hover { background: var(--brand-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #a6441f; color: #fff; }

.hero-art { position: relative; aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: linear-gradient(135deg, var(--bg-soft), var(--line)); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: center; image-rendering: high-quality; }
.hero-art .badge { position: absolute; left: 1rem; bottom: 1rem; background: rgba(15, 76, 74, 0.92); color: #fff; padding: 0.55rem 0.9rem; border-radius: 999px; font-size: 0.8rem; font-weight: 500; }
.hero-art.hero-icon { aspect-ratio: 4/5; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 1.6rem; }
.hero-art.hero-icon img { width: 100%; height: 100%; object-fit: contain; filter: none; }
.hero-meta { display: flex; gap: 2rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-meta div { border-left: 3px solid var(--accent); padding-left: 0.8rem; }
.hero-meta div:nth-child(1) { border-left-color: var(--flag-green); }
.hero-meta div:nth-child(2) { border-left-color: var(--flag-yellow); }
.hero-meta div:nth-child(3) { border-left-color: var(--flag-red); }
.hero-meta div:nth-child(4) { border-left-color: var(--accent); }
.hero-meta strong { display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--brand-dark); }
.hero-meta span { font-size: 0.85rem; color: var(--ink-soft); }

@media (max-width: 820px) {
  .hero { padding: 2.5rem 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-art { aspect-ratio: 16/10; }
}

/* Sections */
section { padding: 4rem 0; }
section.alt { background: var(--bg-soft); }
section.dark { background: var(--brand-dark); color: #f5efe2; }
section.dark h2, section.dark h3 { color: #f5efe2; }
section.dark a { color: var(--highlight); }
section.dark .pull-quote { color: #f5efe2; }
section.dark .attribution { color: #cfdcd8; }
section.dark .eyebrow { color: var(--highlight); }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.section-head p { color: var(--ink-soft); max-width: 46ch; margin: 0; }

/* Cards */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-body { padding: 1.4rem 1.5rem 1.6rem; flex: 1; display: flex; flex-direction: column; gap: 0.5rem; color: var(--ink); }
.card .tag { display: inline-block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.4rem; }
.card h3 { font-size: 1.3rem; margin: 0; color: var(--brand-dark); }
.card h3, .card h3 a { color: var(--brand-dark); }
.card p { color: var(--ink-soft); }
.card .meta { color: var(--ink-soft); font-size: 0.85rem; }
.card .read { margin-top: auto; color: var(--brand); font-weight: 600; font-size: 0.9rem; }

.story-card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; height: auto; }
.pill { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; }

/* Quote */
.pull-quote { font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 1.8rem); line-height: 1.35; color: var(--brand-dark); border-left: 4px solid var(--accent); padding-left: 1.2rem; margin: 0; }
.pull-quote.flagged { border-left: 4px solid; border-image: var(--flag-stripe) 1; }
.attribution { margin-top: 0.8rem; color: var(--ink-soft); font-size: 0.9rem; }

/* Interview transcript */
.transcript { display: grid; grid-template-columns: 220px 1fr; gap: 2.5rem; }
.transcript .toc { position: sticky; top: 90px; align-self: start; border-left: 2px solid var(--line); padding-left: 1rem; }
.transcript .toc a { display: block; padding: 0.35rem 0; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.4; transition: color 0.15s ease; }
.transcript .toc a:hover { color: var(--brand); }
.transcript h2 { margin-top: 2.8rem; scroll-margin-top: 90px; }
.transcript h2:first-of-type { margin-top: 0; }
.transcript > div p,
.transcript > div li {
  font-size: 1.0625rem;
  line-height: 1.75;
  max-width: var(--measure);
  color: var(--ink);
}
.transcript > div p { margin: 0 0 1.15em; }
.transcript > div ul,
.transcript > div ol { max-width: var(--measure); padding-left: 1.4rem; }
.transcript > div li { margin-bottom: 0.4em; }
.transcript blockquote {
  position: relative;
  background: #fff;
  background-image: linear-gradient(135deg, #fff 0%, var(--bg-soft) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.4rem 2rem 1.8rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--ink);
  line-height: 1.75;
  max-width: var(--measure);
  box-shadow: 0 4px 14px -6px rgba(15, 76, 74, 0.15);
  overflow: hidden;
}
.transcript blockquote::before {
  content: "\201C";
  position: absolute;
  top: -1.2rem;
  left: 0.7rem;
  font-family: var(--serif);
  font-size: 7rem;
  color: var(--accent);
  line-height: 1;
  font-weight: 700;
  font-style: normal;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}
.transcript blockquote::after {
  content: "";
  position: absolute;
  bottom: 0.7rem;
  left: 2rem;
  right: 2rem;
  height: 3px;
  border-radius: 2px;
  background: var(--flag-stripe);
  opacity: 0.55;
}
.transcript blockquote p {
  position: relative;
  z-index: 1;
  font-size: 1.125rem;
  margin-bottom: 0;
  letter-spacing: 0.005em;
}
.transcript blockquote cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}
.transcript blockquote cite::before {
  content: "— ";
  color: var(--accent);
  font-weight: 700;
}
@media (max-width: 820px) { .transcript { grid-template-columns: 1fr; } .transcript .toc { position: static; } .transcript > div p, .transcript > div li, .transcript blockquote { max-width: 100%; } }

/* Forms */
form.subscribe { display: flex; gap: 0.5rem; flex-wrap: wrap; max-width: 480px; }
form.subscribe input { flex: 1; min-width: 200px; padding: 0.75rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; color: var(--ink); }
form.subscribe input:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
form.subscribe button { background: var(--flag-red); color: #fff; border: none; padding: 0.75rem 1.4rem; border-radius: 999px; font-weight: 600; cursor: pointer; }
form.subscribe button:hover { background: #a82b21; }

/* Footer */
.flag-stripe { height: 4px; background: var(--flag-stripe); margin: 0; }
.site-footer { background: var(--brand-dark); color: #d6e3df; padding: 3rem 0 2rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid h4 { color: #fff; font-family: var(--sans); font-size: 0.85rem; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-grid a { color: #d6e3df; display: block; padding: 0.25rem 0; }
.footer-grid a:hover { color: var(--highlight); }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.12); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: #99b1ac; }
.footer-motif { display: inline-flex; align-items: center; gap: 0.5rem; color: rgba(255,255,255,0.7); font-size: 0.8rem; letter-spacing: 0.05em; }
.footer-motif svg { flex-shrink: 0; }
.footer-motif .lines { display: inline-block; width: 28px; height: 4px; border-radius: 2px; background: var(--flag-stripe); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* Utilities */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.flex { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* Decorative Burmese motif */
.motif { position: absolute; pointer-events: none; opacity: 0.08; }

/* Focus styles */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Form labels (used on contact page) */
label { font-weight: 500; color: var(--ink); font-size: 0.95rem; }

/* Print friendliness */
@media print {
  .site-header, .site-footer, .nav-cta, .menu-toggle, form.subscribe, .theme-toggle, .progress-bar, .search-bar { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  section { padding: 1rem 0; }
}

/* Reading progress bar */
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent); z-index: 100; transition: width 0.1s linear; }

/* Dark mode toggle */
.theme-toggle { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 0.4rem 0.7rem; cursor: pointer; font-size: 1rem; line-height: 1; color: var(--ink); }
.theme-toggle:hover { background: var(--bg-soft); }

/* Search */
.search-bar { display: flex; gap: 0.5rem; align-items: center; flex: 1; max-width: 280px; margin: 0 1rem; }
.search-bar input { flex: 1; padding: 0.45rem 0.8rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 0.9rem; color: var(--ink); min-width: 0; }
.search-bar input:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.search-bar .clear { background: none; border: none; color: var(--ink-soft); cursor: pointer; font-size: 1.1rem; }
mark.search-hit { background: var(--highlight); color: var(--ink); padding: 0 2px; border-radius: 3px; }
.empty-state { padding: 2rem; text-align: center; color: var(--ink-soft); border: 1px dashed var(--line); border-radius: var(--radius); }

@media (max-width: 760px) {
  .search-bar { order: 3; flex-basis: 100%; max-width: 100%; margin: 0.5rem 0 0; }
}

/* Burmese text rendering */
.burmese { font-family: "Myanmar Text", "Pyidaungsu", "Noto Sans Myanmar", "Padauk", "Tharlon", sans-serif; }

/* Follow blocks (long-form sidebar + reference strip) */
.follow-block { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.follow-block .eyebrow { margin-bottom: 0.6rem; }
.follow-ig { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--brand-dark); font-weight: 500; font-size: 0.92rem; padding: 0.4rem 0.6rem; margin-left: -0.6rem; border-radius: 8px; transition: background 0.15s ease, color 0.15s ease; }
.follow-ig:hover { background: var(--bg-soft); color: var(--accent); }
.follow-ig svg { color: var(--accent); flex-shrink: 0; }

.follow-strip { padding: 1.5rem 0; background: var(--brand-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.follow-strip p { margin: 0; color: var(--brand-dark); font-size: 0.95rem; }
.follow-strip a { color: var(--brand-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.follow-strip a:hover { color: var(--accent); }

/* Dark theme */
@media (prefers-color-scheme: dark) {
  :root:not(.theme-light) {
    color-scheme: dark;
    --bg: #0f1716;
    --bg-soft: #15201e;
    --ink: #ece5d3;
    --ink-soft: #b6c1bb;
    --line: #2a3633;
    --brand: #5fbab5;
    --brand-dark: #83d3cf;
    --brand-soft: #1f3431;
    --accent: #e57a4d;
    --accent-soft: #3a2117;
    --highlight: #f6d36a;
    --flag-yellow: #ffd166;
    --flag-green: #6ac496;
    --flag-red: #e8605a;
  }
  :root:not(.theme-light) body {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 320'%3E%3Cg fill='none' stroke='%2383d3cf' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(40,30) rotate(-30 20 25)' opacity='0.12'%3E%3Cpath d='M20 4 Q 32 10, 32 20 Q 32 30, 20 36 Q 8 30, 8 20 Q 8 10, 20 4 Z'/%3E%3Cpath d='M20 5 L 20 35'/%3E%3Cpath d='M20 12 L 25 13 M20 12 L 15 13 M20 20 L 26 21 M20 20 L 14 21'/%3E%3C/g%3E%3Cg transform='translate(190,60) rotate(35 18 22)' opacity='0.10'%3E%3Cpath d='M18 4 Q 28 8, 28 18 Q 28 28, 18 32 Q 8 28, 8 18 Q 8 8, 18 4 Z'/%3E%3Cpath d='M18 5 L 18 31'/%3E%3Cpath d='M18 11 L 23 12 M18 11 L L 12 M18 18 L 24 19 M18 18 L 12 19'/%3E%3C/g%3E%3Cg transform='translate(100,180) rotate(15 16 22)' opacity='0.11'%3E%3Cpath d='M16 4 Q 26 8, 26 16 Q 26 26, 16 30 Q 6 26, 6 16 Q 6 8, 16 4 Z'/%3E%3Cpath d='M16 5 L 16 29'/%3E%3Cpath d='M16 11 L 21 12 M16 11 L 11 12 M16 18 L 22 19 M16 18 L 10 19'/%3E%3C/g%3E%3Cg transform='translate(250,220) rotate(-20 14 18)' opacity='0.09'%3E%3Cpath d='M14 4 Q 22 7, 22 14 Q 22 22, 14 26 Q 6 22, 6 14 Q 6 7, 14 4 Z'/%3E%3Cpath d='M14 5 L 14 25'/%3E%3Cpath d='M14 10 L 19 11 M14 10 L 9 11 M14 16 L 19 17 M14 16 L 9 17'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  }
  :root:not(.theme-light) .card { background: #182523; }
  :root:not(.theme-light) .hero-art { box-shadow: 0 18px 40px -22px rgba(0,0,0,0.6); }
  :root:not(.theme-light) .transcript blockquote {
    background: #182523;
    background-image: linear-gradient(135deg, #182523 0%, #1d2c2a 100%);
    border-color: #2a3633;
    box-shadow: 0 4px 14px -6px rgba(0,0,0,0.4);
  }
  :root:not(.theme-light) .transcript blockquote::before { color: var(--accent); opacity: 0.25; }
  :root:not(.theme-light) .search-bar input { background: #182523; color: var(--ink); }
  :root:not(.theme-light) .site-header { background: rgba(15, 23, 22, 0.92); }
  :root:not(.theme-light) .site-footer { background: #071110; }
  :root:not(.theme-light) section.dark { background: #0a3433; }
  :root:not(.theme-light) .transcript { color: var(--ink); }
  :root:not(.theme-light) .transcript > div p,
  :root:not(.theme-light) .transcript > div li { color: var(--ink); }
  :root:not(.theme-light) .transcript blockquote { color: var(--ink); }
  :root:not(.theme-light) .transcript blockquote cite { color: var(--ink-soft); }
  :root:not(.theme-light) .transcript .toc a { color: var(--ink-soft); }
  :root:not(.theme-light) .transcript .toc a:hover { color: var(--brand); }
  :root:not(.theme-light) .toc { border-left-color: var(--line); }
  :root:not(.theme-light) .timeline-intro { color: var(--ink); }
  :root:not(.theme-light) .timeline-intro p { color: var(--ink-soft); }
  :root:not(.theme-light) .t-card { color: var(--ink); }
  :root:not(.theme-light) .follow-block { border-top-color: var(--line); }
  :root:not(.theme-light) .follow-strip { border-top-color: var(--line); border-bottom-color: var(--line); }
  :root:not(.theme-light) .translate-link { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--line); }
  :root:not(.theme-light) .translate-link:hover { background: #2a4540; }
  :root:not(.theme-light) .featured-quote { background: #15201e; color: var(--ink); border: 1px solid var(--line); }
  :root:not(.theme-light) .featured-quote::before { color: var(--accent); }
  :root:not(.theme-light) .featured-quote cite { color: var(--highlight); }
  :root:not(.theme-light) .chapter-divider { color: var(--accent); }
  :root:not(.theme-light) .chapter-divider::before,
  :root:not(.theme-light) .chapter-divider::after { background: var(--line); }
  :root:not(.theme-light) .chapter-divider .chapter-num { border-color: var(--accent); color: var(--accent); }
  :root:not(.theme-light) .themes-block { border-top-color: var(--line); }
  :root:not(.theme-light) .extra-intro p { border-left-color: var(--brand-soft); color: var(--ink); }
  :root:not(.theme-light) header.site-header,
  :root:not(.theme-light) header.site-header * { color: var(--ink); }
  :root:not(.theme-light) header.site-header .nav-cta { color: #fff !important; }
}

html.theme-dark {
  color-scheme: dark;
  --bg: #0f1716;
  --bg-soft: #15201e;
  --ink: #ece5d3;
  --ink-soft: #b6c1bb;
  --line: #2a3633;
  --brand: #5fbab5;
  --brand-dark: #83d3cf;
  --brand-soft: #1f3431;
  --accent: #e57a4d;
  --accent-soft: #3a2117;
  --highlight: #f6d36a;
  --flag-yellow: #ffd166;
  --flag-green: #6ac496;
  --flag-red: #e8605a;
}
html.theme-dark body {
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 320'%3E%3Cg fill='none' stroke='%2383d3cf' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(40,30) rotate(-30 20 25)' opacity='0.12'%3E%3Cpath d='M20 4 Q 32 10, 32 20 Q 32 30, 20 36 Q 8 30, 8 20 Q 8 10, 20 4 Z'/%3E%3Cpath d='M20 5 L 20 35'/%3E%3Cpath d='M20 12 L 25 13 M20 12 L 15 13 M20 20 L 26 21 M20 20 L 14 21'/%3E%3C/g%3E%3Cg transform='translate(190,60) rotate(35 18 22)' opacity='0.10'%3E%3Cpath d='M18 4 Q 28 8, 28 18 Q 28 28, 18 32 Q 8 28, 8 18 Q 8 8, 18 4 Z'/%3E%3Cpath d='M18 5 L 18 31'/%3E%3Cpath d='M18 11 L 23 12 M18 11 L 13 12 M18 18 L 24 19 M18 18 L 12 19'/%3E%3C/g%3E%3Cg transform='translate(100,180) rotate(15 16 22)' opacity='0.11'%3E%3Cpath d='M16 4 Q 26 8, 26 16 Q 26 26, 16 30 Q 6 26, 6 16 Q 6 8, 16 4 Z'/%3E%3Cpath d='M16 5 L 16 29'/%3E%3Cpath d='M16 11 L 21 12 M16 11 L 11 12 M16 18 L 22 19 M16 18 L 10 19'/%3E%3C/g%3E%3Cg transform='translate(250,220) rotate(-20 14 18)' opacity='0.09'%3E%3Cpath d='M14 4 Q 22 7, 22 14 Q 22 22, 14 26 Q 6 22, 6 14 Q 6 7, 14 4 Z'/%3E%3Cpath d='M14 5 L 14 25'/%3E%3Cpath d='M14 10 L 19 11 M14 10 L 9 11 M14 16 L 19 17 M14 16 L 9 17'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
html.theme-dark .card,
html.theme-dark .t-card,
html.theme-dark .chapter-card { background: #182523; }
html.theme-dark .hero-art { box-shadow: 0 18px 40px -22px rgba(0,0,0,0.6); }
html.theme-dark .transcript blockquote {
  background: #182523;
  background-image: linear-gradient(135deg, #182523 0%, #1d2c2a 100%);
  border-color: #2a3633;
  box-shadow: 0 4px 14px -6px rgba(0,0,0,0.4);
}
html.theme-dark .transcript blockquote::before { color: var(--accent); opacity: 0.25; }
html.theme-dark .search-bar input,
html.theme-dark form.subscribe input { background: #182523; color: var(--ink); }
html.theme-dark .site-header { background: rgba(15, 23, 22, 0.92); }
html.theme-dark .site-footer { background: #071110; }
html.theme-dark section.dark { background: #0a3433; }
html.theme-dark .transcript { color: var(--ink); }
html.theme-dark .transcript > div p,
html.theme-dark .transcript > div li { color: var(--ink); }
html.theme-dark .transcript blockquote { color: var(--ink); }
html.theme-dark .transcript blockquote cite { color: var(--ink-soft); }
html.theme-dark .transcript .toc a { color: var(--ink-soft); }
html.theme-dark .transcript .toc a:hover { color: var(--brand); }
html.theme-dark .toc { border-left-color: var(--line); }
html.theme-dark .timeline-intro { color: var(--ink); background: var(--bg-soft); }
html.theme-dark .timeline-intro p { color: var(--ink-soft); }
html.theme-dark .t-card { color: var(--ink); }
html.theme-dark .timeline-end { background: var(--brand-soft); }
html.theme-dark .timeline-end h2 { color: var(--brand-dark); }
html.theme-dark .follow-block { border-top-color: var(--line); }
html.theme-dark .follow-strip { border-top-color: var(--line); border-bottom-color: var(--line); }
html.theme-dark .translate-link { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--line); }
html.theme-dark .translate-link:hover { background: #2a4540; }
html.theme-dark .featured-quote { background: #15201e; color: var(--ink); border: 1px solid var(--line); }
html.theme-dark .featured-quote::before { color: var(--accent); }
html.theme-dark .featured-quote cite { color: var(--highlight); }
html.theme-dark .chapter-divider { color: var(--accent); }
html.theme-dark .chapter-divider::before,
html.theme-dark .chapter-divider::after { background: var(--line); }
html.theme-dark .chapter-divider .chapter-num { border-color: var(--accent); color: var(--accent); }
html.theme-dark .themes-block { border-top-color: var(--line); }
html.theme-dark .extra-intro p { border-left-color: var(--brand-soft); color: var(--ink); }
html.theme-dark header.site-header,
html.theme-dark header.site-header * { color: var(--ink); }
html.theme-dark header.site-header .nav-cta { color: #fff !important; }
html.theme-dark .fn-tooltip { background: #182523; color: var(--ink); border-color: var(--line); }
html.theme-dark .notes-list li strong { color: var(--ink); }

html.theme-light {
  --bg: #ffffff;
  --bg-soft: #f5f0e6;
  --ink: #1a2421;
  --ink-soft: #4a5853;
  --line: #d8cfb9;
  --brand: #0f4c4a;
  --brand-dark: #0a3433;
  --brand-soft: #d6e3df;
  --accent: #c0532a;
  --accent-soft: #f4d9c8;
  --highlight: #f4c75b;
}

/* Timeline (burma-history.html) */
.timeline-intro {
  max-width: 68ch;
  margin: 0 auto 2rem;
  padding: 1.4rem 1.6rem;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}
.timeline-intro-art { flex-shrink: 0; opacity: 0.85; }
.timeline-intro .eyebrow { margin-bottom: 0.4rem; }
.timeline-intro p { margin: 0; color: var(--ink-soft); }

.timeline {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 820px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 110px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--accent) 8%, var(--accent) 92%, transparent);
  opacity: 0.55;
}
.timeline-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 2rem;
  align-items: start;
  padding: 0 0 2.5rem 0;
  position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }
.t-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
  margin-left: 99px;
  margin-top: 0.4rem;
  position: relative;
  z-index: 1;
}
.t-card {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem 1.6rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.t-card:hover { transform: translateY(-2px); }
.t-card .section-icon { display: block; margin-bottom: 0.8rem; opacity: 0.85; }
.t-year {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.4rem;
}
.t-card h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.4rem, 2.5vw, 1.7rem);
  color: var(--brand-dark);
}
.t-card p { margin: 0 0 0.9em; color: var(--ink); }
.t-card p:last-child { margin-bottom: 0; }
.t-note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-top: 1px dashed var(--line);
  padding-top: 0.8rem;
  margin-top: 0.6rem !important;
}
.timeline-end {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--brand-soft);
  border-radius: var(--radius);
  text-align: center;
}
.timeline-end h2 { margin-bottom: 0.4rem; }
.timeline-end p { color: var(--ink-soft); }

@media (max-width: 720px) {
  .timeline::before { left: 14px; }
  .timeline-item { grid-template-columns: 1fr; gap: 0.5rem; padding-bottom: 2rem; }
  .t-dot { margin-left: 3px; margin-top: 0.6rem; }
  .t-card { padding: 1.2rem 1.3rem; }
}

/* Interview expansion — extra intro */
.extra-intro {
  max-width: 820px;
  margin: 2rem auto 0;
  padding: 0 0.5rem;
}
.extra-intro p {
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.8;
  font-style: italic;
  border-left: 3px solid var(--brand-soft);
  padding-left: 1.2rem;
}

/* Inline illustrations (interview pages) */
.inline-illustration {
  max-width: 820px;
  margin: 3rem auto;
  padding: 0 0.5rem;
  text-align: center;
}
.inline-illustration svg {
  display: inline-block;
  max-width: 100%;
  height: auto;
  opacity: 0.85;
}
.inline-illustration figcaption {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

/* Tea leaf iconography (lahpet = tea) */
.leaf-bg-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%230f4c4a' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(20,15) rotate(-30 20 25)' opacity='0.10'%3E%3Cpath d='M20 4 Q 32 10, 32 20 Q 32 30, 20 36 Q 8 30, 8 20 Q 8 10, 20 4 Z'/%3E%3Cpath d='M20 5 L 20 35'/%3E%3Cpath d='M20 12 L 25 13 M20 12 L 15 13 M20 20 L 26 21 M20 20 L 14 21'/%3E%3C/g%3E%3Cg transform='translate(95,30) rotate(35 18 22)' opacity='0.08'%3E%3Cpath d='M18 4 Q 28 8, 28 18 Q 28 28, 18 32 Q 8 28, 8 18 Q 8 8, 18 4 Z'/%3E%3Cpath d='M18 5 L 18 31'/%3E%3Cpath d='M18 11 L 23 12 M18 11 L 13 12 M18 18 L 24 19 M18 18 L 12 19'/%3E%3C/g%3E%3Cg transform='translate(50,90) rotate(15 16 22)' opacity='0.09'%3E%3Cpath d='M16 4 Q 26 8, 26 16 Q 26 26, 16 30 Q 6 26, 6 16 Q 6 8, 16 4 Z'/%3E%3Cpath d='M16 5 L 16 29'/%3E%3Cpath d='M16 11 L 21 12 M16 11 L 11 12 M16 18 L 22 19 M16 18 L 10 19'/%3E%3C/g%3E%3Cg transform='translate(125,110) rotate(-20 14 18)' opacity='0.07'%3E%3Cpath d='M14 4 Q 22 7, 22 14 Q 22 22, 14 26 Q 6 22, 6 14 Q 6 7, 14 4 Z'/%3E%3Cpath d='M14 5 L 14 25'/%3E%3Cpath d='M14 10 L 19 11 M14 10 L 9 11 M14 16 L 19 17 M14 16 L 9 17'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 320px 320px;
  opacity: 0.55;
}
/* Dark mode: lighter leaves on dark background */
html.theme-dark .leaf-bg-pattern,
:root:not(.theme-light) .leaf-bg-pattern {
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%2383d3cf' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(20,15) rotate(-30 20 25)' opacity='0.10'%3E%3Cpath d='M20 4 Q 32 10, 32 20 Q 32 30, 20 36 Q 8 30, 8 20 Q 8 10, 20 4 Z'/%3E%3Cpath d='M20 5 L 20 35'/%3E%3Cpath d='M20 12 L 25 13 M20 12 L 15 13 M20 20 L 26 21 M20 20 L 14 21'/%3E%3C/g%3E%3Cg transform='translate(95,30) rotate(35 18 22)' opacity='0.08'%3E%3Cpath d='M18 4 Q 28 8, 28 18 Q 28 28, 18 32 Q 8 28, 8 18 Q 8 8, 18 4 Z'/%3E%3Cpath d='M18 5 L 18 31'/%3E%3Cpath d='M18 11 L 23 12 M18 11 L 13 12 M18 18 L 24 19 M18 18 L 12 19'/%3E%3C/g%3E%3Cg transform='translate(50,90) rotate(15 16 22)' opacity='0.09'%3E%3Cpath d='M16 4 Q 26 8, 26 16 Q 26 26, 16 30 Q 6 26, 6 16 Q 6 8, 16 4 Z'/%3E%3Cpath d='M16 5 L 16 29'/%3E%3Cpath d='M16 11 L 21 12 M16 11 L 11 12 M16 18 L 22 19 M16 18 L 10 19'/%3E%3C/g%3E%3Cg transform='translate(125,110) rotate(-20 14 18)' opacity='0.07'%3E%3Cpath d='M14 4 Q 22 7, 22 14 Q 22 22, 14 26 Q 6 22, 6 14 Q 6 7, 14 4 Z'/%3E%3Cpath d='M14 5 L 14 25'/%3E%3Cpath d='M14 10 L 19 11 M14 10 L 9 11 M14 16 L 19 17 M14 16 L 9 17'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.leaf-icon {
  color: var(--accent);
  display: inline-block;
  vertical-align: -3px;
  margin-right: 0.4rem;
  opacity: 0.85;
  flex-shrink: 0;
}
.leaf-icon ~ .eyebrow-text { display: inline; }
.footer-leaves {
  display: flex;
  justify-content: center;
  padding: 1.6rem 0 0.5rem;
  color: var(--accent);
  opacity: 0.55;
}
.tea-leaves-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.tea-leaves-mark .leaf-icon { margin-right: 0; }
.leaf-cluster { display: block; }

/* Language translate toggle */
.translate-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.7rem 0.3rem 0.5rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.translate-link:hover {
  background: var(--accent-soft);
  color: var(--brand-dark);
  transform: translateY(-1px);
}
.translate-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.translate-link .translate-flag {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
  border-radius: 2px;
  overflow: hidden;
}
.translate-link .translate-flag svg { display: block; }
.translate-link .translate-label { line-height: 1; }

/* Interview expansion — featured quote, chapter dividers, themes, related */
.featured-quote {
  position: relative;
  margin: 3rem auto 1rem;
  max-width: 820px;
  padding: 2.4rem 2.4rem 2rem 3.4rem;
  background: var(--brand-dark);
  color: #f5efe2;
  border-radius: var(--radius);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.45;
  font-style: italic;
  box-shadow: var(--shadow);
}
.featured-quote::before {
  content: "\201C";
  position: absolute;
  top: -0.7rem;
  left: 0.7rem;
  font-size: 6rem;
  font-style: normal;
  color: var(--accent);
  opacity: 0.55;
  line-height: 1;
  font-weight: 700;
}
.featured-quote cite {
  display: block;
  margin-top: 1.2rem;
  padding-left: 0.3rem;
  font-style: normal;
  font-size: 0.9rem;
  font-family: var(--sans);
  color: var(--highlight);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.chapter-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0 1.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.chapter-divider::before,
.chapter-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.chapter-divider .chapter-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.themes-block {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.themes-block .eyebrow { margin-bottom: 0.6rem; }
.themes-block .pill { display: inline-block; margin: 0 0.3rem 0.4rem 0; }

.reading-time {
  letter-spacing: 0.02em;
}

.related-reading { padding: 5rem 0 2rem; }
.related-reading .section-head { margin-bottom: 2rem; }
.related-reading .card { height: 100%; }
.culture-grid .culture-card { height: 100%; }
.culture-card .card-body { gap: 0.6rem; }
.culture-card .pill { align-self: flex-start; }
.culture-card .section-icon { display: block; margin: 0.2rem 0 0.4rem; }
.culture-block { padding: 3rem 0; }
.culture-block h2 { margin-top: 0; }
.culture-quote {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--brand-dark);
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  margin: 1.2rem 0;
}
.script-sample {
  font-family: "Myanmar Text", "Pyidaungsu", "Noto Sans Myanmar", "Padauk", var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.4;
  color: var(--brand-dark);
  margin: 0.5rem 0 0.4rem;
  padding: 0.8rem 1rem;
  background: var(--bg-soft);
  border-radius: 12px;
  display: inline-block;
  max-width: 100%;
  word-break: break-word;
}
.culture-translation {
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 0 1rem;
}
.etiquette-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}
.etiquette-list li {
  padding: 0.8rem 1rem;
  background: var(--bg-soft);
  border-radius: 12px;
  border-left: 3px solid var(--accent);
  line-height: 1.55;
}
.etiquette-list strong { display: block; margin-bottom: 0.15rem; color: var(--brand-dark); }

/* Footnotes — author's notes woven into the reading experience */
.fn-ref {
  position: relative;
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72em;
  font-weight: 600;
  line-height: 1;
  vertical-align: super;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 0.1em 0.3em;
  margin: 0 0.1em;
  cursor: help;
  text-decoration: none;
}
.fn-ref:hover,
.fn-ref:focus { background: var(--accent); color: #fff; outline: none; }
.fn-tooltip {
  position: absolute;
  z-index: 40;
  max-width: min(320px, 80vw);
  background: var(--brand-dark);
  color: #f5efe2;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.5;
  box-shadow: var(--shadow);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.fn-tooltip.show { opacity: 1; transform: translateY(0); }
.notes-list {
  counter-reset: note;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  max-width: var(--measure);
}
.notes-list li {
  position: relative;
  padding-left: 2.2rem;
  margin-bottom: 0.9rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.notes-list li strong { color: var(--brand-dark); }
.notes-list li::before {
  counter-increment: note;
  content: counter(note);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Family series — the miniature book */
.chapter-card {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  padding: 1.4rem 1.5rem;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
a.chapter-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.chapter-card .chapter-index {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  flex-shrink: 0;
  line-height: 1.2;
}
.chapter-card h3 { margin: 0 0 0.3rem; font-size: 1.25rem; }
.chapter-card .meta { margin-bottom: 0.4rem; }
.chapter-card .tag { display: inline-block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.4rem; }
.chapter-card .read { color: var(--brand); font-weight: 600; font-size: 0.9rem; }
.chapter-card.upcoming { opacity: 0.7; }

@media (prefers-color-scheme: dark) {
  :root:not(.theme-light) .timeline-intro { background: var(--bg-soft); }
  :root:not(.theme-light) .t-card { background: #182523; }
  :root:not(.theme-light) .timeline-end { background: var(--brand-soft); }
  :root:not(.theme-light) .timeline-end h2 { color: var(--brand-dark); }
  :root:not(.theme-light) .fn-tooltip { background: #182523; color: var(--ink); border-color: var(--line); }
  :root:not(.theme-light) .chapter-card { background: #182523; color: var(--ink); }
  :root:not(.theme-light) .notes-list li strong { color: var(--ink); }
}

/* Story accordion — all long-form pieces on one page */
.story-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}
.story-jump .eyebrow { margin-right: 0.4rem; }
.story-jump a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.story-jump a:hover { background: var(--accent); color: #fff; }

.story-accordion { display: grid; gap: 1.4rem; }

.story-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 24px -18px rgba(15, 76, 74, 0.35);
  overflow: hidden;
}
.story-block summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.6rem 1.8rem;
  transition: background 0.15s ease;
}
.story-block summary::-webkit-details-marker { display: none; }
.story-block summary:hover { background: var(--bg-soft); }
.story-block summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.story-block summary > div { max-width: 56ch; }
.story-block summary .tag { display: inline-block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.45rem; }
.story-block summary h3 { margin: 0 0 0.35rem; color: var(--brand-dark); }
.story-block summary .meta { color: var(--ink-soft); font-size: 0.9rem; margin: 0; }
.story-min {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.story-num {
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  letter-spacing: 0.08em;
}
.story-block .chevron {
  font-family: var(--mono);
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.25s ease;
  font-weight: 400;
}
.story-block[open] .chevron { transform: rotate(45deg); }
.story-block[open] summary { border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.story-block[open] summary:hover { background: var(--bg-soft); }

.story-body {
  padding: 2.6rem 1.8rem 3rem;
  background: var(--bg);
}
.story-body .story-article { max-width: var(--measure); margin: 0 auto; }
.story-body .story-article h2 { scroll-margin-top: 100px; }
.story-body .chapter-toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.4rem 1.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin: 0 0 2.4rem;
}
.story-body .chapter-toc .eyebrow { margin-bottom: 0.6rem; }
.story-body .chapter-toc ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
  display: contents;
}
.story-body .chapter-toc li {
  counter-increment: toc;
  font-size: 0.92rem;
}
.story-body .chapter-toc li a {
  color: var(--ink-soft);
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.2rem 0;
}
.story-body .chapter-toc li a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
}
.story-body .chapter-toc li a:hover { color: var(--brand); }
.story-body blockquote {
  position: relative;
  background: #fff;
  background-image: linear-gradient(135deg, #fff 0%, var(--bg-soft) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.6rem 2rem 2rem;
  margin: 1.8rem 0;
  font-style: italic;
  color: var(--ink);
  line-height: 1.75;
  overflow: hidden;
  box-shadow: 0 4px 14px -6px rgba(15, 76, 74, 0.15);
}
.story-body blockquote::before {
  content: "\201C";
  position: absolute;
  top: -1.2rem;
  left: 0.7rem;
  font-family: var(--serif);
  font-size: 7rem;
  color: var(--accent);
  line-height: 1;
  font-weight: 700;
  font-style: normal;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}
.story-body blockquote::after {
  content: "";
  position: absolute;
  bottom: 0.7rem;
  left: 2rem;
  right: 2rem;
  height: 3px;
  border-radius: 2px;
  background: var(--flag-stripe);
  opacity: 0.55;
}
.story-body blockquote p { position: relative; z-index: 1; font-size: 1.125rem; }
.story-body blockquote p:last-child { margin-bottom: 0; }
.story-body .story-article p,
.story-body .story-article li { color: var(--ink); }

html.theme-dark .story-block { background: #182523; }
html.theme-dark .story-block summary:hover { background: #1d2b28; }
html.theme-dark .story-block[open] summary { background: #1d2b28; border-bottom-color: var(--line); }
html.theme-dark .story-block[open] summary:hover { background: #1d2b28; }
html.theme-dark .story-body { background: var(--bg); }
html.theme-dark .story-body .story-article p,
html.theme-dark .story-body .story-article li { color: var(--ink); }
html.theme-dark .story-body .chapter-toc { background: #1d2b28; border-color: var(--line); }
html.theme-dark .story-body .chapter-toc li a { color: var(--ink-soft); }
html.theme-dark .story-body .chapter-toc li a:hover { color: var(--highlight); }
html.theme-dark .story-body blockquote {
  background: #182523;
  background-image: linear-gradient(135deg, #182523 0%, #1d2b28 100%);
  color: var(--ink);
  border-color: var(--line);
}
html.theme-dark .story-jump a { background: #1d2b28; color: var(--highlight); }
