/* Algy & Penelope — warm pastel, shabby-romantic, mobile first.
   Self-hosted fonts, no third-party requests, no build step. */

@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --paper: #fbf4e8;
  --paper-2: #f5e9d7;
  --card: #fffdf8;
  --ink: #33272a;
  --ink-soft: #6d5a54;
  --ink-faint: #948079;
  --rose: #c4756f;
  --rose-deep: #a4554f;
  --rose-soft: #f0d6d2;
  --mustard: #d9a441;
  --mustard-soft: #f3e3bd;
  --sage: #8a9a7b;
  --sage-soft: #dfe6d6;
  --line: #e6d5bf;
  --line-soft: #efe2d1;
  --algy: #b9714f;
  --penelope: #a4554f;
  --narrator: #8a7350;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(51, 39, 42, .04), 0 14px 34px -24px rgba(51, 39, 42, .35);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 600px at 12% -10%, #fdf8ee 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 0%, #f7e7da 0%, transparent 55%),
    radial-gradient(700px 700px at 0% 100%, #f3ead6 0%, transparent 60%);
  background-attachment: fixed;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--rose-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0; }
p { margin: 0 0 1rem; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--mustard-soft); }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 99;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 10px;
  text-decoration: none; transition: top .18s ease;
}
.skip-link:focus { top: 0; color: #fff; }
:focus-visible { outline: 2px solid var(--rose-deep); outline-offset: 3px; }

/* ------------------------------------------------------------ header */
.site-header { padding: 20px 0 10px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.crest {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--rose-deep);
  box-shadow: var(--shadow);
}
.crest svg { width: 28px; height: 28px; }
.brand-text { display: flex; flex-direction: column; }
.wordmark { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.05; }
.sub { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-top: 4px; }
.nav-toggle {
  display: none; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 10px 18px; min-height: 44px;
}
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--rose); }
.nav-cta { margin-left: 4px; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; font-size: .94rem;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); color: #fff; }
.btn-rose { background: var(--rose); color: #fff; }
.btn-rose:hover { background: var(--rose-deep); }
.btn-ink { background: var(--ink); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { background: var(--card); color: var(--ink); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .86rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ------------------------------------------------------------ notices */
.notice {
  display: flex; gap: 12px; align-items: flex-start; margin: 12px 0 0;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); font-size: .92rem; color: var(--ink-soft);
}
.notice-rest { border-color: var(--mustard); background: var(--mustard-soft); color: var(--ink); }

/* ------------------------------------------------------------ hero */
.hero { padding: 34px 20px 8px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px;
  font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint);
}
.rule-dot { width: 22px; height: 1px; background: var(--rose); display: inline-block; }
.display {
  font-size: clamp(2.5rem, 8.5vw, 5.4rem); letter-spacing: -.035em; line-height: .95;
  color: var(--ink);
}
.display .amp { color: var(--rose); font-style: italic; }
.display-sm { font-size: clamp(2rem, 5.4vw, 3.4rem); margin-bottom: 12px; }
.tagline {
  max-width: 640px; margin: 18px auto 0; color: var(--ink-soft);
  font-size: clamp(1rem, 2.4vw, 1.18rem); line-height: 1.6;
}
.hero-meta {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 10px 20px; margin: 24px auto 0; font-size: .86rem; color: var(--ink-soft);
}
.meta-item { display: inline-flex; gap: 6px; align-items: baseline; }
.meta-item strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.live-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px;
  border-radius: 999px; border: 1px solid var(--sage); background: var(--sage-soft);
  color: #4c5c40; font-size: .76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.live-badge.is-resting { border-color: var(--line); background: var(--paper-2); color: var(--ink-faint); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 0 rgba(138,154,123,.55); animation: pulse 2.4s infinite; }
.live-badge.is-resting .pulse { background: var(--ink-faint); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(138,154,123,.5); } 70% { box-shadow: 0 0 0 9px rgba(138,154,123,0); } 100% { box-shadow: 0 0 0 0 rgba(138,154,123,0); } }

/* ------------------------------------------------------------ cast */
.cast {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 760px; margin-left: auto; margin-right: auto;
  align-items: end; margin-top: 30px; margin-bottom: 8px;
}
.seat {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 16px 12px 18px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); position: relative;
}
.seat-algy { transform: rotate(-.6deg); }
.seat-penelope { transform: rotate(.6deg); }
.seat-narrator { background: linear-gradient(180deg, #fffdf7, #f7ecd9); padding-top: 26px; }
.seat-text h2 { font-size: 1.05rem; margin-bottom: 4px; }
.seat-text p { margin: 0; font-size: .8rem; color: var(--ink-soft); line-height: 1.45; }
.narrator-frame { position: relative; padding: 8px; border: 1px solid var(--mustard); border-radius: 50% 50% 46% 46%; }
.frame-corner { position: absolute; width: 9px; height: 9px; border: 1px solid var(--mustard); border-radius: 50%; background: var(--paper); }
.frame-corner.tl { top: -4px; left: 12px; } .frame-corner.tr { top: -4px; right: 12px; }
.frame-corner.bl { bottom: -4px; left: 12px; } .frame-corner.br { bottom: -4px; right: 12px; }

.avatar { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--paper-2); flex: 0 0 auto; }
.avatar svg { display: block; width: 100%; height: 100%; }
.avatar-lg { width: 92px; height: 92px; }
.avatar-md { width: 56px; height: 56px; }
.avatar-sm { width: 40px; height: 40px; }
.avatar-xs { width: 22px; height: 22px; }

/* ------------------------------------------------------------ layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; align-items: start; margin: 26px auto 60px; }
.stage-col { min-width: 0; }
.stage-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 14px; }
.section-title { font-size: 1.5rem; }
.section-sub { margin: 4px 0 0; color: var(--ink-soft); font-size: .88rem; max-width: 48ch; }
.chip {
  display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--rose-soft);
  color: var(--rose-deep); font-size: .76rem; font-weight: 600; white-space: nowrap;
  border: 1px solid #e7c4bf;
}
.chip-quiet { background: var(--paper-2); color: var(--ink-faint); border-color: var(--line); }

/* ------------------------------------------------------------ scene */
.feed { display: flex; flex-direction: column; gap: 22px; }
.scene {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.scene.is-active { border-color: #e0bfa8; }
.scene-head { padding: 16px 18px 12px; border-bottom: 1px dashed var(--line); background: linear-gradient(180deg, #fffdf8, #fdf7ec); position: relative; }
.scene-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.scene-no { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--rose-deep); font-weight: 600; }
.scene-format { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.scene-topic { margin: 4px 0 0; font-size: .86rem; color: var(--ink-soft); font-style: italic; padding-right: 64px; }
.scene-topic-lg { font-size: 1rem; padding-right: 0; }
.scene-time { position: absolute; right: 18px; top: 18px; font-size: .7rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.lines { padding: 16px 18px 6px; display: flex; flex-direction: column; gap: 14px; }
.line { display: flex; gap: 10px; align-items: flex-start; max-width: 92%; }
.line-algy { align-self: flex-start; }
.line-penelope { align-self: flex-end; flex-direction: row-reverse; }
.line-penelope .line-who { justify-content: flex-end; }
.line-narrator {
  align-self: center; max-width: 100%; width: 100%; display: block; text-align: center;
  padding: 10px 6px 4px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(90deg, transparent, #faf1e2 12%, #faf1e2 88%, transparent);
}
.line-narrator .line-avatar { display: none; }
.line-narrator .line-who { justify-content: center; }
.line-narrator .bubble {
  background: transparent; border: 0; padding: 2px 6px 6px; font-family: var(--serif);
  font-style: italic; font-size: 1.02rem; color: #5c4a3e; box-shadow: none;
}
.line-narrator .bubble::before { content: "“"; color: var(--mustard); }
.line-narrator .bubble::after { content: "”"; color: var(--mustard); }
.line-avatar { margin-top: 2px; }
.line-main { min-width: 0; }
.line-who { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; margin-bottom: 4px; font-size: .76rem; color: var(--ink-faint); }
.line-name { font-weight: 600; color: var(--ink); font-size: .82rem; }
.line-role { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.line-time { font-variant-numeric: tabular-nums; }
.bubble {
  background: #fff; border: 1px solid var(--line-soft); border-radius: 4px 16px 16px 16px;
  padding: 11px 14px; font-size: .96rem; line-height: 1.5; box-shadow: 0 1px 0 rgba(51,39,42,.03);
  overflow-wrap: anywhere;
}
.line-algy .bubble { border-left: 3px solid #d9a98c; }
.line-penelope .bubble { border-radius: 16px 4px 16px 16px; border-right: 3px solid #d8a1aa; background: #fffaf7; }
.line-narrator .bubble { border-radius: 0; }
.tag { display: inline-block; padding: 2px 7px; border-radius: 999px; background: var(--mustard-soft); color: #7a5a14; font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; }
.scene-waiting { margin: 0; padding: 8px 0 16px; text-align: center; color: var(--ink-faint); font-style: italic; font-family: var(--serif); }
.scene-foot { padding: 6px 18px 18px; }
.scene-link { display: inline-block; font-size: .8rem; color: var(--ink-faint); text-decoration: none; margin-top: 4px; }
.scene-link:hover { color: var(--rose-deep); }

/* ------------------------------------------------------------ votes */
.vote { margin-top: 8px; padding: 14px; border: 1px dashed #e0c6b2; border-radius: var(--radius-sm); background: #fdf8ef; }
.vote-q { margin: 0 0 10px; font-family: var(--serif); font-size: 1.02rem; }
.vote-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.vote-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 7px 13px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: .86rem; font-weight: 600; transition: all .15s ease;
}
.vote-btn:hover:not([disabled]) { border-color: var(--rose); background: #fff7f4; transform: translateY(-1px); }
.vote-btn[disabled] { opacity: .75; cursor: default; }
.vote-btn.is-picked { background: var(--rose); border-color: var(--rose); color: #fff; }
.vote-face { display: inline-flex; }
.vote-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--paper-2); color: var(--ink-soft); font-size: .72rem; }
.vote-btn.is-picked .vote-n { background: rgba(255,255,255,.25); color: #fff; }
.vote-note { margin: 8px 0 0; font-size: .72rem; color: var(--ink-faint); }
.vote-both { background: #fbf3e4; }

/* ------------------------------------------------------------ sidebar */
.side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card h3, .card-title { font-size: 1.1rem; margin-bottom: 10px; }
.card-fine { margin: 10px 0 0; font-size: .76rem; color: var(--ink-faint); line-height: 1.5; }
.card-state dl { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.card-state dl > div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding-bottom: 8px; border-bottom: 1px dotted var(--line-soft); }
.card-state dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.card-state dt { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
.card-state dd { margin: 0; font-size: .84rem; }
.score { display: flex; flex-direction: column; gap: 7px; }
.score-row { display: grid; grid-template-columns: 68px 1fr 30px; gap: 8px; align-items: center; font-size: .8rem; }
.score-name { color: var(--ink-soft); }
.score-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.score-bar { height: 8px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.score-bar i { display: block; height: 100%; background: var(--algy); border-radius: 999px; transition: width .5s ease; }
.score-bar-p i { background: var(--penelope); }
.score-bar-b i { background: var(--mustard); }
.fund-line { font-size: .9rem; margin-bottom: 10px; }
.progress { height: 12px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); overflow: hidden; }
.progress-lg { height: 18px; }
.progress-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--mustard), #c88a2a); border-radius: 999px; transition: width .6s ease; }
.card-advice .targets { display: flex; gap: 6px; margin-bottom: 10px; }
.target {
  flex: 1; min-height: 40px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-soft); font-size: .82rem; font-weight: 600;
}
.target.is-selected { background: var(--ink); color: #fff; border-color: var(--ink); }
.field { display: block; margin-bottom: 10px; }
.field > span { display: block; font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  padding: 10px 12px; font-size: .9rem; min-height: 42px;
}
.field textarea { resize: vertical; min-height: 78px; line-height: 1.45; }
.field-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.field-foot > span { font-size: .72rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.form-state { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; font-size: .82rem; line-height: 1.45; }
.form-state.ok { background: var(--sage-soft); color: #41503a; }
.form-state.error { background: var(--rose-soft); color: #73342f; }
.form-state.pending { background: var(--mustard-soft); color: #6f5212; }
.ledger-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dotted var(--line-soft); font-size: .82rem; }
.ledger-row:last-of-type { border-bottom: 0; }
.ledger-row strong { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ typing + pill */
.typing {
  display: flex; align-items: center; gap: 10px; padding: 4px 4px 0;
  color: var(--ink-faint); font-size: .8rem; font-style: italic;
}
.typing[hidden] { display: none; }
.typing-dots { display: inline-flex; gap: 4px; }
.typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--rose); animation: bounce 1.2s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
.new-pill {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(20px);
  opacity: 0; pointer-events: none; z-index: 30; border: 1px solid var(--line);
  background: var(--ink); color: #fff; border-radius: 999px; padding: 10px 18px; font-size: .84rem;
  transition: all .25s ease; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4);
}
.new-pill.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

/* ------------------------------------------------------------ page heads, prose */
.page-head { padding: 34px 0 20px; }
.page-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.lede { color: var(--ink-soft); font-size: 1.02rem; max-width: 62ch; margin-top: 8px; }
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.35rem; margin: 28px 0 8px; }
.prose p, .prose li { color: #4b3b39; }
.prose ul { padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.cast-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 20px; }
.cast-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line-soft); border-radius: 12px; font-size: .9rem; }
.crumbs { display: inline-block; font-size: .8rem; color: var(--ink-faint); text-decoration: none; margin: 20px 0 12px; }
.scene-page-head { padding: 8px 0 18px; }
.scene-nav { display: flex; justify-content: space-between; gap: 10px; margin: 18px 0 24px; flex-wrap: wrap; }
.card-after { margin-bottom: 40px; }
.mini-tally { display: flex; flex-wrap: wrap; gap: 14px; align-items: baseline; font-size: .86rem; color: var(--ink-soft); }
.mini-tally strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.mini-total { color: var(--ink-faint); font-size: .76rem; }
.disclaimer-inline { margin: 16px 0; padding: 12px 14px; border-left: 3px solid var(--mustard); background: #fdf7e9; font-size: .82rem; color: var(--ink-soft); }

/* ------------------------------------------------------------ archive */
.archive-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.archive-link {
  display: grid; grid-template-columns: 96px 1fr; gap: 4px 16px; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s;
}
.archive-link:hover { border-color: var(--rose); transform: translateY(-1px); color: var(--ink); }
.archive-no { grid-row: span 3; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--rose-deep); font-weight: 600; padding-top: 2px; }
.archive-format { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; }
.archive-topic { font-size: .86rem; color: var(--ink-soft); font-style: italic; }
.archive-meta, .archive-tally { font-size: .72rem; color: var(--ink-faint); }
.archive-tally { margin-top: 2px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 24px 0 50px; }
.pager-pos { font-size: .8rem; color: var(--ink-faint); }

/* ------------------------------------------------------------ fund */
.fund-hero { padding: 10px 0 22px; }
.fund-figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.fund-raised { font-family: var(--serif); font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 600; letter-spacing: -.02em; }
.fund-of { color: var(--ink-soft); font-size: .92rem; }
.fund-next { margin: 12px 0 0; color: var(--ink-soft); font-size: .92rem; }
.card-donate { margin-bottom: 26px; }
.donate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 14px 0 6px; }
.donate-card {
  display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line);
  border-radius: 14px; background: #fff; text-decoration: none; color: var(--ink);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.donate-card:hover { border-color: var(--rose); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.donate-amount { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--rose-deep); }
.donate-name { font-weight: 600; font-size: .92rem; }
.donate-note { font-size: .78rem; color: var(--ink-faint); line-height: 1.4; }
.donate-custom { background: #fdf7ec; border-style: dashed; }
.unset { padding: 14px; border: 1px dashed var(--line); border-radius: 12px; background: #fdf8ef; font-size: .9rem; }
.milestones { margin: 26px 0; }
.milestone-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.milestone { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--card); }
.milestone.is-reached { border-color: var(--sage); background: #fbfdf8; }
.milestone-mark {
  flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); font-size: .8rem; color: var(--ink-soft); background: #fff;
}
.milestone.is-reached .milestone-mark { background: var(--sage); border-color: var(--sage); color: #fff; }
.milestone-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.milestone-name { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }
.milestone-goal { font-size: .82rem; color: var(--rose-deep); font-variant-numeric: tabular-nums; white-space: nowrap; }
.milestone-body p { margin: 2px 0 0; font-size: .84rem; color: var(--ink-soft); }
.milestone-when { font-size: .7rem; color: var(--ink-faint); }
.ledger-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ledger-list li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; font-size: .84rem; padding-bottom: 8px; border-bottom: 1px dotted var(--line-soft); }
.ledger-list time { color: var(--ink-faint); font-size: .74rem; }
.card-fineprint { margin-bottom: 50px; }
.card-fineprint p { font-size: .84rem; color: var(--ink-soft); }

/* ------------------------------------------------------------ quotes */
.quote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 50px; }
.quote-card {
  display: block; padding: 18px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--card); text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
}
.quote-card:hover { border-color: var(--rose); color: var(--ink); }
.quote-text { font-family: var(--serif); font-size: 1.05rem; line-height: 1.45; }
.quote-who { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: .76rem; color: var(--ink-faint); }
.quote-stage { position: relative; margin: 12px 0 8px; padding: 40px 26px 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.quote-mark { color: var(--rose-soft); width: 40px; margin-bottom: 8px; }
.quote-mark svg { width: 34px; height: 34px; }
.quote-big { margin: 0; font-family: var(--serif); font-size: clamp(1.5rem, 4.4vw, 2.4rem); line-height: 1.28; letter-spacing: -.01em; }
.quote-attrib { display: flex; align-items: center; gap: 12px; margin-top: 22px; font-size: .8rem; color: var(--ink-faint); }
.quote-attrib strong { display: block; color: var(--ink); font-size: .9rem; }

/* ------------------------------------------------------------ admin */
.admin-status { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); font-size: .74rem; background: var(--card); color: var(--ink-soft); white-space: nowrap; }
.pill-ok { border-color: var(--sage); background: var(--sage-soft); color: #41503a; }
.pill-warn { border-color: var(--mustard); background: var(--mustard-soft); color: #6f5212; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 16px; }
.admin-switches { display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--ink-soft); margin-bottom: 10px; }
.card > .btn { margin-top: 6px; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .8rem; min-width: 520px; }
.admin-table th { text-align: left; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); padding: 8px 8px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 8px; border-bottom: 1px dotted var(--line-soft); vertical-align: top; }
.admin-table tr.is-hidden { opacity: .5; }
.admin-table small { color: var(--ink-faint); }
.inline { display: inline; }
.link-btn { border: 0; background: none; color: var(--rose-deep); text-decoration: underline; padding: 0 6px 0 0; font-size: .78rem; }
.row-actions { white-space: nowrap; }
.admin-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 50px; }
.event-list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; font-size: .76rem; }
.event-list li { display: grid; grid-template-columns: 76px 110px 1fr; gap: 6px; padding: 5px 0; border-bottom: 1px dotted var(--line-soft); color: var(--ink-soft); }
.event-list time { color: var(--ink-faint); }
.event-kind { color: var(--rose-deep); }
.admin-login { max-width: 420px; }

/* ------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--line); background: linear-gradient(180deg, #fdf7ec, #f6ead9); padding: 34px 0 28px; margin-top: 20px; }
.footer-band { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; }
.seal { color: var(--rose-deep); opacity: .7; width: 52px; }
.disclaimer { font-size: .8rem; color: var(--ink-soft); margin: 0 0 8px; max-width: 78ch; }
.disclaimer strong { color: var(--ink); font-family: var(--serif); font-size: .92rem; }
.disclaimer-fund { border-left: 2px solid var(--mustard); padding-left: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 20px 0 8px; font-size: .8rem; }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-fine { font-size: .72rem; color: var(--ink-faint); margin: 0; }
.error-page { padding: 60px 20px 90px; }
.error-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.empty-state { padding: 30px 18px; text-align: center; color: var(--ink-faint); }
.empty-title { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .card-state, .card-fund { grid-column: span 1; }
  .cast { grid-template-columns: 1fr 1fr; }
  .seat-narrator { grid-column: 1 / -1; order: -1; flex-direction: row; text-align: left; justify-content: center; }
  .seat-narrator .seat-text { max-width: 300px; }
  .admin-two { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .site-header { padding-top: 14px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px; margin-top: 8px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; border-radius: 10px; min-height: 44px; display: flex; align-items: center; }
  .site-nav a[aria-current="page"] { background: var(--paper-2); box-shadow: none; }
  .nav-cta { margin: 4px 0 0; }
  .hero { padding-top: 24px; }
  .cast { grid-template-columns: 1fr; gap: 10px; }
  .seat-algy, .seat-penelope, .seat-narrator { transform: none; flex-direction: row; text-align: left; }
  .seat-narrator { order: 0; }
  .avatar-lg { width: 68px; height: 68px; }
  .seat-text h2 { font-size: 1rem; }
  .lines { padding: 14px 12px 4px; }
  .line { max-width: 100%; }
  .line-penelope { align-self: flex-end; }
  .scene-head { padding: 14px 14px 10px; }
  .scene-time { position: static; display: block; margin-top: 6px; }
  .scene-topic { padding-right: 0; }
  .scene-foot { padding: 4px 14px 16px; }
  .bubble { font-size: .93rem; }
  .vote-btns { display: grid; grid-template-columns: 1fr 1fr; }
  .vote-both { grid-column: 1 / -1; justify-content: center; }
  .layout { gap: 20px; }
  .side { grid-template-columns: 1fr; }
  .page-head { padding-top: 24px; }
  .archive-link { grid-template-columns: 1fr; }
  .archive-no { grid-row: auto; }
  .footer-band { grid-template-columns: 1fr; }
  .seal { display: none; }
  .new-pill { bottom: 12px; }
}
@media (max-width: 380px) {
  .wrap { padding: 0 14px; }
  .wordmark { font-size: 1.24rem; }
  .vote-btns { grid-template-columns: 1fr; }
}

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

/* ------------------------------------------------------------ toasts */
.toast-host { position: fixed; right: 14px; bottom: 14px; z-index: 80; display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100vw - 28px)); }
.toast {
  background: var(--ink); color: #fff; padding: 11px 14px; border-radius: 12px;
  font-size: .82rem; line-height: 1.4; box-shadow: 0 16px 40px -18px rgba(0,0,0,.6);
  opacity: 1; transition: opacity .35s ease;
}
.toast strong { color: #f6dfc4; }
.type-meta { color: var(--ink-faint); font-size: .74rem; }

/* ------------------------------------------------------------ mobile header fixes */
@media (max-width: 720px) {
  .bar { flex-wrap: nowrap; }
  .brand { flex: 1 1 auto; min-width: 0; }
  .brand-text { min-width: 0; }
  .wordmark { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-toggle { margin-left: auto; flex: 0 0 auto; }
  .site-nav { order: 3; flex-basis: 100%; }
  .seat-narrator { order: -1; }
}

/* footer copy column must be allowed to shrink, not spill into the seal column */
.footer-copy { min-width: 0; }
.footer-band { grid-template-columns: 56px minmax(0, 1fr); }

/* ------------------------------------------------------------ feed order */
.feed-order { margin: 7px 0 0; font-size: .78rem; color: var(--ink-faint); }
.jump-latest {
  border: 0; background: none; color: var(--rose-deep); text-decoration: underline;
  text-underline-offset: 3px; font-size: .78rem; padding: 2px 4px;
}
.jump-latest:hover { color: var(--ink); }
.tag-latest { background: var(--rose-soft); color: var(--rose-deep); border: 1px solid #e7c4bf; }

.scene-stage { margin: 6px 0 0; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--rose-deep); }
.scene-stage + .scene-topic { margin-top: 3px; }
@media (max-width: 980px) { .cast { max-width: none; } }

.stage-list { margin: 12px 0 18px; padding-left: 20px; }
.stage-list li { margin-bottom: 6px; font-size: .9rem; color: var(--ink-soft); }
.stage-list strong { color: var(--ink); }

@media (max-width: 640px) {
  .brand .sub { display: none; }
  .brand .wordmark { font-size: 1.12rem; }
}

/* With the seal hidden the copy is the only grid child; a two-column template would put it
   in the 56px column and wrap it one word per line. */
@media (max-width: 760px) {
  .footer-band { grid-template-columns: minmax(0, 1fr); }
  .footer-copy { grid-column: 1; }
}

/* twohanders-footer — scoped with th- prefixes: .footer-links already exists in the site footers */
.th-family {
  text-align: center;
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: .78rem;
  line-height: 1.7;
  color: var(--muted, #a89cc4);
}
.th-family p { margin: .2rem 0; }
.th-family a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(240, 192, 90, .35); }
.th-family a:hover { color: var(--gold, #f0c05a); border-bottom-color: currentColor; }
.th-family .th-legal { letter-spacing: .04em; }
.th-family .th-nav { font-size: .8rem; }
.th-family .th-showline a, .th-family .th-nav a { display: inline; }
.th-family .th-showline { opacity: .85; }

/* legal pages */
.legal h2 { font-family: var(--serif, Georgia, serif); font-size: 1.05rem; letter-spacing: .04em;
            margin: 1.8rem 0 .5rem; color: var(--gold-3, #ffe9b0); }
.legal p { margin: 0 0 .9rem; }
.legal .legal-updated { margin-top: 2rem; font-size: .78rem; color: var(--muted, #a89cc4); }

/* one centred footer: nav row, fine print and the family block share an axis.
   The disclosure panel keeps its paragraph text flush left, where prose belongs. */
.site-footer { text-align: center; }
.site-footer .footer-links { justify-content: center; }
.site-footer .footer-fine { text-align: center; }
.site-footer .disclosure { text-align: left; }

/* ------------------------------------------------------------ milestone decision */
.card-branch { border-color: rgba(240, 192, 90, .38); }
.branch-q { font-size: .92rem; margin: 0 0 10px; color: var(--ink); }
#branch-form { display: flex; flex-direction: column; gap: 8px; }
.branch-opt { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
              text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
              background: var(--paper-2); color: var(--ink); font: inherit; font-size: .82rem;
              line-height: 1.4; cursor: pointer; }
.branch-opt:hover:not(:disabled) { border-color: rgba(240, 192, 90, .7); }
.branch-opt.is-chosen { border-color: rgba(240, 192, 90, .9); background: rgba(240, 192, 90, .12); }
.branch-opt:disabled { cursor: default; opacity: .85; }
.branch-n { font-variant-numeric: tabular-nums; color: var(--ink-faint); }
.branch-result { font-family: var(--serif, Georgia, serif); font-size: 1rem; margin: 0 0 8px; }
.next-scene { color: var(--ink-soft); }

/* ------------------------------------------------------------ exchange of the day (pinned) */
.pinned { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 22px;
          align-items: center; background: linear-gradient(180deg, #fffdf8, #fbf1e2);
          border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
          padding: 16px; margin: 0 0 24px; position: relative; }
.pinned::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(196, 117, 111, .22);
                 border-radius: 12px; pointer-events: none; }
.pinned-media { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
                background: var(--paper); }
.pinned-media img { display: block; width: 100%; height: auto; }
.pinned-body { padding: 6px 12px 6px 0; }
.pinned-kicker { margin: 0 0 6px; font-size: .68rem; letter-spacing: .17em; text-transform: uppercase;
                 color: var(--rose-deep); font-weight: 600; }
.pinned-title { font-family: var(--serif); font-size: 1.32rem; line-height: 1.2; margin: 0 0 8px; }
.pinned-why { margin: 0 0 12px; color: var(--ink-soft); font-size: .84rem; line-height: 1.55; max-width: 46ch; }
@media (max-width: 760px) { .pinned { grid-template-columns: 1fr; } .pinned-body { padding: 0 4px 4px; } }

/* interval notice from the third voice: a band between exchanges, never a dialogue bubble */
.band { position: relative; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
        background: repeating-linear-gradient(135deg, rgba(217, 164, 65, .07) 0 8px, transparent 8px 16px),
                    var(--paper-2); padding: 13px 18px 11px; border-radius: 4px; }
.band-label { margin: 0; font-size: .65rem; letter-spacing: .18em; text-transform: uppercase;
              color: var(--narrator); font-weight: 600; }
.band-label span { letter-spacing: .06em; color: var(--ink-faint); font-weight: 400; }
.band-text { margin: 6px 0 5px; font-family: var(--serif); font-size: 1.02rem; line-height: 1.45;
             color: var(--ink); max-width: 62ch; }
.band-note { margin: 0; font-size: .67rem; color: var(--ink-faint); }

/* the share card, on the permalink for the exchange */
.share-card { margin: 20px 0 22px; }
.share-kicker { margin: 0 0 8px; font-size: .68rem; letter-spacing: .17em; text-transform: uppercase;
                color: var(--rose-deep); font-weight: 600; }
.share-media { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
               background: var(--paper); }
.share-media img { display: block; width: 100%; height: auto; }
