/* Shore Pass — high-contrast light theme, tuned for a 55+ iPhone user in
   sunlight (UX spec §2): body ≥17px effective (we use 19), tap targets
   ≥48px, one primary action per screen, WCAG AA contrast. */

:root {
  --ink: #14262e;        /* 13.9:1 on paper */
  --ink-soft: #3d545e;   /* 7.0:1 on paper */
  --paper: #fbf8f2;
  --card: #ffffff;
  --accent: #0a5c66;     /* 7.3:1 on white */
  --accent-ink: #ffffff;
  --line: #c9d4d6;
  --lock: #8a6d1f;
  --error: #a3232d;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.brand {
  padding: max(14px, env(safe-area-inset-top)) 20px 0;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 18px;
  color: var(--accent);
}

main {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 20px 140px; /* room for the player bar */
}

/* ── S1 hero ─────────────────────────────────────────────── */

.hero { text-align: center; padding-top: 6vh; }

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 4px;
}

.hero h1 { font-size: 32px; line-height: 1.2; margin: 0 0 8px; }

.hero-meta { color: var(--ink-soft); font-size: 18px; margin: 0 0 28px; }

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  min-width: 220px;
  justify-content: center;
  padding: 14px 40px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 26px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(10, 92, 102, 0.35);
}
.btn-play:active { transform: scale(0.98); }

.chips {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.chip {
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: var(--card);
  color: var(--accent);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.chip-quiet { border-color: var(--line); color: var(--ink-soft); font-weight: 600; }

/* ── preview list ────────────────────────────────────────── */

.preview h2 { font-size: 24px; margin: 40px 0 12px; }

.episodes { list-style: none; margin: 0; padding: 0; }

.episode-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  margin-bottom: 10px;
  min-height: 72px;
}
.e-main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: none;
  border: none;
  padding: 6px;
  min-height: 56px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.e-sources {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.episode-row .e-title { font-weight: 700; display: block; }
.episode-row .e-hook { color: var(--ink-soft); font-size: 17px; display: block; }
.episode-row .e-meta { color: var(--ink-soft); font-size: 16px; white-space: nowrap; }
.episode-row .e-badge { font-size: 16px; font-weight: 700; color: var(--lock); white-space: nowrap; }
.episode-row.played .e-title::after { content: " ✓"; color: var(--accent); }
.e-body { flex: 1; }

/* ── player ──────────────────────────────────────────────── */

.player {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--card);
  border-top: 2px solid var(--line);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  max-width: 560px;
  margin: 0 auto;
}
.p-title { margin: 0 0 6px; font-weight: 700; font-size: 17px; }

#p-scrub { width: 100%; min-height: 48px; accent-color: var(--accent); }

.p-times {
  display: flex; justify-content: space-between;
  font-size: 15px; color: var(--ink-soft);
}

.p-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
#p-transcript, #p-sources { flex-basis: calc(50% - 4px); }
.p-controls button {
  flex: 1;
  min-height: 48px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
#p-toggle { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.transcript {
  max-height: 40dvh;
  overflow-y: auto;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.transcript h2 { font-size: 19px; margin: 0 0 8px; }
#transcript-text { white-space: pre-wrap; font-size: 18px; }

/* ── sheets (soft-wall, purchase) ────────────────────────── */

.sheet {
  border: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  width: 100%;
  max-width: 560px;
  margin: auto auto 0;
  background: var(--card);
  color: var(--ink);
}
.sheet::backdrop { background: rgba(20, 38, 46, 0.55); }
.sheet h2 { margin: 0 0 12px; font-size: 26px; line-height: 1.25; }

.unlocks { list-style: none; margin: 0 0 16px; padding: 0; }
.unlocks li { padding: 6px 0; font-size: 18px; }
.unlocks li::before { content: "🔓 "; }

#softwall-form input {
  width: 100%;
  min-height: 52px;
  font-size: 19px;
  padding: 10px 14px;
  border: 2px solid var(--ink-soft);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  margin-bottom: 10px;
}

.btn-primary {
  width: 100%;
  min-height: 56px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}

.btn-ghost {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  border: none;
  background: none;
  color: var(--ink-soft);
  font-size: 18px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.field-error { color: var(--error); font-weight: 700; margin: 4px 0 0; }
.fineprint { color: var(--ink-soft); font-size: 16px; margin: 14px 0 0; }

.sku-cards { display: grid; gap: 12px; }
.sku {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.sku-best { border-color: var(--accent); }
.sku h3 { margin: 0; font-size: 21px; }
.sku p { margin: 6px 0 12px; font-size: 17px; }
.price { font-size: 24px; font-weight: 800; }
.price s { color: var(--ink-soft); font-weight: 600; margin-right: 6px; }
.founding {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* ── toast, footer, misc ─────────────────────────────────── */

#toast {
  position: fixed;
  bottom: calc(150px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  max-width: 90vw;
  text-align: center;
  z-index: 40;
}

.foot {
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--ink-soft);
  font-size: 16px;
}
.foot p { margin: 4px 0; }
.foot a { color: var(--ink-soft); }

.sources-list { list-style: none; margin: 0; padding: 0; }
.sources-list li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
.sources-list a { color: var(--accent); }

#see-pass { text-align: center; }

.prose { padding-top: 24px; }
.prose h1 { font-size: 30px; }
.prose a { color: var(--accent); }

/* ── S7 success ──────────────────────────────────────────── */

.success { text-align: center; padding-top: 4vh; }
.success .kicker { color: var(--accent); }
.success h1 { font-size: 30px; line-height: 1.2; margin: 0 0 8px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  margin: 18px 0;
}
.card-accent { border: 2px solid var(--accent); }
.card h2 { font-size: 21px; margin: 0 0 8px; }
.card p { margin: 0 0 12px; font-size: 18px; }

/* anchor variants of the buttons need flex centering + no underline */
a.btn-primary, a.btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-top: 8px;
}

.refund-note { text-align: center; margin: 20px 0; }
.refund-note a { color: var(--accent); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
