/* Warm, papyrus-toned palette shared in spirit with bible.npmo.net */
:root {
  --bg: #f4efe4;
  --card: #faf6ee;
  --fg: #2a2219;
  --muted: #6e6253;
  --line: #ddd3c2;
  --accent: #9a4a2c;
  --accent-fg: #fbf7f0;
  --accent-soft: #efe0d2;
  --shadow: 0 4px 16px -6px rgb(60 40 20 / 0.18);
  --serif: 'Crimson Text', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1814;
    --card: #25201a;
    --fg: #efe7da;
    --muted: #a99c8a;
    --line: #3a3229;
    --accent: #d27f5a;
    --accent-fg: #1c1814;
    --accent-soft: #3a2a20;
    --shadow: 0 4px 16px -6px rgb(0 0 0 / 0.5);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  padding-bottom: 7rem; /* room for the player bar */
}
.wrap { width: 100%; max-width: 44rem; margin: 0 auto; padding: 0 16px; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--card); padding: .5rem 1rem; z-index: 10; }

/* Header */
.site-header { padding: 2.5rem 0 1.5rem; }
.brand {
  text-decoration: none; font-size: .78rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.site-header h1 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 7vw, 2.8rem);
  line-height: 1.1; margin-top: .35rem;
}
.lede { color: var(--muted); margin-top: .5rem; font-size: 1.05rem; }

/* Controls */
.controls { display: grid; gap: 1rem; grid-template-columns: 1fr auto; align-items: end; margin-bottom: 1.75rem; }
@media (max-width: 560px) { .controls { grid-template-columns: 1fr; } }
fieldset { border: 0; min-width: 0; }
legend, .goto label { font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .4rem; display: block; }
.segments {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  background: var(--line); padding: 4px; border-radius: 12px;
}
.seg {
  border: 0; background: transparent; padding: .55rem .4rem; border-radius: 9px;
  cursor: pointer; text-align: center; line-height: 1.2;
}
.seg strong { display: block; font-weight: 600; font-size: .95rem; }
.seg small { color: var(--muted); font-size: .72rem; }
.seg[aria-checked="true"] { background: var(--card); box-shadow: var(--shadow); }
.seg[aria-checked="true"] strong { color: var(--accent); }

.goto-row { display: flex; gap: 6px; }
.goto input {
  width: 5.5rem; padding: .6rem .75rem; border: 1px solid var(--line);
  background: var(--card); border-radius: 10px; font-size: 1.05rem;
}
.goto button, .btn {
  border: 0; background: var(--accent); color: var(--accent-fg); font-weight: 600;
  padding: .6rem 1rem; border-radius: 10px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: .4rem;
}
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }

/* Stop list */
.stops { list-style: none; display: grid; gap: .75rem; }
.stop-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .12s ease;
}
.stop-card:hover { transform: translateY(-1px); }
.num {
  font-family: var(--serif); font-size: 1.9rem; font-weight: 600; color: var(--accent);
  width: 2.6rem; text-align: center; line-height: 1;
}
.stop-card h2 { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; line-height: 1.2; }
.stop-card .sub { color: var(--muted); font-size: .82rem; }
.stop-card .blurb { font-size: .92rem; margin-top: .25rem; }
.dur { color: var(--muted); font-size: .8rem; white-space: nowrap; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.dur .play-dot {
  width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--accent-soft);
  display: grid; place-items: center;
}
.dur svg { width: 1.1rem; height: 1.1rem; fill: var(--accent); }
.stop-card.playing { border-color: var(--accent); }

/* Stop detail */
.back { display: inline-block; margin-bottom: 1rem; color: var(--muted); text-decoration: none; font-size: .9rem; }
.back:hover { color: var(--fg); }
.detail-head { display: flex; gap: 1rem; align-items: flex-start; }
.detail-head .num { font-size: 2.6rem; width: auto; }
.detail-head h2 { font-family: var(--serif); font-size: clamp(1.8rem, 6vw, 2.3rem); line-height: 1.1; font-weight: 600; }
.detail-head .sub { color: var(--muted); margin-top: .2rem; }
.big-play { margin: 1.5rem 0 .5rem; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.big-play .btn { padding: .85rem 1.4rem; font-size: 1.05rem; border-radius: 999px; }
.big-play svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.big-play .meta { color: var(--muted); font-size: .9rem; }

.transcript {
  margin-top: 1.5rem; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem 1.25rem 1.5rem;
}
.transcript h3 {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
  font-weight: 600; margin-bottom: .75rem;
}
.transcript p { font-family: var(--serif); font-size: 1.22rem; line-height: 1.6; }
.transcript p + p { margin-top: .8rem; }
.transcript p:first-of-type { font-weight: 600; }

.pager { display: flex; justify-content: space-between; gap: .75rem; margin-top: 1.5rem; }
.pager a { flex: 1; text-decoration: none; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.pager a small { display: block; color: var(--muted); font-size: .75rem; }
.pager a.next { text-align: right; }
.pager .spacer { flex: 1; }

.notice { color: var(--muted); padding: 2rem 0; }

/* Player bar */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: .65rem 0 calc(.65rem + env(safe-area-inset-bottom));
}
.player-inner { display: flex; align-items: center; gap: .75rem; }
.pp {
  flex: none; width: 3rem; height: 3rem; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); display: grid; place-items: center;
}
.pp svg { width: 1.4rem; height: 1.4rem; fill: var(--accent-fg); }
.pp .i-pause, .pp.is-playing .i-play { display: none; }
.pp.is-playing .i-pause { display: block; }
.player-body { flex: 1; min-width: 0; }
.now { display: block; font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seek-row { display: flex; align-items: center; gap: .5rem; }
.t { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 2.4rem; }
.t:last-child { text-align: right; }
#seek { flex: 1; accent-color: var(--accent); min-width: 0; }
.skipbtn {
  flex: none; position: relative; width: 2.6rem; height: 2.6rem; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center;
}
.skipbtn svg { width: 1.7rem; height: 1.7rem; fill: var(--fg); }
.skipbtn span { position: absolute; font-size: .55rem; font-weight: 600; top: 58%; left: 50%; transform: translate(-50%, -50%); }

.site-footer { color: var(--muted); font-size: .82rem; margin-top: 3rem; }

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