/* Placement Test — uses existing site tokens, buttons, cards, and MCQ/audio styles. */

.pt-page {
  min-width: 0;
  max-width: 52rem;
  margin: 0 auto;
  padding-bottom: 2.5rem;
}

.pt-landing,
.pt-results {
  max-width: 56rem;
}

.pt-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.pt-hero h1,
.pt-intro h1,
.pt-section-head h1,
.pt-result-hero h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 1.15;
}

.pt-hero-actions,
.pt-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.pt-highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.pt-highlights li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.85rem 0.95rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.pt-highlights svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--primary);
}

.pt-note {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.pt-back {
  margin: 0 0 0.85rem;
}

.pt-intro .page-lead {
  margin: 0 0 1.15rem;
  max-width: none;
  color: var(--text);
  font-size: clamp(1.12rem, 2.4vw, 1.3rem);
  font-weight: 700;
  line-height: 1.5;
}

.pt-intro-list {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.35rem;
  padding: 0;
  list-style: none;
}

.pt-intro-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  min-width: 0;
  padding: 0.95rem 1.05rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: clamp(1.02rem, 2.2vw, 1.18rem);
  font-weight: 700;
  line-height: 1.45;
}

.pt-intro-list svg {
  width: 1.55rem;
  height: 1.55rem;
  flex-shrink: 0;
  margin-top: 0.12rem;
  color: var(--primary);
}

.pt-intro-item--beginners {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.32);
  color: #3730a3;
}
.pt-intro-item--beginners svg { color: #4f46e5; }

.pt-intro-item--once {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.35);
  color: #92400e;
}
.pt-intro-item--once svg { color: #d97706; }

.pt-intro-item--pause {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.3);
  color: #9f1239;
}
.pt-intro-item--pause svg { color: #e11d48; }

.pt-intro-item--headphones {
  background: rgba(14, 165, 233, 0.14);
  border-color: rgba(14, 165, 233, 0.32);
  color: #075985;
}
.pt-intro-item--headphones svg { color: #0284c7; }

.pt-intro-item--quiet {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.32);
  color: #065f46;
}
.pt-intro-item--quiet svg { color: #059669; }

.pt-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.pt-step {
  display: flex;
  align-items: center;
  min-width: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.pt-step:not(:last-child)::after {
  content: "→";
  margin: 0 0.45rem 0 0.55rem;
  font-weight: 500;
  color: var(--border-strong);
}

.pt-step.is-active {
  color: var(--primary-dark);
}

.pt-step.is-done {
  color: var(--success);
}

.pt-section-head {
  margin-bottom: 1rem;
}

.pt-section-head--mcq {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.pt-timer {
  flex-shrink: 0;
  font-size: 1.2rem;
}

.pt-passage {
  max-height: min(52vh, 32rem);
  overflow: auto;
}

.pt-passage p + p {
  margin-top: 0.75rem;
}

.pt-notes .oet-listening-notes {
  margin: 0;
}

.pt-notes .report-problem-btn {
  display: none;
}

.pt-qcount,
.pt-context {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
}

.pt-audio--once {
  max-width: 18rem;
}

.pt-audio--once .lpb-play-btn:disabled {
  opacity: 0.85;
  cursor: default;
}

.pt-notes,
.pt-question,
.pt-passage {
  min-width: 0;
  overflow-x: clip;
}

.pt-notes-patient,
.pt-notes-heading {
  margin: 0 0 0.65rem;
}

.pt-gap-list {
  display: grid;
  gap: 0.7rem;
}

.pt-gap-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
}

.pt-gap-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 800;
}

.pt-gap-text {
  min-width: 0;
  line-height: 1.55;
}

.pt-gap-input,
.pt-page .oet-gap-input {
  display: inline-block;
  width: 14rem;
  max-width: 100%;
  min-height: 2.35rem;
  margin: 0.15rem 0.25rem;
  padding: 0.35rem 0.6rem;
  border: 2px solid #1f2937;
  border-radius: 0;
  background: #fff;
  color: #111827;
  box-shadow: none;
  vertical-align: middle;
}

.pt-page .oet-gap-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: #111827;
}

.pt-passage-title,
.pt-prompt {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
}

.pt-passage p,
.pt-question p {
  overflow-wrap: anywhere;
}

.pt-passage p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
}

.pt-grammar-blank {
  display: inline;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.pt-page .oet-mcq-rect-group {
  min-width: 0;
}

.pt-page .oet-mcq-rect-option {
  min-width: 0;
}

.pt-page .oet-mcq-rect-label {
  overflow-wrap: anywhere;
}

.pt-nav {
  position: sticky;
  bottom: 0;
  padding: 0.85rem 0 0.25rem;
  background: linear-gradient(180deg, transparent, var(--bg) 28%);
}

.pt-result-hero {
  text-align: center;
}

.pt-result-hero .pt-kicker {
  color: var(--primary);
}

.pt-result-hero .pt-overall-label,
.pt-result-hero .pt-note {
  color: var(--text-muted);
}

.pt-overall-label {
  margin: 0.35rem 0 0;
  font-weight: 600;
}

.pt-overall-score {
  margin: 0.2rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  color: var(--primary-dark);
}

.pt-result-hero .pt-overall-score {
  color: var(--primary-dark);
}

.pt-overall-percent {
  margin: 0.15rem 0 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}

.pt-result-hero .pt-overall-percent {
  width: fit-content;
  max-width: 100%;
  margin: 0.35rem auto 0.15rem;
  padding: 0.35rem 0.95rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.6vw, 1.9rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--primary-dark);
}

.pt-level {
  margin: 0.35rem 0 0;
  font-size: 1.15rem;
}

.pt-level-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0.55rem auto 0;
  padding: 0.95rem 1.35rem 1.05rem;
  max-width: 26rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.pt-result-hero .pt-level-badge {
  width: fit-content;
  max-width: 100%;
  margin: 0.55rem auto 0;
  color: var(--text);
}

.pt-level-name {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4.2vw, 2.15rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--primary-dark);
}

.pt-level-oet {
  margin-top: 0.3rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--primary);
}

.pt-result-meta {
  display: grid;
  gap: 0.7rem;
  margin: 1.35rem 0 0;
  text-align: left;
}

.pt-result-hero .pt-period-badge {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.8vw, 1.95rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--primary-dark);
}

.pt-result-meta > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.pt-result-meta dt {
  margin: 0;
  color: var(--text);
  font-size: clamp(0.95rem, 2vw, 1.12rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
}

.pt-result-meta dd {
  margin: 0;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 800;
  text-align: right;
}

.pt-section-scores-title {
  margin: 1.4rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.pt-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0 0 1.25rem;
}

.pt-score-card {
  min-width: 0;
  padding: 1.1rem 1.15rem 1.2rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.pt-score-card h3 {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.3;
}

.pt-score-value {
  margin: 0.35rem 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.pt-score-card .score-bar {
  max-width: none;
  margin: 0;
}

.pt-score-card--listening .score-bar-fill {
  background: linear-gradient(90deg, #f59e0b, #fb923c);
}

.pt-score-card--reading .score-bar-fill {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.pt-score-card--grammar .score-bar-fill {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.pt-feedback-list {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.65;
}

.pt-recommend {
  margin-top: 1rem;
}

.pt-course-panel {
  margin: 0 0 1.25rem;
}

.pt-course-panel .pt-kicker {
  color: var(--primary);
}

.pt-course-panel h2 {
  margin: 0.2rem 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
}

.pt-course-panel .pt-course-plan {
  margin: 0.15rem 0 0;
  padding: 0.95rem 1.15rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  font-weight: 700;
  line-height: 1.35;
}

.pt-course-plan-name,
.pt-course-plan-days {
  color: var(--primary-dark);
  font-weight: 800;
}

.home-overview-card--placement {
  --overview-card-glow: rgba(14, 165, 233, 0.5);
}

.home-overview-icon--placement {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(99, 102, 241, 0.16));
  color: #0284c7;
}

.home-overview-card--placement:hover .home-overview-link {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
}

[data-theme="dark"] .pt-intro-item--beginners { color: #c7d2fe; }
[data-theme="dark"] .pt-intro-item--once { color: #fde68a; }
[data-theme="dark"] .pt-intro-item--pause { color: #fecdd3; }
[data-theme="dark"] .pt-intro-item--headphones { color: #bae6fd; }
[data-theme="dark"] .pt-intro-item--quiet { color: #a7f3d0; }

[data-theme="dark"] .pt-notes .oet-notes-body,
[data-theme="dark"] .pt-notes .oet-notes-heading,
[data-theme="dark"] .pt-notes .oet-notes-patient,
[data-theme="dark"] .pt-notes .oet-notes-label,
[data-theme="dark"] .pt-notes .oet-notes-bullet,
[data-theme="dark"] .pt-notes .oet-notes-text,
[data-theme="dark"] .pt-notes .oet-gap-num,
[data-theme="dark"] .pt-notes .oet-listening-prep,
[data-theme="dark"] .pt-notes .oet-listening-leadin,
[data-theme="dark"] .pt-notes .oet-listening-leadin-heading {
  color: var(--text);
}

[data-theme="dark"] .pt-notes .oet-listening-leadin {
  background: var(--surface-2);
}

@media (max-width: 767px) {
  .pt-highlights {
    grid-template-columns: 1fr;
  }

  .pt-score-grid {
    grid-template-columns: 1fr;
  }

  .pt-result-meta > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .pt-result-meta dd {
    text-align: left;
  }

  .pt-gap-row {
    grid-template-columns: 1.6rem minmax(0, 1fr);
  }

  .pt-gap-input,
  .pt-page .oet-gap-input {
    width: 100%;
    display: inline-block;
    margin: 0.35rem 0 0;
  }

  .pt-nav {
    flex-direction: column;
  }

  .pt-nav .btn {
    width: 100%;
  }

  .pt-hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .pt-step:not(:last-child)::after {
    margin: 0 0.3rem 0 0.4rem;
  }
}
