/* TOEFL audio practice (listening drills + speaking recorder) — sits on top of the
   shared ie-* take styles (43-ielts.css); only the audio-specific blocks live here. */

.tf-family-h {
  font-size: 1rem; font-weight: 700; color: rgb(125, 211, 252);
  margin: 1.4rem 0 .6rem;
}

.ch-passage { color: #eef4f8; font-size: 1.06rem; line-height: 1.8; margin: .5rem 0 1rem; }
.ch-icon-frame {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3.2rem; height: 3.2rem; border: 1px solid rgba(255,255,255,.18);
  border-radius: .8rem; padding: .45rem; color: rgb(125, 211, 252);
}
.ch-icon-frame svg { width: 100%; height: 100%; }
.ch-opt { min-width: 3.5rem; }
.ch-opt.is-picked { border-color: rgb(125, 211, 252); background: rgba(56,189,248,.14); }
.tf-feedback.is-wrong { border-left-color: rgb(248, 113, 113); }

.tf-rehearsal-list { list-style: none; margin: 1rem 0; padding: 0; display: flex; flex-direction: column; gap: .8rem; max-width: 46rem; }
.tf-rehearsal-forms { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.25rem 0; }
.tf-rehearsal-forms a {
  display: inline-flex; align-items: center; min-height: 44px; padding: .55rem .9rem;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: .6rem;
  background: var(--reading-surface, #01040e); color: #cbd5e1; text-decoration: none;
}
.tf-rehearsal-forms a[aria-current="page"], .tf-rehearsal-forms a:hover {
  border-color: #7dd3fc; color: #7dd3fc;
}
.tf-phase-state { display: block; margin-top: .35rem; font-size: .9rem; font-weight: 600; color: #cbd5e1; }
.tf-phase-state.is-done { color: rgb(52, 211, 153); }

.tf-audio-box {
  display: flex; align-items: center; gap: .9rem; flex-wrap: wrap;
  margin: 1rem 0 1.25rem;
}
.tf-play-note { color: #cbd5e1; font-size: .95rem; }

.tf-listen-review { margin-top: 1.25rem; }
.tf-feedback {
  border-left: 3px solid rgb(56, 189, 248);
  background: var(--reading-surface, #01040e);
  border-radius: 0 .65rem .65rem 0;
  padding: .8rem 1rem;
  margin-top: 1rem;
  color: rgba(226, 232, 240, .92);
}
.tf-transcript {
  background: var(--reading-surface, #01040e);
  margin-top: 1rem;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: .65rem;
  padding: .7rem 1rem;
}
.tf-transcript summary { cursor: pointer; color: rgb(56, 189, 248); font-weight: 600; }
.tf-transcript p { white-space: pre-line; margin: .6rem 0 0; }
.tf-review-next { margin-top: 1.1rem; color: #e2e8f0; font-size: 1rem; line-height: 1.6; }
.tf-review-next a { color: rgb(56, 189, 248); }

.tf-speak-list { list-style: none; margin: 1rem 0 2rem; padding: 0; display: flex; flex-direction: column; gap: 1rem; max-width: 46rem; }
.tf-speak-item { padding: 1rem 1.25rem; }
.tf-speak-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.tf-speak-num {
  width: 1.8rem; height: 1.8rem; border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(251, 146, 60, .45); color: rgb(251, 146, 60); font-weight: 700;
}
.tf-rec, .tf-play-mine, .tf-retry {
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: .65rem;
  padding: .5rem .95rem;
  background: rgba(255, 255, 255, .05);
  color: rgba(226, 232, 240, .92);
  cursor: pointer;
}
.tf-rec:hover, .tf-play-mine:hover:not(:disabled), .tf-retry:hover { border-color: rgba(251, 146, 60, .6); }
.tf-rec.is-recording { color: rgb(248, 113, 113); border-color: rgba(248, 113, 113, .6); }
.tf-play-mine:disabled { opacity: .45; cursor: default; }
.tf-speak-setting { color: #e2e8f0; max-width: 46rem; font-size: 1rem; line-height: 1.6; }
.tf-speak-review { margin-top: .9rem; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: .8rem; }
.tf-speak-text { font-size: 1.05rem; color: #eef4f8; }
.tf-checklist { margin: .6rem 0 .8rem; padding-left: 1.2rem; color: #e2e8f0; }
.tf-checklist li { margin: .25rem 0; }
.tf-exemplar {
  margin-top: .8rem; padding: .8rem 1rem;
  border-left: 3px solid rgb(251, 146, 60);
  background: var(--reading-surface, #01040e);
  border-radius: 0 .65rem .65rem 0;
}
.tf-exemplar h3 { margin: 0 0 .4rem; font-size: .95rem; color: rgb(251, 146, 60); }
.tf-exemplar-note { color: #cbd5e1; font-size: .95rem; }

/* HSK mock writing section: word-order tiles and pinyin→character input. */
.ch-wo-built { min-height: 2.6rem; margin: .4rem 0 .2rem; display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.ch-wo-pool { display: flex; flex-wrap: wrap; gap: .45rem; margin: .3rem 0 .2rem; }
.ch-wo-chip {
  border: 1px solid rgba(255, 255, 255, .16); border-radius: .55rem;
  padding: .35rem .7rem; background: rgba(255, 255, 255, .05);
  color: rgba(226, 232, 240, .95); cursor: pointer; font-size: 1rem;
}
.ch-wo-chip:hover:not(:disabled) { border-color: rgba(56, 189, 248, .6); }
.ch-wo-chip:disabled { opacity: .3; cursor: default; }
.ch-wo-chip.is-used { border-color: rgb(125, 211, 252); background: rgba(56, 189, 248, .14); }
.ch-char-input {
  margin-top: .3rem; padding: .55rem .8rem; font-size: 1.15rem;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: .55rem;
  background: var(--reading-surface, #01040e); color: #eef4f8; width: 8rem;
}
.ch-char-input:focus { outline: none; border-color: rgb(125, 211, 252); }
.ch-free-input {
  width: 100%; max-width: 34rem; margin-top: .3rem; padding: .55rem .8rem;
  font-size: 1.05rem; border: 1px solid rgba(255, 255, 255, .16); border-radius: .55rem;
  background: var(--reading-surface, #01040e); color: #eef4f8; resize: vertical;
}
.ch-free-input:focus { outline: none; border-color: rgb(125, 211, 252); }
.tf-selfcheck { border-left-color: rgb(251, 146, 60); }

@media (prefers-reduced-motion: reduce) {
  .tf-rec, .tf-play-mine, .tf-retry { transition: none; }
}

/* ── Official ETS practice tests (/toefl/official, toefl/official.html) ── */
.tf-off-hero { position: relative; margin: 1.5rem 0 1.75rem; padding: 1.75rem 1.5rem; border-radius: 1.25rem;
  border: 1px solid rgba(167, 139, 250, .3);
  background: radial-gradient(120% 140% at 0% 0%, rgba(167, 139, 250, .22), transparent 55%),
              radial-gradient(120% 140% at 100% 100%, rgba(56, 189, 248, .16), transparent 55%), var(--space-deep, #0b1020); }
.tf-off-badge { display: inline-block; margin: 0 0 .6rem; padding: .2rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: rgb(221, 214, 254); background: rgba(167, 139, 250, .2); border: 1px solid rgba(167, 139, 250, .45); }
.tf-off-title { margin: 0; font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 800; color: #fff; }
.tf-off-lead { margin: .6rem 0 0; max-width: 46rem; color: rgba(226, 232, 240, .86); line-height: 1.6; }
.tf-off-grid { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); }
.tf-off-card-link { position: relative; display: flex; flex-direction: column; gap: .35rem; height: 100%; padding: 1.1rem 1.1rem 1rem;
  border-radius: 1rem; border: 1px solid rgba(148, 163, 184, .22); background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
  text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.tf-off-card-link:hover, .tf-off-card-link:focus-visible { border-color: rgba(167, 139, 250, .65); transform: translateY(-2px); }
.tf-off-card.is-current .tf-off-card-link { border-color: rgba(167, 139, 250, .8); box-shadow: 0 0 0 1px rgba(167, 139, 250, .4) inset; }
.tf-off-num { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: .75rem;
  font-weight: 800; font-size: 1.15rem; color: #fff; background: linear-gradient(135deg, rgb(139, 92, 246), rgb(56, 189, 248)); }
.tf-off-card-title { font-weight: 700; color: #fff; font-size: 1.02rem; }
.tf-off-card-sub { font-size: .88rem; color: #cbd5e1; }
.tf-off-pills { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .25rem; }
.tf-off-pill { padding: .12rem .5rem; border-radius: .5rem; font-size: .78rem; font-weight: 600; color: rgb(var(--accent-rgb));
  background: rgba(var(--accent-rgb), .12); border: 1px solid rgba(var(--accent-rgb), .3); }
.tf-off-cta { margin-top: auto; padding-top: .5rem; font-weight: 700; color: rgb(196, 181, 253); }
.tf-off-parts { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .75rem; }
.tf-off-part { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border-radius: 1rem; text-decoration: none; color: inherit;
  border: 1px solid rgba(var(--accent-rgb), .35); background: linear-gradient(90deg, rgba(var(--accent-rgb), .14), rgba(var(--accent-rgb), .03)); }
.tf-off-part:hover, .tf-off-part:focus-visible { border-color: rgba(var(--accent-rgb), .75); }
.tf-off-part-n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  font-weight: 800; color: rgb(var(--accent-rgb)); border: 2px solid rgba(var(--accent-rgb), .6); }
.tf-off-part-body { flex: 1; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.tf-off-part-title { font-weight: 700; color: #fff; font-size: 1.05rem; }
.tf-off-part-meta { font-size: .9rem; color: #cbd5e1; }
.tf-off-part .tf-phase-state { margin: 0; font-size: 1.1rem; font-weight: 700; }
.tf-off-note { font-size: .88rem; color: #cbd5e1; line-height: 1.55; }
.tf-off-note a { color: rgb(196, 181, 253); }
.tf-off-note + .ie-h2 { margin-top: 2.2rem; }

/* ▼▼ LIGHT THEME — GENERATED by scripts/build_light_theme.py from the rules above. Do not edit by hand: run the builder. Hand tuning goes in 36-theme-light.css. ▼▼ */
html[data-theme="light"] .tf-family-h{color:rgb(0 90 133)}
html[data-theme="light"] .ch-passage{color:rgb(37 72 95)}
html[data-theme="light"] .ch-icon-frame{border-color:rgb(15 23 42/0.18);color:rgb(0 90 133)}
html[data-theme="light"] .tf-rehearsal-forms a{border-color:rgb(15 23 42/0.18);background:var(--reading-surface, rgb(252 252 253));color:rgb(48 65 85)}
html[data-theme="light"] .tf-rehearsal-forms a[aria-current="page"],html[data-theme="light"] .tf-rehearsal-forms a:hover{color:rgb(0 90 133)}
html[data-theme="light"] .tf-phase-state{color:rgb(48 65 85)}
html[data-theme="light"] .tf-phase-state.is-done{color:rgb(22 112 79)}
html[data-theme="light"] .tf-play-note{color:rgb(48 65 85)}
html[data-theme="light"] .tf-feedback{background:var(--reading-surface, rgb(252 252 253));color:rgb(44 63 88/0.92)}
html[data-theme="light"] .tf-transcript{background:var(--reading-surface, rgb(252 252 253));border-color:rgb(15 23 42/0.14)}
html[data-theme="light"] .tf-transcript summary{color:rgb(2 107 154)}
html[data-theme="light"] .tf-review-next{color:rgb(44 63 88)}
html[data-theme="light"] .tf-review-next a{color:rgb(2 107 154)}
html[data-theme="light"] .tf-speak-num{color:rgb(167 75 0)}
html[data-theme="light"] .tf-rec,html[data-theme="light"] .tf-play-mine,html[data-theme="light"] .tf-retry{border-color:rgb(15 23 42/0.18);background-color:rgb(15 23 42/0.05);color:rgb(44 63 88/0.92)}
html[data-theme="light"] .tf-rec.is-recording{color:rgb(135 3 3)}
html[data-theme="light"] .tf-speak-setting{color:rgb(44 63 88)}
html[data-theme="light"] .tf-speak-review{border-top-color:rgb(15 23 42/0.112)}
html[data-theme="light"] .tf-speak-text{color:rgb(37 72 95)}
html[data-theme="light"] .tf-checklist{color:rgb(44 63 88)}
html[data-theme="light"] .tf-exemplar{background:var(--reading-surface, rgb(252 252 253))}
html[data-theme="light"] .tf-exemplar h3{color:rgb(167 75 0)}
html[data-theme="light"] .tf-exemplar-note{color:rgb(48 65 85)}
html[data-theme="light"] .ch-wo-chip{border-color:rgb(15 23 42/0.18);background-color:rgb(15 23 42/0.05);color:rgb(44 63 88/0.95)}
html[data-theme="light"] .ch-char-input{border-color:rgb(15 23 42/0.18);background:var(--reading-surface, rgb(252 252 253));color:rgb(37 72 95)}
html[data-theme="light"] .ch-free-input{border-color:rgb(15 23 42/0.18);background:var(--reading-surface, rgb(252 252 253));color:rgb(37 72 95)}
html[data-theme="light"] .tf-off-hero{background:radial-gradient(120% 140% at 0% 0%, rgba(167, 139, 250, .22), transparent 55%),
              radial-gradient(120% 140% at 100% 100%, rgba(56, 189, 248, .16), transparent 55%), var(--space-deep, rgb(247 247 251))}
html[data-theme="light"] .tf-off-badge{color:rgb(23 0 133)}
html[data-theme="light"] .tf-off-title{color:rgb(51 63 82)}
html[data-theme="light"] .tf-off-lead{color:rgb(44 63 88/0.86)}
html[data-theme="light"] .tf-off-card-link{background-image:linear-gradient(180deg, rgb(15 23 42/0.06), rgb(15 23 42/0.015))}
html[data-theme="light"] .tf-off-card.is-current .tf-off-card-link{box-shadow:inset 0px 0px 0px 1px rgb(54 10 184/0.55)}
html[data-theme="light"] .tf-off-num{color:rgb(51 63 82)}
html[data-theme="light"] .tf-off-card-title{color:rgb(51 63 82)}
html[data-theme="light"] .tf-off-card-sub{color:rgb(48 65 85)}
html[data-theme="light"] .tf-off-pill{color:color-mix(in srgb,rgb(var(--accent-rgb)) 44%,#0f172a)}
html[data-theme="light"] .tf-off-cta{color:rgb(28 0 132)}
html[data-theme="light"] .tf-off-part-n{color:color-mix(in srgb,rgb(var(--accent-rgb)) 44%,#0f172a)}
html[data-theme="light"] .tf-off-part-title{color:rgb(51 63 82)}
html[data-theme="light"] .tf-off-part-meta{color:rgb(48 65 85)}
html[data-theme="light"] .tf-off-note{color:rgb(48 65 85)}
html[data-theme="light"] .tf-off-note a{color:rgb(28 0 132)}
/* ▲▲ LIGHT THEME END ▲▲ */
