/* =========================================================
   Fast IELTS Studies — app surfaces
   Shared shell, accounts, tests, results, dashboard, checkout
   ========================================================= */

:root {
  --app-header-h: 72px;
  --app-radius: 26px;
  --app-radius-sm: 18px;
  --app-shadow: 0 22px 50px -38px rgba(23, 19, 41, 0.45);
  --app-shadow-strong: 0 34px 80px -50px rgba(23, 19, 41, 0.55);
  --app-line: #e6dfd2;
  --app-soft: #f1ece1;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 4%, rgba(243, 172, 60, 0.09), transparent 30rem),
    radial-gradient(circle at 88% 10%, rgba(74, 61, 224, 0.07), transparent 34rem),
    var(--paper);
}

.app-body main {
  display: block;
}

.preview-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 22px;
  background: var(--indigo-ink);
  color: rgba(255, 255, 255, 0.68);
  font-size: 11.5px;
  line-height: 1.4;
  text-align: center;
}

.preview-ribbon strong {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.preview-ribbon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(243, 172, 60, 0.14);
  flex: none;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(230, 223, 210, 0.86);
  background: rgba(251, 248, 242, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.app-header-inner {
  width: min(1260px, calc(100% - 44px));
  height: var(--app-header-h);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.app-brand {
  min-width: 0;
}

.app-brand .brand-mark {
  width: 34px;
  height: 34px;
}

.app-brand .brand-name {
  font-size: 18px;
  white-space: nowrap;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(241, 236, 225, 0.65);
}

.app-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.app-nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
}

.app-nav a[aria-current="page"] {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 6px 16px -12px rgba(23, 19, 41, 0.45);
}

.app-account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  flex: none;
}

.app-account-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
}

.app-signout {
  border: 0;
  background: transparent;
  padding: 6px 2px;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.app-signout:hover {
  color: var(--ink);
}

.app-main {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
  padding: 34px 0 96px;
  min-height: calc(100vh - 250px);
}

.app-pagehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.app-pagehead > div {
  min-width: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.back-link:hover {
  color: var(--indigo);
}

.app-pagehead h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
  color: var(--ink);
}

.app-pagehead p {
  max-width: 650px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.preview-pill,
.plan-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.preview-pill {
  border: 1px solid #ecd5a5;
  background: var(--amber-soft);
  color: #81540b;
}

.preview-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber-deep);
}

.plan-pill {
  border: 1px solid rgba(74, 61, 224, 0.16);
  background: var(--indigo-soft);
  color: var(--indigo-dark);
}

.status-pill {
  border: 1px solid #d4eadf;
  background: #ebf7f1;
  color: #257a55;
}

.app-footer {
  border-top: 1px solid var(--app-line);
  background: rgba(251, 248, 242, 0.6);
}

.app-footer-inner {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
  padding: 26px 0 24px;
  color: var(--muted);
  font-size: 11.5px;
}

.app-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.app-footer-top p {
  font-weight: 500;
}

.app-footer-top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.app-footer-inner a:hover {
  color: var(--indigo);
}

.app-footer-legal {
  max-width: 1040px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--app-line);
  display: grid;
  gap: 6px;
  font-size: 10.5px;
  line-height: 1.65;
}

.app-footer-credit {
  color: var(--ink-2);
}

.app-footer-credit strong {
  color: var(--ink);
  font-weight: 700;
}

.app-footer-credit a {
  color: var(--indigo);
  font-weight: 600;
}

.app-footer-credit a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.app-footer-disclaimer strong {
  color: var(--ink-2);
  font-weight: 600;
}

.app-footer-disclaimer a {
  color: var(--indigo);
  font-weight: 600;
}

.app-footer-disclaimer a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.app-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: none;
  grid-template-columns: repeat(6, 1fr);
  padding: 7px 6px max(7px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--app-line);
  background: rgba(251, 248, 242, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.app-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 47px;
  border-radius: 10px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 8.5px;
  font-weight: 700;
}

.app-tabbar a.is-active {
  color: var(--indigo);
  background: var(--indigo-soft);
}

.app-tabbar svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Shared app primitives ---------- */

.app-card {
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--app-shadow);
}

.app-card-pad {
  padding: 26px;
}

.app-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.app-card-head h2,
.app-card-head h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.app-card-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.app-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--indigo);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.guest-gate {
  display: grid;
  gap: 10px;
  max-width: 780px;
  margin: 0 0 22px;
  padding: 24px 26px;
  border: 1px solid var(--app-line);
  border-left: 3px solid var(--amber);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--app-shadow);
}

.guest-gate .app-kicker {
  margin-bottom: 0;
}

.guest-gate h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ink);
}

.guest-gate p {
  max-width: 62ch;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

.guest-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 4px;
}

.guest-gate .guest-gate-note {
  font-size: 11.5px;
  color: var(--indigo);
}

.plan-gate {
  border-left-color: var(--indigo);
}

body.is-guest .exam-layout,
body.is-guest .speaking-layout,
body.is-guest .reading-layout,
body.is-guest .listening-layout,
body.is-locked .exam-layout,
body.is-locked .speaking-layout,
body.is-locked .reading-layout,
body.is-locked .listening-layout {
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}

@media (max-width: 560px) {
  .guest-gate {
    padding: 20px 18px;
    border-radius: var(--app-radius-sm);
  }

  .guest-gate h2 {
    font-size: 21px;
  }
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn.is-loading {
  pointer-events: none;
  opacity: 0.72;
}

.btn.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: app-spin 0.65s linear infinite;
}

@keyframes app-spin {
  to { transform: rotate(360deg); }
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--app-line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.icon-btn:hover {
  border-color: #cfc5b4;
  background: var(--paper-2);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field + .field {
  margin-top: 15px;
}

.field label,
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.field input,
.field select,
.field textarea,
.text-input,
.text-select {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #ddd5c7;
  border-radius: 13px;
  background: #fffdf9;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 100px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-2);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.text-input:focus,
.text-select:focus {
  border-color: var(--indigo);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74, 61, 224, 0.1);
}

.field-hint {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.form-error {
  display: none;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #f1c4b8;
  border-radius: 12px;
  background: #fdf0ec;
  color: #9a3b22;
  font-size: 12px;
  line-height: 1.5;
}

.form-error.is-visible {
  display: flex;
}

.form-success {
  display: none;
  padding: 12px 14px;
  border: 1px solid #cfe7da;
  border-radius: 13px;
  background: #eef8f2;
  color: #226a4b;
  font-size: 12.5px;
  line-height: 1.5;
}

.form-success.is-visible {
  display: block;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: var(--indigo);
}

.divider {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 20px 0;
  color: var(--muted-2);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--app-line);
}

.empty-state {
  padding: 50px 24px;
  text-align: center;
  border: 1px dashed #dbd2c3;
  border-radius: var(--app-radius-sm);
  background: rgba(255, 255, 255, 0.5);
}

.empty-state-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--indigo-soft);
  color: var(--indigo);
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
}

.empty-state p {
  max-width: 360px;
  margin: 6px auto 18px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 36px));
}

.toast {
  padding: 12px 15px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: var(--indigo-ink);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: var(--shadow-float);
  animation: toast-in 0.24s ease both;
}

.toast--error {
  background: #7d2c1b;
}

.toast--success {
  background: #175c40;
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Account / auth ---------- */

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.9fr);
  gap: 22px;
  align-items: stretch;
}

.auth-story {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  padding: 44px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 80% 18%, rgba(243, 172, 60, 0.2), transparent 20rem),
    radial-gradient(circle at 8% 90%, rgba(108, 95, 247, 0.45), transparent 24rem),
    var(--indigo-ink);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
}

.auth-story::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.28;
  background-image: radial-gradient(rgba(255, 255, 255, 0.5) 0.7px, transparent 0.7px);
  background-size: 22px 22px;
  mask-image: linear-gradient(135deg, #000, transparent 72%);
}

.auth-story > div {
  position: relative;
}

.auth-story .eyebrow {
  color: #f6c46c;
}

.auth-story h1 {
  max-width: 560px;
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: clamp(33px, 4.3vw, 55px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.auth-story h1 em {
  font-family: var(--font-serif);
  font-weight: 500;
  color: #ffcf7c;
}

.auth-story-copy {
  max-width: 460px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 14px;
  line-height: 1.7;
}

.auth-benefits {
  display: grid;
  gap: 12px;
  margin-top: 34px;
  max-width: 470px;
}

.auth-benefit {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.055);
}

.auth-benefit-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(243, 172, 60, 0.14);
  color: #ffcf7c;
  flex: none;
}

.auth-benefit strong {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
}

/* Scoped to the copy column so it cannot reset the icon badge's grid centring. */
.auth-benefit div span {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10.5px;
  line-height: 1.5;
}

.auth-story-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 34px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10.5px;
}

.auth-score {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.auth-score strong {
  color: #ffcf7c;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.auth-score span {
  max-width: 120px;
  line-height: 1.35;
}

.auth-card {
  align-self: center;
  width: 100%;
  padding: 30px;
  border: 1px solid var(--app-line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--app-shadow-strong);
}

.auth-card-head {
  margin-bottom: 20px;
}

.auth-card-head h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.auth-card-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  border-radius: 13px;
  background: var(--app-soft);
}

.auth-tab {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.auth-tab[aria-selected="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 5px 14px -10px rgba(23, 19, 41, 0.45);
}

.auth-panel[hidden] {
  display: none !important;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 74px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--indigo);
  background: var(--indigo-soft);
}

.auth-submit {
  width: 100%;
  margin-top: 19px;
}

.auth-meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
  text-align: center;
}

.auth-meta a {
  color: var(--indigo);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-forgot {
  margin: 10px 0 0;
  text-align: right;
  font-size: 11.5px;
}

.auth-forgot a {
  color: var(--indigo);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-done {
  padding: 8px 0 4px;
  text-align: center;
}

.auth-done-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--indigo-soft);
  color: var(--indigo);
}

.auth-done h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-done p {
  margin: 10px auto 20px;
  max-width: 360px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.auth-demo {
  width: 100%;
  margin-top: 8px;
}

.auth-switch {
  margin-top: 15px;
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}

.auth-switch button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--indigo);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.signed-in-card {
  text-align: center;
}

.signed-in-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
}

.signed-in-card h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
}

.signed-in-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
}

.signed-in-actions {
  display: grid;
  gap: 9px;
  margin-top: 22px;
}

/* ---------- Dashboard ---------- */

.dash-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 20px;
  padding: 30px 32px;
  border-radius: var(--app-radius);
  background:
    radial-gradient(circle at 88% 10%, rgba(243, 172, 60, 0.22), transparent 16rem),
    linear-gradient(125deg, #211a54, var(--indigo-ink));
  color: #fff;
  box-shadow: var(--app-shadow-strong);
}

.dash-hero::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -70px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.025), 0 0 0 72px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.dash-hero > div {
  position: relative;
  z-index: 1;
}

.dash-hero .eyebrow {
  color: #f6c46c;
}

.dash-hero h1 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(27px, 3.4vw, 39px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.dash-hero p {
  max-width: 560px;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12.5px;
  line-height: 1.65;
}

.dash-hero-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  flex: none;
}

.dash-hero .btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 20px;
}

.dash-stat {
  padding: 18px 20px;
  border: 1px solid var(--app-line);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.82);
}

.dash-stat span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.dash-stat strong {
  display: block;
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.dash-stat small {
  display: block;
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.4;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: 20px;
  align-items: start;
}

.dash-main,
.dash-side {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.practice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.practice-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 205px;
  padding: 22px;
  border: 1px solid var(--app-line);
  border-radius: 22px;
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.practice-card:hover {
  transform: translateY(-3px);
  border-color: #d3c9b9;
  box-shadow: var(--app-shadow);
}

.practice-card--writing {
  background: linear-gradient(145deg, #f1eeff, #fbf9ff 70%);
  border-color: #ded8ff;
}

.practice-card--speaking {
  background: linear-gradient(145deg, #fff1e4, #fffaf4 70%);
  border-color: #f4ddc3;
}

.practice-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #fff;
  color: var(--indigo);
  box-shadow: 0 4px 12px -8px rgba(23, 19, 41, 0.35);
}

.practice-card--speaking .practice-icon {
  color: var(--amber-deep);
}

.practice-card h3 {
  margin-top: 15px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.practice-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.practice-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.practice-card-foot .arrow {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
}

.attempt-list {
  display: grid;
}

.attempt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
}

.attempt-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.attempt-main {
  min-width: 0;
}

.attempt-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
}

.attempt-main span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.attempt-skill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--indigo-soft);
  color: var(--indigo-dark);
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.attempt-skill--speaking {
  background: var(--amber-soft);
  color: #81540b;
}

.attempt-band {
  min-width: 42px;
  text-align: right;
}

.attempt-band strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.attempt-band span {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.attempt-link {
  color: var(--indigo);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.attempt-link:hover {
  color: var(--indigo-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.plan-panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--app-radius);
  background: var(--indigo-ink);
  color: #fff;
  box-shadow: var(--app-shadow-strong);
}

.plan-panel::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -50px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 27px rgba(255, 255, 255, 0.03);
}

.plan-panel .plan-pill {
  position: relative;
  z-index: 1;
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
  color: #ffcf7c;
}

.plan-panel h2 {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.plan-panel > p {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 11.5px;
  line-height: 1.55;
}

.plan-meter {
  margin: 20px 0 15px;
}

.plan-meter-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
}

.plan-meter-top strong {
  color: #fff;
}

.plan-meter-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.plan-meter-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber), #ffd28a);
  transition: width 0.5s ease;
}

.plan-panel .btn {
  width: 100%;
  position: relative;
  z-index: 1;
}

.plan-panel-note {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 9.5px;
  line-height: 1.5;
  text-align: center;
}

.mini-note {
  padding: 16px;
  border: 1px solid var(--app-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.mini-note h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
}

.mini-note p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.mini-note a {
  color: var(--indigo);
  font-weight: 700;
}

.mini-note a:hover {
  text-decoration: underline;
}

/* ---------- Writing test ---------- */

.exam-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 20px;
  align-items: start;
}

.exam-side {
  position: sticky;
  top: calc(var(--app-header-h) + 18px);
  display: grid;
  gap: 14px;
  min-width: 0;
}

.exam-card {
  padding: 24px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--app-shadow);
}

.task-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  border-radius: 13px;
  background: var(--app-soft);
}

.task-tab {
  min-height: 37px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.task-tab[aria-selected="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 5px 14px -11px rgba(23, 19, 41, 0.5);
}

.exam-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.exam-title-row h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.exam-title-row span {
  flex: none;
  padding: 4px 8px;
  border: 1px solid var(--app-line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.exam-prompt {
  margin-top: 16px;
  padding: 17px 18px;
  border-left: 3px solid var(--indigo);
  border-radius: 0 13px 13px 0;
  background: var(--indigo-soft);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.65;
}

.exam-prompt strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 800;
}

.exam-instructions {
  margin-top: 14px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.data-table {
  width: 100%;
  margin-top: 15px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--app-line);
  border-radius: 12px;
  font-size: 11.5px;
}

.data-table caption {
  padding: 9px 11px;
  background: var(--paper);
  border: 1px solid var(--app-line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 8px 11px;
  border-top: 1px solid var(--line-soft);
  text-align: left;
}

.data-table th {
  background: #f8f5ee;
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.data-table td:not(:first-child),
.data-table th:not(:first-child) {
  text-align: right;
}

.exam-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.exam-fact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
}

.exam-fact svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exam-tip {
  padding: 17px 18px;
  border: 1px solid #f0d9b2;
  border-radius: 18px;
  background: #fff8ea;
  color: #73531a;
  font-size: 10.5px;
  line-height: 1.6;
}

.exam-tip strong {
  color: #5e4210;
}

.exam-tip details {
  margin-top: 9px;
}

.exam-tip summary {
  cursor: pointer;
  color: #8a621d;
  font-weight: 700;
}

.exam-tip p {
  margin-top: 7px;
}

.editor-card {
  display: flex;
  flex-direction: column;
  min-height: 660px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: #fff;
  box-shadow: var(--app-shadow);
  overflow: hidden;
}

.editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: #fdfbf7;
}

.timer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.timer svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timer.is-warning {
  color: #a74622;
}

.editor-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.editor-meta strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
}

.save-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.save-state::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #71b99a;
}

.save-state.is-saving::before {
  background: var(--amber-deep);
}

#essay {
  flex: 1;
  width: 100%;
  min-height: 470px;
  padding: 24px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.8;
  resize: vertical;
  outline: 0;
}

#essay::placeholder {
  color: #b1aab9;
}

.editor-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 20px;
  border-top: 1px solid var(--line-soft);
  background: #fdfbf7;
}

.quota-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.quota-note strong {
  color: var(--ink);
}

.quota-note a {
  color: var(--indigo);
  font-weight: 700;
}

.quota-note.is-empty {
  color: #963d23;
}

.quota-note.is-empty strong {
  color: #7c2e19;
}

.submit-cluster {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}

.draft-warning {
  display: none;
  align-items: center;
  gap: 8px;
  margin: 0 20px 14px;
  padding: 9px 11px;
  border: 1px solid #f0d9b2;
  border-radius: 10px;
  background: #fff8ea;
  color: #73531a;
  font-size: 10.5px;
  line-height: 1.5;
}

.draft-warning.is-visible {
  display: flex;
}

.quota-banner {
  display: none;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #f0c7b5;
  border-radius: 14px;
  background: #fdf1eb;
}

.quota-banner.is-visible {
  display: block;
}

.quota-banner strong {
  display: block;
  color: #87351e;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
}

.quota-banner p {
  margin-top: 4px;
  color: #95513d;
  font-size: 10.5px;
  line-height: 1.55;
}

.quota-banner .btn {
  margin-top: 10px;
}

.mock-quota {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0 0 18px;
  padding: 11px 15px;
  border: 1px solid rgba(74, 61, 224, 0.18);
  border-radius: 12px;
  background: rgba(74, 61, 224, 0.055);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.mock-quota strong {
  color: var(--indigo);
  font-family: var(--font-display);
  font-weight: 800;
}

.mock-quota a {
  color: var(--indigo);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Result ---------- */

.result-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 26px;
  margin-bottom: 20px;
  padding: 28px 30px;
  border-radius: var(--app-radius);
  background:
    radial-gradient(circle at 0% 0%, rgba(108, 95, 247, 0.4), transparent 20rem),
    radial-gradient(circle at 100% 0%, rgba(243, 172, 60, 0.17), transparent 18rem),
    var(--indigo-ink);
  color: #fff;
  box-shadow: var(--app-shadow-strong);
}

.result-score {
  width: 122px;
  height: 122px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.025);
  flex: none;
}

.result-score-inner {
  text-align: center;
}

.result-score-inner strong {
  display: block;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.95;
  color: #ffcf7c;
}

.result-score-inner span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-summary {
  min-width: 0;
}

.result-summary .eyebrow {
  color: #f6c46c;
}

.result-summary h1 {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.result-summary p {
  max-width: 640px;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11.5px;
  line-height: 1.65;
}

.result-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 13px;
  margin-top: 13px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 9.5px;
}

.result-summary-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.result-hero-actions {
  display: grid;
  gap: 8px;
  align-self: stretch;
  align-content: center;
  min-width: 132px;
}

.result-hero-actions .btn {
  height: 40px;
  font-size: 11px;
  padding: 0 15px;
}

.result-hero .btn-ghost {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.criteria-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.criterion-card {
  padding: 18px;
  border: 1px solid var(--app-line);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.9);
}

.criterion-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.criterion-top h3 {
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
}

.criterion-score {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  flex: none;
}

.criterion-bar {
  height: 5px;
  margin: 13px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line-soft);
}

.criterion-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--indigo);
}

.criterion-card:nth-child(2) .criterion-bar span { background: #6c5ff7; }
.criterion-card:nth-child(3) .criterion-bar span { background: var(--amber-deep); }
.criterion-card:nth-child(4) .criterion-bar span { background: #d9684d; }

.criterion-card p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.criterion-card .estimated {
  display: inline-block;
  margin-top: 6px;
  color: #946215;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(290px, 0.6fr);
  gap: 20px;
  align-items: start;
}

.result-main,
.result-side {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.feedback-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.feedback-box {
  padding: 18px;
  border-radius: 16px;
  background: #f6faf7;
  border: 1px solid #dcece3;
}

.feedback-box--grow {
  background: #fff9ee;
  border-color: #f1dfbf;
}

.feedback-box h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #246145;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 800;
}

.feedback-box--grow h3 {
  color: #7b5413;
}

.feedback-box ul {
  display: grid;
  gap: 8px;
  margin-top: 11px;
}

.feedback-box li {
  position: relative;
  padding-left: 14px;
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.55;
}

.feedback-box li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5da886;
}

.feedback-box--grow li::before {
  background: var(--amber-deep);
}

.answer-panel {
  padding: 24px;
}

.answer-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.answer-panel-header h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.answer-panel-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.answer-text {
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fdfbf7;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.answer-text mark {
  padding: 1px 2px;
  border-radius: 3px;
  background: #f9d9cf;
  color: #7d2b17;
  box-shadow: 0 1px 0 rgba(125, 43, 23, 0.15);
}

.answer-text mark.issue--grammar,
.answer-text mark.issue--capitalisation {
  background: #f9dfc0;
  color: #75430c;
}

.answer-text mark.issue--spelling {
  background: #f6d4dd;
  color: #84223a;
}

.answer-text mark.issue--repetition {
  background: #dde5f8;
  color: #273e78;
}

.answer-text mark.issue--punctuation {
  background: #e3ddf6;
  color: #4a367e;
}

.answer-text mark.issue--style {
  background: #e1eddd;
  color: #355c2c;
}

.correction-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.correction-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
}

.correction-type {
  align-self: start;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--app-soft);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.correction-item strong {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.45;
}

.correction-item p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}

.model-answer {
  padding: 24px;
}

.model-answer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
}

.model-answer summary::-webkit-details-marker {
  display: none;
}

.model-answer summary span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.model-answer summary::after {
  content: "+";
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--app-line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}

.model-answer[open] summary::after {
  content: "−";
}

.model-answer .answer-text {
  margin-top: 16px;
  font-size: 12.5px;
}

.result-side-card {
  padding: 22px;
}

.stat-lines {
  display: grid;
}

.stat-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 10.5px;
}

.stat-line:first-child {
  border-top: 0;
}

.stat-line span {
  color: var(--muted);
}

.stat-line strong {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
}

.score-key {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.score-key span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 8.5px;
}

.score-key i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.result-note {
  padding: 13px 14px;
  border: 1px solid #f0d9b2;
  border-radius: 12px;
  background: #fff8ea;
  color: #73531a;
  font-size: 9.5px;
  line-height: 1.55;
}

.speaking-transcript mark {
  padding: 1px 2px;
  border-radius: 3px;
  background: #f9dfc0;
  color: #75430c;
}

/* ---------- Speaking test ---------- */

.speaking-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 20px;
  align-items: start;
}

.speaking-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.part-stepper {
  display: grid;
  gap: 3px;
  padding: 16px;
  border-radius: var(--app-radius);
  background: var(--indigo-ink);
  color: #fff;
  box-shadow: var(--app-shadow);
}

.part-step {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.48);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.part-step:not(.is-active):not([aria-disabled="true"]):hover {
  background: rgba(255, 255, 255, 0.05);
}

.part-step[aria-disabled="true"] {
  cursor: default;
}

.part-step:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.part-step.is-active {
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
}

.part-step.is-complete {
  color: rgba(255, 255, 255, 0.72);
}

.part-step-num {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
}

.part-step.is-active .part-step-num {
  border-color: transparent;
  background: var(--amber);
  color: var(--ink);
}

.part-step.is-complete .part-step-num {
  border-color: transparent;
  background: rgba(113, 185, 154, 0.18);
  color: #9ed9bf;
}

.part-step strong {
  display: block;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
}

.part-step small {
  display: block;
  margin-top: 1px;
  font-size: 8.5px;
  opacity: 0.68;
}

.part-step-state {
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.speaking-prompt-card {
  padding: 24px;
}

.speaking-prompt-card h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.speaking-prompt-card > p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.speaking-question {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.55;
}

.speaking-question:first-of-type {
  margin-top: 13px;
}

.speaking-question span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-family: var(--font-display);
  font-size: 8.5px;
  font-weight: 800;
  flex: none;
  margin-top: 1px;
}

.cue-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #e6d4b5;
  border-radius: 16px;
  background: #fffaf0;
}

.cue-card h3 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.cue-card ul {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding-left: 16px;
  list-style: disc;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.5;
}

.cue-card p {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.5;
}

.speaking-tip {
  padding: 15px 17px;
  border: 1px solid var(--app-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.speaking-tip strong {
  color: var(--ink);
}

.recorder-card {
  min-height: 500px;
  padding: 28px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background:
    radial-gradient(circle at 50% 12%, rgba(74, 61, 224, 0.05), transparent 16rem),
    #fff;
  box-shadow: var(--app-shadow);
  display: flex;
  flex-direction: column;
}

.recorder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.recorder-head h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.recorder-head .timer {
  font-size: 15px;
}

.recorder-prompt {
  display: none;
}

.recorder-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 280px;
  padding: 20px 0;
}

.recorder-stage.is-review {
  justify-content: flex-start;
  padding-top: 4px;
}

.recorder-stage.is-review .mic-orb,
.recorder-stage.is-review .waveform {
  display: none;
}

.mic-orb {
  position: relative;
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--indigo-soft);
  color: var(--indigo);
  margin-bottom: 20px;
}

.mic-orb::before,
.mic-orb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(74, 61, 224, 0.16);
  animation: mic-ring 3s ease-out infinite;
}

.mic-orb::after {
  animation-delay: 1.5s;
}

.mic-orb svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mic-orb.is-recording {
  background: #fde8e0;
  color: #b84224;
}

.mic-orb.is-recording::before,
.mic-orb.is-recording::after {
  border-color: rgba(184, 66, 36, 0.2);
}

@keyframes mic-ring {
  0% { transform: scale(1); opacity: 0.7; }
  75%, 100% { transform: scale(1.55); opacity: 0; }
}

.recorder-stage h3 {
  max-width: 420px;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.recorder-stage p {
  max-width: 420px;
  margin: 7px auto 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.recorder-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

.record-btn {
  min-width: 158px;
  background: var(--indigo);
  color: #fff;
}

.record-btn.is-recording {
  background: #b84224;
  animation: record-pulse 1.8s ease-in-out infinite;
}

@keyframes record-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 66, 36, 0.3); }
  50% { box-shadow: 0 0 0 9px rgba(184, 66, 36, 0); }
}

.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 34px;
  margin-top: 18px;
  opacity: 0.28;
}

.waveform span {
  width: 3px;
  height: 8px;
  border-radius: 99px;
  background: var(--indigo);
  transform-origin: center;
}

.waveform.is-active {
  opacity: 1;
}

.waveform.is-active span {
  animation: wave 0.9s ease-in-out infinite;
}

.waveform span:nth-child(2n) { animation-delay: 0.12s; }
.waveform span:nth-child(3n) { animation-delay: 0.24s; }
.waveform span:nth-child(5n) { animation-delay: 0.36s; }

@keyframes wave {
  0%, 100% { height: 7px; }
  50% { height: 26px; }
}

.transcript-box {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: #fdfbf7;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.65;
  max-height: 180px;
  overflow-y: auto;
}

.transcript-box:empty {
  display: none;
}

.transcript-box .interim {
  color: var(--muted-2);
  font-style: italic;
}

.transcript-fallback {
  display: none;
  width: 100%;
  margin-top: 14px;
  text-align: left;
}

.transcript-fallback.is-visible {
  display: block;
}

.transcript-fallback label {
  font-size: 10px;
  color: var(--muted);
}

.transcript-fallback textarea {
  width: 100%;
  min-height: 120px;
  margin-top: 6px;
  font-size: 12px;
}

.recorder-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
  margin-top: 18px;
}

.recorder-foot p {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.audio-review {
  width: 100%;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: #fff;
}

.audio-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.audio-review-head strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
}

.audio-review-head .btn {
  flex: none;
  gap: 5px;
}

.audio-review audio {
  width: 100%;
  height: 38px;
}

.recorder-stage .audio-review-note {
  max-width: none;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: left;
}

@media (max-width: 640px) {
  .audio-review-head {
    flex-wrap: wrap;
  }
}

.question-group {
  margin-top: 16px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.question-group:first-child {
  margin-top: 13px;
}

.speaking-question.is-current {
  margin: 4px -10px;
  padding: 12px 10px;
  border-top-color: transparent;
  border-radius: 12px;
  background: var(--indigo-soft);
  color: var(--ink);
  font-weight: 600;
}

.speaking-question.is-current span {
  background: var(--indigo);
  color: #fff;
}

.speaking-question.is-done span {
  background: #dff3e6;
  color: #1f7a45;
}

.cue-card .cue-instruction {
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cue-card .cue-instruction + ul {
  margin-top: 6px;
}

.answer-log {
  width: 100%;
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.answer-log-item {
  padding: 13px 14px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
}

.answer-log-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.answer-log-head > span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  flex: none;
  margin-top: 1px;
}

.answer-log-head div {
  min-width: 0;
  flex: 1;
}

.answer-log-head strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
}

.answer-log-head p {
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.5;
}

.answer-log-cue {
  color: var(--muted) !important;
  font-size: 10px !important;
}

.answer-log-head em {
  flex: none;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.answer-log-item audio {
  width: 100%;
  height: 38px;
  margin-top: 9px;
}

.answer-log-text {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.answer-log-text.is-empty {
  color: var(--muted);
  font-style: italic;
}

.answer-log-download {
  margin-top: 8px;
}

@media (max-width: 640px) {
  .answer-log-head {
    flex-wrap: wrap;
  }

  .answer-log-head em {
    margin-left: 30px;
  }
}

.prep-overlay {
  width: 100%;
  padding: 18px;
  border: 1px solid #f0d9b2;
  border-radius: 16px;
  background: #fff8ea;
  text-align: center;
}

.prep-overlay strong {
  display: block;
  color: #6d4b0e;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
}

.prep-overlay p {
  margin-top: 3px;
  color: #886728;
  font-size: 10.5px;
}

.prep-count {
  margin-top: 9px;
  color: #6d4b0e;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.review-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.review-part {
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fdfbf7;
}

.review-part h4 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 800;
}

.review-part h4 span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.review-part p {
  margin-top: 5px;
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.55;
}

.speaking-note {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--indigo-soft);
  color: var(--indigo-dark);
  font-size: 9.5px;
  line-height: 1.5;
}

/* ---------- Checkout ---------- */

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(310px, 0.7fr);
  gap: 22px;
  align-items: start;
}

.checkout-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.checkout-card {
  padding: 26px;
  min-width: 0;
}

.plan-choice-grid {
  display: grid;
  gap: 10px;
  margin-top: 17px;
}

.plan-choice {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--app-line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.plan-choice:hover {
  border-color: #cfc5b4;
}

.plan-choice.is-selected {
  border-color: var(--indigo);
  background: #fbfaff;
  box-shadow: 0 0 0 3px rgba(74, 61, 224, 0.07);
}

.plan-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-radio {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid #d3caba;
  border-radius: 50%;
  flex: none;
}

.plan-choice.is-selected .plan-radio {
  border: 5px solid var(--indigo);
}

.plan-choice-main {
  min-width: 0;
}

.plan-choice-main strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.current-plan-tag {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.plan-choice-main p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.plan-choice-features {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 8px;
}

.plan-choice-features span {
  color: var(--muted);
  font-size: 9px;
}

.plan-choice-price {
  text-align: right;
  flex: none;
}

.plan-choice-price strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.plan-choice-price span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.5px;
  white-space: nowrap;
}

.order-summary {
  position: sticky;
  top: calc(var(--app-header-h) + 18px);
}

.order-card {
  padding: 24px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--app-shadow);
}

.order-card h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.order-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
  padding: 13px 14px;
  border-radius: 13px;
  background: var(--paper);
}

.order-plan strong {
  display: block;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 800;
}

.order-plan span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.order-plan > strong {
  font-size: 14px;
  white-space: nowrap;
}

.coupon-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed var(--app-line);
  border-radius: 13px;
  background: rgba(247, 243, 234, 0.72);
}

.coupon-label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.coupon-row {
  display: flex;
  gap: 7px;
}

.coupon-row input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--app-line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.coupon-row input::placeholder {
  color: #9a93a8;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.coupon-row input:focus {
  outline: 2px solid rgba(74, 61, 224, 0.28);
  outline-offset: 1px;
  border-color: var(--indigo);
}

.coupon-row input:disabled {
  background: var(--paper);
  color: var(--indigo-dark);
}

.coupon-row .btn {
  flex: none;
  height: 34px;
  padding: 0 13px;
  font-size: 9.5px;
}

.coupon-message {
  margin-top: 8px;
  font-size: 9px;
  line-height: 1.5;
}

.coupon-code-tag {
  display: inline-block;
  margin-inline-end: 4px;
  direction: ltr;
  unicode-bidi: isolate;
}

.coupon-message.is-success {
  color: #1e7a4f;
}

.coupon-message.is-error {
  color: #a2382a;
}

.order-line.discount {
  color: #1e7a4f;
  font-weight: 700;
}

.order-lines {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.order-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 10.5px;
}

.order-line.total {
  padding-top: 11px;
  border-top: 1px solid var(--app-line);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
}

.order-line.total strong {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.order-note {
  margin-top: 13px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.pay-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.pay-method {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  border: 1px solid var(--app-line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.pay-method:has(input:checked) {
  border-color: var(--indigo);
  background: #fbfaff;
}

.pay-method input {
  accent-color: var(--indigo);
}

.demo-pay-note {
  display: flex;
  gap: 8px;
  margin-top: 13px;
  padding: 10px 12px;
  border: 1px solid #f0d9b2;
  border-radius: 10px;
  background: #fff8ea;
  color: #73531a;
  font-size: 9px;
  line-height: 1.55;
}

.demo-pay-note.is-secure {
  border-color: #c9d7f4;
  background: #f4f7ff;
  color: #30456f;
}

.checkout-success {
  display: none;
  padding: 44px 28px;
  text-align: center;
}

.checkout-success.is-visible {
  display: block;
}

.success-orb {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #e9f7ef;
  color: #247650;
}

.success-orb svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.checkout-success h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.checkout-success > p {
  max-width: 420px;
  margin: 7px auto 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.success-receipt {
  max-width: 390px;
  margin: 22px auto;
  padding: 15px;
  border: 1px solid var(--app-line);
  border-radius: 13px;
  background: var(--paper);
  text-align: left;
}

.success-receipt div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  color: var(--muted);
  font-size: 10px;
}

.success-receipt strong {
  color: var(--ink);
  font-weight: 700;
}

.success-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Bank pickers / Reading / Listening ---------- */

.test-picker {
  margin-bottom: 18px;
}

.prompt-picker {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 14px;
  border: 1px solid var(--app-line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 40px -38px rgba(23, 19, 41, 0.45);
}

.prompt-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.prompt-picker select {
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.prompt-picker select:focus {
  border-color: var(--indigo);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(74, 61, 224, 0.12);
}

.prompt-picker .btn {
  height: 38px;
  white-space: nowrap;
}

.prompt-picker-meta {
  margin: 0 2px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.45;
}

.practice-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: auto;
  padding-top: 15px;
}

.practice-card--reading {
  background: linear-gradient(145deg, #edf5ff, #fbfdff 70%);
  border-color: #d9e7f5;
}

.practice-card--listening {
  background: linear-gradient(145deg, #edf7ef, #fbfefb 70%);
  border-color: #d9eadc;
}

.practice-card--reading .practice-icon {
  color: #2f6f9e;
}

.practice-card--listening .practice-icon {
  color: #3b7a57;
}

.practice-card--english {
  grid-column: 1 / -1;
  background: linear-gradient(145deg, #fff7e9, #fffcf6 70%);
  border-color: #f0e1c4;
}

.practice-card--mock {
  grid-column: 1 / -1;
  background: linear-gradient(145deg, #e9f4f0, #fbfdfc 70%);
  border-color: #d3e7df;
}

.practice-card--mock .practice-icon {
  color: #2f7d6d;
}

.practice-card--english .practice-icon {
  color: var(--amber-deep);
}

.attempt-skill--english {
  background: #fdf3df;
  color: #95651a;
}

.attempt-skill--reading {
  background: #eaf3fb;
  color: #2f6f9e;
}

.attempt-skill--listening {
  background: #eaf6ee;
  color: #3b7a57;
}

.attempt-skill--mock {
  background: #e9f4f0;
  color: #2f7d6d;
}

.data-flow {
  margin-top: 15px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fdfbf7;
}

.data-flow h3 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
}

.data-flow ol {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.55;
}

.reading-layout,
.listening-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.reading-paper {
  position: sticky;
  top: calc(var(--app-header-h) + 18px);
  max-height: calc(100vh - var(--app-header-h) - 36px);
  overflow: auto;
  padding: 26px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: #fff;
  box-shadow: var(--app-shadow);
  scrollbar-width: thin;
}

.reading-paper-head h2 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.reading-paper-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.passage-text {
  display: grid;
  gap: 13px;
  margin-top: 18px;
}

.passage-text p {
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.8;
}

.paragraph-label {
  float: left;
  min-width: 18px;
  margin-right: 6px;
  color: var(--indigo);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.65;
}

.question-paper {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: #fff;
  box-shadow: var(--app-shadow);
}

.question-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.question-top h2 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.question-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.question-paper .draft-warning {
  margin: 12px 0 0;
}

.question-list {
  display: grid;
  gap: 18px;
  margin-top: 15px;
}

.question-group + .question-group {
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.question-group-head h3 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.question-group-head p {
  margin: 4px 0 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.question-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding-top: 13px;
}

.question-item + .question-item {
  margin-top: 13px;
  border-top: 1px solid var(--line-soft);
}

.question-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 800;
}

.question-prompt {
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.6;
}

.question-location {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.answer-options {
  display: grid;
  gap: 6px;
  margin-top: 9px;
}

.answer-options--tfng {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.answer-option {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #fdfbf7;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.45;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.answer-option:hover {
  border-color: #d3c9b9;
  background: #fff;
}

.answer-option:has(input:checked) {
  border-color: var(--indigo);
  background: var(--indigo-soft);
  color: var(--ink);
}

.answer-options--tfng .answer-option {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.answer-ovalue {
  font-weight: 700;
}

.answer-option input {
  flex: none;
  margin-top: 2px;
  accent-color: var(--indigo);
}

.answer-options--tfng .answer-option input {
  margin-top: 0;
}

.answer-option strong {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-right: 6px;
  border-radius: 5px;
  background: #fff;
  color: var(--indigo);
  font-size: 9px;
  vertical-align: 1px;
}

.gap-answer {
  display: block;
  margin-top: 9px;
}

.gap-answer input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--app-line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 12px;
  outline: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.gap-answer input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(74, 61, 224, 0.12);
}

.objective-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.objective-submit .field-hint {
  max-width: 62%;
  margin: 0;
}

.objective-submit .btn {
  flex: none;
}

.listening-side {
  position: sticky;
  top: calc(var(--app-header-h) + 18px);
  display: grid;
  gap: 14px;
  min-width: 0;
}

.audio-card {
  padding: 23px;
  border: 1px solid #f0dfc6;
  border-radius: var(--app-radius);
  background:
    radial-gradient(circle at 88% 6%, rgba(243, 172, 60, 0.18), transparent 15rem),
    linear-gradient(150deg, #fff8ec, #fffdf8 72%);
  box-shadow: var(--app-shadow);
}

.audio-card h2 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.audio-card > p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.audio-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.audio-speed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.audio-speed select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--app-line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.audio-speed select:focus {
  border-color: var(--indigo);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(74, 61, 224, 0.12);
}

.audio-speed select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.audio-status {
  min-height: 30px;
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.5;
}

.audio-instructions {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #f0dfc6;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
}

.audio-instructions strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.audio-instructions p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
}

.audio-meter {
  height: 6px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #efe4d4;
}

.audio-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--indigo), var(--amber-deep));
  transition: width 0.35s linear;
}

.transcript-toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 15px;
}

.transcript-toggle-row .field-hint {
  margin: 0;
  font-size: 9px;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--indigo);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.listening-transcript {
  max-height: 330px;
  margin-top: 11px;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
  scrollbar-width: thin;
}

.objective-scoreline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
}

.objective-scoreline strong {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.objective-scoreline span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.review-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fdfbf7;
}

.review-item.is-correct {
  border-color: #dcece3;
  background: #f7fbf8;
}

.review-item.is-incorrect {
  border-color: #f0d5c9;
  background: #fff9f5;
}

.review-mark {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #5da886;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.review-item.is-incorrect .review-mark {
  background: #d9684d;
}

.review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
}

.review-head strong {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
}

.review-head span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.review-question {
  margin-top: 5px;
  color: var(--ink);
  font-size: 11.5px;
  line-height: 1.55;
}

.review-answer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.review-answer-row strong {
  color: var(--ink);
  font-weight: 700;
}

.review-right {
  color: #246145;
}

.review-wrong {
  color: #963d23;
}

.review-explanation {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
}

/* ---------- Motion / responsive ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 1120px) {
  .app-header-inner {
    gap: 14px;
  }

  .app-nav {
    gap: 2px;
    padding: 3px;
  }

  .app-nav a {
    padding: 0 9px;
    font-size: 12px;
  }

  .app-account-name {
    display: none;
  }

  .dash-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .result-hero-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
  }

  .result-hero-actions .btn {
    flex: 1;
  }
}

@media (max-width: 980px) {
  .app-main {
    padding-top: 26px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-story {
    min-height: 0;
    padding: 30px;
  }

  .auth-story h1 {
    font-size: clamp(30px, 6vw, 45px);
  }

  .auth-benefits {
    grid-template-columns: 1fr 1fr;
    margin-top: 24px;
  }

  .auth-story-foot {
    padding-top: 22px;
  }

  .auth-card {
    max-width: 520px;
    margin-inline: auto;
  }

  .dash-stats {
    grid-template-columns: 1fr 1fr;
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }

  .dash-side {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .exam-layout {
    grid-template-columns: 1fr;
  }

  .exam-side {
    position: static;
  }

  .editor-card {
    min-height: 560px;
  }

  #essay {
    min-height: 380px;
  }

  .criteria-grid {
    grid-template-columns: 1fr 1fr;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .result-side {
    grid-template-columns: 1fr 1fr;
  }

  .speaking-layout {
    grid-template-columns: 1fr;
  }

  .recorder-prompt:not([hidden]) {
    display: block;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: #fdfbf7;
    color: var(--ink-2);
    text-align: left;
    font-size: 11px;
    line-height: 1.5;
  }

  .recorder-prompt strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 11.5px;
    line-height: 1.35;
  }

  .recorder-prompt ul {
    margin: 0;
    padding-left: 16px;
    list-style: disc;
  }

  .recorder-prompt li + li {
    margin-top: 3px;
  }

  .recorder-card {
    min-height: 480px;
  }

  .checkout-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-summary {
    position: static;
  }

  .reading-layout,
  .listening-layout {
    grid-template-columns: 1fr;
  }

  .reading-paper {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .listening-side {
    position: static;
  }
}

@media (max-width: 900px) {
  .app-header-inner {
    gap: 9px;
  }

  .app-nav {
    display: none;
  }

  .app-tabbar {
    display: grid;
  }

  body.app-body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .app-brand .brand-name {
    font-size: 15px;
  }

  .app-nav a {
    padding: 0 7px;
    font-size: 11px;
  }

  .app-account {
    gap: 5px;
  }
}

@media (max-width: 760px) {
  :root {
    --app-header-h: 62px;
  }

  .preview-ribbon {
    justify-content: flex-start;
    padding: 7px 16px;
    text-align: left;
    font-size: 10.5px;
  }

  .preview-ribbon strong {
    flex: none;
  }

  .app-header-inner {
    width: calc(100% - 28px);
    gap: 10px;
  }

  .app-nav {
    display: none;
  }

  .app-brand .brand-mark {
    width: 31px;
    height: 31px;
  }

  .app-brand .brand-name {
    font-size: 16px;
  }

  .app-account {
    gap: 6px;
  }

  .app-account .btn {
    height: 36px;
    padding: 0 12px;
    font-size: 11px;
  }

  .app-avatar {
    width: 30px;
    height: 30px;
    font-size: 10.5px;
  }

  .app-signout {
    display: none;
  }

  .app-main {
    width: calc(100% - 32px);
    padding: 22px 0 92px;
  }

  .part-stepper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    padding: 9px;
  }

  .part-step {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 7px;
    padding: 6px;
  }

  .part-step-num {
    width: 22px;
    height: 22px;
    font-size: 8px;
  }

  .part-step strong {
    font-size: 9px;
    line-height: 1.2;
  }

  .part-step small,
  .part-step-state {
    display: none;
  }

  .app-footer {
    margin-bottom: 66px;
  }

  .app-footer-inner {
    width: calc(100% - 32px);
    padding: 20px 0;
  }

  .app-footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
  }

  .app-footer-top nav {
    gap: 14px;
  }

  .app-footer-legal {
    margin-top: 14px;
    padding-top: 12px;
    font-size: 10px;
  }

  .app-pagehead {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
  }

  .app-pagehead h1 {
    font-size: 31px;
  }

  .app-pagehead p {
    font-size: 12.5px;
  }

  .app-card-pad {
    padding: 20px;
  }

  .auth-story {
    padding: 24px;
    border-radius: 24px;
  }

  .auth-story h1 {
    font-size: 32px;
  }

  .auth-story-copy {
    font-size: 12.5px;
  }

  .auth-benefits {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .auth-story-foot {
    flex-wrap: wrap;
    gap: 10px;
  }

  .auth-card {
    padding: 22px;
    border-radius: 24px;
  }

  .auth-card-head h2 {
    font-size: 23px;
  }

  .dash-hero {
    padding: 24px;
    gap: 20px;
  }

  .dash-hero h1 {
    font-size: 28px;
  }

  .dash-hero-actions {
    width: 100%;
  }

  .dash-hero-actions .btn {
    flex: 1;
  }

  .dash-stats {
    gap: 9px;
  }

  .dash-stat {
    padding: 15px;
  }

  .dash-stat strong {
    font-size: 22px;
  }

  .practice-grid {
    grid-template-columns: 1fr;
  }

  .practice-card {
    min-height: 180px;
  }

  .dash-side {
    grid-template-columns: 1fr;
  }

  .attempt-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
  }

  .attempt-skill {
    display: none;
  }

  .attempt-link {
    font-size: 0;
  }

  .attempt-link::after {
    content: "View";
    font-size: 10px;
  }

  .exam-card,
  .editor-card,
  .result-hero,
  .answer-panel,
  .model-answer,
  .result-side-card,
  .speaking-prompt-card,
  .recorder-card,
  .checkout-card,
  .order-card {
    border-radius: 22px;
  }

  .editor-top {
    padding: 12px 15px;
  }

  .editor-meta {
    gap: 9px;
    font-size: 9.5px;
  }

  #essay {
    padding: 19px;
    font-size: 15px;
    min-height: 330px;
  }

  .editor-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 13px 15px;
  }

  .submit-cluster {
    width: 100%;
  }

  .submit-cluster .btn {
    flex: 1;
  }

  .result-hero {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px;
  }

  .result-score {
    width: 98px;
    height: 98px;
  }

  .result-score-inner strong {
    font-size: 37px;
  }

  .criteria-grid {
    gap: 9px;
  }

  .criterion-card {
    padding: 15px;
  }

  .feedback-columns {
    grid-template-columns: 1fr;
  }

  .result-side {
    grid-template-columns: 1fr;
  }

  .answer-panel,
  .model-answer {
    padding: 19px;
  }

  .answer-text {
    padding: 16px;
    font-size: 12.5px;
  }

  .recorder-card {
    padding: 20px;
  }

  .recorder-stage {
    min-height: 250px;
  }

  .mic-orb {
    width: 96px;
    height: 96px;
  }

  .recorder-stage h3 {
    font-size: 18px;
  }

  .plan-choice {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .plan-choice-price {
    grid-column: 2;
    text-align: left;
    margin-top: 3px;
  }

  .checkout-card,
  .order-card {
    padding: 20px;
  }

  .pay-methods {
    grid-template-columns: 1fr;
  }

  .toast-stack {
    bottom: 78px;
  }

  .prompt-picker-row {
    gap: 7px;
  }

  .reading-paper,
  .question-paper {
    padding: 18px;
    border-radius: 16px;
  }

  .reading-paper-head h2 {
    font-size: 20px;
  }

  .passage-text p {
    font-size: 12px;
  }

  .audio-card {
    padding: 18px;
  }

  .objective-submit {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .objective-submit .field-hint {
    max-width: none;
  }

  .objective-submit .btn {
    width: 100%;
  }

  .review-item {
    padding: 12px;
  }
}

@media (max-width: 500px) {
  .preview-ribbon {
    font-size: 9.5px;
    gap: 6px;
  }

  .checkout-card .app-card-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .preview-ribbon span:last-child {
    display: none;
  }

  .app-brand .brand-name {
    font-size: 15px;
  }

  .dash-stats {
    grid-template-columns: 1fr 1fr;
  }

  .dash-stat {
    padding: 13px;
  }

  .dash-stat small {
    display: none;
  }

  .dash-hero-actions {
    flex-direction: column;
  }

  .criteria-grid {
    grid-template-columns: 1fr;
  }

  .criterion-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
  }

  .criterion-top {
    display: contents;
  }

  .criterion-top h3 {
    grid-column: 1;
    grid-row: 1;
  }

  .criterion-score {
    grid-column: 2;
    grid-row: 1;
  }

  .criterion-bar {
    grid-column: 1 / -1;
    margin: 5px 0 2px;
  }

  .criterion-card p {
    grid-column: 1 / -1;
  }

  .task-switch,
  .auth-tabs {
    gap: 3px;
  }

  .exam-title-row h2 {
    font-size: 18px;
  }

  .editor-top {
    gap: 8px;
  }

  .editor-meta .save-state {
    display: none;
  }

  .attempt-row {
    gap: 8px;
  }

  .attempt-band {
    min-width: 35px;
  }

  .attempt-band strong {
    font-size: 15px;
  }

  .result-hero-actions {
    flex-direction: column;
  }

  .result-hero-actions .btn {
    width: 100%;
  }

  .submit-cluster {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }

  .submit-cluster .btn {
    width: 100%;
    flex: none;
  }

  .success-actions {
    flex-direction: column;
  }

  .prompt-picker select {
    font-size: 10.5px;
    padding: 0 8px;
  }

  .reading-paper,
  .question-paper,
  .audio-card {
    padding: 15px;
    border-radius: 14px;
  }

  .question-top {
    flex-direction: column;
    gap: 8px;
  }

  .question-meta-row {
    flex-wrap: wrap;
  }

  .question-item {
    grid-template-columns: 23px minmax(0, 1fr);
    gap: 8px;
  }

  .question-num {
    width: 23px;
    height: 23px;
    font-size: 9.5px;
  }

  .question-prompt {
    font-size: 12px;
  }

  .answer-options--tfng {
    grid-template-columns: 1fr;
  }

  .answer-options--tfng .answer-option {
    justify-content: flex-start;
    text-align: left;
  }

  .listening-transcript {
    max-height: 240px;
  }
}

@media print {
  .preview-ribbon,
  .app-header,
  .app-tabbar,
  .app-footer,
  .result-hero-actions,
  .toast-stack {
    display: none !important;
  }

  .app-body {
    background: #fff;
  }

  .app-main {
    width: 100%;
    padding: 0;
  }

  .result-hero {
    color: #000;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: none;
  }

  .result-summary p,
  .result-summary-meta {
    color: #444;
  }

  .result-score-inner strong {
    color: #000;
  }

  .app-card,
  .criterion-card {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* ---------- App language switcher ---------- */

.app-lang {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex: none;
}

.app-lang + .app-account {
  margin-left: 0;
}

.app-lang .lang-trigger {
  height: 36px;
  padding: 0 10px;
  border-color: var(--line-soft);
  background: #fff;
  font-size: 11.5px;
}

.app-lang .lang-menu {
  width: 238px;
}

@media (max-width: 1120px) {
  .app-lang .lang-current,
  .app-lang .lang-chevron {
    display: none;
  }

  .app-lang .lang-trigger {
    width: 36px;
    height: 36px;
    justify-content: center;
    padding: 0;
  }
}

@media (max-width: 760px) {
  .app-lang .lang-trigger {
    width: 36px;
    height: 36px;
  }

  .app-lang .lang-menu {
    width: min(238px, calc(100vw - 28px));
  }
}

@media (max-width: 380px) {
  .app-account .btn-ghost {
    display: none;
  }
}

.currency-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

/* ---------- Candidate track controls ---------- */

.track-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px 18px;
  border: 1px solid var(--app-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 40px -40px rgba(23, 19, 41, 0.4);
}

.track-bar-copy {
  min-width: 0;
}

.track-bar-copy p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.track-switch {
  display: inline-flex;
  flex: none;
  gap: 3px;
  padding: 4px;
  border-radius: 999px;
  background: var(--app-soft);
}

.track-switch button {
  min-height: 34px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.track-switch button:hover {
  color: var(--ink);
}

.track-switch button.is-active {
  background: #fff;
  color: var(--indigo);
  box-shadow: 0 8px 18px -12px rgba(23, 19, 41, 0.5);
}

.track-switch button:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
}

.letter-brief {
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px solid #eed9ad;
  border-radius: 14px;
  background: rgba(252, 235, 199, 0.45);
}

.letter-brief h3 {
  color: #7a4f08;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.letter-brief ul {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.letter-brief li {
  position: relative;
  padding-left: 17px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.5;
}

.letter-brief li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber-deep);
}

.track-panel .track-switch {
  display: flex;
  width: 100%;
  margin: 13px 0 10px;
}

.track-panel .track-switch button {
  flex: 1;
  padding: 0 10px;
}

.track-panel h2 {
  margin-bottom: 4px;
}

.track-panel .plan-panel-note {
  margin-top: 2px;
}

.track-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.track-choice label {
  position: relative;
  display: block;
  cursor: pointer;
}

.track-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.track-choice label > span {
  display: block;
  height: 100%;
  padding: 12px 13px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.track-choice strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
}

.track-choice small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.track-choice label:hover > span {
  border-color: #c9c0ae;
}

.track-choice input:checked + span {
  border-color: var(--indigo);
  background: rgba(239, 236, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(74, 61, 224, 0.1);
}

.track-choice input:focus-visible + span {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
}

.signed-track {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--app-line);
  text-align: left;
}

.signed-track h3 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}

.signed-track .track-switch {
  display: flex;
  width: 100%;
  margin: 10px 0 8px;
}

.signed-track .track-switch button {
  flex: 1;
}

.signed-track p {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.track-empty {
  color: var(--muted);
  font-size: 12px;
}

.attempt-track {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--app-soft);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

@media (max-width: 720px) {
  .track-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }

  .track-switch {
    display: flex;
    width: 100%;
  }

  .track-switch button {
    flex: 1;
    padding: 0 10px;
  }

  .track-choice {
    grid-template-columns: 1fr;
  }

  .track-panel .track-switch {
    margin-bottom: 8px;
  }
}
