/* ============================================================
   KIMO'S KORNER  ·  default newsprint theme
   ------------------------------------------------------------
   Everything visual is driven by the tokens in :root.
   The chosen art direction swaps these tokens + the masthead
   font — the structure/flip below stays the same.
   ============================================================ */

:root {
  /* --- palette (default: warm newsprint) --- */
  --paper:        #f3ecdb;   /* page background          */
  --paper-edge:   #e7dcc2;   /* deckle / page edge       */
  --ink:          #211d17;   /* main text                */
  --ink-soft:     #5b5345;   /* secondary text           */
  --accent:       #8b2c20;   /* single spot color (red)  */
  --rule:         #cabd9d;   /* hairlines / column rules */
  --rule-strong:  #211d17;   /* heavy masthead rules     */

  /* --- type --- */
  --font-masthead: "Playfair Display", "Times New Roman", Georgia, serif;
  --font-headline: "Playfair Display", Georgia, serif;
  --font-body:     "Lora", Georgia, "Times New Roman", serif;
  --font-accent:   "Lora", Georgia, serif; /* datelines, labels (small caps) */

  /* --- metrics --- */
  --measure:      940px;     /* max reading width        */
  --gutter:       clamp(16px, 4vw, 40px);
  --radius:       2px;       /* paper is barely rounded  */

  /* --- the flip --- */
  --flip-dur:  900ms;
  --flip-ease: cubic-bezier(0.62, 0.04, 0.30, 1.00);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: clip;   /* the logo starburst is wider than the logo — keep it from causing sideways scroll */
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.5;
  /* newsprint paper: warm base + a whisper of grain */
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 20% 18%, rgba(0,0,0,0.020) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 62%, rgba(0,0,0,0.018) 0 1px, transparent 1px),
    radial-gradient(circle at 45% 85%, rgba(0,0,0,0.016) 0 1px, transparent 1px);
  background-size: 7px 7px, 11px 11px, 9px 9px;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

/* ============================================================
   MASTHEAD
   ============================================================ */
.masthead {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 34px) var(--gutter) 0;
  text-align: center;
}

.masthead__rule { height: 0; border: 0; }
.masthead__rule--top {
  border-top: 4px solid var(--rule-strong);
  margin-bottom: 10px;
}
.masthead__rule--double {
  border-top: 3px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  height: 5px;
  margin: 12px 0 10px;
}

.masthead__brandline {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-accent);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.masthead__logo {
  margin: 8px auto 4px;
  max-width: min(560px, 86%);
}
.masthead__logo img {
  margin: 0 auto;
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: contain;
}

.masthead__tagline {
  font-family: var(--font-headline);
  font-style: italic;
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  color: var(--ink-soft);
  margin: 2px 0 0;
}
.masthead__tagline strong { color: var(--accent); font-style: normal; }

.dateline {
  font-family: var(--font-accent);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  gap: 0.5em;
  justify-content: center;
  flex-wrap: wrap;
}
.dateline__dot { color: var(--accent); }

/* ============================================================
   ARCHIVE NAV
   ============================================================ */
.archive {
  max-width: var(--measure);
  margin: clamp(14px, 3vw, 26px) auto 0;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.archive__btn {
  font-family: var(--font-accent);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  padding: 7px 14px;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.archive__btn:hover { background: var(--ink); color: var(--paper); }
.archive__btn:disabled { opacity: 0.28; cursor: default; background: transparent; color: var(--ink); }

.archive__center { text-align: center; }
.archive__label {
  display: block;
  font-family: var(--font-accent);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 2px;
}
.archive__picker {
  font-family: var(--font-headline);
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  padding: 2px 22px 3px 6px;
  text-align: center;
  text-align-last: center;
  cursor: pointer;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: right 8px center, right 3px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* ============================================================
   THE STAGE + FLIPPING LEAF
   ============================================================ */
.reading {
  max-width: 1180px;                 /* wider than masthead to seat the quiz + answer pad */
  margin: 0 auto;
  padding: clamp(18px, 4vw, 34px) var(--gutter) 0;
}

/* quiz card (left) + sticky answer pad (right) on wide screens; stacked on narrow */
.reading__layout {
  display: flex;
  align-items: flex-start;
  gap: clamp(18px, 2.6vw, 34px);
}
.reading__main { flex: 1 1 auto; min-width: 0; }

/* ============================================================
   THE ANSWER PAD  (structure; theme adds the flavor)
   ============================================================ */
.notepad {
  flex: 0 0 300px;
  width: 300px;
  position: sticky;
  top: 16px;
  align-self: flex-start;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 15px 16px;
  box-shadow: 0 10px 26px -18px rgba(0,0,0,0.5);
}
.notepad__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 11px;
  border-bottom: 1px solid var(--rule);
}
.notepad__title {
  font-family: var(--font-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.86rem;
  color: var(--accent);
}
.notepad__clear {
  font-family: var(--font-accent);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 2px 8px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.notepad__clear:hover { color: var(--accent); border-color: var(--accent); }

.notepad__list { display: flex; flex-direction: column; gap: 7px; }
.notepad__row { display: flex; align-items: center; gap: 8px; }
.notepad__num {
  flex: 0 0 1.9em;
  text-align: right;
  font-family: var(--font-accent);
  font-size: 0.82rem;
  color: var(--ink-soft);
  cursor: default;
}
.notepad__input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 3px 2px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.notepad__input:focus {
  outline: none;
  border-bottom-color: var(--accent);
  background: rgba(0,0,0,0.025);
}
.notepad__input::placeholder { color: var(--ink-soft); opacity: 0.5; }

.notepad__free {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 8px;
}
.notepad__hint {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 0.72rem;
  color: var(--ink-soft);
  margin: 12px 0 0;
}

/* per-row "got it right" box — only visible once you flip to the answers */
.notepad__grade { display: none; flex: 0 0 auto; align-items: center; }
body.is-answers .notepad__grade { display: inline-flex; }
.notepad__grade input { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); margin: 0; }
.notepad__row.is-right .notepad__num { color: var(--accent); font-weight: 700; }
/* freeform self-score (non-numbered quizzes), shown on the answers side */
.notepad__selfscore { display: none; margin-top: 10px; }
body.is-answers .notepad__selfscore { display: block; }
.notepad__selfscore label { display: block; font-family: var(--font-accent); font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.notepad__selfscore input { width: 100%; font-family: var(--font-body); font-size: 0.9rem; padding: 6px 8px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); color: var(--ink); }

/* ============================================================
   SUBMIT  +  SCOREBOARD  +  VIEWER  (the family game layer)
   ============================================================ */
.submit { margin-top: 14px; display: none; flex-direction: column; gap: 8px; }   /* submit only on the answers side */
body.is-answers .submit { display: flex; }
.submit__name {
  font-family: var(--font-body); font-size: 0.95rem; padding: 8px 10px;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
}
.submit__name:focus { outline: none; border-color: var(--accent); }
.submit__btn {
  font-family: var(--font-accent); font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer; padding: 9px 14px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--paper); border-radius: var(--radius);
  transition: filter 0.15s ease, transform 0.1s ease;
}
.submit__btn:hover { filter: brightness(1.06); }
.submit__btn:active { transform: translateY(1px); }
.submit__btn:disabled { opacity: 0.45; cursor: default; filter: none; }
.submit__status { font-family: var(--font-accent); font-style: italic; font-size: 0.74rem; color: var(--ink-soft); margin: 0; min-height: 1em; }
.submit__status.is-ok { color: #2a8c3a; font-style: normal; }
.submit__status.is-err { color: var(--accent); font-style: normal; }

.scoreboard { margin-top: 16px; border-top: 1px solid var(--rule); padding-top: 10px; }
.scoreboard__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.scoreboard__title { font-family: var(--font-accent); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: var(--ink-soft); }
.scoreboard__list { display: flex; flex-direction: column; gap: 5px; }
.scoreboard__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--font-body); font-size: 0.9rem; padding: 5px 8px; border-radius: var(--radius); }
.scoreboard__row--clickable { cursor: pointer; border: 1px solid var(--rule); background: var(--paper); transition: border-color 0.15s ease; }
.scoreboard__row--clickable:hover { border-color: var(--accent); }
.scoreboard__pname { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
.scoreboard__pscore { font-family: var(--font-accent); font-size: 0.8rem; color: var(--accent); flex: 0 0 auto; }
.scoreboard__del { flex: 0 0 auto; width: 20px; height: 20px; line-height: 18px; text-align: center; padding: 0; border: 1px solid var(--rule); background: transparent; color: var(--ink-soft); border-radius: 50%; cursor: pointer; font-size: 1rem; }
.scoreboard__del:hover { border-color: var(--accent); color: var(--accent); }
.scoreboard__empty { font-style: italic; font-size: 0.82rem; color: var(--ink-soft); }
.scoreboard__hint { font-family: var(--font-accent); font-style: italic; font-size: 0.7rem; color: var(--ink-soft); margin: 7px 0 0; }

.viewer[hidden] { display: none; }
.viewer { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.viewer__backdrop { position: absolute; inset: 0; background: rgba(20,18,14,0.55); }
.viewer__box {
  position: relative; z-index: 1; background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  max-width: 560px; width: 100%; max-height: 84vh; overflow: auto;
  padding: 22px 24px; box-shadow: 0 24px 60px -20px rgba(0,0,0,0.6);
}
.viewer__close { position: absolute; top: 8px; right: 12px; font-size: 1.6rem; line-height: 1; background: transparent; border: 0; cursor: pointer; color: var(--ink-soft); }
.viewer__name { font-family: var(--font-headline); margin: 0 0 2px; color: var(--ink); }
.viewer__meta { font-family: var(--font-accent); font-size: 0.8rem; color: var(--ink-soft); margin: 0 0 14px; }
.viewer__answers { display: flex; flex-direction: column; gap: 6px; }
.viewer__arow { display: flex; gap: 8px; align-items: baseline; font-family: var(--font-body); font-size: 0.92rem; padding-bottom: 5px; border-bottom: 1px solid var(--rule); }
.viewer__anum { flex: 0 0 1.9em; text-align: right; color: var(--ink-soft); font-family: var(--font-accent); font-size: 0.82rem; }
.viewer__atext { flex: 1; min-width: 0; word-break: break-word; }
.viewer__amark { flex: 0 0 auto; font-weight: 700; }
.viewer__amark--right { color: #2a8c3a; }
.viewer__amark--wrong { color: var(--accent); opacity: 0.75; }

.viewer__actions { display: flex; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.viewer__edit, .viewer__del {
  font-family: var(--font-accent); font-size: 0.82rem; letter-spacing: 0.04em;
  padding: 8px 16px; border-radius: var(--radius); cursor: pointer; border: 1px solid var(--ink);
  background: transparent; color: var(--ink);
}
.viewer__edit:hover { background: var(--ink); color: var(--paper); }
.viewer__del { border-color: var(--accent); color: var(--accent); margin-left: auto; }
.viewer__del:hover { background: var(--accent); color: var(--paper); }

.scoreboard__row--mine { background: rgba(0,0,0,0.03); }
.scoreboard__row--mine .scoreboard__pname { color: var(--accent); }

/* ============================================================
   FULL-SCREEN ANSWER MODE  (tap the page → read it big + type at the bottom)
   ============================================================ */
.fs[hidden] { display: none; }
.fs {
  position: fixed; left: 0; z-index: 3000;
  top: var(--fs-top, 0px);             /* = visualViewport.offsetTop (set by JS) */
  width: 100vw;
  height: var(--fs-h, 100dvh);         /* = visualViewport.height (set by JS); 100dvh is only the pre-JS fallback */
  display: flex; flex-direction: column;
  background: var(--paper);
  overscroll-behavior: contain;
}
.fs__close {
  position: absolute; top: 8px; right: 10px; z-index: 2;
  font-family: var(--font-accent); font-size: 0.82rem; letter-spacing: 0.04em;
  padding: 7px 13px; border: 1px solid var(--ink); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); cursor: pointer;
}
.fs__imgwrap {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  touch-action: pan-y;   /* allow vertical image scrolling; signal the intent to iOS */
  padding: 10px;
}
.fs__img { width: 100%; height: auto; display: block; border: 1px solid var(--rule); border-radius: 2px; }
/* the text box sits at the BOTTOM, just above the keyboard (overlay is sized to the visible area) */
.fs__bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 10px; border-top: 2px solid var(--rule-strong); background: var(--paper);
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
.fs__num { font-family: var(--font-accent); font-weight: 700; color: var(--accent); min-width: 1.7em; text-align: right; }
.fs__input {
  flex: 1 1 auto; min-width: 0; font-family: var(--font-body); font-size: 1rem;
  padding: 11px 10px; border: 1px solid var(--rule); border-radius: var(--radius); background: #fff; color: var(--ink);
}
.fs__input:focus { outline: none; border-color: var(--accent); }
.fs__nav, .fs__next {
  flex: 0 0 auto; font-size: 1.2rem; line-height: 1; padding: 10px 15px;
  border-radius: var(--radius); cursor: pointer;
}
.fs__next { border: 1px solid var(--accent); background: var(--accent); color: var(--paper); }
.fs__nav { border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.fs__nav:disabled { opacity: 0.3; cursor: default; }
.fs__count { font-family: var(--font-accent); font-size: 0.72rem; color: var(--ink-soft); flex: 0 0 auto; }
/* freeform issues: just a single text box, no number/arrows/counter */
.fs__bar--free .fs__num,
.fs__bar--free .fs__nav,
.fs__bar--free .fs__next,
.fs__bar--free .fs__count { display: none; }
body.fs-open { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }   /* real iOS scroll-lock; top:-scrollY set in JS */

@media (max-width: 980px) {
  .reading { max-width: var(--measure); }
  .reading__layout { flex-direction: column; }

  /* MOBILE: dissolve .reading__main so the card + source button become siblings of the
     answer pad, then reorder them: card -> answer pad -> source button. Desktop untouched. */
  .reading__main { display: contents; }
  .stage   { order: 0; width: 100%; }
  .actions { order: 2; width: 100%; }

  .notepad {
    order: 1;             /* answer pad sits between the card and the source button */
    position: relative;   /* not sticky on mobile, but still a positioning context so the tape (::before) stays attached */
    width: 100%;
    flex-basis: auto;
    max-width: 560px;
    margin: 4px auto 0;
  }

  /* hint that the page can be tapped to open the full-screen answer mode */
  .page__scan-wrap { position: relative; }
  .page__scan-wrap::after {
    content: "⤢ Tap for full screen";
    position: absolute; bottom: 8px; left: 8px;
    font-family: var(--font-accent); font-size: 0.62rem; letter-spacing: 0.02em;
    background: var(--accent); color: var(--paper);
    padding: 3px 9px; border-radius: 999px; pointer-events: none; opacity: 0.92;
  }
  /* keep the hint opposite the flip dog-ear: quiz flip is on the right (hint left); answers flip is on the left (hint right) */
  .page--answers .page__scan-wrap::after { left: auto; right: 8px; }
  .page__scan { cursor: zoom-in; }
}

.stage {
  perspective: 2400px;
  perspective-origin: 50% 38%;
}

.leaf {
  position: relative;
  width: 100%;
  margin: 0 auto;
  transform-style: preserve-3d;
  transition: transform var(--flip-dur) var(--flip-ease);
  will-change: transform;
}
.leaf.is-flipped { transform: rotateY(180deg); }

/* a soft "lift" while turning, so it feels like a sheet being handled */
.leaf.is-flipping { transition: transform var(--flip-dur) var(--flip-ease); }

.face {
  top: 0;
  left: 0;
  width: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.face--front { position: relative; }      /* gives the leaf its height */
.face--back  { position: absolute; transform: rotateY(180deg); }

/* moving sheen that reads as paper catching the light mid-turn */
.leaf::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg,
    rgba(255,255,255,0) 30%,
    rgba(255,255,255,0.35) 50%,
    rgba(0,0,0,0.10) 62%,
    rgba(0,0,0,0) 80%);
  opacity: 0;
  border-radius: var(--radius);
  z-index: 5;
}
/* a quick, full-strength glint that holds a beat then fades right back out */
.leaf.is-flipping::after { animation: kk-sheen 0.5s ease-out; }
@keyframes kk-sheen {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  50%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ============================================================
   THE PAGE (a sheet of newsprint that frames the scan)
   ============================================================ */
.page {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  padding: clamp(14px, 3vw, 26px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 18px 38px -20px rgba(0,0,0,0.55),
    0 3px 8px -4px rgba(0,0,0,0.30);
}

.page__kicker {
  font-family: var(--font-accent);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.page__kicker--answers { color: var(--ink); }
.page__kicker-mark { color: var(--accent); }
.page__kicker--answers .page__kicker-mark { color: var(--accent); }

.page__scan-wrap {
  /* keeps a pleasing frame even before a real scan loads */
  min-height: 42vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page__scan {
  width: 100%;
  height: auto;
  border-radius: 1px;
}

/* ============================================================
   DOG-EAR FLIP AFFORDANCE (a folded page corner)
   ============================================================ */
.dogear {
  position: absolute;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-accent);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--accent);
  border: 0;
  padding: 9px 14px;
  cursor: pointer;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 -2px 8px -3px rgba(0,0,0,0.4);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.dogear--next { right: clamp(14px, 3vw, 26px); }
.dogear--back { left: clamp(14px, 3vw, 26px); background: var(--ink); }
.dogear:hover { transform: translateY(-3px); filter: brightness(1.06); }
.dogear__arrow { font-size: 1em; }

/* ============================================================
   ACTIONS
   ============================================================ */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: clamp(20px, 4vw, 34px) 0 0;
}

.btn {
  font-family: var(--font-accent);
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius);
  padding: 12px 22px;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn--flip {
  background: var(--accent);
  color: var(--paper);
  border: 1px solid var(--accent);
  position: relative;
}
.btn--flip:hover { filter: brightness(1.06); }
.btn__face--answers { display: none; }
body.is-answers .btn__face--quiz { display: none; }
body.is-answers .btn__face--answers { display: inline; }

.btn--source {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn--source strong { color: var(--accent); }
.btn--source:hover { background: var(--ink); color: var(--paper); }
.btn--source:hover strong { color: var(--paper); }

/* ============================================================
   COLOPHON / FOOTER
   ============================================================ */
.colophon {
  max-width: var(--measure);
  margin: clamp(28px, 6vw, 56px) auto 0;
  padding: 0 var(--gutter) clamp(28px, 6vw, 56px);
  text-align: center;
}
.colophon__rule {
  border-top: 1px solid var(--rule);
  margin-bottom: 14px;
}
.colophon__line {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0 0 4px;
}
.colophon__line strong { color: var(--accent); }
.colophon__fine {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 560px) {
  .masthead__brandline { font-size: 0.62rem; }
  .archive { flex-wrap: wrap; }
  .archive__center { order: -1; flex-basis: 100%; }
  .dogear { padding: 9px 12px; }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .leaf { transition: none; }
  .leaf::after { display: none; }
}

/* ============================================================
   THEME PICKER BAR  (temporary chooser — theme-independent chrome)
   Deliberately a neutral UI bar so it stays readable over any
   art direction. Removed once a favorite is locked in.
   ============================================================ */
.picker-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  background: #1e1b16;
  color: #f3ecdb;
  padding: 8px 14px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.28);
}
.picker-bar__label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.82;
}
.picker-bar__opts { display: flex; gap: 6px; flex-wrap: wrap; }
.picker-bar__btn {
  font: inherit;
  cursor: pointer;
  background: transparent;
  color: #f3ecdb;
  border: 1px solid rgba(243,236,219,0.4);
  padding: 5px 11px;
  border-radius: 3px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.picker-bar__btn:hover { border-color: #f3ecdb; }
.picker-bar__btn.is-active {
  background: #f3ecdb;
  color: #1e1b16;
  border-color: #f3ecdb;
  font-weight: 600;
}
.picker-bar__hint { opacity: 0.5; font-style: italic; font-size: 0.72rem; }
@media (max-width: 560px) {
  .picker-bar__hint { display: none; }
  .picker-bar__label { flex-basis: 100%; text-align: center; }
}
