:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --white: #ffffff;
  --ink: #193843;
  --muted: #485f65;
  --teal: #17655d;
  --teal-dark: #0c4d46;
  --teal-pale: #eaf3ee;
  --line: #c8d3cf;
  --gold: #9b602a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, a, [tabindex] { scroll-margin-block: 2rem; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }
p, h1, h2 { margin-block-start: 0; }
p { margin-block-end: 1rem; }
p:last-child { margin-block-end: 0; }

.skip-link {
  position: absolute;
  z-index: 10;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.7rem 1rem;
  color: var(--white);
  background: var(--teal-dark);
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }
.site-header, main, .site-footer { width: min(1120px, calc(100% - 4rem)); margin-inline: auto; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 2rem; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 0.7rem; font-size: 1.45rem; font-weight: 700; letter-spacing: -0.05em; }
.brand-mark { display: flex; align-items: end; gap: 3px; width: 26px; height: 28px; }
.brand-mark span { width: 6px; border-radius: 5px; background: var(--teal); }
.brand-mark span:nth-child(1) { height: 11px; }
.brand-mark span:nth-child(2) { height: 19px; }
.brand-mark span:nth-child(3) { height: 27px; }
.practice-tag { font-size: 0.76rem; font-weight: 600; color: var(--teal-dark); padding: 0.35rem 0.7rem; border: 1px solid var(--line); border-radius: 30px; }
.introduction { max-width: 750px; padding-block: 2rem 1.5rem; }
.eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); margin-bottom: 0.6rem; }
h1 { font-size: clamp(2.2rem, 5vw, 3.65rem); line-height: 1.13; letter-spacing: -0.045em; font-weight: 650; margin-bottom: 0; }
.practice-note { font-size: 0.85rem; line-height: 1.6; color: var(--muted); margin-bottom: 1.3rem; overflow-wrap: anywhere; }
.journey-started .introduction { padding-block: 1.5rem; }
.journey-started h1 { font-size: 1.7rem; }
.journey-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 2rem; align-items: start; padding-bottom: 3rem; }
.question-card { min-width: 0; padding: 2.2rem; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: 0 6px 22px #19384307; }
.card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 44px; margin-bottom: 0.7rem; }
.card-eyebrow { margin: 0; }
#back-control { display: flex; }
h2 { font-size: clamp(1.45rem, 3.2vw, 1.85rem); line-height: 1.3; letter-spacing: -0.025em; margin-bottom: 0.85rem; font-weight: 650; overflow-wrap: anywhere; }
h2:focus { outline: none; }
.explanation { color: var(--muted); margin-bottom: 1.5rem; overflow-wrap: anywhere; }
.choice-list { display: grid; gap: 0.75rem; margin-block: 1.5rem; }
.choice { width: 100%; min-height: 64px; text-align: left; display: flex; align-items: center; gap: 1rem; padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); line-height: 1.4; }
.choice:hover { border-color: var(--teal); background: #f4f8f5; }
.choice:active { background: var(--teal-pale); }
.choice-label { flex: 0 0 2rem; display: inline-flex; align-items: center; justify-content: center; min-height: 2rem; border-radius: 7px; background: var(--teal-pale); color: var(--teal-dark); font-weight: 650; font-size: 0.9rem; }
.choice-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.choice-arrow { color: var(--teal); font-size: 1.1rem; flex: 0 0 auto; }
.notice { border-left: 3px solid var(--teal); background: var(--teal-pale); padding: 0.9rem 1rem; margin-block: 1.3rem; border-radius: 0 6px 6px 0; font-size: 0.9rem; color: var(--ink); overflow-wrap: anywhere; }
.primary-button { justify-self: start; min-height: 48px; border: 1px solid var(--teal); border-radius: 8px; padding: 0.6rem 1rem; background: var(--teal); color: var(--white); font-weight: 600; text-decoration: none; line-height: 1.5; }
.primary-button:hover { background: var(--teal-dark); }
.presentation-controls { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-block: 0.2rem; }
.quiet-button { min-height: 44px; padding: 0.55rem 0.75rem; border: 1px solid var(--line); border-radius: 7px; background: var(--white); color: var(--teal-dark); font-size: 0.85rem; font-weight: 600; line-height: 1.4; }
.quiet-button:hover { background: var(--teal-pale); border-color: var(--teal); }
.journey-controls { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1.5rem; }
.text-button { min-height: 44px; min-width: 44px; border: 0; background: transparent; padding: 0.5rem 0.1rem; color: var(--teal-dark); font-size: 0.85rem; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; line-height: 1.4; }
.text-button:hover { color: var(--ink); }
.event-status { font-size: 0.85rem; color: var(--muted); margin-top: 1rem; overflow-wrap: anywhere; }
.event-status:empty { margin: 0; }
.event-status.status-duplicate { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.goal-card { padding: 1.5rem; border: 1px solid var(--line); border-radius: 14px; background: #eef2eb; }
.goal-copy { font-size: 1.15rem; line-height: 1.5; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.goal-rule { display: block; width: 2rem; height: 2px; background: var(--teal); margin-block: 1.2rem; }
.goal-hint, .session-note { font-size: 0.8rem; color: var(--muted); }
.session-note { padding: 1.5rem 0.2rem; }
.session-note strong { color: var(--ink); font-weight: 600; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1.3rem 2rem; border-top: 1px solid var(--line); font-size: 0.72rem; color: var(--muted); }
.site-footer p { margin: 0; }
.external-link { display: inline-block; margin-block: 1rem; }
.external-note { font-size: 0.85rem; color: var(--muted); }

@media (max-width: 850px) {
  .journey-layout { display: flex; flex-direction: column; gap: 1rem; }
  .question-card { width: 100%; }
  .companion { display: contents; }
  .goal-card { order: -1; width: 100%; padding: 0.8rem 1rem; }
  body:not(.has-confirmed-goal) .goal-card { display: none; }
  .goal-card .eyebrow { margin-bottom: 0.25rem; }
  .goal-copy { font-size: 1rem; }
  .goal-rule, .goal-hint { display: none; }
  .session-note { order: 1; padding: 0.5rem 0.2rem; }
}

@media (max-width: 520px) {
  :root { font-size: 17px; }
  .site-header, main, .site-footer { width: calc(100% - 2rem); }
  .site-header { padding-block: 0.8rem; gap: 0.75rem; }
  .brand { font-size: 1.3rem; gap: 0.5rem; }
  .practice-tag { font-size: 0.65rem; padding: 0.3rem 0.5rem; }
  .introduction { padding-block: 1.2rem 1rem; }
  h1 { font-size: 1.8rem; }
  .practice-note { font-size: 0.8rem; }
  .journey-started .introduction { padding-block: 1rem; }
  .journey-started h1 { font-size: 1.2rem; }
  .question-card { padding: 1.3rem 1rem; border-radius: 14px; }
  .choice { gap: 0.7rem; padding: 0.8rem; }
  .choice-arrow { display: none; }
  .session-note { padding: 0.8rem 0.2rem; }
  .journey-layout { padding-bottom: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .choice, .question-card, .goal-card, .quiet-button, .primary-button { border: 1px solid ButtonText; }
  .choice-label { border: 1px solid ButtonText; }
}

/* Separate local preview v0.3. */
.guide-page { background: #f8f6ef; }
.guide-page .site-header, .guide-page main, .guide-page .site-footer { width: min(1120px, calc(100% - 4rem)); }
.guide-page .brand { text-decoration: none; color: var(--ink); }
.guide-page .introduction { padding-block: 2.5rem 1.8rem; }
.guide-page .introduction > .eyebrow { margin-bottom: .7rem; }
.guide-page .question-card { box-shadow: none; border-radius: 14px; }
.guide-page .goal-card { background: #e7efea; border-radius: 10px; }
.guide-page .site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.guide-page.journey-started .introduction { padding-block: 1.5rem; }
@media (max-width: 580px) {
  .guide-page .site-header, .guide-page main, .guide-page .site-footer { width: calc(100% - 2rem); }
  .guide-page .site-header { align-items: start; flex-direction: column; padding-block: .8rem; }
  .guide-page .introduction { padding-block: 1.5rem 1.1rem; }
  .guide-page .site-nav { gap: .15rem 1.1rem; }
}

.checklist { margin-block: 1.5rem; padding: 1.2rem; background: var(--teal-pale); border: 1px solid var(--line); border-radius: 9px; }
.checklist h3 { font-size: 1.1rem; letter-spacing: -.02em; margin-block: .6rem 1rem; }
.checklist-focus { font-weight: 650; font-size: .9rem; }
.checklist-items { padding-left: 1.4rem; margin-block: 0 1rem; }
.checklist-items li { margin-bottom: 1rem; padding-left: .2rem; overflow-wrap: anywhere; }
.checklist-items li:last-child { margin-bottom: 0; }
.checklist-note { font-size: .86rem; }
.completion-note { font-weight: 650; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .86rem; }
@media print { .site-header, .site-footer, .presentation-controls, .journey-controls, .companion, #back-control { display: none !important; } .journey-layout { display: block; } .question-card { border: 0; } main { width: 100%; } }

.practice-objective { padding: .85rem 1rem; border-left: 3px solid var(--accent, #326854); background: #f0f5f1; color: #234737; font-weight: 600; line-height: 1.55; }

/* One compact goal and progress marker while answering practice questions. */
.question-in-progress .goal-card { padding: .65rem 1rem; }
.question-in-progress .goal-card .eyebrow,
.question-in-progress .goal-rule,
.question-in-progress .goal-hint { display: none; }
.question-in-progress .goal-copy { font-size: .95rem; margin: 0; }
.presentation-controls { margin-block: 0 1rem; }
.terminology-intro { color: var(--muted); margin-block: 0 .8rem; overflow-wrap: anywhere; }
.checklist-perspective { font-size: .9rem; }
.speech-disclosure, .speech-status { flex-basis: 100%; font-size: .78rem; line-height: 1.45; color: var(--muted); margin: 0; overflow-wrap: anywhere; }
.speech-status:empty { display: none; }
.speech-disclosure a { display: inline-flex; align-items: center; min-height: 44px; }
.quiet-button:disabled { opacity: .7; }
@media print { .speech-disclosure, .speech-status { display: none !important; } }

/* Passage feedback uses native speech start/end, independent of keyboard focus. */
.reading-passage { background-color: #fff0b3; box-shadow: inset 0 -3px 0 #806018; border-radius: .15rem; }
.choice.reading-passage { background-color: #fff0b3; }
@media (forced-colors: active) {
  .reading-passage { outline: 2px dashed Highlight; outline-offset: 1px; box-shadow: none; }
  .reading-passage:focus-visible { outline: 3px solid Highlight; outline-offset: 4px; }
}
@media print { .reading-passage { background-color: transparent; box-shadow: none; outline: none; } }

/* Only the active mobile speech control sticks. display:contents removes the
   short group's layout box so the containing block is the complete session. */
.speech-dock { display: inline-flex; }
@media (max-width: 850px) {
  .presentation-controls { display: contents; }
  .presentation-controls > .quiet-button { margin: 0 .35rem .55rem 0; }
  .speech-dock { display: flex; width: 100%; min-height: 56px; align-items: center; padding: .25rem; margin-block: .2rem .55rem; border: 1px solid transparent; }
  .speech-dock.is-reading { position: sticky; top: max(.35rem, env(safe-area-inset-top, 0px)); z-index: 5; background: var(--white); border-color: var(--line); border-radius: 7px; box-shadow: 0 2px 5px #15362b20; }
  .choice, #question-heading, .checklist li { scroll-margin-block-start: calc(80px + env(safe-area-inset-top, 0px)); }
  .speech-disclosure { margin-bottom: .35rem; }
  .speech-status { margin-bottom: .75rem; }
}
@media (max-width: 520px) {
  .checklist { padding: .8rem .65rem; }
  .checklist-items { padding-left: 1.15rem; }
  .checklist-items li { padding-left: 0; }
}
@media print { .speech-dock { display: none !important; } }
