/* ===========================================================
   托福全科题库 · Design System
   paper / ink / deep teal / copper
   =========================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

:root{
  --paper:#F7F5F0;
  --paper-2:#F1EEE6;
  --surface:#FFFFFF;
  --ink:#16211F;
  --ink-2:#55635F;
  --ink-3:#8B9793;
  --line:#E6E1D7;
  --line-2:#D3CCBC;

  --brand:#0E5A56;
  --brand-2:#12736D;
  --brand-soft:#E6F0EE;
  --brand-ring:rgba(14,90,86,.14);

  --copper:#B0683C;
  --amber:#D19433;
  --danger:#B2452D;
  --ok:#2E7D52;

  --r-sm:8px;
  --r:12px;
  --r-lg:18px;

  --sans:-apple-system,BlinkMacSystemFont,"SF Pro SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  --display:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI Variable Display","Segoe UI","Helvetica Neue",Arial,"PingFang SC",sans-serif;
  --mono:ui-monospace,"SF Mono",SFMono-Regular,Menlo,Consolas,monospace;

  --shadow-s:0 1px 2px rgba(22,33,31,.05);
  --shadow-m:0 4px 18px -6px rgba(22,33,31,.14);
  --shadow-l:0 18px 50px -22px rgba(22,33,31,.30);
}

html,body{ height:100%; }
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--sans);
  font-size:15px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
body::before{
  content:"";
  position:fixed; inset:0; pointer-events:none; z-index:0;
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(18,115,109,.07), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, rgba(176,104,60,.06), transparent 55%);
}
#app{ position:relative; z-index:1; }

a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; cursor:pointer; border:0; background:none; }
input,textarea{ font:inherit; color:inherit; }
::selection{ background:rgba(18,115,109,.16); }

.wrap{ width:100%; max-width:1180px; margin:0 auto; padding:0 28px; }
.mono{ font-family:var(--mono); font-variant-numeric:tabular-nums; }

/* ---------- top nav ---------- */
.nav{
  position:sticky; top:0; z-index:40;
  backdrop-filter:saturate(180%) blur(14px);
  -webkit-backdrop-filter:saturate(180%) blur(14px);
  background:rgba(247,245,240,.82);
  border-bottom:1px solid var(--line);
}
.nav-in{
  height:66px; display:flex; align-items:center; gap:18px;
}
.brand{ display:flex; align-items:center; gap:11px; }
.brand-mark{ width:30px; height:30px; flex:0 0 auto; }
.brand-name{ font-weight:650; letter-spacing:-.01em; font-size:15.5px; }
.brand-sub{
  font-size:10.5px; letter-spacing:.16em; text-transform:uppercase;
  color:var(--ink-3); font-weight:600; margin-top:-3px;
}
.nav-links{ display:flex; gap:2px; margin-left:auto; align-items:center; }
.nav-link{
  padding:7px 12px; border-radius:999px; font-size:13.5px; color:var(--ink-2);
  transition:.18s; white-space:nowrap;
}
.nav-link:hover{ background:var(--paper-2); color:var(--ink); }
.nav-link.on{ background:var(--brand); color:#fff; }
.nav-meta{
  font-size:11.5px; color:var(--ink-3); padding-left:14px; margin-left:6px;
  border-left:1px solid var(--line-2); white-space:nowrap;
}

/* ---------- home hero ---------- */
.hero{ padding:72px 0 44px; }
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size:11px; letter-spacing:.18em; text-transform:uppercase;
  color:var(--brand); font-weight:650;
  border:1px solid rgba(14,90,86,.22); background:var(--brand-soft);
  padding:5px 11px; border-radius:999px;
}
.hero h1{
  font-family:var(--display);
  font-size:clamp(36px,4.9vw,60px);
  line-height:1.06; letter-spacing:-.035em; font-weight:600;
  margin:22px 0 0; max-width:15em;
}
.hero h1 em{ font-style:normal; color:var(--brand); }
.hero p.lead{
  margin:20px 0 0; font-size:16.5px; color:var(--ink-2); max-width:34em; line-height:1.75;
}
.stats{
  display:flex; gap:0; margin-top:44px; border-top:1px solid var(--line);
  border-bottom:1px solid var(--line); flex-wrap:wrap;
}
.stat{ padding:20px 34px 20px 0; margin-right:34px; border-right:1px solid var(--line); }
.stat:last-child{ border-right:0; margin-right:0; }
.stat .v{
  font-family:var(--display); font-size:32px; line-height:1; letter-spacing:-.035em; font-weight:600;
  font-variant-numeric:tabular-nums;
}
.stat .k{ font-size:11.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--ink-3); margin-top:7px; font-weight:600; }

/* ---------- subject cards ---------- */
.section-head{
  display:flex; align-items:baseline; gap:14px; margin:56px 0 20px;
}
.section-head h2{
  font-size:13px; letter-spacing:.16em; text-transform:uppercase;
  font-weight:700; color:var(--ink-3); margin:0;
}
.section-head .rule{ flex:1; height:1px; background:var(--line); }

.grid-sub{ display:grid; grid-template-columns:repeat(2,1fr); gap:16px; }
.sub-card{
  position:relative; display:block; background:var(--surface);
  border:1px solid var(--line); border-radius:var(--r-lg);
  padding:26px 26px 20px; transition:.22s cubic-bezier(.2,.7,.3,1);
  box-shadow:var(--shadow-s); overflow:hidden;
}
.sub-card::after{
  content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background:linear-gradient(135deg, rgba(18,115,109,.055), transparent 42%);
  opacity:0; transition:.22s;
}
.sub-card:hover{ transform:translateY(-3px); box-shadow:var(--shadow-m); border-color:var(--line-2); }
.sub-card:hover::after{ opacity:1; }
.sub-top{ display:flex; align-items:flex-start; gap:14px; }
.sub-icon{
  width:42px; height:42px; flex:0 0 auto; border-radius:11px;
  background:var(--brand-soft); color:var(--brand);
  display:grid; place-items:center; border:1px solid rgba(14,90,86,.13);
}
.sub-title{ font-size:21px; font-weight:650; letter-spacing:-.01em; line-height:1.25; }
.sub-en{
  font-family:var(--display); font-size:10.5px; color:var(--ink-3);
  letter-spacing:.14em; text-transform:uppercase; font-weight:600; margin-top:3px;
}
.sub-arrow{
  margin-left:auto; color:var(--ink-3); transition:.22s; padding-top:4px;
}
.sub-card:hover .sub-arrow{ color:var(--brand); transform:translate(3px,-3px); }
.sub-nums{
  display:flex; gap:22px; margin-top:20px; padding-top:16px; border-top:1px dashed var(--line);
}
.sub-num .v{ font-family:var(--display); font-size:22px; line-height:1; font-variant-numeric:tabular-nums; font-weight:600; letter-spacing:-.03em; }
.sub-num .k{ font-size:11px; color:var(--ink-3); margin-top:5px; letter-spacing:.06em; }
.pills{ display:flex; flex-wrap:wrap; gap:6px; margin-top:15px; }
.pill{
  font-size:11.5px; color:var(--ink-2); background:var(--paper-2);
  border:1px solid var(--line); border-radius:999px; padding:3px 9px; white-space:nowrap;
}
.pill b{ color:var(--ink); font-weight:600; font-variant-numeric:tabular-nums; }

/* ---------- footer ---------- */
.foot{
  margin:80px 0 0; padding:30px 0 48px; border-top:1px solid var(--line);
  color:var(--ink-3); font-size:12.5px; display:flex; gap:20px; flex-wrap:wrap;
  justify-content:space-between;
}

/* ---------- subject page ---------- */
.page-head{ padding:44px 0 9px; }
.crumbs{ font-size:12.5px; color:var(--ink-3); display:flex; gap:8px; align-items:center; }
.crumbs a:hover{ color:var(--brand); }
.page-title{
  display:flex; align-items:flex-end; gap:16px; flex-wrap:wrap; margin-top:14px;
}
.page-title h1{ font-family:var(--display); font-size:40px; line-height:1.08; margin:0; letter-spacing:-.035em; font-weight:600; }
.page-title .meta{ color:var(--ink-3); font-size:13px; padding-bottom:6px; }

.tabs{ display:flex; gap:8px; margin:28px 0 0; flex-wrap:wrap; }
.tab{
  display:flex; align-items:center; gap:9px; padding:10px 16px; border-radius:999px;
  border:1px solid var(--line); background:var(--surface); color:var(--ink-2);
  font-size:13.5px; transition:.18s; box-shadow:var(--shadow-s);
}
.tab:hover{ border-color:var(--line-2); color:var(--ink); }
.tab.on{ background:var(--ink); color:#fff; border-color:var(--ink); }
.tab .n{ font-size:11px; opacity:.62; font-variant-numeric:tabular-nums; }

.toolbar{
  display:flex; gap:10px; align-items:center; margin:22px 0 6px; flex-wrap:wrap;
}
.search{
  flex:1; min-width:200px; display:flex; align-items:center; gap:9px;
  background:var(--surface); border:1px solid var(--line); border-radius:10px;
  padding:0 13px; height:40px; max-width:360px;
}
.search input{ border:0; outline:0; background:none; width:100%; font-size:13.5px; }
.search svg{ color:var(--ink-3); flex:0 0 auto; }
.seg{ display:flex; background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:3px; }
.seg button{
  padding:6px 12px; border-radius:7px; font-size:12.5px; color:var(--ink-2); transition:.15s;
}
.seg button.on{ background:var(--paper-2); color:var(--ink); font-weight:600; }
.count-note{ font-size:12.5px; color:var(--ink-3); margin-left:auto; font-variant-numeric:tabular-nums; }

.list{ margin:14px 0 0; border-top:1px solid var(--line); }
.row{
  display:grid; grid-template-columns:74px 1fr auto auto; gap:18px; align-items:center;
  padding:15px 14px 15px 8px; border-bottom:1px solid var(--line);
  transition:.15s; cursor:pointer; position:relative;
}
.row:hover{ background:var(--surface); box-shadow:var(--shadow-s); }
.row:hover .row-go{ color:var(--brand); transform:translateX(2px); }
.row > *{ min-width:0; }
.row-date{ text-align:center; line-height:1.15; }
.row-date .d{ font-family:var(--display); font-size:19px; font-variant-numeric:tabular-nums; font-weight:600; letter-spacing:-.02em; }
.row-date .m{ font-size:10.5px; color:var(--ink-3); letter-spacing:.08em; }
.row-name{ font-size:14.5px; font-weight:550; letter-spacing:-.005em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.row-sub{ font-size:12px; color:var(--ink-3); margin-top:3px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.tag{
  font-size:10.5px; padding:1.5px 7px; border-radius:5px; letter-spacing:.04em;
  background:var(--paper-2); color:var(--ink-2); border:1px solid var(--line);
}
.tag.jj{ background:rgba(14,90,86,.08); color:var(--brand); border-color:rgba(14,90,86,.16); }
.tag.tm{ background:rgba(176,104,60,.09); color:var(--copper); border-color:rgba(176,104,60,.18); }
.row-c{ font-size:12.5px; color:var(--ink-2); white-space:nowrap; font-variant-numeric:tabular-nums; }
.row-go{ color:var(--line-2); transition:.18s; }

.more{
  display:block; width:100%; margin:18px 0 0; padding:13px; border-radius:10px;
  border:1px solid var(--line); background:var(--surface); color:var(--ink-2); font-size:13.5px;
  transition:.18s;
}
.more:hover{ border-color:var(--brand); color:var(--brand); }

/* ---------- practice runner ---------- */
.runner{ min-height:100vh; display:flex; flex-direction:column; }
.rbar{
  position:sticky; top:0; z-index:50; background:rgba(247,245,240,.9);
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
.rbar-in{ height:64px; display:flex; align-items:center; gap:16px; }
.icon-btn{
  width:34px; height:34px; border-radius:9px; display:grid; place-items:center;
  color:var(--ink-2); border:1px solid transparent; transition:.15s; flex:0 0 auto;
}
.icon-btn:hover{ background:var(--paper-2); border-color:var(--line); color:var(--ink); }
.rbar-title{ min-width:0; }
.rbar-title .t{ font-size:14.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:46vw; }
.rbar-title .s{ font-size:11.5px; color:var(--ink-3); margin-top:-1px; }
.rbar-right{ margin-left:auto; display:flex; align-items:center; gap:16px; }

.prog{ display:flex; align-items:center; gap:9px; font-size:12px; color:var(--ink-3); font-variant-numeric:tabular-nums; }
.prog-bar{ width:96px; height:3px; border-radius:99px; background:var(--line-2); overflow:hidden; }
.prog-bar i{ display:block; height:100%; background:var(--brand); border-radius:99px; transition:width .3s; }

/* timer ring */
.ring{ position:relative; width:56px; height:56px; flex:0 0 auto; }
.ring svg{ transform:rotate(-90deg); display:block; }
.ring .track{ stroke:var(--line-2); }
.ring .bar{ stroke:var(--brand); transition:stroke-dashoffset .28s linear, stroke .4s; }
.ring .num{
  position:absolute; inset:0; display:grid; place-items:center;
  font-family:var(--mono); font-size:14px; font-weight:600; letter-spacing:-.02em;
  font-variant-numeric:tabular-nums;
}
.ring.warn .bar{ stroke:var(--amber); }
.ring.warn .num{ color:var(--amber); }
.ring.crit .bar{ stroke:var(--danger); }
.ring.crit .num{ color:var(--danger); }
.ring.idle .bar{ stroke:var(--line-2); }
@keyframes pulse{ 0%,100%{opacity:1} 50%{opacity:.45} }
.ring.crit{ animation:pulse 1s ease-in-out infinite; }
.ring-hint{ font-size:10px; color:var(--ink-3); text-align:center; margin-top:-2px; letter-spacing:.05em; }

.rbody{ flex:1; padding:30px 0 90px; }

/* question card */
.qcard{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  padding:28px 30px; box-shadow:var(--shadow-s);
}
.q-head{ display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.q-no{
  font-family:var(--mono); font-size:11.5px; font-weight:600; color:var(--brand);
  background:var(--brand-soft); border:1px solid rgba(14,90,86,.15);
  padding:2px 8px; border-radius:6px; letter-spacing:.04em;
}
.q-type{ font-size:11.5px; color:var(--ink-3); letter-spacing:.06em; text-transform:uppercase; }
.q-prompt{ font-size:16px; line-height:1.7; font-weight:500; }
.q-prompt .zh{ display:block; font-size:13px; color:var(--ink-3); font-weight:400; margin-top:6px; }

/* choices */
.choices{ display:flex; flex-direction:column; gap:9px; margin-top:20px; }
.choice{
  display:flex; gap:13px; align-items:flex-start; text-align:left;
  padding:13px 16px; border:1px solid var(--line); border-radius:11px;
  background:var(--surface); transition:.16s; width:100%;
}
.choice:hover:not(.locked){ border-color:var(--brand); background:var(--brand-soft); }
.choice .k{
  flex:0 0 auto; width:22px; height:22px; border-radius:6px; display:grid; place-items:center;
  font-size:11.5px; font-weight:700; background:var(--paper-2); color:var(--ink-2); margin-top:1px;
  font-family:var(--mono);
}
.choice .x{ font-size:14.5px; line-height:1.6; }
.choice .zh{ display:block; font-size:12.5px; color:var(--ink-3); margin-top:2px; }
.choice.pick{ border-color:var(--brand); background:var(--brand-soft); }
.choice.pick .k{ background:var(--brand); color:#fff; }
.choice.right{ border-color:rgba(46,125,82,.45); background:rgba(46,125,82,.07); }
.choice.right .k{ background:var(--ok); color:#fff; }
.choice.wrong{ border-color:rgba(178,69,45,.4); background:rgba(178,69,45,.06); }
.choice.wrong .k{ background:var(--danger); color:#fff; }
.choice.locked{ cursor:default; }
.choice:disabled{ opacity:1; }

/* verdict */
.verdict{
  margin-top:20px; border-radius:12px; padding:16px 18px; font-size:13.5px; line-height:1.7;
  border:1px solid var(--line); background:var(--paper-2);
}
.verdict.ok{ border-color:rgba(46,125,82,.3); background:rgba(46,125,82,.06); }
.verdict.no{ border-color:rgba(178,69,45,.3); background:rgba(178,69,45,.055); }
.verdict .vt{ font-weight:650; display:flex; align-items:center; gap:7px; }
.verdict.ok .vt{ color:var(--ok); }
.verdict.no .vt{ color:var(--danger); }
.verdict .exp{ margin-top:8px; color:var(--ink-2); }

/* passage */
.split{ display:grid; grid-template-columns:1fr 1fr; gap:26px; align-items:start; }
.passage{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  padding:26px 28px; font-size:14.5px; line-height:1.9; color:var(--ink);
  position:sticky; top:92px; max-height:calc(100vh - 120px); overflow:auto;
  box-shadow:var(--shadow-s);
}
.passage p{ margin:0 0 1em; }
.passage p:last-child{ margin-bottom:0; }
.passage h4{
  font-size:12px; letter-spacing:.14em; text-transform:uppercase; color:var(--ink-3);
  margin:0 0 14px; font-weight:700;
}
.passage::-webkit-scrollbar{ width:8px; }
.passage::-webkit-scrollbar-thumb{ background:var(--line-2); border-radius:99px; }

.qlist{ display:flex; flex-direction:column; gap:16px; }

/* blank-fill (reading T1) */
.wc{ min-height:calc(100vh - 156px); display:flex; flex-direction:column; justify-content:center; }
.fill-passage{ font-size:16px; line-height:2.05; max-width:820px; margin:0 auto; }
.blank{
  display:inline-block; white-space:nowrap; vertical-align:baseline;
  padding:0 2px; border-radius:5px; transition:.15s;
}
.blank.cur{ background:none; box-shadow:0 0 0 1.5px rgba(14,90,86,.3); }
.blank .fixed{ font-family:var(--mono); color:var(--ink); font-size:15px; letter-spacing:.02em; }
/* 每个待填字母一条独立短横线，横线之间留空 */
.blank input{
  width:.9em; text-align:center; border:0; outline:0; background:none;
  border-bottom:2.5px solid rgba(22,33,31,.62);
  font-family:var(--mono); font-size:16px; padding:0; margin:0 3px;
  border-radius:2px 2px 0 0; vertical-align:baseline; text-transform:lowercase;
  transition:.15s;
}
.blank input:focus{ border-bottom-color:var(--brand); background:none; }
.blank.ok input{ border-bottom-color:var(--ok); color:var(--ok); }
.blank.no input{ border-bottom-color:var(--danger); color:var(--danger); }
.blank .reveal{
  font-family:var(--mono); color:var(--ok); font-size:15px; margin-left:4px;
}
.blank.no .reveal{ color:var(--danger); text-decoration:line-through; }

/* empty slot placeholder */
.slot:empty::after{ content:"＿＿＿"; color:var(--ink-3); font-size:13px; font-weight:400; letter-spacing:1px; }
.qdots{ display:flex; gap:6px; justify-content:center; margin-top:22px; flex-wrap:wrap; }
.qdots i{ width:26px; height:3px; border-radius:99px; background:var(--line-2); display:block; transition:.2s; }
.qdots i.on{ background:var(--brand); }
.qdots i.ok{ background:var(--ok); }
.qdots i.no{ background:var(--danger); }

/* listening */
.audio-card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  padding:20px 22px; display:flex; align-items:center; gap:16px; box-shadow:var(--shadow-s);
}
.play-btn{
  width:48px; height:48px; border-radius:50%; background:var(--brand); color:#fff;
  display:grid; place-items:center; flex:0 0 auto; transition:.18s;
  box-shadow:0 6px 18px -8px rgba(14,90,86,.7);
}
.play-btn:hover{ background:var(--brand-2); transform:scale(1.04); }
.play-btn:disabled{ background:var(--line-2); box-shadow:none; cursor:not-allowed; }
.wave{ flex:1; }
.wave-top{ display:flex; justify-content:space-between; font-size:11.5px; color:var(--ink-3); margin-bottom:7px; font-variant-numeric:tabular-nums; }
.wave-bar{ height:5px; border-radius:99px; background:var(--paper-2); overflow:hidden; }
.wave-bar i{ display:block; height:100%; background:var(--brand); border-radius:99px; transition:width .2s linear; }

/* speaking */
.stage-vis{ display:flex; justify-content:center; margin:26px 0 6px; height:44px; align-items:center; }
.wave-anim{ display:inline-flex; gap:4px; align-items:flex-end; height:100%; }
.wave-anim i{ display:block; width:4px; border-radius:3px; background:var(--brand); animation:wv 1.05s ease-in-out infinite; }
.wave-anim i:nth-child(1){ height:12px; animation-delay:0s }
.wave-anim i:nth-child(2){ height:26px; animation-delay:.12s }
.wave-anim i:nth-child(3){ height:38px; animation-delay:.24s }
.wave-anim i:nth-child(4){ height:22px; animation-delay:.36s }
.wave-anim i:nth-child(5){ height:32px; animation-delay:.48s }
.wave-anim i:nth-child(6){ height:16px; animation-delay:.6s }
.wave-anim.rec i{ background:var(--danger); animation-duration:.5s; }
.wave-anim.idle i{ animation-play-state:paused; opacity:.3; }
@keyframes wv{ 0%,100%{ transform:scaleY(.4) } 50%{ transform:scaleY(1) } }
.speak-stage{
  text-align:center; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-lg); padding:46px 30px; box-shadow:var(--shadow-s);
}
.speak-prompt{
  font-family:var(--display); font-size:clamp(23px,3.2vw,38px); line-height:1.3;
  letter-spacing:-.028em; font-weight:600; margin:6px 0 0;
}
.speak-zh{ color:var(--ink-3); font-size:14px; margin-top:14px; }
.speak-timer{
  font-family:var(--mono); font-size:64px; line-height:1; letter-spacing:-.03em;
  font-variant-numeric:tabular-nums; margin:30px 0 0;
}
.speak-timer.small{ font-size:58px; margin-top:20px; }
.speak-phase{
  display:inline-flex; align-items:center; gap:7px; font-size:12px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--brand); font-weight:650; margin-bottom:4px;
}
.speak-phase.rec{ color:var(--danger); }
.dot{ width:7px; height:7px; border-radius:50%; background:currentColor; }
.speak-phase.rec .dot{ animation:pulse .9s infinite; }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:11px 20px; border-radius:10px; font-size:14px; font-weight:550; transition:.18s;
  border:1px solid var(--line); background:var(--surface); color:var(--ink);
}
.btn:hover{ border-color:var(--line-2); background:var(--paper-2); }
.btn.primary{ background:var(--brand); color:#fff; border-color:var(--brand); }
.btn.primary:hover{ background:var(--brand-2); border-color:var(--brand-2); }
.btn.ghost{ background:transparent; }
.btn.lg{ padding:13px 26px; font-size:15px; border-radius:11px; }
.btn:disabled{ opacity:.5; cursor:not-allowed; }

/* writing editor */
.editor{
  width:100%; min-height:340px; resize:vertical; border:1px solid var(--line);
  border-radius:var(--r); padding:18px 20px; font-size:15px; line-height:1.8;
  background:var(--surface); outline:0; transition:.18s;
}
.editor:focus{ border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-ring); }
.editor-foot{ display:flex; justify-content:space-between; align-items:center; margin-top:10px; font-size:12.5px; color:var(--ink-3); }

/* sentence build */
.build-sent{
  font-size:17px; line-height:2.6; background:var(--paper-2); border-radius:11px;
  padding:18px 20px; border:1px dashed var(--line-2);
}
.slot{
  display:inline-block; min-width:88px; padding:0 8px; margin:0 3px;
  border-bottom:2px solid var(--brand); text-align:center; color:var(--brand);
  font-weight:550; cursor:pointer; transition:.15s; border-radius:4px 4px 0 0;
}
.slot.filled{ background:rgba(14,90,86,.07); }
.slot.ok{ border-bottom-color:var(--ok); color:var(--ok); background:rgba(46,125,82,.07); }
.slot.no{ border-bottom-color:var(--danger); color:var(--danger); background:rgba(178,69,45,.06); text-decoration:line-through; }
.bank{ display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.token{
  padding:7px 13px; border-radius:8px; border:1px solid var(--line-2);
  background:var(--surface); font-size:14px; transition:.15s; box-shadow:var(--shadow-s);
}
.token:hover{ border-color:var(--brand); color:var(--brand); transform:translateY(-1px); }
.token.used{ opacity:.32; pointer-events:none; text-decoration:line-through; }

/* misc */
.notice{
  font-size:12.5px; color:var(--ink-2); background:var(--brand-soft);
  border:1px solid rgba(14,90,86,.15); border-radius:10px; padding:11px 14px;
  display:flex; gap:9px; align-items:flex-start; line-height:1.6;
}
.center{ text-align:center; }
.mt8{ margin-top:8px } .mt16{ margin-top:16px } .mt24{ margin-top:24px } .mt32{ margin-top:32px }
.muted{ color:var(--ink-3); }
.hr{ height:1px; background:var(--line); margin:26px 0; border:0; }

.done-card{ max-width:620px; margin:60px auto; }
.done-card h2{ font-family:var(--display); font-size:32px; font-weight:600; margin:0 0 10px; letter-spacing:-.035em; }
.done-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:var(--r); overflow:hidden; margin-top:26px; }
.done-grid div{ background:var(--surface); padding:20px 16px; text-align:center; }
.done-grid .v{ font-family:var(--display); font-size:28px; line-height:1; font-variant-numeric:tabular-nums; font-weight:600; letter-spacing:-.03em; }
.done-grid .k{ font-size:11px; color:var(--ink-3); letter-spacing:.1em; text-transform:uppercase; margin-top:7px; }

.toast{
  position:fixed; left:50%; bottom:28px; transform:translate(-50%,20px); opacity:0;
  background:var(--ink); color:#fff; padding:10px 18px; border-radius:99px;
  font-size:13px; transition:.28s; pointer-events:none; z-index:99; box-shadow:var(--shadow-l);
}
.toast.on{ opacity:1; transform:translate(-50%,0); }

.skel{
  background:linear-gradient(90deg,var(--paper-2) 25%,#EDE9E0 37%,var(--paper-2) 63%);
  background-size:400% 100%; animation:sk 1.3s ease infinite; border-radius:8px;
}
@keyframes sk{ 0%{background-position:100% 50%}100%{background-position:0 50%} }

/* responsive */
@media (max-width:900px){
  body{ overflow-x:hidden; }
  .wrap{ padding:0 18px; }
  .split{ grid-template-columns:1fr; }
  .passage{ position:static; max-height:none; }
  .grid-sub{ grid-template-columns:1fr; }
  .hero{ padding:44px 0 30px; }
  .stat{ padding:16px 22px 16px 0; margin-right:22px; }
  .row{ grid-template-columns:60px 1fr auto; }
  .row-go{ display:none; }
  .rbar-title .t{ max-width:38vw; }
  .qcard{ padding:22px 20px; }
  .speak-timer{ font-size:48px; }
  .done-grid{ grid-template-columns:1fr; }
}
@media (max-width:700px){
  .nav-in{ height:58px; gap:10px; }
  .brand-name,.brand-sub{ display:none; }
  .nav-meta{ display:none; }
  .nav-links{ gap:0; min-width:0; margin-left:auto; }
  .nav-link{ padding:6px 8px; font-size:12.5px; }
  .hero h1{ font-size:34px; }
  .hero p.lead{ font-size:15px; }
  .stats{ display:grid; grid-template-columns:1fr 1fr; }
  .stat{ padding:14px 12px 14px 0; margin:0; border-right:0; border-bottom:1px solid var(--line); }
  .stat:nth-child(odd){ border-right:1px solid var(--line); }
  .stat:nth-child(even){ padding-left:16px; }
  .stat:nth-child(n+3){ border-bottom:0; }
  .stat .v{ font-size:26px; }
  .page-head{ padding:28px 0 4px; }
  .page-title h1{ font-size:28px; }
  .tabs{ gap:6px; overflow-x:auto; padding-bottom:4px; }
  .tab{ padding:8px 12px; font-size:12.5px; white-space:nowrap; }
  .toolbar{ gap:8px; }
  .search{ max-width:none; width:100%; }
  .count-note{ margin-left:0; }
  .row{ grid-template-columns:52px 1fr auto; gap:12px; padding:13px 6px; }
  .row-date .d{ font-size:17px; }
  .row-c{ display:none; }
  .rbar-in{ height:58px; gap:10px; }
  .prog-bar{ width:56px; }
  .ring{ width:48px; height:48px; }
  .ring svg{ width:48px; height:48px; }
  .ring .num{ font-size:12.5px; }
  .fill-passage{ font-size:15px; }
  .speak-prompt{ font-size:22px; }
  .speak-timer.small{ font-size:44px; }
  .done-card h2{ font-size:26px; }
  .editor{ min-height:260px; }
}

/* ---------- transcript toggle ---------- */
.tr-row{ display:flex; align-items:center; gap:10px; margin-top:12px; }
.tr-btn{
  display:inline-flex; align-items:center; gap:7px; padding:6px 12px;
  border:1px solid var(--line); border-radius:999px; background:var(--surface);
  font-size:12.5px; color:var(--ink-2); transition:.16s; box-shadow:var(--shadow-s);
}
.tr-btn:hover{ border-color:var(--line-2); color:var(--ink); }
.tr-btn.on{ background:var(--brand-soft); border-color:rgba(14,90,86,.3); color:var(--brand); }
.tr-line{ display:flex; gap:10px; padding:5px 0; border-bottom:1px dashed var(--line); font-size:14px; line-height:1.65; }
.tr-line:last-child{ border-bottom:0; }
.tr-line b{ flex:0 0 34px; color:var(--brand); font-family:var(--mono); font-size:11.5px; font-weight:600; padding-top:3px; }

/* ---------- switch ---------- */
.switch{ display:inline-flex; align-items:center; gap:8px; font-size:12.5px; color:var(--ink-2); cursor:pointer; user-select:none; }
.switch input{ appearance:none; -webkit-appearance:none; width:34px; height:19px; border-radius:999px; background:var(--line-2); position:relative; outline:0; cursor:pointer; transition:.2s; margin:0; }
.switch input::after{ content:""; position:absolute; top:2px; left:2px; width:15px; height:15px; border-radius:50%; background:#fff; transition:.2s; box-shadow:0 1px 2px rgba(0,0,0,.18); }
.switch input:checked{ background:var(--brand); }
.switch input:checked::after{ transform:translateX(15px); }

/* ---------- speaking nav ---------- */
.speak-nav{ display:flex; align-items:center; justify-content:center; gap:14px; margin-top:30px; flex-wrap:wrap; }
.speak-nav .btn{ padding:9px 16px; font-size:13.5px; }
.mt12{ margin-top:12px; }

@media (max-width:700px){
  .speak-nav{ gap:8px; }
  .speak-nav .btn{ padding:8px 12px; font-size:12.5px; }
  .blank input{ margin:0 2px; }
}

/* ---------- question navigation ---------- */
.q-nav{ display:flex; align-items:center; justify-content:center; gap:12px; margin-top:24px; flex-wrap:wrap; }
.q-nav-mid{ font-size:12.5px; color:var(--ink-3); text-align:center; min-width:120px; font-variant-numeric:tabular-nums; }
.q-nav .btn{ padding:9px 16px; font-size:13.5px; }
.q-nav .btn:disabled{ opacity:.4; cursor:not-allowed; }
@media (max-width:700px){ .q-nav{ gap:8px; } .q-nav .btn{ padding:8px 12px; font-size:12.5px; } .q-nav-mid{ min-width:90px; } }
