/* Fraunces, latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/fraunces-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Fraunces, latin */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/fraunces-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Fraunces, latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/fraunces-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Fraunces, latin */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/fraunces-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Inter, latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Inter, latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Inter, latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Inter, latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Inter, latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Inter, latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Literata, latin-ext */
@font-face {
  font-family: 'Literata';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/literata-latin-ext-italic.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Literata, latin */
@font-face {
  font-family: 'Literata';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/literata-latin-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Literata, latin-ext */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/literata-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Literata, latin */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/literata-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Literata, latin-ext */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/literata-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Literata, latin */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/literata-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
 * The reading site (V3-SITE-PLAN.md section 5), sarungano.net.
 *
 * Two rules shaped all of this. Every default lives here rather than in
 * JavaScript, so the page is already correct before any script runs and
 * stays correct if none ever does. And the chapter itself is plain flowing
 * prose with nothing decorative inside it, because that is what makes a
 * browser's reader mode and a screen reader agree about where the text is.
 *
 * The look: a storyteller's evening. Warm night or warm paper, the gold of
 * the logo for what can be pressed, ochre and clay beside it, and the
 * chevron of the Great Zimbabwe walls as the one ornament. Light and dark
 * both, following the reader's system until they choose (the header's
 * switch, or the reader's own controls, which add sepia).
 */

/* -- tokens -------------------------------------------------------------- */

:root {
  /* Light: warm paper. Every pair here was picked against WCAG AA. */
  --bg: #f8f4ec;
  --bg-deep: #efe7d8;
  --surface: #fffdf8;
  --surface-2: #f2ebde;
  --text: #1e1913;
  --muted: #655a4b;
  --rule: #e2d8c6;
  --gold: #8f5f10;          /* links and actions: 6.4:1 on --bg */
  --gold-bright: #c8962e;   /* ornament only, never text */
  --clay: #a4482a;
  --on-gold: #fffaf0;
  --button: #2a2118;
  --on-button: #fbf4e6;
  --focus: #1b64b0;
  --shadow: 0 1px 2px rgba(40, 28, 12, 0.06), 0 8px 24px rgba(40, 28, 12, 0.08);
  --glow: radial-gradient(60% 60% at 70% 30%, rgba(200, 150, 46, 0.18), transparent 70%);

  --measure: 36rem;
  --scale: 1;
  --display-font: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body-font: "Literata", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --ui-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  color-scheme: light;
}

/* Dark: a warm night, the default for anyone whose system asks for it. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #110e0b; --bg-deep: #0b0907; --surface: #1a1612; --surface-2: #231d17;
    --text: #f1e9dc; --muted: #ab9f8c; --rule: #2f2720;
    --gold: #e2b45e; --gold-bright: #e2b45e; --clay: #d9805b;
    --on-gold: #1a1209; --button: #e2b45e; --on-button: #1a1209; --focus: #7db4ee;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
    --glow: radial-gradient(60% 60% at 70% 30%, rgba(226, 180, 94, 0.16), transparent 70%);
    color-scheme: dark;
  }
}

[data-theme="light"] {
  --bg: #f8f4ec; --bg-deep: #efe7d8; --surface: #fffdf8; --surface-2: #f2ebde;
  --text: #1e1913; --muted: #655a4b; --rule: #e2d8c6;
  --gold: #8f5f10; --gold-bright: #c8962e; --clay: #a4482a;
  --on-gold: #fffaf0; --button: #2a2118; --on-button: #fbf4e6; --focus: #1b64b0;
  --shadow: 0 1px 2px rgba(40, 28, 12, 0.06), 0 8px 24px rgba(40, 28, 12, 0.08);
  --glow: radial-gradient(60% 60% at 70% 30%, rgba(200, 150, 46, 0.18), transparent 70%);
  color-scheme: light;
}

/* Sepia, from the reader's own controls: #2e2519 on #f4e8d0 is about 11:1. */
[data-theme="sepia"] {
  --bg: #f4e8d0; --bg-deep: #eadcbf; --surface: #f9f0dd; --surface-2: #ecdcbd;
  --text: #2e2519; --muted: #6a5a41; --rule: #ddcaa6;
  --gold: #85520f; --gold-bright: #b8862a; --clay: #9a4527;
  --on-gold: #fff8ea; --button: #2e2519; --on-button: #f9f0dd; --focus: #1b64b0;
  --shadow: 0 1px 2px rgba(60, 40, 10, 0.08), 0 8px 24px rgba(60, 40, 10, 0.08);
  --glow: none;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #110e0b; --bg-deep: #0b0907; --surface: #1a1612; --surface-2: #231d17;
  --text: #f1e9dc; --muted: #ab9f8c; --rule: #2f2720;
  --gold: #e2b45e; --gold-bright: #e2b45e; --clay: #d9805b;
  --on-gold: #1a1209; --button: #e2b45e; --on-button: #1a1209; --focus: #7db4ee;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  --glow: radial-gradient(60% 60% at 70% 30%, rgba(226, 180, 94, 0.16), transparent 70%);
  color-scheme: dark;
}

[data-size="s"] { --scale: 0.92; }
[data-size="l"] { --scale: 1.13; }
[data-size="xl"] { --scale: 1.28; }
[data-face="sans"] { --body-font: var(--ui-font); }

/* -- base ------------------------------------------------------------------ */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui-font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main, body > .page { flex: 1 0 auto; }

img, svg { max-width: 100%; }
a { color: var(--gold); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1rem;
  z-index: 50;
}
.skip:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 720px) { .wrap { padding: 0 2rem; } }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display-font);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
}
.brand img { width: 34px; height: 34px; }
.site-nav { display: flex; align-items: center; gap: 0.25rem; font-size: 0.95rem; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

/* The theme switch: shown by site.js, which is what makes it work. */
.theme-switch {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-left: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.theme-switch[hidden] { display: none; }
.theme-switch:hover { color: var(--text); background: var(--surface-2); }
.theme-switch svg { width: 1.1rem; height: 1.1rem; }
.theme-switch .icon { display: none; }
.theme-switch[data-mode="system"] .icon-system,
.theme-switch[data-mode="light"] .icon-light,
.theme-switch[data-mode="dark"] .icon-dark { display: block; }

@media (max-width: 420px) {
  .brand span { display: none; }
  .site-nav a { padding: 0.45rem 0.6rem; }
}

/* -- the chevron: the one ornament ----------------------------------------- */

.chevron {
  height: 14px;
  background:
    linear-gradient(135deg, var(--gold-bright) 25%, transparent 25%) -7px 0 / 14px 14px,
    linear-gradient(225deg, var(--gold-bright) 25%, transparent 25%) -7px 0 / 14px 14px;
  opacity: 0.55;
}

/* -- buttons ---------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 0.98rem/1 var(--ui-font);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.button:hover { transform: translateY(-1px); text-decoration: none; }
.button.primary { background: var(--button); color: var(--on-button); }
.button.quiet { background: transparent; color: var(--text); border-color: var(--rule); }
.button.quiet:hover { background: var(--surface-2); }
.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.eyebrow {
  font: 600 0.78rem/1.2 var(--ui-font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
  margin: 0 0 0.9rem;
}

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; list-style: none; }
.chips li {
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}
.chips.genres li { color: var(--text); background: var(--surface-2); border-color: transparent; text-transform: capitalize; }

/* -- home -------------------------------------------------------------------- */

.hero { position: relative; overflow: hidden; background: var(--glow), var(--bg); }
.hero .wrap {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
@media (min-width: 860px) {
  .hero .wrap { grid-template-columns: 1.15fr 0.85fr; padding-top: 5.5rem; padding-bottom: 5.5rem; }
}
.hero h1 {
  font-family: var(--display-font);
  font-weight: 600;
  font-size: clamp(2.4rem, 6.5vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}
.hero h1 em { font-style: italic; color: var(--gold); }
.hero .lede { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--muted); max-width: 34rem; margin: 0 0 2rem; }
/* The hero's picture is for a wide screen: on a phone the featured story
 * just below shows the same cover. */
.hero-art { display: none; place-items: center; }
@media (min-width: 860px) { .hero-art { display: grid; } }
.hero-art .cover-frame { width: min(19rem, 72vw); transform: rotate(-2deg); }
.hero-art .mark { width: min(16rem, 60vw); filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.25)); }

.section { padding: 3.5rem 0; }
.section + .section { padding-top: 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-head h2, .page-head h1 {
  font-family: var(--display-font);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.section-head a { font-size: 0.95rem; white-space: nowrap; }

.featured {
  display: grid;
  gap: 2rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: calc(var(--radius) + 6px);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.featured > a { display: block; width: min(11rem, 55%); }
@media (min-width: 760px) { .featured { grid-template-columns: 15rem 1fr; padding: 2.25rem; } .featured > a { width: auto; } }
.featured h3 { font-family: var(--display-font); font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.1; margin: 0 0 0.75rem; }
.featured h3 a { color: var(--text); text-decoration: none; }
.featured p { color: var(--muted); margin: 0 0 1.25rem; max-width: 38rem; }
.featured .chips { margin-bottom: 1.25rem; }

.shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(9rem, 42%), 1fr));
  gap: 1.75rem 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.shelf a { color: var(--text); text-decoration: none; display: block; }
.shelf a:hover .cover-frame { transform: translateY(-4px); }
.shelf h3 { font-family: var(--display-font); font-size: 1.08rem; line-height: 1.25; margin: 0.8rem 0 0.2rem; }
.shelf .meta { color: var(--muted); font-size: 0.85rem; margin: 0; }
.shelf .soon { color: var(--clay); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

.cover-frame {
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
  background: var(--surface-2);
}
.cover-frame img, .cover-frame svg { width: 100%; height: 100%; object-fit: cover; display: block; }

.latest { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.latest li { border-bottom: 1px solid var(--rule); }
.latest a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  padding: 1rem 0.25rem;
  color: var(--text);
  text-decoration: none;
}
.latest a:hover { background: var(--surface-2); }
.latest .novel { color: var(--muted); font-size: 0.85rem; grid-column: 1 / -1; }
.latest .title { font-family: var(--display-font); font-size: 1.1rem; }
.latest .when { color: var(--muted); font-size: 0.85rem; white-space: nowrap; align-self: center; }

.pillars { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.pillar h3 { font-family: var(--display-font); font-size: 1.2rem; margin: 0 0 0.5rem; }
.pillar p { color: var(--muted); margin: 0; font-size: 0.96rem; }
.pillar .number { font-family: var(--display-font); color: var(--gold); font-size: 1.4rem; display: block; margin-bottom: 0.6rem; }

.empty {
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
}
.empty h3 { font-family: var(--display-font); font-size: 1.4rem; margin: 0 0 0.5rem; }
.empty p { color: var(--muted); margin: 0 auto; max-width: 30rem; }

/* -- novel page -------------------------------------------------------------- */

.novel-hero { background: var(--glow), var(--bg-deep); border-bottom: 1px solid var(--rule); }
.novel-hero .wrap { display: grid; gap: 2rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
@media (min-width: 760px) {
  .novel-hero .wrap { grid-template-columns: 15rem 1fr; gap: 3rem; padding-top: 3.5rem; padding-bottom: 3.5rem; align-items: center; }
}
.novel-hero .cover-frame { width: min(15rem, 60vw); }
.novel-hero h1 {
  font-family: var(--display-font);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.9rem;
}
.novel-hero .lede { color: var(--muted); font-size: 1.08rem; max-width: 40rem; margin: 1rem 0 1.25rem; }
.novel-hero .facts { color: var(--muted); font-size: 0.9rem; margin: 0 0 1.5rem; }
.novel-hero .facts span + span::before { content: "·"; margin: 0 0.5rem; }
.continue[hidden] { display: none; }

.contents { padding: 2.5rem 0 1rem; }
.contents h2 { font-family: var(--display-font); font-size: 1.5rem; margin: 0 0 1rem; }
.chapter-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.chapter-list li { border-bottom: 1px solid var(--rule); }
.chapter-list a {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.95rem 0.25rem;
  text-decoration: none;
  color: var(--text);
}
.chapter-list a:hover { background: var(--surface-2); }
.chapter-list .number { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.chapter-list .when { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }
.chapter-list .title { font-family: var(--body-font); }
.tags { margin: 2rem 0 0; }
.tags h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin: 0 0 0.6rem; font-family: var(--ui-font); }
.follow { color: var(--muted); font-size: 0.92rem; margin: 2rem 0 0; }

.attribution {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 2rem 0 0;
}
.attribution p { margin: 0; }

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

/* A thin bar across the top for how far through the chapter you are. */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--gold-bright);
  z-index: 30;
  transition: width 0.1s linear;
}
.progress[hidden] { display: none; }

.reading-head {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }

.chapter-art {
  max-width: 48rem;
  margin: 1.5rem auto 0;
  padding: 0 1.25rem;
}
.chapter-art img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }

/*
 * The article holds the chapter and nothing else. Readability keeps the
 * densest block of paragraphs and drops its siblings, so every other part
 * of the page (navigation, the controls, the footer) is deliberately a
 * sibling rather than a child.
 */
article.chapter {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
  font-family: var(--body-font);
  font-size: calc(1.125rem * var(--scale));
  line-height: 1.75;
  font-optical-sizing: auto;
}
article.chapter h1 {
  font-family: var(--display-font);
  font-weight: 600;
  font-size: calc(clamp(1.75rem, 4.5vw, 2.4rem) * var(--scale));
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 1.75rem 0 2rem;
}
article.chapter p { margin: 0 0 1.2em; }
/* The first lines of a chapter open in small capitals, as a book does. */
article.chapter h1 + p::first-line { font-variant-caps: small-caps; letter-spacing: 0.03em; }

.chapter-end {
  max-width: var(--measure);
  margin: 3rem auto 0;
  padding: 0 1.25rem;
}
.chapter-end .chevron { margin-bottom: 2rem; }
.chapter-nav { display: grid; gap: 0.75rem; }
@media (min-width: 560px) { .chapter-nav { grid-template-columns: 1fr 1fr; } }
.chapter-nav a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  text-decoration: none;
  color: var(--text);
}
.chapter-nav a:hover { border-color: var(--gold); }
.chapter-nav .direction { display: block; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.25rem; }
.chapter-nav .name { font-family: var(--display-font); font-size: 1.05rem; }
.chapter-nav a[rel="next"] { text-align: right; }
@media (min-width: 560px) { .chapter-nav a[rel="next"]:only-child { grid-column: 2; } }
.chapter-end .all { display: block; text-align: center; margin-top: 1.25rem; font-size: 0.92rem; }

/* -- reading controls --------------------------------------------------------- */

/*
 * Hidden until the script unhides it: with JavaScript off these buttons
 * would do nothing, and a dead control is worse than no control. Collapsed
 * by default so the page opens on the chapter rather than on its settings.
 */
.reader-controls { position: relative; font-family: var(--ui-font); font-size: 0.82rem; }
.reader-controls[hidden] { display: none; }
.reader-controls > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  list-style: none;
  font-family: var(--display-font);
  font-size: 0.95rem;
}
.reader-controls > summary::-webkit-details-marker { display: none; }
.reader-controls > summary::marker { content: ""; }
.control-body {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 25;
  width: min(19rem, calc(100vw - 2.5rem));
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem 0.75rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}
.reader-controls .group {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 999px;
  overflow: hidden;
  justify-self: start;
}
.reader-controls button {
  font: inherit;
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}
.reader-controls button[aria-pressed="true"] { background: var(--button); color: var(--on-button); }
.reader-controls .label { color: var(--muted); }

.resume {
  max-width: var(--measure);
  margin: 1rem auto 0;
  padding: 0 1.25rem;
}
.resume[hidden] { display: none; }
.resume button {
  font: 600 0.88rem/1 var(--ui-font);
  color: var(--on-button);
  background: var(--button);
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
}

/* -- pages: about, privacy, terms, not found ------------------------------------ */

.page-head { padding: 3rem 0 1rem; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.08; }
.page-head .lede { color: var(--muted); font-size: 1.1rem; max-width: 40rem; margin: 1rem 0 0; }

.prose { max-width: 42rem; padding-bottom: 2rem; }
.prose h2 { font-family: var(--display-font); font-size: 1.45rem; margin: 2.25rem 0 0.6rem; }
.prose p, .prose li { color: var(--text); }
.prose p { margin: 0 0 1rem; }
.prose ul { padding-left: 1.2rem; }
.prose .note { color: var(--muted); font-size: 0.92rem; }

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

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--rule);
  background: var(--bg-deep);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .chevron { opacity: 0.35; }
.site-footer .wrap { display: grid; gap: 2rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .brand { font-size: 1.1rem; }
.site-footer .tagline { margin: 0.6rem 0 0; max-width: 22rem; }
.site-footer h2 { font: 600 0.78rem/1 var(--ui-font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); margin: 0 0 0.85rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer .legal { display: block; border-top: 1px solid var(--rule); padding-top: 1.25rem; padding-bottom: 2rem; font-size: 0.82rem; }
.site-footer .legal p { margin: 0 0 0.35rem; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .reader-controls, .chapter-end, .progress, .resume { display: none !important; }
  body { background: #fff; color: #000; }
}
