/* Same palette and type as the home page (brand-premium.css): wine for
 * headings and accents, terracotta reserved for actions, ivory paper,
 * Cormorant Garamond headings and Manrope text. */
:root {
  --wine: #4a2636;
  --wine-2: #61394b;
  --ivory: #faf7f3;
  --surface: #fffdfa;
  --powder: #eedfd8;
  --terracotta: #a94a3b;
  --terracotta-hover: #903d31;
  --ink: #392f32;
  --ink-light: #65545b;
  --champagne: #c8b69a;
  --gold: #c9973a;
  --line: #ded0c5;
  --rec: #a94a3b;
  --ok: #3f7552;
  --ok-bg: #e8f1ea;
  --bad-bg: #f8e7e3;
  --heading: 'Cormorant Garamond', Georgia, serif;
  --body: 'Manrope', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font: 400 17px/1.7 var(--body);
}
[hidden] { display: none !important; }
a { color: var(--wine); }

.st-top {
  display: flex; justify-content: center;
  padding: 14px 16px; background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.st-logo img { display: block; height: 44px; width: auto; }

.st-main { max-width: 680px; margin: 0 auto; padding: 28px 16px 72px; }

.st-steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin-bottom: 16px;
}
.st-steps span {
  font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: #a5958c; padding-top: 8px; border-top: 2px solid var(--line);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.st-steps span em { font-style: normal; }
/* a phone has room for one name: the current step's */
@media (max-width: 480px) {
  .st-steps { display: flex; }
  .st-steps span { flex: 0 0 36px; }
  .st-steps span.is-now { flex: 1 1 auto; }
  .st-steps span:not(.is-now) em { display: none; }
}
.st-steps span.is-done { color: var(--champagne); border-top-color: var(--champagne); }
.st-steps span.is-now { color: var(--wine); border-top-color: var(--wine); }

.st-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  padding: 32px 28px; box-shadow: 0 6px 24px rgba(74, 38, 54, .07);
}
@media (max-width: 480px) { .st-card { padding: 24px 16px; } }

h1, h2 { font-family: var(--heading); font-weight: 500; line-height: 1.15; color: var(--wine); margin: 0 0 12px; text-wrap: balance; }
h1 { font-size: clamp(2rem, 6vw, 2.7rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.1rem); }
p { margin: 0 0 14px; }
.st-lead { color: var(--ink); }
.st-small { font-size: .875rem; color: var(--ink-light); }
.st-eyebrow {
  font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--terracotta); margin-bottom: 8px;
}

.st-plan { list-style: none; padding: 0; margin: 6px 0 20px; counter-reset: plan; }
.st-plan li {
  counter-increment: plan; position: relative; padding: 11px 0 11px 46px;
  border-top: 1px solid var(--line); font-size: .97rem;
}
.st-plan li:first-child { border-top: 0; }
.st-plan li strong { color: var(--wine); font-weight: 600; }
.st-plan li::before {
  content: counter(plan); position: absolute; left: 0; top: 10px;
  width: 30px; height: 30px; border-radius: 50%; background: var(--powder); color: var(--wine);
  display: grid; place-items: center; font: 600 1.05rem var(--heading);
}

/* form */
.st-field { margin-bottom: 14px; }
.st-field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--wine); }
.st-field input, .st-field select, .st-field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; background: #fff;
}
.st-field textarea { min-height: 90px; resize: vertical; }
.st-field input:focus, .st-field select:focus, .st-field textarea:focus {
  outline: none; border-color: var(--wine); box-shadow: 0 0 0 3px rgba(74, 38, 54, .1);
}
.st-check { display: flex; gap: 10px; align-items: flex-start; font-size: .875rem; line-height: 1.6; margin: 6px 0 18px; }
.st-check input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--wine); }
.st-error { color: var(--terracotta); font-size: .875rem; min-height: 1.2em; margin: 4px 0 10px; }

/* buttons: terracotta is for actions */
.st-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: .8rem 1.4rem; border-radius: 4px; border: 1px solid var(--terracotta);
  background: var(--terracotta); color: var(--ivory); font: 500 .97rem var(--body); cursor: pointer;
  transition: background .15s, color .15s;
}
.st-btn:hover { background: var(--terracotta-hover); border-color: var(--terracotta-hover); }
.st-btn:disabled { opacity: .45; cursor: default; }
.st-btn.is-ghost { background: transparent; color: var(--wine); border-color: var(--wine); }
.st-btn.is-ghost:hover { background: var(--wine); color: var(--ivory); }
.st-btn.is-wide { width: 100%; }
:is(.st-btn, .st-opt, .st-chip, .st-play, .st-link, .st-rec-btn):focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }
.st-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.st-link {
  background: none; border: 0; padding: 6px 0; color: var(--ink-light); font: 500 .9rem var(--body);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* grammar questions */
.st-progress { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-light); margin-bottom: 18px; letter-spacing: .02em; }
.st-q { font: 500 clamp(1.55rem, 5vw, 2rem)/1.3 var(--heading); color: var(--wine); margin: 0 0 20px; }
.st-options { display: grid; gap: 10px; }
.st-opt {
  text-align: left; padding: 14px 18px; border: 1px solid var(--line); border-radius: 4px;
  background: #fff; color: var(--ink); font: 500 1rem var(--body); cursor: pointer;
}
.st-opt:hover { border-color: var(--wine); }
.st-opt:disabled { cursor: default; }
.st-opt:disabled:not(.is-right):not(.is-wrong) { opacity: .55; }
/* the answer, shown straight away */
.st-opt.is-right { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.st-opt.is-wrong { border-color: var(--terracotta); background: var(--bad-bg); color: var(--terracotta); }
.st-opt.is-right::after, .st-opt.is-wrong::after { float: right; font-weight: 700; }
.st-opt.is-right::after { content: "\2713"; }
.st-opt.is-wrong::after { content: "\2715"; }
.st-fb { min-height: 1.7em; margin: 12px 0 0; font-size: .95rem; }
.st-fb.is-right { color: var(--ok); font-weight: 600; }
.st-fb.is-wrong { color: var(--ink-light); }
.st-fb.is-wrong strong { color: var(--ok); }
.st-dontknow { margin-top: 10px; width: 100%; }

/* listening and voice */
.st-play {
  display: inline-flex; align-items: center; gap: 12px; margin: 4px 0 18px;
  padding: 10px 20px 10px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--wine); font: 600 .95rem var(--body); cursor: pointer;
}
.st-play .ic {
  width: 34px; height: 34px; border-radius: 50%; background: var(--powder); color: var(--wine);
  display: grid; place-items: center;
}
.st-play:disabled { opacity: .5; cursor: default; }
.st-play.is-on .ic { background: var(--wine); color: var(--ivory); }
.st-big-uk { font: 500 clamp(1.4rem, 4.6vw, 1.75rem)/1.35 var(--heading); color: var(--wine); margin: 0 0 18px; }

.st-rec {
  border: 1px dashed var(--champagne); border-radius: 4px; padding: 20px 16px; text-align: center; background: var(--ivory);
}
.st-rec-btn {
  width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--rec); color: #fff;
  display: inline-grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(169, 74, 59, .25);
}
.st-rec-btn .dot { width: 26px; height: 26px; border-radius: 50%; background: #fff; }
.st-rec-btn.is-on { animation: st-pulse 1.4s infinite; }
.st-rec-btn.is-on .dot { width: 22px; height: 22px; border-radius: 3px; }
@keyframes st-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(169, 74, 59, .35); } 50% { box-shadow: 0 0 0 14px rgba(169, 74, 59, 0); } }
.st-rec-label { font-weight: 600; color: var(--wine); margin-top: 10px; }
.st-timer { font-variant-numeric: tabular-nums; color: var(--ink-light); font-size: .9rem; }
.st-rec audio { width: 100%; margin-top: 8px; }
.st-meter { display: flex; justify-content: center; align-items: center; gap: 5px; height: 30px; margin: 12px 0 4px; }
.st-meter i { width: 6px; height: 100%; border-radius: 3px; background: var(--terracotta); transform: scaleY(.12); transition: transform .07s linear; }
.st-mic { display: block; margin-top: 14px; font-size: .8rem; color: var(--ink-light); }
.st-mic select { font: inherit; max-width: 100%; margin-left: 6px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); }

/* goals and timing: one question per screen */
.st-back { padding: 0; font-size: .8rem; }
.st-ask { margin: 4px 0 6px; }
.st-ask .uk, .st-hint .uk { display: block; font: 400 .9rem var(--body); color: var(--ink-light); margin-top: 4px; }
.st-hint { margin: 0; }
.st-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 20px; }
@media (max-width: 480px) { .st-tiles { grid-template-columns: 1fr; } }
.st-tile {
  display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 12px 16px;
  text-align: left; border: 1px solid var(--line); border-radius: 4px; background: #fff;
  color: var(--ink); font: 500 .98rem/1.35 var(--body); cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, transform .15s;
  animation: st-up .35s both; animation-delay: calc(var(--d, 0) * 45ms);
}
.st-tile:hover { border-color: var(--wine); transform: translateY(-1px); }
.st-tile:disabled { cursor: default; }
.st-tile .uk { display: block; font-size: .78rem; font-weight: 400; color: var(--ink-light); }
.st-tile .tick {
  flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--champagne);
  display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.st-tiles.is-multi .tick { border-radius: 4px; }
.st-tile[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: var(--ivory); }
.st-tile[aria-pressed="true"] .uk { color: rgba(250, 247, 243, .75); }
.st-tile[aria-pressed="true"] .tick { background: var(--gold); border-color: var(--gold); }
.st-tile[aria-pressed="true"] .tick::after {
  content: ""; width: 5px; height: 10px; margin-top: -2px;
  border: solid var(--wine); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.st-result {
  margin: 8px 0 18px; padding: 16px 20px; border-left: 3px solid var(--wine); background: var(--powder); border-radius: 0 4px 4px 0;
  font-size: .9rem; color: var(--ink-light);
}
.st-result strong { display: block; font: 500 1.7rem/1.2 var(--heading); color: var(--wine); margin-top: 2px; }
.st-spinner {
  width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--wine);
  animation: st-spin .8s linear infinite; margin: 10px auto;
}
@keyframes st-spin { to { transform: rotate(360deg); } }

/* every screen eases in */
#app.is-in > * { animation: st-up .32s both; }
@keyframes st-up { from { opacity: 0; transform: translateY(8px); } }

/* Vox: the school's robot (as on /ai-prompt and in Case Files), here the
 * teenagers' companion who cheers a right answer. */
.vox {
  position: fixed; right: 16px; bottom: 12px; z-index: 50;
  display: flex; align-items: flex-end; gap: 6px; pointer-events: none;
  transform: translateY(150%); opacity: 0;
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), opacity .2s;
}
.vox.is-up { transform: none; opacity: 1; }
.vox .vox-svg { width: 78px; height: auto; overflow: visible; filter: drop-shadow(0 8px 14px rgba(74, 38, 54, .25)); }
.vox.is-up .vox-svg { animation: vox-hop .55s .15s ease; }
.vox.is-up .vox-arm { animation: vox-wave .9s ease-in-out .2s 1; }
.vox-bubble {
  margin-bottom: 58px; padding: 8px 14px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 4px 14px;
  color: var(--wine); font: 700 1rem var(--body); box-shadow: 0 6px 18px rgba(74, 38, 54, .12);
}
.vox-eyes { transform-box: fill-box; transform-origin: center; animation: vox-blink 4.6s infinite; }
.vox-ant { animation: vox-glow 2.4s ease-in-out infinite; }
.vox-arm { transform-box: view-box; transform-origin: 56px 74px; }
@keyframes vox-hop { 40% { transform: translateY(-14px) rotate(-5deg); } 70% { transform: translateY(2px); } }
@keyframes vox-wave { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-42deg); } 60% { transform: rotate(-12deg); } }
@keyframes vox-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes vox-glow { 50% { fill: #f2c76d; } }
.vox-hello { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.vox-hello .vox-svg { flex: none; width: 84px; height: auto; overflow: visible; }
.vox-hello .vox-arm { animation: vox-wave .9s ease-in-out .4s 2; }
.vox-hello h1 { margin-bottom: 6px; }
.vox-hello .st-lead { margin: 0; }
@media (max-width: 420px) { .vox-hello { align-items: flex-start; gap: 12px; } .vox-hello .vox-svg { width: 64px; } }

@media (prefers-reduced-motion: reduce) {
  #app.is-in > *, .st-tile, .vox.is-up .vox-svg, .vox-eyes, .vox-ant, .vox-arm { animation: none !important; }
  .vox { transition: opacity .2s; transform: none; }
}
