:root {
  color-scheme: light;
  --ink: #172522;
  --muted: #65706c;
  --soft: #8a9690;
  --line: rgba(23, 37, 34, 0.1);
  --line-strong: rgba(23, 37, 34, 0.16);
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --bg: #f7f4ee;
  --bg-soft: #eef4ef;
  --accent: #237c6e;
  --accent-dark: #18584f;
  --accent-soft: #dceee8;
  --warm: #b96540;
  --warm-soft: #fae8dc;
  --gold: #d6a45d;
  --success: #237c6e;
  --error: #a13d3d;
  --shadow: 0 20px 60px rgba(23, 37, 34, 0.1);
  --shadow-soft: 0 10px 26px rgba(23, 37, 34, 0.07);
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-story: Newsreader, Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  overflow-x: clip;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: clip;
  background:
    linear-gradient(180deg, rgba(250, 247, 241, 0.96) 0%, rgba(239, 246, 241, 0.78) 44%, rgba(247, 244, 238, 1) 100%);
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 247, 241, 0.82);
  backdrop-filter: blur(18px);
}

.nav,
.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  position: relative;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  line-height: 1;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(35, 124, 110, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-toggle {
  display: none;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 900;
  padding: 0 14px;
  cursor: pointer;
}

.nav-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  padding: 0 13px;
  transition: background 160ms ease, color 160ms ease;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.page {
  padding: 34px 0 70px;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 34px;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.site-footer div,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.site-footer strong {
  color: var(--ink);
}

.footer-brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 7px 18px rgba(35, 124, 110, 0.18);
}

.site-footer a {
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-dark);
}

.footer-socials {
  gap: 8px !important;
}

.footer-socials a {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(23, 37, 34, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  color: var(--muted);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.footer-socials a:hover {
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.footer-socials svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: currentColor;
}

.dashboard-hero,
.dashboard-welcome,
.dashboard-recommendation,
.panel,
.metric-card,
.chart-card,
.filter-panel,
.form-panel,
.auth-panel,
.audio-panel,
.empty-state,
.story-card,
.journey-hero,
.library-hero,
.library-search,
.spanish-help-panel,
.listen-again-panel,
.settings-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.dashboard-welcome {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(16px, 2.4vw, 24px);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: none;
}

.dashboard-welcome h1 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(1.85rem, 3.2vw, 3.1rem);
  line-height: 1;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.dashboard-welcome .muted {
  max-width: 720px;
  margin: 0;
}

.dashboard-quick-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-quick-actions .primary-cta {
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.92rem;
}

.dashboard-quick-actions .ghost-button {
  min-height: 44px;
  padding: 0 14px;
}

.dashboard-recommendation {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  align-items: stretch;
  gap: 18px;
  margin-top: 16px;
  padding: clamp(16px, 2.2vw, 22px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(250, 247, 241, 0.72));
  box-shadow: var(--shadow-soft);
}

.dashboard-recommendation::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--warm));
  opacity: 0.82;
}

.dashboard-recommendation .journey-copy {
  align-content: start;
  gap: 0;
}

.dashboard-recommendation .journey-copy h1 {
  margin: 4px 0 8px;
  max-width: 560px;
  font-size: clamp(1.65rem, 3vw, 2.65rem);
  line-height: 1.02;
}

.dashboard-recommendation .story-type {
  margin: 0 0 2px;
}

.dashboard-recommendation .hero-story-teaser {
  max-width: 620px;
  margin-bottom: 12px;
  font-size: clamp(0.98rem, 1.35vw, 1.12rem);
  line-height: 1.38;
}

.dashboard-recommendation .story-pill-row span {
  min-height: 26px;
  font-size: 0.74rem;
  padding: 0 9px;
}

.dashboard-recommendation .story-detail-setting {
  margin: 9px 0 0;
  font-size: 0.88rem;
}

.dashboard-recommendation .journey-actions {
  margin-top: 14px;
}

.dashboard-recommendation .primary-cta,
.dashboard-recommendation .ghost-button {
  min-height: 42px;
  padding: 0 15px;
  font-size: 0.9rem;
}

.dashboard-recommendation .hero-cover-art {
  min-height: 190px;
  max-height: 250px;
  box-shadow: none;
}

.dashboard-recommendation .hero-cover-art img {
  object-position: center;
}

.dashboard-progress-summary {
  margin-top: 14px;
}

.dashboard-progress-summary .progress-card {
  padding: 13px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
}

.dashboard-progress-summary .progress-card h2 {
  margin-bottom: 6px;
}

.journey-progress-card h2 {
  font-weight: 650;
}

.app-workspace-header {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: none;
  padding: clamp(16px, 2.4vw, 24px);
}

.app-workspace-header h1 {
  margin-bottom: 7px;
  font-size: clamp(1.85rem, 3.3vw, 3.1rem);
}

.app-workspace-header .muted {
  max-width: 720px;
  margin: 0;
}

.app-quiet-panel {
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
  padding: 16px;
}

.app-quiet-panel:hover {
  box-shadow: var(--shadow-soft);
}

.app-quiet-panel h2 {
  font-size: 1.22rem;
  font-weight: 650;
}

.app-search-panel input {
  min-height: 44px;
  font-size: 0.95rem;
}

.app-search-panel .button {
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.92rem;
}

.journey-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 38%);
  align-items: stretch;
  gap: 28px;
  padding: clamp(22px, 4vw, 38px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 241, 0.9) 58%, rgba(250, 232, 220, 0.8));
  box-shadow: var(--shadow);
}

.journey-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--warm));
}

.journey-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
}

.journey-copy h1 {
  margin: 0 0 14px;
  max-width: 760px;
  font-size: clamp(2.25rem, 5.5vw, 5rem);
  line-height: 0.96;
  font-family: var(--font-story);
  font-weight: 650;
}

.journey-copy .muted {
  max-width: 620px;
  margin: 0 0 22px;
  font-size: 1.05rem;
}

.journey-copy .progress {
  max-width: 620px;
}

.hero-story-teaser {
  max-width: 640px;
  margin: 0 0 18px;
  color: #33423d;
  font-family: var(--font-story);
  font-size: clamp(1.08rem, 2vw, 1.45rem);
  line-height: 1.36;
  font-weight: 500;
}

.hero-cover-art {
  position: relative;
  z-index: 1;
  display: block;
  align-self: stretch;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.hero-cover-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.journey-mini-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.journey-mini-stats span,
.story-pill-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(23, 37, 34, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  padding: 0 10px;
}

.journey-actions {
  position: relative;
  z-index: 1;
  justify-content: flex-start;
  margin-top: 8px;
}

.primary-cta {
  min-height: 52px;
  padding: 0 22px;
  font-size: 1rem;
}

.progress-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(150px, 0.8fr));
  gap: 14px;
  margin-top: 16px;
}

.progress-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.progress-card h2 {
  margin: 0 0 8px;
  font-size: clamp(1.08rem, 2vw, 1.45rem);
  line-height: 1.1;
}

.progress-card.compact h2 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 650;
}

.progress-card .progress {
  height: 8px;
}

.library-hero,
.platform-hero {
  padding: clamp(24px, 4vw, 38px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(238, 244, 239, 0.88));
}

.library-hero h1,
.dashboard-hero h1,
.section-header h1,
.story-header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.3rem);
  line-height: 0.98;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.story-header h1 {
  font-family: var(--font-story);
}

.story-header h1 {
  max-width: 760px;
  font-size: clamp(2.25rem, 5.4vw, 4.8rem);
  line-height: 0.98;
}

.section-header,
.story-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 32px 0 18px;
}

.story-header {
  align-items: flex-start;
}

.story-workspace-header {
  align-items: center;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: none;
  padding: clamp(16px, 2.4vw, 24px);
}

.story-workspace-header h1 {
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1;
}

.story-workspace-header .story-cover-art {
  flex: 0 0 min(300px, 30vw);
  box-shadow: none;
}

.story-workspace-header .story-cover-art img {
  aspect-ratio: 4 / 3;
}

.story-cover-art {
  flex: 0 0 min(360px, 34vw);
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.story-cover-art img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.eyebrow,
.label {
  margin: 0 0 9px;
  color: var(--warm);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.muted {
  color: var(--muted);
}

.button,
.ghost-button,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button {
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  padding: 0 18px;
  box-shadow: 0 12px 24px rgba(35, 124, 110, 0.22);
}

.button:hover {
  transform: translateY(-1px);
  background: var(--accent-dark);
}

.button:disabled {
  transform: none;
  box-shadow: none;
  background: #a8b5af;
  cursor: default;
}

.button-small {
  min-height: 38px;
  padding: 0 15px;
  color: #fff !important;
}

.ghost-button,
.ghost-link {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-dark);
  padding: 0 14px;
}

.ghost-button:hover,
.ghost-link:hover {
  transform: translateY(-1px);
  border-color: rgba(35, 124, 110, 0.28);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.status,
.topic-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 900;
}

.hero-actions,
.story-actions,
.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-grid,
.stats-grid,
.chart-grid {
  display: grid;
  gap: 16px;
}

.dashboard-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
}

.dashboard-grid.slim-grid {
  grid-template-columns: 2fr 1fr 1fr;
}

.stats-grid {
  grid-template-columns: 1fr 2fr;
  margin-top: 16px;
}

.metric-card,
.chart-card,
.panel {
  padding: 22px;
}

.metric-card,
.story-card,
.chart-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.metric-card:hover,
.story-card:hover,
.chart-card:hover {
  transform: translateY(-3px);
  border-color: rgba(35, 124, 110, 0.22);
  box-shadow: var(--shadow);
}

.metric-card.wide {
  grid-column: span 2;
}

.metric-card h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.8vw, 2.25rem);
  line-height: 1.05;
  font-weight: 930;
}

.topic-pill {
  min-height: 32px;
  margin: 0 6px 8px 0;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 0 11px;
  font-size: 0.86rem;
}

.mini-distribution {
  display: grid;
  grid-template-columns: 34px 1fr 52px;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.progress {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 37, 34, 0.08);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #63ad96, var(--gold));
  transition: width 450ms ease;
}

.panel h2,
.section-header h2,
.transcript h2,
.questions h2,
.carousel-header h2,
.chart-card h2,
.settings-panel h2,
.spanish-help-panel h2,
.listen-again-panel h2 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.15;
  font-weight: 920;
  letter-spacing: 0;
}

.carousel-header h2,
.empty-state h3 {
  font-weight: 800;
}

.carousel-header h2 {
  font-size: 1.48rem;
}

.carousel-section {
  margin-top: 30px;
}

.carousel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.carousel-controls {
  display: flex;
  gap: 8px;
}

.carousel-controls .ghost-button {
  width: 38px;
  min-height: 38px;
  padding: 0;
  font-size: 1.35rem;
}

.story-list {
  display: grid;
  gap: 14px;
}

.story-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 24%);
  gap: 14px;
  overflow-x: auto;
  padding: 6px 2px 16px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  cursor: grab;
}

.story-row.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.story-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  gap: 18px;
  min-height: 300px;
  min-width: 0;
  padding: 18px;
  scroll-snap-align: start;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 247, 241, 0.86));
  cursor: pointer;
}

.story-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--warm));
}

.story-card-click-target {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.story-card-click-target:focus-visible {
  outline: 3px solid rgba(246, 190, 111, 0.85);
  outline-offset: -5px;
}

.story-card-cover {
  position: relative;
  z-index: 2;
  display: block;
  margin: -18px -18px 0;
  overflow: hidden;
  background: var(--accent-soft);
}

.story-card-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 260ms ease;
}

.story-card-cover.square-cover img {
  aspect-ratio: 1 / 1;
}

.placeholder-cover {
  min-height: 180px;
  display: grid;
  place-items: end start;
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(circle at 76% 18%, rgba(214, 164, 93, 0.38), transparent 34%),
    linear-gradient(145deg, rgba(23, 37, 34, 0.96), rgba(35, 124, 110, 0.72));
  color: #fff7ec;
  text-decoration: none;
  padding: 16px;
}

.placeholder-cover span {
  max-width: 82%;
  font-family: var(--font-story);
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.05;
}

.landing-page {
  background: #f8f2e8;
}

.landing-page {
  scroll-behavior: smooth;
}

.landing-page .brand {
  color: #f8f2e8;
}

.landing-page .brand small {
  color: rgba(255, 247, 236, 0.68);
}

.landing-nav .brand-mark {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 247, 236, 0.08);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.landing-nav {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 30;
  display: flex;
  width: min(1080px, calc(100% - 40px));
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(23, 37, 34, 0.42);
  padding: 0 14px;
  backdrop-filter: blur(18px);
  transition: transform 220ms ease, opacity 220ms ease;
}

.landing-nav:focus-within {
  opacity: 1;
  transform: translateX(-50%);
}

.landing-nav.nav-hidden {
  opacity: 0;
  transform: translate(-50%, -120%);
  pointer-events: none;
}

.landing-nav nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.landing-nav nav a:not(.button) {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  padding: 7px 9px;
}

.landing-nav nav button {
  font: inherit;
}

.landing-page a:focus-visible,
.landing-page button:focus-visible,
.landing-page input:focus-visible,
.landing-page select:focus-visible {
  outline: 3px solid rgba(246, 190, 111, 0.8);
  outline-offset: 3px;
}

.landing-hero {
  position: relative;
  min-height: 630px;
  max-height: 700px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(390px, 1.05fr);
  align-items: stretch;
  overflow: hidden;
  background: #172522;
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(23, 37, 34, 0.92), rgba(23, 37, 34, 0.64) 38%, rgba(23, 37, 34, 0.08) 72%),
    linear-gradient(180deg, transparent 72%, rgba(248, 242, 232, 1));
  pointer-events: none;
}

.landing-hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: end;
  max-width: 560px;
  padding: 84px 0 68px max(32px, calc((100vw - 1080px) / 2));
}

.landing-hero-copy h1,
.landing-section-header h2,
.world-section h2,
.create-section h2,
.social-section h2,
.final-cta h2 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.landing-hero-copy h1 {
  color: #fff7ec;
  font-size: clamp(2.4rem, 4.75vw, 4.35rem);
  line-height: 0.98;
}

.landing-hero-copy > p:not(.eyebrow) {
  max-width: 460px;
  margin: 12px 0 14px;
  color: rgba(255, 247, 236, 0.82);
  font-size: clamp(0.96rem, 1.25vw, 1.08rem);
  line-height: 1.42;
}

.landing-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.landing-hero .landing-actions,
.create-section .landing-actions {
  justify-content: flex-start;
}

.landing-page .primary-cta {
  min-height: 42px;
  padding: 0 16px;
}

.landing-hero-art {
  margin: 0;
}

.landing-hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.landing-section,
.world-section,
.create-section,
.final-cta,
.coming-soon-panel {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.coming-soon-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 4;
  margin-top: -24px;
  overflow: hidden;
  border: 1px solid rgba(187, 116, 82, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.98), rgba(248, 227, 187, 0.9)),
    #fffaf1;
  box-shadow: 0 22px 55px rgba(23, 37, 34, 0.13);
  padding: 18px 20px;
}

.coming-soon-panel::before {
  content: "";
  align-self: stretch;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--terracotta), var(--gold));
  flex: 0 0 auto;
}

.coming-soon-panel h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2vw, 1.68rem);
  line-height: 1.1;
  font-weight: 700;
}

.coming-soon-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.coming-soon-panel .eyebrow {
  margin-bottom: 4px;
}

.coming-soon-panel .button {
  flex: 0 0 auto;
  min-width: 156px;
  box-shadow: 0 14px 28px rgba(35, 124, 110, 0.24);
}

.waitlist-success {
  border: 1px solid rgba(35, 124, 110, 0.18);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark) !important;
  font-weight: 850;
  padding: 10px 14px;
}

.landing-section {
  padding: 50px 0 0;
}

.coming-soon-panel + .landing-section {
  padding-top: clamp(78px, 9vh, 118px);
}

.landing-section-header {
  max-width: 620px;
  margin-bottom: 18px;
}

.landing-section-header h2,
.world-section h2,
.create-section h2,
.social-section h2,
.final-cta h2 {
  color: var(--ink);
  font-size: clamp(1.75rem, 3.35vw, 3.15rem);
  line-height: 1.06;
}

.landing-section-header > p:not(.eyebrow),
.world-section p,
.understanding-section p,
.create-section p,
.final-cta p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.42;
}

.landing-story-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.landing-story-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgba(23, 37, 34, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.landing-story-card:hover {
  transform: translateY(-3px);
  border-color: rgba(35, 124, 110, 0.24);
  box-shadow: 0 18px 40px rgba(23, 37, 34, 0.14);
}

.landing-story-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 260ms ease;
}

.landing-story-card:hover img {
  transform: scale(1.025);
}

.landing-story-card div {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 14px;
}

.landing-story-card h3,
.type-grid h3,
.how-grid h3 {
  margin: 0 0 8px;
  font-family: var(--font-story);
  font-size: 1.18rem;
  line-height: 1.08;
  font-weight: 650;
}

.landing-story-card p:not(.story-type),
.type-grid p,
.how-grid p,
.landing-story-card span {
  color: var(--muted);
}

.landing-story-card p:not(.story-type) {
  font-family: var(--font-story);
  font-size: 0.9rem;
  line-height: 1.34;
}

.landing-story-card span {
  display: block;
  margin-top: auto;
  padding-top: 12px;
  font-size: 0.78rem;
  font-weight: 850;
}

.landing-story-card small {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 10px;
  border: 1px solid rgba(35, 124, 110, 0.16);
  border-radius: 999px;
  background: rgba(220, 238, 232, 0.58);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 5px 9px;
}

.inline-story-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--accent-dark);
  font-weight: 900;
  text-decoration: none;
}

.inline-story-link:hover {
  text-decoration: underline;
}

.public-library-hero {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(136px, 18vh, 190px) 0 28px;
  text-align: center;
}

.public-library-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.25rem, 5vw, 5rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.98;
}

.public-library-hero > p:not(.eyebrow) {
  max-width: 680px;
  margin: 16px auto 18px;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.45vw, 1.22rem);
  line-height: 1.42;
}

.public-library-page .landing-actions {
  justify-content: center;
}

.public-library-success {
  margin-top: 8px;
}

.public-library-feature {
  padding-top: 42px;
}

.compact-header {
  margin-bottom: 14px;
}

.compact-header h2 {
  font-size: clamp(1.45rem, 2.25vw, 2.15rem);
}

.library-preview-row {
  padding-top: 44px;
}

.library-preview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.library-preview-card {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(23, 37, 34, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.library-preview-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.library-preview-card div {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 12px;
}

.library-preview-card h3 {
  margin: 0;
  font-family: var(--font-story);
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.08;
}

.library-preview-card p:not(.story-type) {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-story);
  font-size: 0.86rem;
  line-height: 1.32;
}

.library-preview-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.membership-hero,
.membership-cards,
.founding-readers-section,
.membership-faq {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.membership-hero {
  max-width: 920px;
  padding: clamp(136px, 18vh, 190px) 0 36px;
  text-align: center;
}

.membership-hero h1,
.membership-card h2,
.founding-readers-section h2,
.membership-faq h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
}

.membership-hero h1 {
  font-size: clamp(2.6rem, 5.5vw, 5.4rem);
  line-height: 0.96;
}

.membership-hero p {
  max-width: 760px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.42vw, 1.2rem);
  line-height: 1.44;
}

.membership-hero .membership-subtitle {
  max-width: 680px;
  color: var(--ink);
  font-size: clamp(1.15rem, 1.8vw, 1.42rem);
}

.membership-hero .landing-actions {
  margin-top: 22px;
}

.membership-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-top: 28px;
}

.membership-card,
.founding-readers-section,
.membership-faq article {
  border: 1px solid rgba(23, 37, 34, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
}

.membership-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 24px;
}

.premium-card {
  border-color: rgba(35, 124, 110, 0.26);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(220, 238, 232, 0.58));
}

.membership-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.membership-card-topline .eyebrow {
  margin: 0;
}

.membership-card-topline span {
  border: 1px solid rgba(35, 124, 110, 0.18);
  border-radius: 999px;
  background: rgba(220, 238, 232, 0.72);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 6px 10px;
}

.membership-card h2 {
  font-size: clamp(1.7rem, 2.4vw, 2.45rem);
  line-height: 1;
}

.membership-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.42;
}

.membership-card ul {
  display: grid;
  gap: 9px;
  margin: 4px 0 8px;
  padding: 0;
  list-style: none;
}

.membership-card li {
  position: relative;
  padding-left: 22px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
}

.membership-card li::before {
  content: "";
  position: absolute;
  top: 0.58em;
  left: 2px;
  width: 8px;
  height: 8px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--accent);
}

.membership-card .primary-cta {
  justify-self: start;
  margin-top: 4px;
}

.founding-readers-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  margin-top: 48px;
  padding: 28px;
}

.founding-readers-section h2 {
  font-size: clamp(1.75rem, 3vw, 3rem);
  line-height: 1.04;
}

.founding-readers-section p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.42;
}

.membership-faq {
  padding-top: 52px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.membership-faq article {
  padding: 18px;
}

.membership-faq h3 {
  margin: 0 0 8px;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.08;
}

.membership-faq p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.4;
}

.how-grid,
.type-grid,
.quote-grid {
  display: grid;
  gap: 12px;
}

.how-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.how-grid article,
.type-grid article,
.quote-grid blockquote {
  margin: 0;
  border: 1px solid rgba(23, 37, 34, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.how-grid article,
.type-grid article {
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.how-grid article:hover,
.type-grid article:hover {
  transform: translateY(-2px);
  border-color: rgba(35, 124, 110, 0.18);
  background: rgba(255, 255, 255, 0.88);
}

.how-grid span {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 900;
  margin-bottom: 14px;
}

.understanding-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(20px, 4vw, 42px);
  align-items: center;
  width: min(1120px, calc(100% - 32px));
  margin: 54px auto 0;
  border: 1px solid rgba(23, 37, 34, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.96), rgba(250, 232, 220, 0.58));
  box-shadow: var(--shadow-soft);
  padding: clamp(24px, 4vw, 44px);
}

.understanding-section h2 {
  max-width: 620px;
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(1.85rem, 3.4vw, 3.1rem);
  line-height: 1.04;
  font-weight: 800;
}

.understanding-section p {
  max-width: 660px;
  margin: 0 0 12px;
}

.understanding-section p:last-child {
  margin-bottom: 0;
}

.understanding-section .understanding-emphasis {
  max-width: 600px;
  margin: 18px 0;
  color: var(--ink);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.28;
  font-weight: 650;
}

.understanding-example {
  border: 1px solid rgba(35, 124, 110, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(220, 238, 232, 0.62));
  padding: clamp(18px, 3vw, 28px);
}

.understanding-example p {
  margin: 0;
  font-size: 0.98rem;
}

.understanding-example blockquote {
  margin: 18px 0;
  border-left: 4px solid var(--accent);
  color: var(--ink);
  font-family: var(--font-story);
  font-size: clamp(1.25rem, 2.8vw, 1.8rem);
  line-height: 1.2;
  font-weight: 600;
  padding-left: 18px;
}

.world-section,
.create-section,
.final-cta {
  margin-top: 54px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.world-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 22px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.94), rgba(220, 238, 232, 0.76)),
    url("/static/covers/el-ultimo-tren-de-la-montana.png");
  background-size: cover;
  background-position: center;
  padding: clamp(20px, 3.2vw, 34px);
}

.world-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.world-tags span {
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--accent-dark);
  font-weight: 900;
  padding: 7px 11px;
  font-size: 0.86rem;
}

.type-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.create-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: stretch;
  background: rgba(255, 255, 255, 0.76);
}

.create-section > div {
  display: grid;
  align-content: center;
  padding: clamp(20px, 3.2vw, 34px);
}

.create-section img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
}

.quote-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-grid blockquote {
  color: #33423d;
  font-family: var(--font-story);
  font-size: 0.98rem;
  line-height: 1.38;
}

.final-cta {
  display: grid;
  justify-items: center;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(23, 37, 34, 0.1), rgba(23, 37, 34, 0.78)),
    url("/static/covers/el-cafe-que-nunca-cerro.png");
  background-size: cover;
  background-position: center;
  padding: clamp(38px, 5.6vw, 70px) 22px;
  margin-bottom: 46px;
}

.final-cta h2,
.final-cta p {
  color: #fff7ec;
}

@media (max-height: 820px) and (min-width: 901px) {
  .landing-hero {
    min-height: 520px;
    max-height: 580px;
  }

  .landing-hero-copy {
    padding-top: 70px;
    padding-bottom: 56px;
  }

  .landing-hero-copy h1 {
    font-size: clamp(2.05rem, 3.8vw, 3.35rem);
  }

  .landing-hero-copy > p:not(.eyebrow) {
    margin: 10px 0 12px;
    font-size: 0.95rem;
  }

  .coming-soon-panel {
    margin-top: -18px;
  }
}

.waitlist-modal {
  width: min(560px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 32px));
  border: 1px solid rgba(23, 37, 34, 0.12);
  border-radius: 8px;
  background: #fffaf1;
  box-shadow: 0 30px 90px rgba(23, 37, 34, 0.32);
  overflow: auto;
  padding: 0;
}

.waitlist-modal::backdrop {
  background: rgba(23, 37, 34, 0.58);
  backdrop-filter: blur(8px);
}

.waitlist-modal form {
  position: relative;
  display: grid;
  gap: 16px;
  padding: clamp(24px, 5vw, 36px);
}

.waitlist-modal h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 0.98;
  font-weight: 800;
}

.waitlist-modal p {
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.4;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 1.4rem;
}

.waitlist-modal fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 14px;
}

.waitlist-modal legend {
  color: var(--ink);
  font-weight: 900;
  padding: 0 6px;
}

.waitlist-modal fieldset label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.9rem;
}

.waitlist-modal fieldset input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.story-card:hover .story-card-cover img {
  transform: scale(1.035);
}

.story-card-main {
  position: relative;
  z-index: 2;
  min-width: 0;
  pointer-events: none;
}

.story-card h3 {
  margin: 0 0 12px;
  font-family: var(--font-story);
  font-size: 1.32rem;
  line-height: 1.06;
  font-weight: 650;
}

.story-card h3 a {
  text-decoration: none;
}

.story-card h3 a:hover {
  color: var(--accent-dark);
}

.story-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.story-pill-row span {
  min-height: 28px;
  background: rgba(220, 238, 232, 0.64);
  color: var(--accent-dark);
  font-size: 0.78rem;
}

.story-card p {
  margin: 0 0 6px;
}

.story-type {
  color: var(--warm);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.story-teaser {
  display: -webkit-box;
  min-height: 3.9em;
  overflow: hidden;
  color: #3d4b46;
  font-family: var(--font-story);
  font-size: 1rem;
  line-height: 1.32;
  font-weight: 500;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.story-setting {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
}

.story-meta,
.story-listens {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.story-listens {
  color: var(--accent-dark);
}

.featured-card .story-card {
  border-color: rgba(35, 124, 110, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(220, 238, 232, 0.8));
}

.card-actions {
  position: relative;
  z-index: 3;
  cursor: default;
}

.dashboard-footer-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 30px;
}

.status {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  padding: 4px 10px;
}

.status.listened {
  border-color: rgba(35, 124, 110, 0.22);
  color: var(--success);
  background: var(--accent-soft);
}

.empty-state {
  padding: 34px;
  text-align: center;
}

.empty-state.compact {
  padding: 22px;
  text-align: left;
}

.empty-state h3 {
  margin: 0 0 8px;
}

.flash-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
}

.flash-error {
  border-color: rgba(161, 61, 61, 0.25);
  color: var(--error);
}

.flash-success {
  border-color: rgba(35, 124, 110, 0.25);
  color: var(--success);
}

.form-panel,
.auth-panel {
  padding: clamp(22px, 4vw, 34px);
}

.generate-hero {
  max-width: 760px;
  margin: 0 0 24px;
}

.generate-hero h1,
.generate-section-heading h2 {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0;
}

.generate-hero h1 {
  color: var(--ink);
  font-size: clamp(2.2rem, 4.5vw, 4.4rem);
  line-height: 0.98;
}

.learner-hint {
  max-width: 620px;
  margin: 12px 0 0;
  border-left: 2px solid rgba(35, 124, 110, 0.32);
  color: color-mix(in srgb, var(--muted) 82%, var(--accent-dark));
  font-family: var(--font-story);
  font-size: 0.98rem;
  font-weight: 560;
  line-height: 1.45;
  padding: 2px 0 2px 12px;
}

.generate-panel {
  display: grid;
  gap: 24px;
  max-width: 100%;
  overflow-x: clip;
}

.generate-section {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.generate-section-heading {
  max-width: 720px;
}

.generate-section-heading h2 {
  color: var(--ink);
  font-size: clamp(1.45rem, 2.4vw, 2.35rem);
  line-height: 1.04;
}

.choice-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.story-type-choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.generate-setup-section {
  border-top: 1px solid rgba(23, 37, 34, 0.08);
  padding-top: 22px;
}

.generate-setup-card {
  border: 1px solid rgba(23, 37, 34, 0.075);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: none;
  padding: clamp(14px, 2.3vw, 20px);
}

.generate-setup-card label {
  gap: 8px;
}

.generate-setup-card small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.choice-card {
  position: relative;
  display: block;
  min-width: 0;
  margin: 0;
  font-weight: inherit;
}

.choice-card input {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.choice-card-body {
  display: grid;
  min-width: 0;
  min-height: 100%;
  align-content: start;
  gap: 7px;
  border: 1px solid rgba(23, 37, 34, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  cursor: pointer;
  padding: 15px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.choice-card input:focus-visible + .choice-card-body {
  outline: 0;
  border-color: rgba(35, 124, 110, 0.55);
  box-shadow: 0 0 0 4px rgba(35, 124, 110, 0.13);
}

.choice-card input:checked + .choice-card-body {
  border-color: rgba(35, 124, 110, 0.34);
  background: rgba(250, 247, 241, 0.92);
  box-shadow: inset 0 0 0 1px rgba(35, 124, 110, 0.08);
}

.choice-card:hover .choice-card-body {
  transform: translateY(-2px);
  border-color: rgba(35, 124, 110, 0.28);
}

.choice-card-body strong {
  min-width: 0;
  color: var(--ink);
  font-family: var(--font-story);
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.choice-card-body small {
  min-width: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.34;
  overflow-wrap: anywhere;
}

.choice-topline {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.choice-topline em {
  flex: 0 0 auto;
  border: 1px solid rgba(35, 124, 110, 0.16);
  border-radius: 999px;
  background: rgba(220, 238, 232, 0.62);
  color: var(--accent-dark);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
  padding: 4px 8px;
}

.prompt-inspiration {
  border-top: 1px solid rgba(23, 37, 34, 0.07);
  padding-top: 10px;
}

.prompt-inspiration summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 850;
}

.prompt-inspiration div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.prompt-inspiration span {
  border: 1px solid rgba(35, 124, 110, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  padding: 6px 9px;
}

.generate-library-option {
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.learner-feedback-panel {
  margin-top: 14px;
  border-top: 1px solid rgba(23, 37, 34, 0.08);
  padding-top: 12px;
}

.learner-feedback-panel summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 850;
}

.learner-feedback-inner {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.learner-feedback-form {
  display: grid;
  gap: 12px;
  max-width: 680px;
}

.learner-feedback-form fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.learner-feedback-form legend {
  flex: 0 0 100%;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.learner-feedback-form label {
  position: relative;
  display: inline-flex;
  margin: 0;
}

.learner-feedback-form input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.learner-feedback-form span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid rgba(23, 37, 34, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 760;
  padding: 5px 10px;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.learner-feedback-form input:checked + span {
  border-color: rgba(35, 124, 110, 0.32);
  background: rgba(220, 238, 232, 0.54);
  box-shadow: none;
}

.learner-profile-card {
  align-items: start;
}

.learner-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: min(100%, 600px);
}

.learner-profile-grid div {
  border-left: 1px solid rgba(23, 37, 34, 0.12);
  background: transparent;
  padding: 4px 0 4px 12px;
}

.learner-profile-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.learner-profile-grid strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1;
}

.learner-interest-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
}

.learner-interest-row span {
  border: 1px solid rgba(35, 124, 110, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
  padding: 5px 9px;
}

.auth-panel {
  display: grid;
  gap: 22px;
  max-width: 500px;
  margin: 36px auto;
}

.field-grid,
.filter-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.library-search {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: none;
}

.library-search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.filter-drawer {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(23, 37, 34, 0.08);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.52);
  padding: 12px;
}

.app-filter-drawer summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--accent-dark);
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.app-filter-drawer summary::-webkit-details-marker {
  display: none;
}

.app-filter-drawer summary::after {
  content: "Filter";
  border: 1px solid rgba(23, 37, 34, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  padding: 5px 9px;
}

.app-filter-drawer[open] summary::after {
  content: "Hide";
}

.app-filter-drawer summary small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.library-workspace-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.library-workspace-header h1 {
  max-width: 720px;
  margin-bottom: 7px;
  font-size: clamp(1.85rem, 3.3vw, 3.1rem);
  line-height: 1;
}

.search-results-section {
  margin-top: 22px;
}

.filter-drawer-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}

.filter-drawer-header h2 {
  margin: 2px 0 0;
  font-size: clamp(1.12rem, 1.8vw, 1.42rem);
  line-height: 1.05;
  font-weight: 800;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.filter-grid label {
  gap: 6px;
  margin: 0;
}

.filter-grid label span {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.filter-grid select {
  min-height: 42px;
  border-color: rgba(23, 37, 34, 0.12);
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0 10px;
}

.filter-grid label {
  margin-bottom: 0;
}

.compact-list {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.filter-panel {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  padding: 20px;
}

.admin-workspace-header {
  align-items: end;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: none;
  padding: clamp(16px, 2.4vw, 24px);
}

.admin-workspace-header h1 {
  font-size: clamp(1.85rem, 3.3vw, 3.1rem);
}

.admin-workspace-header .button,
.admin-workspace-header .ghost-button {
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.92rem;
}

.admin-metric-grid {
  margin-top: 0;
}

.admin-metric-grid .metric-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
}

.admin-metric-grid .metric-card:hover,
.admin-status-grid .metric-card:hover,
.workshop-story-card:hover {
  transform: none;
  box-shadow: var(--shadow-soft);
}

.admin-metric-grid .metric-card h2 {
  margin-bottom: 6px;
  font-size: clamp(1.35rem, 2.4vw, 1.95rem);
}

.profile-metric-grid {
  margin-top: 0;
}

.profile-workspace-header {
  align-items: end;
}

.profile-workspace-header h1 {
  margin-bottom: 7px;
  font-size: clamp(1.85rem, 3.3vw, 3.1rem);
  line-height: 1;
}

.profile-metric-grid .metric-card,
.profile-chart-grid .chart-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
}

.profile-metric-grid .metric-card:hover,
.profile-chart-grid .chart-card:hover {
  transform: none;
  box-shadow: var(--shadow-soft);
}

.profile-metric-grid .metric-card h2 {
  margin-bottom: 6px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.profile-chart-grid {
  margin-top: 16px;
}

.profile-chart-grid .chart-card h2 {
  font-size: 1.22rem;
  font-weight: 800;
}

.profile-chart-grid canvas {
  max-height: 280px;
}

.workshop-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(360px, 1.3fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
  padding: clamp(16px, 2.4vw, 22px);
}

.workshop-hero h2 {
  margin: 0 0 6px;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  line-height: 0.98;
  font-weight: 800;
}

.workshop-level-grid,
.workshop-status-grid,
.workshop-card-grid,
.workshop-checkbox-grid,
.analytics-placeholder-grid {
  display: grid;
  gap: 12px;
}

.workshop-level-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.level-progress,
.workshop-pipeline,
.workshop-story-card,
.workshop-table-panel,
.workshop-edit-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-soft);
}

.level-progress {
  display: grid;
  gap: 6px;
  box-shadow: none;
  padding: 12px;
}

.level-progress span,
.level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 930;
  text-transform: uppercase;
  padding: 5px 9px;
}

.level-progress strong {
  font-size: 1.25rem;
}

.level-lantern {
  background: rgba(246, 190, 111, 0.22);
  color: #755124;
}

.level-compass {
  background: rgba(220, 238, 232, 0.78);
  color: var(--accent-dark);
}

.level-explorer {
  background: rgba(148, 176, 197, 0.24);
  color: #28465b;
}

.level-voyager {
  background: rgba(177, 151, 199, 0.24);
  color: #503b67;
}

.workshop-status-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-bottom: 14px;
}

.admin-status-grid .metric-card {
  padding: 13px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: none;
}

.admin-status-grid .metric-card h2 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 800;
}

.workshop-pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  box-shadow: none;
  padding: 16px;
}

.workshop-pipeline h2,
.workshop-edit-heading h2 {
  margin: 0;
  font-size: 1.38rem;
  line-height: 1.05;
  font-weight: 800;
}

.pipeline-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pipeline-pills span,
.production-checks span,
.analytics-placeholder-grid span {
  border: 1px solid rgba(23, 37, 34, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
  padding: 6px 9px;
}

.workshop-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
}

.workshop-story-card {
  display: grid;
  gap: 9px;
  box-shadow: none;
  padding: 15px;
}

.workshop-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.workshop-story-card h3 {
  margin: 0;
  font-size: 1.26rem;
  line-height: 1.06;
  font-weight: 800;
}

.workshop-card-meta,
.workshop-question {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
}

.production-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.production-checks span.complete {
  border-color: rgba(35, 124, 110, 0.18);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.workshop-question {
  border-left: 2px solid rgba(216, 163, 95, 0.72);
  padding-left: 10px;
}

.workshop-table-panel,
.workshop-edit-section {
  margin-top: 16px;
  box-shadow: none;
  padding: 16px;
}

.workshop-table-wrap {
  overflow-x: auto;
}

.workshop-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.workshop-table th,
.workshop-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 8px;
  text-align: left;
  vertical-align: middle;
  font-size: 0.83rem;
}

.workshop-table th {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.workshop-table tbody tr {
  transition: background 140ms ease;
}

.workshop-table tbody tr:hover {
  background: rgba(255, 250, 241, 0.72);
}

.workshop-yesno {
  display: inline-flex;
  min-width: 38px;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 800;
}

.workshop-yesno.is-yes {
  background: #2f7d4f;
  border: 1px solid #24643e;
  color: #ffffff;
  box-shadow: 0 5px 12px rgba(47, 125, 79, 0.22);
}

.workshop-yesno.is-no {
  background: rgba(20, 36, 32, 0.06);
  color: var(--muted);
}

.workshop-edit-form {
  display: grid;
  gap: 16px;
}

.workshop-edit-heading {
  margin-bottom: 14px;
}

.workshop-edit-section textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
  padding: 10px 12px;
  resize: vertical;
}

.workshop-edit-section label {
  margin-bottom: 12px;
}

.workshop-edit-section input,
.workshop-edit-section select {
  min-height: 42px;
}

.workshop-checkbox-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.narration-workspace-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.narration-provider-grid {
  align-items: end;
  margin-bottom: 6px;
}

.narration-provider-note {
  max-width: 760px;
  font-size: 0.92rem;
  margin: 0 0 14px;
}

.narration-preview {
  border: 1px solid rgba(23, 37, 34, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  padding: 12px;
}

.narration-preview audio {
  display: block;
  width: 100%;
}

.narration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.workshop-checkbox {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  padding: 10px;
}

.analytics-placeholder-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font: inherit;
  padding: 0 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:hover,
select:hover {
  background: #fff;
}

input:focus,
select:focus {
  outline: 0;
  border-color: rgba(35, 124, 110, 0.55);
  box-shadow: 0 0 0 4px rgba(35, 124, 110, 0.13);
  background: #fff;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.comfort-note,
.explanation-box {
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: rgba(220, 238, 232, 0.62);
  padding: 14px 16px;
}

.comfort-note {
  margin: 0 0 18px;
}

.comfort-note p {
  margin: 0 0 6px;
}

.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.interest-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  padding: 10px 12px;
}

.interest-choice input {
  width: 18px;
  min-height: 18px;
}

.onboarding-workspace-header {
  display: block;
  min-height: auto;
}

.onboarding-workspace-header .journey-copy {
  align-content: start;
}

.onboarding-workspace-header .journey-copy h1 {
  margin-bottom: 8px;
  font-size: clamp(1.85rem, 3.3vw, 3.1rem);
  line-height: 1;
}

.onboarding-panel {
  display: grid;
  gap: 16px;
  max-width: 920px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
  padding: 16px;
}

.onboarding-panel-heading h2 {
  margin: 0;
  font-size: 1.32rem;
  line-height: 1.05;
  font-weight: 800;
}

.onboarding-interest-section .label {
  margin-bottom: 10px;
}

.onboarding-panel .interest-grid {
  margin-bottom: 0;
}

.onboarding-panel .interest-choice {
  min-height: 42px;
  background: rgba(255, 255, 255, 0.54);
  padding: 8px 10px;
}

.onboarding-panel .field-grid label {
  margin-bottom: 0;
}

.onboarding-panel select {
  min-height: 44px;
}

.onboarding-panel .form-actions {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.understanding-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.story-page {
  max-width: 100%;
}

.audio-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.story-audio-panel {
  gap: 12px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
  padding: 16px;
}

.story-audio-panel h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.05;
  font-weight: 800;
}

.story-audio-panel .button {
  justify-self: start;
  min-height: 42px;
  padding: 0 15px;
  font-size: 0.9rem;
}

.spanish-help-panel,
.listen-again-panel,
.settings-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 22px;
}

.explanation-box {
  flex: 1 1 100%;
}

.reveal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.story-reveal-actions {
  margin-top: 14px;
}

.story-reveal-actions .ghost-button {
  min-height: 40px;
  padding: 0 13px;
  font-size: 0.88rem;
}

.hidden-section {
  display: none;
}

.selection-popover {
  position: absolute;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(21, 31, 28, 0.94);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.18);
}

.selection-popover .button-small {
  min-height: 34px;
  padding: 0 14px;
}

.selection-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(36, 87, 74, 0.94);
  color: #f7f3eb;
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.16);
}

.selection-toast[data-state="error"] {
  background: rgba(136, 55, 28, 0.94);
}

audio {
  width: 100%;
  min-height: 44px;
}

.story-primary-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}

.story-primary-actions .primary-cta,
.story-primary-actions .ghost-button {
  min-height: 42px;
  padding: 0 15px;
  font-size: 0.9rem;
}

.story-detail-teaser {
  max-width: 650px;
  margin: 12px 0 12px;
  color: var(--ink);
  font-family: var(--font-story);
  font-size: clamp(1rem, 1.55vw, 1.22rem);
  line-height: 1.38;
  font-weight: 500;
}

.story-detail-meta,
.story-detail-setting {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.story-detail-setting {
  color: var(--accent-dark);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 0.9fr);
  gap: 16px;
  margin-top: 16px;
}

.transcript,
.questions {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  padding: 18px;
  box-shadow: none;
}

.transcript {
  font-size: 1.02rem;
  line-height: 1.72;
}

.transcript h2,
.questions h2 {
  margin-bottom: 14px;
  font-family: var(--font-story);
  font-size: 1.35rem;
  font-weight: 650;
}

.transcript p {
  margin: 0 0 1rem;
}

.vocabulary-filter-panel {
  align-items: start;
}

.vocabulary-filter-form {
  width: min(720px, 100%);
}

.vocabulary-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.vocabulary-card {
  display: grid;
  gap: 14px;
}

.vocabulary-card-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.vocabulary-card h2 {
  margin: 6px 0 0;
  font-size: 1.4rem;
  line-height: 1.05;
}

.vocabulary-context {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-story);
  line-height: 1.5;
}

.vocabulary-meta-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vocabulary-explanation {
  margin: 0;
}

.vocabulary-explanation strong {
  display: block;
  margin-bottom: 6px;
}

.vocabulary-explanation p {
  margin: 0;
}

.vocabulary-actions {
  flex-wrap: wrap;
}

.status-pill.status-active {
  background: rgba(218, 239, 228, 0.9);
  color: #24574a;
}

.status-pill.status-mastered {
  background: rgba(231, 236, 245, 0.9);
  color: #38506d;
}

.status-pill.status-ignored {
  background: rgba(244, 232, 223, 0.9);
  color: #8b5e36;
}

.status-pill.status-recycled {
  background: rgba(240, 235, 221, 0.9);
  color: #7c6641;
}

.questions {
  align-self: start;
}

.questions li {
  margin-bottom: 12px;
}

.roadmap {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.roadmap-item {
  position: relative;
  min-height: 140px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  padding: 16px;
}

.roadmap-item.complete {
  border-color: rgba(35, 124, 110, 0.26);
  background: rgba(220, 238, 232, 0.7);
}

.roadmap-item.current {
  border-color: rgba(35, 124, 110, 0.55);
  box-shadow: 0 0 0 4px rgba(35, 124, 110, 0.12);
}

.roadmap-item.next {
  border-color: rgba(214, 164, 93, 0.55);
}

.roadmap-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--line-strong);
}

.roadmap-item.complete .roadmap-dot,
.roadmap-item.current .roadmap-dot {
  background: var(--accent);
}

.roadmap-item.next .roadmap-dot {
  background: var(--gold);
}

.chart-grid {
  grid-template-columns: 1.4fr 1fr;
  margin-top: 24px;
}

.chart-card h2 {
  margin-bottom: 16px;
}

.chart-card canvas {
  max-height: 320px;
}

@media (max-width: 900px) {
  .journey-hero,
  .dashboard-recommendation,
  .library-search-bar {
    grid-template-columns: 1fr;
  }

  .dashboard-welcome {
    align-items: flex-start;
    flex-direction: column;
  }

  .workshop-hero,
  .workshop-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .narration-workspace-grid {
    grid-template-columns: 1fr;
  }

  .workshop-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .learner-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workshop-level-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-type-choice-grid,
  .level-choice-grid,
  .listening-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workshop-pipeline {
    align-items: stretch;
    flex-direction: column;
  }

  .pipeline-pills {
    justify-content: flex-start;
  }

  .filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .landing-hero,
  .world-section,
  .understanding-section,
  .create-section,
  .coming-soon-panel,
  .membership-cards,
  .founding-readers-section {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    min-height: auto;
    max-height: none;
  }

  .coming-soon-panel {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 12px;
  }

  .coming-soon-panel .ghost-button,
  .coming-soon-panel .button {
    width: auto;
  }

  .landing-hero-copy {
    padding: 96px 24px 34px;
  }

  .landing-hero-art {
    min-height: 40vh;
  }

  .landing-story-grid,
  .library-preview-grid,
  .faq-grid,
  .type-grid,
  .quote-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-cover-art {
    min-height: 240px;
  }

  .dashboard-recommendation .hero-cover-art {
    min-height: 220px;
    max-height: 320px;
  }

  .progress-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journey-actions {
    justify-content: flex-start;
  }

  .dashboard-grid,
  .dashboard-grid.slim-grid,
  .chart-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .story-workspace-header {
    align-items: stretch;
  }

  .story-workspace-header .story-cover-art {
    flex: 0 1 auto;
  }
}

@media (max-width: 760px) {
  .nav,
  .section-header,
  .story-header,
  .dashboard-welcome,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    align-items: flex-start;
    padding: 14px 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 0;
    top: 17px;
  }

  .nav-links {
    display: none;
    width: 100%;
    justify-content: flex-start;
  }

  .nav-links.is-open {
    display: flex;
    padding-top: 8px;
  }

  .site-footer div {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-grid,
  .dashboard-grid.slim-grid,
  .stats-grid,
  .field-grid,
  .learner-profile-grid,
  .story-type-choice-grid,
  .level-choice-grid,
  .listening-choice-grid,
  .filter-panel,
  .chart-grid,
  .progress-summary {
    grid-template-columns: 1fr;
  }

  .dashboard-welcome h1 {
    font-size: clamp(1.75rem, 9vw, 2.55rem);
  }

  .dashboard-quick-actions {
    justify-content: flex-start;
  }

  .dashboard-recommendation .journey-copy h1 {
    font-size: clamp(1.55rem, 8vw, 2.15rem);
  }

  .metric-card.wide {
    grid-column: span 1;
  }

  .story-row {
    grid-auto-columns: minmax(260px, 86%);
  }

  .story-card,
  .settings-panel,
  .spanish-help-panel,
  .listen-again-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .story-cover-art {
    flex-basis: auto;
    width: 100%;
  }

  .dashboard-recommendation .hero-cover-art {
    min-height: 190px;
  }

  .primary-cta,
  .library-search-bar .button,
  .library-search .button,
  .form-actions .button {
    width: 100%;
  }

  .journey-hero,
  .panel,
  .metric-card,
  .form-panel,
  .empty-state,
  .library-hero {
    padding: 22px;
  }

  .hero-cover-art {
    min-height: 210px;
  }

  .carousel-controls {
    display: none;
  }

  .landing-nav {
    position: absolute;
    top: 12px;
    width: calc(100% - 24px);
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .waitlist-modal fieldset {
    grid-template-columns: 1fr;
  }

  .landing-nav nav {
    justify-content: flex-start;
  }

  .landing-nav nav a:not(.button) {
    padding: 6px 8px;
  }

  .landing-hero-copy {
    padding-top: 158px;
  }

  .landing-hero-copy h1 {
    font-size: clamp(2.45rem, 15vw, 3.7rem);
  }

  .landing-story-grid,
  .library-preview-grid,
  .membership-cards,
  .founding-readers-section,
  .faq-grid,
  .how-grid,
  .type-grid,
  .quote-grid {
    grid-template-columns: 1fr;
  }

  .public-library-hero,
  .membership-hero {
    padding-top: 164px;
    text-align: left;
  }

  .public-library-page .landing-actions,
  .membership-page .landing-actions {
    justify-content: flex-start;
  }

  .membership-card,
  .founding-readers-section {
    padding: 22px;
  }

  .understanding-section {
    width: calc(100% - 24px);
    margin-top: 42px;
    padding: 22px;
  }

  .landing-section {
    padding-top: 46px;
  }

  .coming-soon-panel + .landing-section {
    padding-top: 58px;
  }

  .coming-soon-panel {
    width: calc(100% - 24px);
    padding: 16px;
  }

  .filter-drawer-header {
    align-items: stretch;
    flex-direction: column;
  }

  .library-workspace-header {
    align-items: stretch;
    flex-direction: column;
  }

  .app-filter-drawer summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-drawer-header .ghost-link {
    width: 100%;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .coming-soon-panel .ghost-button,
  .coming-soon-panel .button {
    width: 100%;
  }

  .waitlist-modal {
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
  }

  .waitlist-modal form {
    padding: 24px 18px;
  }

  .create-section img {
    min-height: 240px;
  }
}

/* ── Animations ── */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes growWidth {
  from { width: 0; }
}

.anim-fade-up {
  animation: fadeUp 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.anim-delay-1 { animation-delay: 120ms; }
.anim-delay-2 { animation-delay: 240ms; }
.anim-delay-3 { animation-delay: 380ms; }
.anim-delay-4 { animation-delay: 520ms; }

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 650ms cubic-bezier(0.22, 1, 0.36, 1), transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.revealed {
  opacity: 1;
  transform: translateY(0);
}

.progress span {
  animation: growWidth 800ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.button:active,
.ghost-button:active,
.ghost-link:active {
  transform: translateY(1px);
  box-shadow: none;
  transition-duration: 60ms;
}

.carousel-section {
  position: relative;
}

.carousel-section::after {
  content: "";
  position: absolute;
  top: 0;
  right: -2px;
  bottom: 0;
  z-index: 4;
  width: 48px;
  background: linear-gradient(90deg, transparent, var(--bg));
  pointer-events: none;
}

.carousel-controls .ghost-button {
  border: none;
  background: transparent;
}

.carousel-controls .ghost-button:hover {
  background: rgba(255, 255, 255, 0.72);
}

@media (prefers-reduced-motion: reduce) {
  .anim-fade-up,
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .progress span {
    animation: none;
  }
}

/* AI Agent Pipeline Loader and Cards */
.pipeline-loader {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(0,0,0,0.15);
  border-left-color: currentColor;
  border-radius: 50%;
  animation: pipeline-spin 0.8s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

@keyframes pipeline-spin {
  to { transform: rotate(360deg); }
}

.pipeline-step-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.pipeline-step-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.formatted-outline,
.formatted-draft,
.formatted-critique,
.audit-summary {
  animation: fadeUp 0.4s ease-out;
}

.policy-page {
  width: min(860px, 100%);
  margin: 0 auto;
}

.policy-page h1 {
  margin: 0;
  font-family: var(--font-story);
  font-size: clamp(2.4rem, 6vw, 4.7rem);
  font-weight: 650;
  line-height: 0.95;
}

.policy-updated {
  margin: 10px 0 24px;
  color: var(--muted);
  font-weight: 750;
}

.policy-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  padding: clamp(22px, 4vw, 38px);
}

.policy-card h2 {
  margin: 16px 0 0;
  font-family: var(--font-story);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1;
}

.policy-card h2:first-child {
  margin-top: 0;
}

.policy-card p {
  max-width: 68ch;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.policy-card a {
  color: var(--accent-dark);
  font-weight: 850;
}

.policy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 8px;
}

.policy-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.policy-list strong {
  color: var(--ink);
}

.about-intro {
  max-width: 62ch;
  margin: 14px 0 26px;
  color: var(--muted);
  font-family: var(--font-story);
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  line-height: 1.25;
}

.about-card p + p {
  margin-top: -4px;
}

.about-principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 4px;
}

.about-principles span {
  border: 1px solid rgba(187, 116, 82, 0.22);
  border-radius: 999px;
  background: rgba(248, 227, 187, 0.35);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 850;
  padding: 10px 14px;
}

.about-actions {
  margin-top: 14px;
}

.cookie-banner {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: min(720px, calc(100vw - 36px));
  border: 1px solid rgba(23, 37, 34, 0.14);
  border-radius: 14px;
  background: rgba(255, 252, 246, 0.96);
  box-shadow: 0 24px 80px rgba(23, 37, 34, 0.18);
  padding: 16px;
  backdrop-filter: blur(18px);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.cookie-banner-title {
  margin-bottom: 4px !important;
  color: var(--ink) !important;
  font-weight: 900;
}

.cookie-banner a {
  display: inline-flex;
  margin-top: 7px;
  color: var(--accent-dark);
  font-size: 0.84rem;
  font-weight: 850;
  text-decoration: none;
}

.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cookie-banner .ghost-button,
.cookie-banner .button {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .cookie-banner {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    grid-template-columns: 1fr;
  }

  .cookie-banner-actions {
    justify-content: flex-start;
  }

  .about-principles {
    grid-template-columns: 1fr;
  }
}
