:root {
  --canvas: #faf9f5;
  --surface-soft: #f5f0e8;
  --surface-card: #efe9de;
  --surface-strong: #e8e0d2;
  --ink: #141413;
  --body: #3d3d3a;
  --muted: #6c6a64;
  --line: #e6dfd8;
  --coral: #cc785c;
  --coral-dark: #a9583e;
  --teal: #327d70;
  --teal-soft: #e0eee9;
  --amber: #e8a55a;
  --dark: #181715;
  --dark-raised: #252320;
  --on-dark: #faf9f5;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 0 0, rgba(204, 120, 92, .09), transparent 26rem),
    var(--canvas);
  color: var(--body);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid rgba(204, 120, 92, .34);
  outline-offset: 3px;
}

.app { width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 68px; }
.site-nav {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.site-brand {
  color: var(--ink);
  font-family: Copernicus, "Tiempos Headline", Georgia, serif;
  font-size: 19px;
  text-decoration: none;
}
.site-links { display: flex; align-items: center; gap: 7px; }
.site-link {
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.site-link:hover, .site-link[aria-current="page"] { background: var(--surface-card); color: var(--ink); }

.eyebrow {
  margin: 0 0 9px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--canvas);
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
}
.button:hover { border-color: #bdb3a7; }
.button.primary { border-color: var(--coral); background: var(--coral); color: #fff; }
.button.primary:hover, .button.accent:hover { border-color: var(--coral-dark); background: var(--coral-dark); }
.button.accent { border-color: var(--coral); background: var(--coral); color: #fff; }
.button.secondary-dark { border-color: #4a4640; background: var(--dark-raised); color: var(--on-dark); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--coral-dark); cursor: pointer; font-size: 13px; font-weight: 700; }

.home-hero {
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr);
  overflow: hidden;
  margin-top: 24px;
  border-radius: var(--radius-lg);
  background: var(--dark);
  color: var(--on-dark);
}
.home-hero-copy { padding: clamp(42px, 7vw, 84px); }
.home-hero-copy h1 {
  max-width: 740px;
  margin: 0;
  color: #fff;
  font-family: Copernicus, "Tiempos Headline", Georgia, serif;
  font-size: clamp(58px, 9vw, 104px);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .91;
}
.home-hero-copy > p:not(.eyebrow) { max-width: 610px; margin: 26px 0 0; color: #c4c0b8; font-size: 17px; }
.portal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.home-hero-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(30px, 5vw, 52px);
  border-left: 1px solid #38342f;
  background: var(--dark-raised);
}
.home-hero-summary .eyebrow { color: var(--amber); }
.home-metrics { border-top: 1px solid #47423b; }
.home-metrics > div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid #47423b; }
.home-metrics strong { color: #fff; font-family: Georgia, serif; font-size: 44px; font-weight: 400; line-height: 1; }
.home-metrics span { color: #aaa69e; font-size: 13px; }
.summary-note { margin: 24px 0 0; color: #aaa69e; font-size: 13px; }

.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.module-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  text-decoration: none;
}
.module-card:hover { border-color: var(--coral); }
.module-card.dark { border-color: var(--line); background: var(--surface-soft); color: var(--ink); }
.module-number { align-self: flex-end; color: var(--coral); font-family: Georgia, serif; font-size: 34px; }
.module-kicker { margin: 0 0 8px; color: var(--coral); font-size: 12px; font-weight: 750; letter-spacing: .12em; }
.module-card h2 { margin: 0; color: var(--ink); font-family: Georgia, serif; font-size: clamp(34px, 5vw, 52px); font-weight: 400; letter-spacing: -.025em; line-height: 1.04; }
.module-card.dark h2 { color: var(--ink); }
.module-card p:not(.module-kicker) { max-width: 520px; margin: 18px 0 0; color: var(--muted); }
.module-card.dark p:not(.module-kicker) { color: var(--muted); }
.module-link { color: var(--teal); font-size: 14px; font-weight: 750; }
.module-card.dark .module-link { color: var(--coral-dark); }

.source-principle { margin-top: 14px; padding: clamp(30px, 6vw, 64px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--canvas); }
.source-principle h2 { max-width: 800px; margin: 0; color: var(--ink); font-family: Georgia, serif; font-size: clamp(32px, 5vw, 54px); font-weight: 400; line-height: 1.08; }
.source-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.source-flow span { padding: 9px 13px; border-radius: 999px; background: var(--surface-card); color: var(--ink); font-size: 13px; font-weight: 650; }
.source-flow b { color: var(--coral); }

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: end;
  padding: 54px 0 32px;
}
.masthead-copy { max-width: 800px; }
.masthead h1 { margin: 0; color: var(--ink); font-family: Georgia, serif; font-size: clamp(44px, 7vw, 76px); font-weight: 400; letter-spacing: -.04em; line-height: .98; }
.masthead-copy > p:last-child { max-width: 720px; margin: 17px 0 0; color: var(--muted); }

.library-controls {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-card);
}
.search-field, .jump-field { display: grid; gap: 6px; }
.search-field label, .jump-field label { color: var(--muted); font-size: 12px; font-weight: 700; }
.search-field input, .jump-field select {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #d4ccc0;
  border-radius: var(--radius-sm);
  background: var(--canvas);
  color: var(--ink);
}
.search-field input::placeholder { color: #98938a; }
.combobox-field { position: relative; }
.search-options {
  position: absolute;
  z-index: 60;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  max-height: min(320px, 48vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #d4ccc0;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  box-shadow: 0 16px 36px rgba(20, 20, 19, .14);
}
.search-option {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 10px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.search-option:hover,
.search-option[aria-selected="true"] { background: var(--surface-card); }
.search-option strong { font-size: 14px; }
.search-option small { color: var(--muted); font-size: 11px; }
.search-option-empty { padding: 11px; color: var(--muted); font-size: 13px; }
.library-status { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 3px; color: var(--muted); font-size: 13px; }

.accordion-list { display: grid; gap: 10px; }
.index-card { overflow: clip; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--canvas); scroll-margin-top: 18px; }
.index-card[open] { border-color: #cfc5b8; }
.index-card > summary {
  min-height: 92px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto 28px;
  gap: 18px;
  align-items: center;
  padding: 19px 22px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.index-card > summary::-webkit-details-marker { display: none; }
.index-card > summary:hover { background: var(--surface-soft); }
.index-card[open] > summary { border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.index-number { color: var(--coral); font-family: Georgia, serif; font-size: 25px; }
.index-title { min-width: 0; display: flex; flex-direction: column; }
.index-title strong { overflow: hidden; color: var(--ink); font-family: Georgia, serif; font-size: 25px; font-weight: 400; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.index-title small { order: -1; margin-bottom: 2px; color: var(--coral-dark); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.story-index-card .index-title small { order: initial; margin: 3px 0 0; color: var(--muted); letter-spacing: 0; text-transform: none; }
.index-meta { color: var(--muted); font-size: 12px; font-weight: 650; }
.index-toggle { width: 25px; height: 25px; position: relative; border-radius: 50%; background: var(--surface-card); }
.index-toggle::before, .index-toggle::after { content: ""; position: absolute; left: 7px; right: 7px; top: 12px; height: 1px; background: var(--ink); }
.index-toggle::after { transform: rotate(90deg); transition: transform .18s ease; }
.index-card[open] .index-toggle::after { transform: rotate(0); }

.story-card-content { background: var(--canvas); }
.story-cover { position: relative; min-height: 330px; display: flex; align-items: flex-end; overflow: hidden; background: var(--dark); color: #fff; }
.story-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 47%; opacity: .7; }
.story-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(24,23,21,.96), rgba(24,23,21,.22)); }
.cover-copy { position: relative; z-index: 1; max-width: 760px; padding: clamp(30px, 6vw, 58px); }
.status-badge, .part-badge { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: var(--coral); color: #fff; font-size: 11px; font-weight: 750; letter-spacing: .09em; }
.cover-copy h2 { margin: 15px 0 0; color: #fff; font-family: Georgia, serif; font-size: clamp(42px, 7vw, 72px); font-weight: 400; line-height: 1; }
.cover-copy p { margin: 11px 0 0; color: rgba(255,255,255,.78); }

.story-section { padding: clamp(26px, 5vw, 48px); border-top: 1px solid var(--line); }
.complete-story-section { padding-inline: clamp(20px, 3vw, 32px); }
.story-cover + .story-section { border-top: 0; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-heading > div:first-child { display: flex; align-items: baseline; gap: 12px; }
.section-heading > div:first-child > span { color: var(--coral); font-family: Georgia, serif; font-size: 18px; }
.section-heading h3 { margin: 0; color: var(--ink); font-family: Georgia, serif; font-size: 30px; font-weight: 400; }
.section-heading > p { max-width: 510px; margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.section-note { margin: -12px 0 20px; color: var(--muted); font-size: 13px; }
.complete-story-card { overflow: hidden; border: 1px solid #d8cec1; border-radius: var(--radius-lg); background: var(--surface-soft); box-shadow: 0 12px 32px rgba(49, 40, 31, .06); }
.complete-story-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px clamp(20px, 3vw, 28px); border-bottom: 1px solid #d8cec1; background: var(--surface-strong); }
.complete-story-header h4 { margin: 0; color: var(--coral-dark); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.delivery-legend { color: var(--muted); font-size: 11px; }
.delivery-legend b { margin-right: 3px; color: rgba(50, 125, 112, .48); font-size: 11px; font-weight: 600; }
.delivery-legend strong { color: var(--ink); font-weight: 750; }
.story-paragraph-list { display: grid; }
.story-paragraph-block { position: relative; padding: 22px clamp(20px, 3vw, 28px) 18px 70px; background: var(--surface-soft); }
.story-paragraph-block + .story-paragraph-block { border-top: 1px solid #ded6cb; }
.story-prose { color: var(--ink); font-family: Georgia, serif; font-size: clamp(15.5px, 1.45vw, 17px); letter-spacing: -.006em; line-height: 1.58; }
.story-sentence-line { margin: 0; }
.story-sentence-line + .story-sentence-line { margin-top: 5px; }
.translation-prose { margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed rgba(108, 106, 100, .2); color: var(--muted); font-size: 12px; line-height: 1.65; }
.paragraph-number { position: absolute; top: 27px; left: 24px; color: var(--coral); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 750; letter-spacing: .04em; line-height: 1; }
.story-key { color: var(--coral-dark); font-weight: 600; text-decoration-line: underline; text-decoration-color: rgba(204, 120, 92, .76); text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-skip-ink: auto; }
.story-connector { color: var(--teal); font-family: var(--font-body, Arial, sans-serif); font-size: .88em; font-weight: 750; }
.story-stress { font-weight: 750; }
.speech-break { display: inline-block; margin: 0 .17em; color: rgba(50, 125, 112, .38); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .6em; font-weight: 600; line-height: 1; text-decoration: none; vertical-align: .08em; }
.story-sentence { border-radius: 4px; transition: background .25s ease, color .25s ease; }
.story-sentence:target { padding: 2px 4px; background: var(--amber); color: var(--ink); box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.segmented { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas); }
.segment { min-height: 34px; padding: 7px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 700; }
.segment[aria-pressed="true"] { background: var(--dark); color: #fff; }
.key-expression-list { display: grid; grid-template-columns: 1fr; gap: 6px; }
.key-expression { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.expression-number { color: var(--coral); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 750; }
.key-expression-en { margin: 0; color: var(--ink); font-family: Georgia, serif; font-size: 16px; line-height: 1.45; }
.key-expression-en::after { content: "."; }
.key-expression-zh { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.expression-reveal { display: none; margin-top: 8px; padding: 0; border: 0; background: transparent; color: var(--coral-dark); cursor: pointer; font-size: 12px; font-weight: 750; }
.expression-bank.recall-mode .key-expression-en { display: none; }
.expression-bank.recall-mode .expression-reveal { display: inline-flex; }
.expression-bank.recall-mode .key-expression.revealed .key-expression-en { display: block; }

.keyword-section { background: var(--surface-card); }
.keyword-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.keyword-chips span { padding: 7px 11px; border: 1px solid rgba(169,88,62,.18); border-radius: 999px; background: var(--canvas); color: var(--coral-dark); font-size: 12px; font-weight: 650; }
.recall-cue-list { display: grid; gap: 8px; }
.recall-cue-row { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid rgba(169,88,62,.14); border-radius: var(--radius-md); background: rgba(250,249,245,.56); }
.recall-cue-number { color: var(--coral); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 750; }

.part-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.part-button { min-height: 42px; display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 700; }
.part-button span { min-width: 22px; padding: 2px 6px; border-radius: 999px; background: var(--surface-card); color: var(--body); font-size: 11px; text-align: center; }
.part-button[aria-pressed="true"] { border-color: var(--dark); background: var(--dark); color: #fff; }
.part-button[aria-pressed="true"] span { background: var(--dark-raised); color: #fff; }
.main-question-content { background: var(--canvas); }
.main-question-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding: clamp(26px, 5vw, 44px); border-bottom: 1px solid var(--line); background: var(--surface-card); }
.main-question-head h2 { margin: 13px 0 0; color: var(--ink); font-family: Georgia, serif; font-size: clamp(40px, 6vw, 64px); font-weight: 400; line-height: 1; }
.main-question-head > div > p { margin: 8px 0 0; color: var(--muted); }
.main-question-head > p { max-width: 380px; margin: 0; color: var(--muted); font-size: 13px; }
.small-question-list { padding: clamp(18px, 4vw, 34px); }
.small-question-card { padding: 25px 0; border-bottom: 1px solid var(--line); scroll-margin: 24px; }
.small-question-card:first-child { padding-top: 0; }
.small-question-card:last-child { padding-bottom: 0; border-bottom: 0; }
.small-question-head { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; }
.question-number { color: var(--coral); font-family: Georgia, serif; font-size: 22px; }
.cue-pill { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: var(--surface-card); color: var(--coral-dark); font-size: 11px; font-weight: 700; }
.small-question-head h3 { max-width: 840px; margin: 11px 0 3px; color: var(--ink); font-family: Georgia, serif; font-size: clamp(23px, 4vw, 34px); font-weight: 400; line-height: 1.2; }
.small-question-head p { margin: 0; color: var(--muted); font-size: 14px; }
.small-question-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0 60px; }
.question-support { margin: 18px 0 0 60px; padding: 20px; border-left: 4px solid var(--teal); border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--teal-soft); }
.support-block + .support-block { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(50,125,112,.2); }
.support-block h4 { margin: 0 0 10px; color: var(--teal); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.compact-keywords span { border-color: rgba(50,125,112,.2); color: var(--teal); }
.source-expression-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.source-expression-list li { padding: 11px 14px; border-radius: var(--radius-sm); background: rgba(250,249,245,.86); }
.source-expression-list p { margin: 0; color: var(--ink); font-family: Georgia, serif; font-size: 15px; line-height: 1.45; }
.source-expression-list p::after { content: "."; }
.source-expression-list small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.source-expression-list a { display: inline-flex; margin-top: 6px; color: var(--teal); font-size: 11px; font-weight: 750; text-decoration: none; }
.source-expression-list a:hover { text-decoration: underline; }
.focus-flash { animation: focus-flash 1.8s ease; }
@keyframes focus-flash { 0%, 35% { background: #fff0df; box-shadow: 0 0 0 14px #fff0df; } 100% { background: transparent; box-shadow: none; } }

.empty-state { padding: 70px 28px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); text-align: center; }
.empty-state h2 { margin: 0 0 18px; color: var(--ink); font-family: Georgia, serif; font-size: 28px; font-weight: 400; }

dialog { width: min(800px, calc(100% - 28px)); max-height: calc(100vh - 36px); padding: 0; overflow: auto; border: 1px solid #46413a; border-radius: var(--radius-lg); background: var(--canvas); color: var(--body); box-shadow: 0 28px 90px rgba(20,20,19,.32); }
dialog::backdrop { background: rgba(20,20,19,.72); backdrop-filter: blur(3px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 24px; padding: 25px 28px; border-bottom: 1px solid #3d3933; background: var(--dark); color: #fff; }
.dialog-head .eyebrow { margin-bottom: 8px; color: var(--amber); }
.dialog-head h2 { margin: 0; color: #fff; font-family: Georgia, serif; font-size: clamp(26px, 5vw, 40px); font-weight: 400; line-height: 1.15; }
.dialog-head p:last-child { margin: 7px 0 0; color: #aaa69e; font-size: 14px; }
.dialog-close { flex: 0 0 auto; width: 38px; height: 38px; border: 1px solid #4c4740; border-radius: 50%; background: var(--dark-raised); color: #fff; cursor: pointer; font-size: 22px; }
.practice-dialog-body { padding: 0 28px 30px; }
.practice-step { padding: 26px 0; border-bottom: 1px solid var(--line); }
.practice-step:last-child { border-bottom: 0; }
.practice-step-label { display: flex; align-items: center; gap: 10px; }
.practice-step-label span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: var(--coral); color: #fff; font-size: 12px; font-weight: 750; }
.practice-step-label strong { color: var(--ink); font-size: 15px; }
.practice-step > p { margin: 8px 0 14px 37px; color: var(--muted); font-size: 13px; }
.practice-step > .button, .practice-step > .practice-support, .practice-step > .tool-actions, .record-indicator, .recording-step audio, .recording-step .download-link, .recording-step .handoff-reminder { margin-left: 37px; }
.practice-support { margin-top: 16px; padding: 18px; border-radius: var(--radius-md); background: var(--teal-soft); }
.timer { margin: 13px 0 9px 37px; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 58px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.tool-status { min-height: 21px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.record-indicator { display: flex; align-items: center; gap: 9px; margin-top: 15px; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.record-dot { width: 9px; height: 9px; border-radius: 50%; background: #aaa69e; }
.record-indicator.recording .record-dot { background: var(--coral); box-shadow: 0 0 0 5px rgba(204,120,92,.18); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { transform: scale(.72); } }
.recording-step audio { width: calc(100% - 37px); margin-top: 15px; }
.download-link { display: inline-flex; margin-top: 8px; color: var(--teal); font-size: 13px; font-weight: 750; }
.handoff-reminder { margin-top: 16px; padding: 13px 15px; border-left: 4px solid var(--amber); background: #fff6e7; color: #665438; font-size: 13px; }

.page-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 20px; color: var(--muted); font-size: 12px; }

@media (max-width: 900px) {
  .home-hero { min-height: auto; grid-template-columns: 1fr; }
  .home-hero-summary { border-top: 1px solid #38342f; border-left: 0; }
  .module-grid { grid-template-columns: 1fr; }
  .library-controls { grid-template-columns: 1fr 1fr; }
  .library-controls > .button { grid-column: 1 / -1; }
  .section-heading { flex-direction: column; }
  .main-question-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 640px) {
  .app { width: min(100% - 24px, 1160px); padding-top: 12px; }
  .site-nav { align-items: flex-start; gap: 12px; }
  .site-brand { padding-top: 6px; font-size: 17px; }
  .site-links { gap: 1px; }
  .site-link { padding: 7px; font-size: 12px; }
  .home-hero { margin-top: 12px; }
  .home-hero-copy { padding: 38px 24px; }
  .home-hero-copy h1 { font-size: clamp(50px, 17vw, 76px); }
  .home-hero-summary { padding: 28px 24px; }
  .module-card { min-height: 320px; padding: 26px 22px; }
  .source-principle { padding: 30px 22px; }
  .masthead { grid-template-columns: 1fr; padding: 38px 0 24px; }
  .masthead > .button { justify-self: start; }
  .library-controls { grid-template-columns: 1fr; padding: 14px; }
  .library-controls > .button { grid-column: auto; }
  .library-status { align-items: flex-start; flex-direction: column; gap: 4px; }
  .index-card > summary { min-height: 82px; grid-template-columns: 36px minmax(0, 1fr) 25px; gap: 10px; padding: 15px 14px; }
  .index-meta { display: none; }
  .index-title strong { font-size: 21px; }
  .index-number { font-size: 20px; }
  .story-cover { min-height: 280px; }
  .cover-copy { padding: 30px 22px; }
  .story-section { padding: 27px 19px; }
  .complete-story-header { align-items: flex-start; flex-direction: column; gap: 4px; padding: 14px 18px; }
  .story-paragraph-block { padding: 19px 17px 16px 52px; }
  .paragraph-number { top: 24px; left: 17px; }
  .story-prose { font-size: 15.5px; line-height: 1.58; }
  .key-expression { grid-template-columns: 35px minmax(0, 1fr); padding: 12px 14px; }
  .part-filter { display: grid; grid-template-columns: 1fr 1fr; }
  .part-button:first-child { grid-column: 1 / -1; }
  .small-question-list { padding: 22px 17px; }
  .small-question-head { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
  .small-question-actions, .question-support { margin-left: 44px; }
  .question-support { padding: 15px; }
  .dialog-head { padding: 22px 19px; }
  .practice-dialog-body { padding: 0 19px 24px; }
  .practice-step > p, .practice-step > .button, .practice-step > .practice-support, .practice-step > .tool-actions, .record-indicator, .recording-step audio, .recording-step .download-link, .recording-step .handoff-reminder, .timer { margin-left: 0; }
  .recording-step audio { width: 100%; }
  .page-footer { flex-direction: column; gap: 4px; }
}

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