* {
  box-sizing: border-box;
}
:root {
  --ink: #243d34;
  --green: #225444;
  --muted: #68776f;
  --edge: #dfe5dc;
  --canvas: #f7f8f4;
  --side: 222px;
  font-family: "Inter", "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-size: 16px;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button,
a {
  cursor: pointer;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #b98344;
  outline-offset: 3px;
}
a {
  color: var(--green);
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button {
  border: 0;
  background: none;
}
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side);
  background: #fafbf7;
  border-right: 1px solid var(--edge);
  padding: 33px 18px;
  z-index: 4;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
}
.brand strong {
  display: block;
  font-size: 23px;
  letter-spacing: -1.1px;
  font-weight: 730;
  line-height: 1.12;
}
.brand small {
  font-size: 11px;
  letter-spacing: 2.1px;
  color: #687c6f;
  display: block;
  margin-top: 4px;
}
.navcaption {
  font-size: 12px;
  font-weight: 600;
  color: #748178;
  letter-spacing: 1.5px;
  margin: 54px 14px 15px;
}
nav {
  display: grid;
  gap: 7px;
}
nav button,
.sidefoot a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  text-align: left;
  font-size: 15px;
  color: #606f66;
  border-radius: 8px;
}
nav button.active {
  color: #235642;
  background: #e5ece1;
  font-weight: 700;
}
nav button:hover,
.sidefoot a:hover {
  background: #edf1e9;
}
.sidefoot {
  margin-top: auto;
  border-top: 1px solid var(--edge);
  padding-top: 18px;
}
.sidefoot svg:last-child {
  margin-left: auto;
}
main {
  margin-left: var(--side);
  min-height: 100vh;
}
header {
  height: 70px;
  border-bottom: 1px solid var(--edge);
  display: flex;
  align-items: center;
  padding: 0 clamp(22px, 3.3vw, 56px);
  gap: 12px;
  background: #fcfcf9;
}
.crumb {
  font-size: 13px;
  color: var(--muted);
}
.crumb b {
  color: #c1c9bf;
  margin: 0 10px;
}
.crumb strong {
  font-weight: 550;
  color: #3d5145;
}
.identity {
  margin-left: auto;
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 13px;
  color: #55695b;
}
.identity svg {
  box-sizing: content-box;
  padding: 6px;
  border-radius: 50%;
  background: #e8eee3;
}
#menu {
  display: none;
}
#view {
  max-width: 1520px;
  margin: auto;
  padding: 28px clamp(22px, 3.3vw, 56px) 10px;
}
.hero {
  position: relative;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  isolation: isolate;
  padding: 36px 38px 30px;
  background: #e5ede1 url("/range.webp") center right/100% 100% no-repeat;
  min-height: 240px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: Consolas, "Courier New", monospace;
  letter-spacing: 2px;
  font-weight: 650;
  font-size: 11px;
  color: #47725c;
}
.eyebrow i {
  width: 18px;
  height: 2px;
  background: #63886c;
}
.hero h1 {
  font-size: clamp(32px, 3.4vw, 57px);
  font-weight: 730;
  line-height: 1.25;
  letter-spacing: -2.1px;
  margin: 18px 0 10px;
  color: #203f30;
}
.hero p {
  font-size: 15px;
  color: #526751;
}
.herochip,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  background: #edf3e8;
  color: #3b614a;
  border-radius: 5px;
  padding: 5px 9px;
}
.herochip {
  margin-top: 21px;
  background: #ffffff65;
  border: 1px solid #a8bda5;
  border-radius: 20px;
  padding: 5px 11px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #274d3e;
  color: #f1f6e9;
  border-radius: 0 0 15px 15px;
  padding: 15px 0;
}
.metrics > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border-left: 1px solid #ffffff26;
}
.metrics > div:first-child {
  border: 0;
}
.metrics svg {
  color: #bfd0b7;
}
.metrics strong {
  font-family: "Segoe UI", sans-serif;
  display: block;
  font-size: 21px;
  letter-spacing: 0.3px;
  line-height: 1.2;
}
.metrics small {
  display: block;
  color: #d1decd;
  font-size: 11px;
  margin-top: 2px;
}
.columns {
  display: grid;
  grid-template-columns: 1.28fr 1fr;
  gap: 20px;
  margin-top: 22px;
}
.card {
  border: 1px solid var(--edge);
  background: #fff;
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 2px 5px #263e2d03;
}
.sectionhead {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 22px;
}
.iconbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: 42px;
  width: 42px;
  border-radius: 11px;
  background: #eaf0e5;
  color: #386543;
}
.sectionhead h2,
.subhead h2,
.card h2 {
  font-size: 20px;
  letter-spacing: -0.6px;
}
.sectionhead p,
.card p,
.intro,
.footnote {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}
.sectionhead p {
  margin-top: 3px;
  font-size: 13px;
}
.entry label,
form > label,
dialog label {
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}
.phoneinput {
  border: 1px solid #d3dbd3;
  display: flex;
  align-items: center;
  border-radius: 7px;
  overflow: hidden;
  background: #fbfcf9;
}
.phoneinput > span {
  padding: 0 13px;
  border-right: 1px solid var(--edge);
  font-size: 14px;
  font-weight: 600;
}
.phoneinput input {
  width: 0;
  flex: 1;
  border: 0;
  background: none;
}
.phoneinput:focus-within {
  outline: 2px solid #81a18a;
}
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  color: var(--ink);
  border: 1px solid #ced9cf;
  border-radius: 7px;
  padding: 11px 13px;
  max-width: 100%;
  background: #fbfcfa;
}
.phoneinput input:not([type="checkbox"]) {
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
  height: 45px;
}
input::placeholder,
textarea::placeholder {
  color: #8a958f;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: #285840;
}
.entry .consent {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-weight: 400;
  color: #6e7a70;
  font-size: 12px;
  line-height: 1.55;
  margin: 12px 0 16px;
}
.consent input {
  margin: 3px 0 0;
}
.primary,
.secondary {
  display: inline-flex;
  gap: 9px;
  justify-content: center;
  align-items: center;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 650;
  border-radius: 7px;
  min-height: 44px;
}
.primary {
  background: #285540;
  color: white;
}
.primary:hover:not(:disabled) {
  background: #1c4231;
}
.secondary {
  border: 1px solid #c7d4c8;
  background: #f4f7f0;
  color: var(--green);
}
.wide {
  width: 100%;
}
.wide + .wide {
  margin-top: 9px;
}
.scale {
  background: #fcfdf9;
}
.scale .iconbox {
  background: #f2eddc;
  color: #8a7541;
}
.route {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin: 29px 0 18px;
}
.route:before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 16px;
  border-top: 2px dashed #d7decd;
}
.route > div {
  z-index: 1;
  text-align: center;
}
.route span,
.badge {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 32px;
  border-radius: 7px;
  font-weight: 700;
  font-family: Consolas, monospace;
  font-size: 15px;
}
.route small {
  display: block;
  font-size: 12px;
  color: #6c776d;
  margin-top: 8px;
}
.l0 {
  background: #e1edda;
  color: #427041;
}
.l1 {
  background: #d0e3c4;
  color: #396138;
}
.l2 {
  background: #a6c5a0;
  color: #2e5234;
}
.l3 {
  background: #759a77;
  color: white;
}
.l4 {
  background: #497753;
  color: white;
}
.l5 {
  background: #2e553d;
  color: white;
}
.scale p {
  font-size: 13px;
  padding-top: 10px;
  border-top: 1px solid var(--edge);
}
.textbtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 13px;
  color: #3e7051;
  padding: 4px 0;
}
.scale .textbtn {
  margin-top: 12px;
}
.subhead {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 25px 0 13px;
}
.subhead span {
  font-family: Georgia, serif;
  font-style: italic;
  color: #788777;
  font-size: 14px;
}
.skills {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.skill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 13px;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: #fff;
}
.skill svg {
  color: #467758;
  flex: none;
}
.skill.c1 svg,
.skill.c3 svg {
  color: #a27e4c;
}
.skill.c2 svg {
  color: #5c7e8b;
}
.skill.c4 svg {
  color: #8d7898;
}
.skill strong,
.skill small {
  display: block;
}
.skill strong {
  font-size: 14px;
}
.skill small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
footer {
  max-width: 1520px;
  padding: 21px clamp(22px, 3.3vw, 56px);
  margin: auto;
  color: #768179;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}
.pagetitle,
.flow h1 {
  font-size: 34px;
  letter-spacing: -1.2px;
  margin: 4px 0 15px;
}
.intro {
  margin-bottom: 21px;
}
.levelgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.levelgrid h2 {
  margin: 14px 0 7px;
}
.footnote {
  margin: 15px 0;
}
.guide .sectionhead {
  align-items: flex-start;
  padding: 15px 0;
  border-bottom: 1px solid var(--edge);
}
.guide .sectionhead:last-child {
  border: 0;
  margin: 0;
}
.flow {
  max-width: 740px;
  margin: 10px auto;
}
.flow .card {
  margin-bottom: 16px;
}
.flow .eyebrow {
  margin: 20px 0;
}
.recrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 13px 0;
}
#recstatus {
  font-size: 13px;
  color: var(--muted);
}
audio {
  width: 100%;
  margin: 12px 0;
  display: block;
}
audio[hidden] {
  display: none;
}
.exammeta {
  display: flex;
  justify-content: space-between;
}
.exammeta span {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
}
progress {
  width: 100%;
  height: 8px;
  accent-color: #456d54;
  margin: 14px 0 22px;
}
.exam h2 {
  margin: 20px 0;
  line-height: 1.45;
}
.exam blockquote,
blockquote {
  white-space: pre-wrap;
  margin: 20px 0;
  padding: 17px 18px;
  background: #f1f4ee;
  border-left: 3px solid #83a185;
  border-radius: 4px;
  line-height: 1.65;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 12px 0 22px;
  display: grid;
  gap: 9px;
}
.option {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 12px;
  line-height: 1.5;
}
.option:has(:checked) {
  background: #e9f0e5;
  border-color: #7b9e7b;
}
.option b {
  font-size: 13px;
  color: #68816b;
}
.option input {
  margin: 0;
}
.exam textarea,
dialog textarea {
  width: 100%;
  margin: 8px 0 18px;
  resize: vertical;
}
.result {
  text-align: center;
}
.result h1 {
  margin: 14px 0;
}
.result > strong {
  font-size: 66px;
  color: var(--green);
}
.scores {
  display: flex;
  justify-content: space-around;
  margin: 23px 0;
}
.scores b {
  display: block;
  margin-top: 6px;
}
.result .footnote {
  font-size: 13px;
}
.login {
  max-width: 470px;
  margin: 8vh auto;
}
.login input {
  width: 100%;
  margin-bottom: 16px;
}
.adminhead,
.filters,
.summary {
  display: flex;
  gap: 12px;
}
.adminhead {
  justify-content: space-between;
  align-items: center;
}
.summary {
  margin: 12px 0 20px;
}
.summary .card {
  flex: 1;
}
.summary strong {
  display: block;
  font-size: 28px;
  margin-top: 5px;
}
.tablecard {
  padding: 0;
  overflow: hidden;
}
.filters {
  padding: 18px;
  flex-wrap: wrap;
}
.scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  white-space: nowrap;
}
th,
td {
  text-align: left;
  padding: 15px;
  border-top: 1px solid var(--edge);
}
th {
  background: #f4f6ef;
  color: #627566;
  font-weight: 550;
}
.truncate {
  max-width: 350px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.empty {
  text-align: center;
  padding: 48px;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--edge);
  border-radius: 15px;
  padding: 32px;
  width: min(620px, 92vw);
  color: var(--ink);
  max-height: 82dvh;
}
dialog::backdrop {
  background: #13291e66;
}
#close {
  float: right;
  color: #617464;
  font-size: 24px;
}
dialog h2 {
  font-size: 22px;
  margin: 8px 20px 12px 0;
}
dialog p {
  line-height: 1.65;
  color: #53665a;
  margin: 10px 0;
  white-space: pre-wrap;
}
dialog label {
  margin: 15px 0 5px;
}
.answer {
  border-top: 1px solid var(--edge);
  padding: 16px 0;
}
.answer h3 {
  font-size: 16px;
  margin-top: 8px;
}
#toast {
  position: fixed;
  z-index: 20;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(90vw, 650px);
  background: #213e30;
  color: white;
  border-radius: 8px;
  padding: 12px 19px;
  opacity: 0;
  pointer-events: none;
  font-size: 14px;
  transition: opacity 0.18s;
}
#toast.show {
  opacity: 1;
}
@media (min-width: 1550px) {
  .hero {
    min-height: 290px;
  }
}
@media (max-width: 1180px) {
  :root {
    --side: 186px;
  }
  .columns {
    grid-template-columns: 1.18fr 1fr;
    gap: 14px;
  }
  .card {
    padding: 20px;
  }
  .tablecard {
    padding: 0;
  }
  .skills {
    gap: 8px;
  }
  .skill {
    padding: 12px 8px;
  }
  .hero {
    padding: 28px;
    min-height: 215px;
  }
  .route span {
    width: 33px;
  }
  .skill small {
    font-size: 10px;
  }
}
@media (max-width: 910px) {
  :root {
    --side: 0px;
  }
  aside {
    width: 215px;
    transform: translateX(-100%);
    transition: transform 0.2s;
    box-shadow: 18px 0 35px #243a2612;
  }
  .menu-open aside {
    transform: translateX(0);
  }
  .menu-open #menu {
    position: fixed;
    z-index: 6;
    left: 220px;
    background: white;
    border-radius: 7px;
  }
  #menu {
    display: grid;
    place-items: center;
    padding: 7px;
  }
  header {
    height: 57px;
  }
  #view {
    padding-top: 20px;
  }
}
@media (max-width: 640px) {
  #view {
    padding: 14px 14px 8px;
  }
  header {
    padding: 0 12px;
  }
  .hero {
    padding: 22px;
    min-height: 218px;
    justify-content: flex-start;
    background-size: auto 100%;
    background-position: 65% center;
  }
  .hero:before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, #e3ecdedc, transparent 90%);
  }
  .hero h1 {
    font-size: 33px;
    margin: 17px 0 8px;
  }
  .hero p {
    font-size: 13px;
  }
  .herochip {
    margin-top: 17px;
  }
  .metrics {
    padding: 12px 0;
  }
  .metrics > div {
    gap: 8px;
  }
  .metrics svg {
    width: 18px;
  }
  .metrics strong {
    font-size: 17px;
  }
  .metrics small {
    font-size: 10px;
  }
  .columns {
    grid-template-columns: 1fr;
    margin-top: 14px;
  }
  .card {
    border-radius: 12px;
    padding: 20px;
  }
  .sectionhead {
    margin-bottom: 17px;
  }
  .route {
    margin: 14px 0;
  }
  .skills {
    grid-template-columns: repeat(2, 1fr);
  }
  .skill {
    padding: 12px;
  }
  .subhead {
    margin: 20px 0 12px;
  }
  .levelgrid {
    grid-template-columns: repeat(2, 1fr);
  }
  .flow {
    margin: 8px 0;
  }
  .pagetitle,
  .flow h1 {
    font-size: 29px;
  }
  .summary {
    gap: 6px;
  }
  .summary .card {
    padding: 12px;
  }
  .tablecard {
    padding: 0;
  }
  .filters input {
    width: 100%;
  }
  .guide .sectionhead {
    align-items: flex-start;
  }
  .recrow {
    flex-wrap: wrap;
  }
  footer {
    padding: 18px;
  }
  .scale p {
    padding-top: 12px;
  }
  .eyebrow {
    font-size: 10px;
  }
}

/* A distinct stage for listening, answering, and moving to the next item. */
.skills {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sample {
  min-height: 44px;
  padding: 9px 15px;
  font-size: 15px;
  color: #244a36;
  background: #fafdf2d9;
}
.sample:hover {
  background: #fff;
}
.question-flow {
  --accent: #335e48;
  --panel: #254d3e;
  --pale: #e6f0e4;
}
.mode-speaking {
  --accent: #78542f;
  --panel: #594436;
  --pale: #f4eadb;
}
.mode-reading {
  --accent: #485b82;
  --panel: #3f4f75;
  --pale: #e9edf5;
}
.mode-language {
  --accent: #71566f;
  --panel: #634561;
  --pale: #f3eaf2;
}
.round-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--accent);
}
.round-num {
  font:
    700 42px/1.2 "Segoe UI",
    sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -2px;
}
.round-num small {
  font-size: 18px;
  color: #68776b;
  letter-spacing: 0;
}
.round-head > span:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}
.step-track {
  display: flex;
  gap: 4px;
  margin: 10px 0 22px;
}
.step-track i {
  flex: 1;
  height: 6px;
  background: #dbe2d8;
  border-radius: 3px;
}
.step-track .past {
  background: #93aa94;
}
.step-track .now {
  background: var(--accent);
}
.question-flow .exam {
  overflow: hidden;
  border-top: 5px solid var(--accent);
  padding: clamp(18px, 3vw, 32px);
}
.question-kicker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--accent);
}
.question-kicker span {
  border-radius: 5px;
  background: var(--pale);
  padding: 5px 9px;
  font-weight: 600;
}
.question-kicker em {
  display: flex;
  align-items: center;
  gap: 4px;
  font-style: normal;
  color: #45654e;
}
.question-flow h1 {
  margin: 17px 0;
  font-size: clamp(26px, 3vw, 36px);
}
#newquestion:focus {
  outline: none;
}
.audio-panel {
  background: var(--panel);
  color: #fff;
  border-radius: 14px;
  padding: 20px;
}
.audio-top,
.audio-top > span:first-child,
.sound-track {
  display: flex;
  align-items: center;
}
.audio-top {
  justify-content: space-between;
  font-size: 14px;
  color: #f1f2e5;
}
.audio-top > span:first-child {
  gap: 8px;
}
#elapsed {
  font-variant-numeric: tabular-nums;
}
.sound-track {
  gap: 14px;
  margin: 18px 0;
}
#toggleaudio {
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #faf8e9;
  color: var(--panel);
  display: grid;
  place-items: center;
}
.sound-body {
  flex: 1;
  min-width: 0;
}
.sound-body strong {
  font-size: 19px;
  font-weight: 600;
}
.sound-body progress {
  display: block;
  width: 100%;
  height: 6px;
  margin: 12px 0 0;
  appearance: none;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff42;
}
.sound-body progress::-webkit-progress-bar {
  background: #ffffff42;
}
.sound-body progress::-webkit-progress-value {
  background: #e2ce90;
}
.sound-body progress::-moz-progress-bar {
  background: #e2ce90;
}
.replay {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 55px;
  border-radius: 9px;
  border: 1px solid #ffffff70;
  background: #ffffff13;
  color: white;
  gap: 10px;
  font-size: 18px;
  font-weight: 650;
}
.replay:hover {
  background: #ffffff24;
}
#responsearea {
  margin-top: 20px;
}
#responsearea[hidden],
.stage-hint[hidden] {
  display: none;
}
.question-flow .stage-hint {
  margin: 20px 0 0;
  font-size: 16px;
  color: #56695c;
}
.question-flow .context-cue {
  font-size: 17px;
  margin: 0 0 15px;
  color: #3c4c40;
}
.question-flow .option {
  min-height: 54px;
  padding: 13px;
  gap: 12px;
  font-size: 18px;
}
.question-flow .option b {
  border: 1px solid #b9c7b9;
  border-radius: 6px;
  min-width: 28px;
  text-align: center;
}
.question-flow .option:has(:checked) b {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.question-flow fieldset {
  min-width: 0;
}
#submit,
#begin {
  min-height: 52px;
  font-size: 17px;
}
#record {
  min-height: 54px;
  font-size: 18px;
  padding: 13px 20px;
}
.mode-speaking #record {
  width: 100%;
  background: var(--pale);
  color: var(--panel);
  border-color: #cbb194;
}
#record.recording {
  background: #923b36;
  border-color: #923b36;
  color: #fff;
}
#recstatus {
  font-size: 15px;
}
.credits {
  max-width: 920px;
  margin: 30px auto;
  padding: 20px;
}
.credits li {
  padding: 12px 0;
  border-bottom: 1px solid var(--edge);
}
.credits p,
.credit-text {
  overflow-wrap: anywhere;
  line-height: 1.65;
}
.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}
@media (prefers-reduced-motion: no-preference) {
  .question-flow {
    animation: round-in 0.4s ease-out both;
  }
  #responsearea:not([hidden]) {
    animation: round-in 0.28s ease-out both;
  }
  @keyframes round-in {
    from {
      opacity: 0.35;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
@media (max-width: 640px) {
  .skills {
    grid-template-columns: 1fr 1fr;
  }
  .hero p,
  .sectionhead p,
  .guide .sectionhead p,
  .scale p,
  .levelgrid p,
  .intro,
  .entry form > label,
  .skill strong,
  .textbtn {
    font-size: 16px;
  }
  .phoneinput input:not([type="checkbox"]) {
    font-size: 17px;
    min-height: 49px;
  }
  .entry .consent {
    font-size: 14px;
  }
  .primary,
  .secondary {
    font-size: 17px;
  }
  .metrics small,
  .route small,
  .skill small {
    font-size: 13px;
  }
  .flow blockquote {
    font-size: 19px;
    line-height: 1.65;
    padding: 15px;
  }
  .question-flow .exam h2 {
    font-size: 22px;
    line-height: 1.5;
  }
  .question-flow .option {
    font-size: 19px;
    line-height: 1.5;
  }
  .question-flow .audio-panel {
    padding: 17px;
  }
  .flow .recrow {
    margin: 15px 0;
  }
}
#ownreplay[hidden] {
  display: none;
}
.stage-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 16px 0;
}
.stage-picker legend {
  margin-bottom: 8px;
  font-weight: 650;
}
.entry .stage-picker label {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}
.stage-picker input {
  position: absolute;
  opacity: 0;
}
.stage-picker span {
  display: grid;
  place-items: center;
  min-height: 44px;
  font-size: 16px;
  border: 1px solid #cad4cb;
  border-radius: 7px;
}
.stage-picker input:checked + span {
  color: white;
  border-color: #245442;
  background: #245442;
}
.stage-picker input:focus-visible + span {
  outline: 2px solid #426f55;
  outline-offset: 2px;
}
.section-position, .recordtimeline:not([hidden]) {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.section-position {
  margin: -10px 0 15px;
  color: #465a4e;
  font-size: 15px;
}
.recordtimeline {
  margin: 6px 0 14px;
}
.recordtimeline input[type="range"] {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 0;
  accent-color: #295641;
}
.recordtimeline output {
  flex: none;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
}
#ownreplay {
  min-height: 54px;
  font-size: 18px;
}
.turn-confirm {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 60px 16px;
  background: var(--pale);
  border-radius: 16px;
  text-align: center;
}
.turn-confirm svg {
  background: var(--panel);
  color: white;
  border-radius: 50%;
  box-sizing: content-box;
  padding: 12px;
}
.turn-confirm strong {
  font-size: 24px;
}
.turn-confirm span {
  font-size: 18px;
  color: var(--accent);
}
.genres {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.genres button {
  padding: 6px 10px;
  border: 1px solid var(--edge);
  border-radius: 18px;
  color: #526857;
  font-size: 14px;
  min-height: 36px;
}
.genres button[aria-pressed="true"] {
  background: #e4eee0;
  border-color: #94b697;
  color: #234e35;
}
.sampler .sectionhead {
  margin-bottom: 13px;
}
.audition {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 15px 0 11px;
}
.audition > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
#previewscene {
  font-size: 17px;
  overflow-wrap: anywhere;
}
#previewlevel {
  padding: 4px 7px;
  color: #366245;
  background: #ecf2e8;
  border-radius: 5px;
  font-weight: 600;
  font-size: 14px;
}
.sampler .replay {
  background: #294f40;
  min-height: 48px;
  font-size: 16px;
}
.audition > .textbtn {
  flex: none;
  min-height: 40px;
}
.question-flow .scene-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  margin: -4px 0 12px;
}
@media (max-width: 640px) {
  .genres button {
    min-height: 44px;
    font-size: 15px;
  }
  .metrics strong {
    font-size: 16px;
  }
}

/* Shared mobile controls for device checks and spoken answers. */
.stage-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.edition-picker { display: block; min-width: 0; margin: 20px 0; }
.edition-picker legend { margin-bottom: 10px; font-weight: 650; }
.edition-list { display: grid; gap: 10px; }
.entry .edition-option {
  display: block; position: relative; margin: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.edition-option input {
  position: absolute; top: 50%; right: 14px; width: 22px; height: 22px;
  margin: -11px 0 0; opacity: 0;
}
.edition-face {
  display: grid; grid-template-columns: clamp(66px, 18%, 88px) minmax(0, 1fr) 22px;
  gap: 14px; align-items: center; min-height: 94px; padding-right: 14px;
  border: 1px solid #c8d5c9; border-radius: 13px; overflow: hidden;
  background: #fff; color: #203e30; line-height: 1.35;
}
.edition-count {
  position: relative; isolation: isolate; align-self: stretch;
  display: flex; justify-content: center; align-items: baseline; gap: 3px;
  padding-top: 12px; border-right: 1px solid #324b361c; color: #264b38;
  background: #e6eedc; font-variant-numeric: lining-nums tabular-nums;
}
.edition-count::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, #e9f0e3 5%, #e9f0e399 48%, transparent 84%),
    url("/range.webp") 66% bottom / auto 100% no-repeat;
}
.edition-full .edition-count { background: #f3ebd9; color: #654922; }
.edition-full .edition-count::before {
  background-position: center, 89% bottom;
  filter: sepia(.68) saturate(.88);
}
.edition-count b { font: 600 36px/1.05 Georgia, serif; letter-spacing: -1.8px; }
.edition-count small { font-size: 13px; font-weight: 650; }
.edition-copy { display: grid; justify-items: start; gap: 2px; padding: 10px 0; }
.edition-copy strong { font-size: 18px; font-weight: 700; }
.edition-purpose { font-size: 14px; font-weight: 400; color: #58675d; }
.edition-facts {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 4px;
  color: #355541; font-variant-numeric: tabular-nums;
}
.edition-facts small { font-size: 14px; font-weight: 600; }
.edition-mark {
  width: 21px; height: 21px; display: grid; place-items: center;
  border: 1.5px solid #93a498; border-radius: 50%;
}
.edition-mark svg { visibility: hidden; stroke-width: 3; }
@media (hover: hover) {
  .edition-option:hover .edition-face { border-color: #658471; background: #f7faf5; }
}
.edition-option input:checked + .edition-face {
  color: #fff; background: #254e3e; border-color: #254e3e;
}
.edition-option input:checked + .edition-face .edition-purpose { color: #d5e4d8; }
.edition-option input:checked + .edition-face .edition-facts { color: #f0f5e9; }
.edition-option input:checked + .edition-face .edition-mark { background: #eff5e6; color: #254e3e; border-color: #eff5e6; }
.edition-option input:checked + .edition-face .edition-mark svg { visibility: visible; }
.edition-option input:focus-visible + .edition-face { outline: 2px solid #285840; outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .edition-face { transition: background-color 140ms ease, border-color 140ms ease; }
}
@media (max-width: 360px) {
  .edition-face { grid-template-columns: 60px minmax(0,1fr) 21px; gap: 9px; padding-right: 10px; }
}
.device-flow, .question-flow { min-width: 0; max-width: 720px; }
.device-flow h1 { margin: 8px 0; }
.device-flow .intro { margin: 0 0 20px; }
.device-sheet { border: 1px solid var(--edge); border-radius: 18px; background: #fff; overflow: hidden; }
.check-part { padding: 20px; }
.check-part + .check-part { border-top: 1px solid var(--edge); }
.check-part.waiting { background: #f7f8f4; }
.check-head { display:flex; align-items:center; gap:12px; }
.check-head h2 { margin:0 0 3px; font-size:20px; }
.check-head small, .device-dock small { color:#54685b; font-size:15px; }
.check-head > span:last-child { margin-inline-start:auto; color:#2c614a; }
.check-icon { display:grid; place-items:center; width:42px; height:42px; flex:none; border-radius:12px; background:#eaf1e7; color:#315542; }
.check-actions:not([hidden]) { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:16px; }
.check-part [hidden], .action-dock[hidden], .action-dock button[hidden] { display:none !important; }
.device-flow .recrow { display:flex; flex-wrap:wrap; align-items:center; gap:9px; margin:16px 0 6px; }
.device-flow #ownreplay { margin:6px 0 0; }
.device-flow #confirmmic { margin:4px 0; }
.action-dock { display:flex; gap:12px; align-items:center; margin:16px auto 0; max-width:720px; }
.action-dock .primary, .speaking-dock #record { flex:1; min-width:0; min-height:50px; margin:0; }
.device-dock small { flex:1; }
.speaking-dock #record { background:#794f31; color:white; }
.speaking-dock.ready #record { background:#f5efe6; color:#5d422e; flex:0 1 auto; }
.speaking-dock #record.recording { background:#983a39; }
.speaking-hint { margin:8px 0 0; }
.speaking-hint summary { color:#6d513b; font-weight:650; cursor:pointer; padding:10px 0; }
.speaking-hint p { font-size:17px; line-height:1.6; margin:0 0 8px; }
.exam-nav { display:flex; justify-content:space-between; align-items:center; font-size:14px; color:#526958; }
.exam-nav:empty { display:none; }
.exam-nav button { padding:8px 0; min-height:42px; }
.question-flow button.option { width:100%; color:var(--ink); background:#fff; text-align:start; font-weight:450; white-space:normal; }
.question-flow .option[aria-pressed="true"] { background:var(--pale); border-color:var(--accent); }
.question-flow .option[aria-pressed="true"] b { background:var(--accent); color:#fff; }
.question-flow .option:disabled { opacity:1; }
.question-flow .exam blockquote { white-space:pre-line; overflow-wrap:anywhere; }
#answererror { color:#883d30; font-weight:600; }
.step-track, .round-head, .audio-panel { min-width:0; }
@media(max-width:700px) {
  #view:has(.device-flow), #view:has(.mode-speaking) { padding-bottom:calc(96px + env(safe-area-inset-bottom)); }
  .action-dock { position:fixed; z-index:5; left:0; right:0; bottom:0; margin:0; max-width:none;
    padding:10px max(14px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));
    border-top:1px solid #d2dacf; background:#fafbf7; }
  .device-flow { padding-top:4px; }
  .check-part { padding:16px; }
  .round-num { font-size:32px; }
  .mode-speaking h1 { font-size:24px; margin:12px 0; }
  .question-flow .step-track { margin:7px 0 15px; }
  .mode-speaking .audio-panel { padding:13px; }
  .mode-speaking .sound-track { margin:10px 0; }
  .mode-speaking .replay { min-height:46px; }
  .mode-speaking .recrow:empty, .mode-speaking .recrow:has(#recstatus:empty) { display:none; }
  .mode-speaking .recrow { margin:8px 0; }
  .device-flow .action-dock { position:fixed; }
}
