:root {
  --ink: #17332a;
  --muted: #65766f;
  --line: #dce8e0;
  --green: #2e7d5b;
  --green-dark: #1e5c43;
  --green-soft: #eaf5ee;
  --cream: #fbf8ef;
  --gold: #d8a536;
  --white: #ffffff;
  --red: #c94d4d;
  --wine: #7b2018;
  --wine-dark: #5d1711;
  --antique-gold: #b58a48;
  --paper: #f7ecd8;
  --shadow: 0 22px 70px rgba(26, 72, 54, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #f6f7f2;
  color: var(--ink);
  font-family: "Times New Roman", Times, serif;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

button, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.placement-link {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #c9dfd1;
  border-radius: 12px;
  background: var(--green);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.placement-button {
  width: 100%;
  min-height: 66px;
  margin-top: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  border: 1px solid #bfdcca;
  border-radius: 14px;
  background: #f2faf5;
  color: var(--green-dark);
  text-align: left;
  cursor: pointer;
}

.placement-button strong { font-size: 15px; }
.placement-button span { color: var(--muted); font-size: 12px; }
.placement-set-field { margin: 6px 0 24px; }
.placement-set-options button { min-width: 0; padding: 0 8px; }

.placement-intro {
  width: min(760px, calc(100% - 32px));
  margin: 60px auto;
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: white;
  box-shadow: var(--shadow);
}

.placement-intro h1 {
  margin: 12px 0 18px;
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1.05;
}

.placement-intro > p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.placement-facts {
  margin: 30px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.placement-facts div {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-radius: 15px;
  background: var(--green-soft);
  text-align: center;
}

.placement-facts strong { color: var(--green-dark); font-size: 26px; }
.placement-facts span { color: var(--muted); font-size: 12px; }

.placement-rule, .assessment-note {
  margin: 0 0 24px;
  padding: 18px;
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: #fff9e9;
}

.placement-rule p, .assessment-note p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.placement-card { position: relative; }
.placement-card h1 { white-space: pre-line; }
.placement-card .prompt-pinyin {
  margin: -28px 0 30px;
  font-size: 17px;
  line-height: 1.55;
}
.beginner-pinyin {
  color: var(--green);
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  letter-spacing: .025em;
  word-spacing: .32em;
  line-height: 1.65;
}
.choice-copy {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.choice-copy strong { font-size: 16px; font-weight: 600; }
.choice-copy small { font-size: 13px; font-weight: 500; }
.placement-level-badge {
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 7px 11px;
  border-radius: 99px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.choice-list {
  display: grid;
  gap: 11px;
}

.choice-button {
  width: 100%;
  min-height: 58px;
  padding: 9px 14px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.choice-button > .choice-letter {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eef4ef;
  color: var(--green-dark);
  font-weight: 800;
}

.choice-button > strong { font-size: 16px; font-weight: 600; }
.choice-button.selected {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 0 0 3px rgba(46, 125, 91, .1);
}
.choice-button.selected > .choice-letter { background: var(--green); color: white; }

.practice-choice-list {
  margin-top: 24px;
}

.practice-choice-list .choice-button {
  min-height: 72px;
  padding: 14px 18px;
  align-items: center;
}

.practice-choice-list .choice-copy strong {
  font-size: 20px;
  line-height: 1.55;
  font-weight: 600;
}

.practice-choice-list .choice-copy strong.han-text {
  font-size: 28px;
  line-height: 1.65;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.practice-choice-list .choice-copy small {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.45;
}

@media (max-width: 700px) {
  .practice-choice-list .choice-button {
    min-height: 68px;
    padding: 12px 14px;
  }

  .practice-choice-list .choice-copy strong {
    font-size: 18px;
  }

  .practice-choice-list .choice-copy strong.han-text {
    font-size: 25px;
    letter-spacing: 0.05em;
  }
}

.placement-result-hero {
  width: min(1000px, calc(100% - 32px));
  margin: 50px auto 36px;
  padding: clamp(28px, 5vw, 48px);
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 34px;
  border-radius: 28px;
  background: #17332a;
  color: white;
}

.placement-result-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(32px, 5vw, 52px);
}
.placement-result-hero p { margin: 0 0 10px; color: #d7e7de; line-height: 1.55; }
.placement-result-hero small { color: #9fc2af; }

.level-breakdown {
  width: min(1000px, calc(100% - 32px));
  margin: 0 auto;
}

.level-score-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.level-score-grid article {
  position: relative;
  padding: 19px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.level-score-grid article > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.level-score-grid article span { color: var(--muted); font-size: 12px; }
.level-score-grid article b { color: var(--red); font-size: 22px; }
.level-score-grid article.passed b { color: var(--green); }
.level-bar {
  height: 7px;
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 99px;
  background: #edf1ee;
}
.level-bar i { display: block; height: 100%; border-radius: inherit; background: var(--red); }
.level-score-grid article.passed .level-bar i { background: var(--green); }
.level-breakdown .assessment-note { margin-top: 18px; }

@media (max-width: 700px) {
  .topbar-actions { gap: 6px; }
  .placement-link, .data-button { padding: 0 10px; font-size: 12px; }
  .placement-facts { grid-template-columns: 1fr; }
  .placement-facts div { flex-direction: row; align-items: center; justify-content: space-between; padding: 13px 16px; }
  .placement-facts strong { font-size: 21px; }
  .placement-result-hero { grid-template-columns: 1fr; text-align: center; }
  .placement-result-hero .score-ring { margin: auto; }
  .level-score-grid { grid-template-columns: 1fr; }
  .choice-button > strong { font-size: 15px; }
}

.data-button {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .8);
  color: var(--green-dark);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

dialog {
  width: min(520px, calc(100% - 24px));
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  box-shadow: 0 24px 90px rgba(15, 52, 38, .28);
}

dialog::backdrop {
  background: rgba(15, 39, 29, .45);
  backdrop-filter: blur(4px);
}

.dialog-card {
  position: relative;
  padding: 34px;
  background: white;
}

.dialog-card h2 {
  margin: 9px 0 12px;
  font-family: "Times New Roman", Times, serif;
  font-size: 28px;
  font-weight: 500;
}

.dialog-card p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.65;
}

.dialog-card small {
  display: block;
  margin-top: 20px;
  color: #84918b;
  line-height: 1.5;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #eef4ef;
  color: var(--green-dark);
  font-size: 22px;
  cursor: pointer;
}

.upload-button {
  min-height: 52px;
  margin-bottom: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--green);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.upload-button input { display: none; }
.wide { width: 100%; }

.danger-link {
  width: 100%;
  margin-top: 15px;
  border: 0;
  background: transparent;
  color: var(--red);
  font-weight: 800;
  cursor: pointer;
}

.site-shell, .quiz-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 84% 12%, rgba(201, 228, 210, .72), transparent 28%),
    linear-gradient(135deg, #f8f9f4 0%, #f2f7f2 100%);
}

.topbar, .quiz-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand > div { display: flex; flex-direction: column; gap: 2px; }
.brand strong { font-size: 18px; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: 12px; }
.brand-hanzi {
  color: #7b2018;
  font-family: "KaiTi", "STKaiti", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .22em;
  line-height: 1.05;
}
.viet-lo-brand strong {
  color: #7b2018;
  font-size: 21px;
  letter-spacing: .12em;
  line-height: 1.15;
}
.viet-lo-brand .brand-mark {
  background: linear-gradient(145deg, #8d291d, #64160f);
  color: #f4d49a;
  border: 2px solid #b98b4a;
  box-shadow: 0 8px 24px rgba(111, 29, 20, .22);
}
.viet-lo-brand .brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 34px;
  outline: 1px solid rgba(123,32,24,.22);
  outline-offset: 4px;
}
.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--green);
  color: white;
  font-family: "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Arial, sans-serif;
  font-size: 22px;
  box-shadow: 0 8px 24px rgba(46, 125, 91, .22);
}
.brand.compact .brand-mark { width: 36px; height: 36px; border-radius: 11px; font-size: 18px; }

.online-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
}
.online-badge i { width: 8px; height: 8px; border-radius: 50%; background: #43a56f; box-shadow: 0 0 0 4px #dcf0e3; }

.hero {
  width: min(1180px, calc(100% - 40px));
  margin: 28px auto 0;
  min-height: calc(100vh - 170px);
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  align-items: center;
  gap: 80px;
  padding: 42px 0 72px;
}

.eyebrow, .step-label {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

.hero-copy h1 {
  margin: 18px 0 22px;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(52px, 6vw, 82px);
  line-height: .98;
  letter-spacing: normal;
  font-weight: 700;
}
.hero-copy h1 em { color: var(--green); font-style: italic; }
.hero-copy > p { max-width: 500px; color: var(--muted); font-size: 18px; line-height: 1.7; }

.hero-stats { display: flex; gap: 42px; margin-top: 40px; }
.hero-stats div { display: flex; flex-direction: column; gap: 4px; }
.hero-stats strong { font-family: "Times New Roman", Times, serif; font-size: 26px; }
.hero-stats span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .09em; }

.setup-card {
  position: relative;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(206, 224, 212, .9);
  border-radius: 28px;
  padding: 36px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.card-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.card-heading h2 { margin: 8px 0 0; font-family: "Times New Roman", Times, serif; font-size: 27px; font-weight: 600; }
.card-number { color: #dae6dd; font-family: "Times New Roman", Times, serif; font-size: 54px; line-height: 1; }

.field { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.field label { font-size: 13px; font-weight: 800; color: #344b42; }
.two-column { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  background: #f5f8f5;
  border-radius: 14px;
}
.segmented button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}
.segmented button.selected {
  color: white;
  background: var(--green);
  box-shadow: 0 5px 14px rgba(46, 125, 91, .22);
}

.select-wrap { position: relative; }
.select-wrap::after {
  content: "⌄";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-54%);
  color: var(--green);
  pointer-events: none;
  font-weight: 800;
}
select, input {
  width: 100%;
  min-height: 54px;
  appearance: none;
  padding: 0 44px 0 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  outline: none;
}
input { padding: 0 16px; font-weight: 500; }
select:focus, input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(46, 125, 91, .1); outline: none; }

.set-note {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin: 0 0 22px;
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--green-soft);
  color: #3b6251;
}
.set-note > span { display: grid; place-items: center; flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--green); color: white; font-size: 12px; }
.set-note p { margin: 0; font-size: 12px; line-height: 1.55; }

.primary-button, .secondary-button {
  min-height: 52px;
  padding: 0 22px;
  border-radius: 13px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.primary-button { color: white; background: var(--green); box-shadow: 0 10px 24px rgba(46, 125, 91, .2); }
.primary-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.secondary-button { color: var(--green-dark); background: white; border: 1px solid var(--line); }
.secondary-button:hover { border-color: var(--green); }
.secondary-button:disabled { opacity: .4; cursor: not-allowed; }
.start-button { width: 100%; display: flex; justify-content: center; align-items: center; gap: 16px; }
.start-button span { font-size: 21px; }

.home-footer {
  width: min(1180px, calc(100% - 40px));
  margin: -30px auto 0;
  padding-bottom: 24px;
  display: flex;
  justify-content: center;
  gap: 10px;
  color: #85938d;
  font-size: 12px;
}

.center-screen { min-height: 100vh; display: grid; place-content: center; text-align: center; background: #f5f8f4; }
.loader { width: 46px; height: 46px; margin: auto; border-radius: 50%; border: 4px solid #dceadf; border-top-color: var(--green); animation: spin .8s linear infinite; }
.loading-text { color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }
.error-card { width: min(420px, calc(100vw - 32px)); padding: 36px; border-radius: 24px; background: white; box-shadow: var(--shadow); }
.error-card .brand-mark { margin: auto; }
.error-card h1 { font-family: "Times New Roman", Times, serif; font-size: 25px; }
.error-card p { color: var(--muted); margin-bottom: 24px; }

.quiz-page { padding-bottom: 70px; }
.quiz-header { min-height: 74px; border-bottom: 1px solid rgba(217, 229, 220, .8); }
.text-button { border: 0; background: transparent; color: var(--green); font-weight: 800; cursor: pointer; }
.quiz-title { text-align: center; display: flex; flex-direction: column; gap: 3px; }
.quiz-title small { color: var(--muted); }
.question-count { min-width: 54px; text-align: center; padding: 8px 10px; border-radius: 11px; background: var(--green-soft); color: var(--green-dark); font-weight: 800; }
.header-spacer { width: 74px; }
.progress-track { height: 4px; background: #dce8df; }
.progress-track div { height: 100%; background: linear-gradient(90deg, var(--green), #65aa76); transition: width .25s ease; }

.question-stage { width: min(760px, calc(100% - 32px)); margin: 48px auto 0; }
.question-topline { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin-bottom: 14px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.question-topline .type-chip { justify-self: end; }
.question-source-id { justify-self: center; padding: 7px 11px; border: 1px solid #c9dccf; border-radius: 999px; background: #f5faf6; color: var(--green-dark); font-family: Consolas, monospace; font-size: 12px; letter-spacing: .02em; white-space: nowrap; }
.type-chip { padding: 8px 11px; border-radius: 99px; letter-spacing: normal; }
.type-chip.vocab { color: #37614e; background: #e2f0e7; }
.type-chip.grammar { color: #7d5b13; background: #fff2ca; }

.question-card {
  padding: clamp(25px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: white;
  box-shadow: var(--shadow);
}
.topic-label { color: var(--muted); font-size: 12px; }
.review-question-id { padding: 4px 8px; border: 1px solid #c9dccf; border-radius: 999px; color: var(--green-dark); background: #f5faf6; font-family: Consolas, monospace; font-size: 11px; white-space: nowrap; }
.question-card h1 {
  min-height: 86px;
  margin: 22px 0 40px;
  display: flex;
  align-items: center;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(30px, 7vw, 46px);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: normal;
}
.question-card label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 800; }
.question-card textarea {
  width: 100%;
  resize: vertical;
  min-height: 112px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fbfdfb;
  font-size: 18px;
  outline: none;
}
.answer-help { margin: 10px 0 0; color: #8a9791; font-size: 11px; }

.question-dots { display: flex; gap: 7px; overflow-x: auto; padding: 18px 2px 10px; scrollbar-width: thin; }
.question-dots button {
  flex: 0 0 35px;
  height: 35px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.question-dots button.answered { background: var(--green-soft); color: var(--green-dark); border-color: #b8d6c1; }
.question-dots button.active { background: var(--green); color: white; border-color: var(--green); }

.navigation-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.submit-button { background: #b48423; box-shadow: 0 10px 24px rgba(180, 132, 35, .22); }
.submit-button:hover { background: #936a17; }

.result-hero {
  width: min(900px, calc(100% - 40px));
  margin: 45px auto 32px;
  padding: 34px 40px;
  display: flex;
  align-items: center;
  gap: 32px;
  border-radius: 26px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.result-hero h1 { margin: 8px 0; font-family: "Times New Roman", Times, serif; font-size: clamp(28px, 5vw, 40px); font-weight: 600; }
.result-hero p { margin: 0; color: var(--muted); }
.score-ring {
  flex: 0 0 126px;
  height: 126px;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 75%, #e5eee8 75%);
  box-shadow: inset 0 0 0 12px white;
}
.score-ring strong { font-family: "Times New Roman", Times, serif; font-size: 38px; line-height: 1; }
.score-ring span { font-size: 11px; color: var(--muted); }
.score-ring.great { background: conic-gradient(#2e7d5b 0 88%, #e5eee8 88%); }
.score-ring.okay { background: conic-gradient(#d39a2b 0 62%, #eee9dc 62%); }
.score-ring.needs-work { background: conic-gradient(#c95e51 0 35%, #f0e5e2 35%); }

.review-list { width: min(900px, calc(100% - 40px)); margin: 0 auto; }
.review-heading { display: flex; justify-content: space-between; align-items: end; margin: 36px 2px 18px; }
.review-heading h2 { margin: 7px 0 0; font-family: "Times New Roman", Times, serif; font-size: 28px; font-weight: 600; }
.result-legend { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.correct-dot, .wrong-dot { width: 9px; height: 9px; border-radius: 50%; margin-left: 8px; }
.correct-dot { background: var(--green); }
.wrong-dot { background: var(--red); }
.review-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr 34px;
  gap: 14px;
  align-items: start;
  margin-bottom: 12px;
  padding: 22px;
  border-radius: 18px;
  background: white;
  border: 1px solid var(--line);
}
.review-card.wrong { border-left: 4px solid var(--red); }
.review-card.correct { border-left: 4px solid var(--green); }
.review-index { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #eff4f0; font-weight: 800; }
.question-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.question-meta span { color: var(--green); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.question-meta small { color: var(--muted); }
.review-content h3 { margin: 10px 0 15px; font-family: "Times New Roman", Times, serif; font-size: 22px; font-weight: 500; letter-spacing: normal; }

.han-text {
  font-family: "Microsoft YaHei", "Noto Sans SC", "PingFang SC", "SimSun", sans-serif !important;
  letter-spacing: .11em !important;
  line-height: 1.65 !important;
}
.answer-lines { display: grid; gap: 8px; }
.answer-lines p { margin: 0; display: grid; grid-template-columns: 105px 1fr; gap: 12px; font-size: 13px; }
.answer-lines p span { color: var(--muted); }
.answer-lines p strong { word-break: break-word; }
.result-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-size: 18px; font-weight: 800; }
.correct .result-icon { color: var(--green); background: var(--green-soft); }
.wrong .result-icon { color: var(--red); background: #f9eaea; }
.result-actions { width: min(900px, calc(100% - 40px)); margin: 26px auto; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 18px; }
  .hero-copy { text-align: center; }
  .hero-copy > p { margin-left: auto; margin-right: auto; }
  .hero-stats { justify-content: center; }
  .home-footer { margin-top: 0; }
}

@media (max-width: 600px) {
  .topbar, .quiz-header { width: calc(100% - 28px); min-height: 66px; }
  .brand small, .online-badge { display: none; }
  .data-button { min-height: 38px; padding: 0 12px; font-size: 12px; }
  .dialog-card { padding: 28px 20px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 12px; font-size: 19px; }
  .hero { width: calc(100% - 24px); margin-top: 0; padding: 26px 0 54px; gap: 30px; }
  .hero-copy h1 { margin-top: 12px; font-size: 47px; }
  .hero-copy > p { font-size: 15px; line-height: 1.6; }
  .hero-stats { gap: 26px; margin-top: 26px; }
  .hero-stats strong { font-size: 23px; }
  .setup-card { border-radius: 22px; padding: 23px 18px; }
  .card-heading { margin-bottom: 23px; }
  .card-heading h2 { font-size: 23px; }
  .card-number { display: none; }
  .level-options { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
  .two-column { grid-template-columns: 1fr; gap: 0; }
  .field { margin-bottom: 18px; }
  .home-footer { display: none; }
  .quiz-title strong { font-size: 13px; }
  .quiz-title small { font-size: 10px; }
  .text-button { font-size: 12px; }
  .question-count { font-size: 12px; min-width: 47px; }
  .question-stage { margin-top: 25px; }
  .question-card { padding: 25px 19px; border-radius: 21px; }
  .question-card h1 { min-height: 72px; margin: 18px 0 30px; font-size: 32px; }
  .question-card textarea { font-size: 17px; }
  .navigation-buttons { position: sticky; bottom: 8px; z-index: 10; padding: 8px; margin-left: -8px; margin-right: -8px; border-radius: 16px; background: rgba(246, 247, 242, .92); backdrop-filter: blur(10px); }
  .navigation-buttons button { padding: 0 10px; font-size: 13px; }
  .result-hero { width: calc(100% - 24px); margin-top: 26px; padding: 25px 20px; flex-direction: column; text-align: center; gap: 18px; }
  .score-ring { flex-basis: 108px; width: 108px; height: 108px; }
  .review-list, .result-actions { width: calc(100% - 24px); }
  .review-heading { align-items: start; }
  .result-legend { display: none; }
  .review-card { grid-template-columns: 33px 1fr 28px; padding: 17px 13px; gap: 10px; }
  .review-index { width: 31px; height: 31px; }
  .review-content h3 { font-size: 20px; }
  .answer-lines p { grid-template-columns: 1fr; gap: 3px; }
  .result-actions { position: sticky; bottom: 8px; z-index: 10; padding: 8px; border-radius: 16px; background: rgba(246, 247, 242, .94); backdrop-filter: blur(10px); }
  .result-actions button { padding: 0 10px; font-size: 13px; }
}

/* Đáp án chữ Hán cần đủ lớn để nhìn rõ từng nét. */
.placement-card .choice-button {
  min-height: 94px;
  padding: 16px 18px;
}
.placement-card .choice-copy strong {
  color: #102f26;
  font-size: 18px;
  font-weight: 700;
}
.placement-card .choice-copy strong.han-text {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: .14em !important;
}
.placement-card .choice-copy small {
  font-size: 15px;
  font-weight: 500;
}

@media (max-width: 600px) {
  .placement-card .choice-button {
    min-height: 86px;
    padding: 14px 12px;
  }
  .placement-card .choice-copy strong.han-text {
    font-size: 27px;
    font-weight: 500;
  }
  .placement-card .choice-copy small { font-size: 14px; }
}

/* Nhận diện cổ điển Việt Lộ Hoa Ngữ */
.site-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(181,138,72,.13), transparent 23%),
    radial-gradient(circle at 88% 14%, rgba(123,32,24,.08), transparent 22%),
    repeating-linear-gradient(0deg, rgba(100,62,26,.018) 0 1px, transparent 1px 5px),
    linear-gradient(135deg, #fbf5e9 0%, #f5ead7 55%, #fbf6ec 100%);
}
.site-shell .topbar {
  width: min(1240px, calc(100% - 32px));
  min-height: 108px;
  margin-top: 12px;
  padding: 14px 24px;
  border: 1px solid rgba(181,138,72,.42);
  border-radius: 22px;
  background: rgba(255,250,239,.86);
  box-shadow: 0 12px 35px rgba(94,54,26,.08);
  backdrop-filter: blur(10px);
}
.site-shell .hero {
  width: min(1320px, calc(100% - 28px));
  min-height: calc(100vh - 150px);
  grid-template-columns: minmax(270px,.76fr) minmax(440px,1.08fr) minmax(290px,.72fr);
  align-items: center;
  gap: 28px;
  padding-top: 28px;
}
.site-shell .setup-card {
  background: rgba(255,250,239,.95);
  border-color: rgba(181,138,72,.48);
  box-shadow: 0 24px 75px rgba(104,60,29,.13);
}
.site-shell .setup-card::before,
.recruitment-section::before,
.recruitment-section::after {
  content: "❖";
  position: absolute;
  color: var(--antique-gold);
}
.site-shell .setup-card::before { top: 14px; right: 18px; font-size: 15px; }
.site-shell .hero-copy h1 { color: #35291f; }
.site-shell .hero-copy h1 em,
.site-shell .eyebrow,
.site-shell .step-label { color: var(--wine); }
.site-shell .primary-button {
  background: linear-gradient(135deg, #8e2c20, #681912);
  box-shadow: 0 10px 24px rgba(123,32,24,.22);
}
.site-shell .primary-button:hover { background: var(--wine-dark); }
.site-shell .placement-link {
  background: linear-gradient(135deg, #8e2c20, #681912);
  color: #fff7e8;
  border-color: var(--antique-gold);
}
.site-shell .data-button { border-color: #d8bc8a; background: #fffaf0; color: var(--wine); }
.site-shell .placement-button { border-color: #d8bc8a; background: #fff8ea; }
.site-shell .placement-button strong { color: var(--wine); }

.recruitment-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  align-self: center;
  min-width: 0;
  max-height: min(700px, calc(100vh - 180px));
  padding: 24px 18px 18px;
  overflow: hidden;
  border: 1px solid rgba(154,94,42,.5);
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(123,32,24,.03) 1px, transparent 1px),
    linear-gradient(rgba(123,32,24,.03) 1px, transparent 1px),
    rgba(255,248,233,.96);
  background-size: 26px 26px;
  box-shadow: 0 20px 55px rgba(92,51,26,.13);
}
.recruitment-aside::before {
  content: "❖";
  position: absolute;
  top: 10px;
  right: 13px;
  color: var(--antique-gold);
  font-size: 12px;
}
.aside-recruitment-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #d4ad79;
}
.aside-recruitment-title > span {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid var(--antique-gold);
  border-radius: 50%;
  background: var(--wine);
  color: #f6d59f;
  font-family: "KaiTi","STKaiti",serif;
  font-size: 19px;
  box-shadow: inset 0 0 0 4px #7d2118;
}
.aside-recruitment-title small { color: #8b6b42; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.aside-recruitment-title h2 { margin: 2px 0; color: var(--wine); font-size: 28px; line-height: 1; letter-spacing: .08em; }
.aside-recruitment-title p { margin: 0; color: #6c5945; font-size: 11px; font-style: italic; }
.recruitment-list-compact {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(500px, calc(100vh - 365px));
  margin-top: 14px;
  padding-right: 3px;
  overflow-y: auto;
  scrollbar-color: #b58a48 transparent;
  scrollbar-width: thin;
}
.recruitment-list-compact .recruitment-card {
  grid-template-columns: 48px 1fr;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 13px;
}
.recruitment-list-compact .class-number {
  width: 45px;
  height: 45px;
  border-radius: 11px 3px 11px 3px;
  font-size: 20px;
}
.recruitment-list-compact .class-copy > span { font-size: 9px; letter-spacing: .06em; }
.recruitment-list-compact .class-copy h3 { margin: 3px 0; font-size: 18px; }
.recruitment-list-compact .class-copy p { font-size: 11px; line-height: 1.35; }
.recruitment-list-compact .class-meta { gap: 3px 9px; margin-top: 6px; font-size: 10px; }
.recruitment-list-compact .class-slots {
  grid-column: 1/-1;
  flex-direction: row;
  justify-content: flex-end;
  gap: 7px;
  padding: 8px 0 0;
  border-top: 1px solid #ddc39b;
  border-left: 0;
}
.recruitment-list-compact .class-slots > strong { font-size: 23px; }
.recruitment-list-compact .class-slots > span { margin: 0; font-size: 10px; }
.recruitment-list-compact .class-slots a { padding: 6px 11px; font-size: 11px; }
.recruitment-list-compact .recruitment-empty { padding: 18px 12px; font-size: 12px; line-height: 1.45; }
.aside-contact-box {
  flex: 0 0 auto;
  margin-top: 13px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--wine);
  color: #fff7e8;
  box-shadow: 0 7px 18px rgba(104,25,18,.18);
}
.aside-contact-box > div,
.aside-contact-link {
  display: flex;
  align-items: center;
  gap: 9px;
}
.aside-contact-box > div { padding: 0 2px 8px; border-bottom: 1px solid rgba(255,247,232,.28); }
.aside-contact-box span { flex: 0 0 auto; color: #f4cb91; font-size: 18px; }
.aside-contact-box p { min-width: 0; margin: 0; }
.aside-contact-box small { display: block; color: #eacb9c; font-size: 9px; font-weight: 800; letter-spacing: .09em; }
.aside-contact-box strong { display: block; margin-top: 2px; color: #fffaf0; font-size: 11px; line-height: 1.35; }
.aside-contact-link {
  padding: 8px 2px 0;
  color: #fff7e8;
  text-decoration: none;
}
.aside-contact-link strong { font-size: 16px; letter-spacing: .035em; }

.recruitment-section {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin: 30px auto 55px;
  padding: 48px;
  overflow: hidden;
  border: 1px solid rgba(154,94,42,.5);
  border-radius: 26px;
  background:
    linear-gradient(90deg, rgba(123,32,24,.035) 1px, transparent 1px),
    linear-gradient(rgba(123,32,24,.035) 1px, transparent 1px),
    rgba(255,248,233,.93);
  background-size: 34px 34px;
  box-shadow: 0 24px 70px rgba(92,51,26,.13);
}
.recruitment-support { padding-top: 14px; }
.recruitment-support .why-section { margin-top: 0; padding-top: 22px; border-top: 0; }
.recruitment-section::before { top: 14px; left: 18px; }
.recruitment-section::after { right: 18px; bottom: 14px; transform: rotate(180deg); }
.ornament-title { display: flex; align-items: center; justify-content: center; gap: 22px; text-align: center; margin-bottom: 34px; }
.ornament-title > span {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border: 2px solid var(--antique-gold);
  border-radius: 50%;
  background: var(--wine);
  color: #f6d59f;
  font-family: "KaiTi","STKaiti",serif;
  font-size: 25px;
  box-shadow: inset 0 0 0 5px #7d2118, 0 8px 24px rgba(123,32,24,.2);
}
.ornament-title small { color: #8b6b42; font-weight: 800; letter-spacing: .2em; }
.ornament-title h2 { margin: 3px 0; color: var(--wine); font-size: clamp(38px,5vw,64px); letter-spacing: .12em; line-height: 1; }
.ornament-title p { margin: 6px 0 0; color: #6c5945; font-style: italic; }
.recruitment-list { display: grid; gap: 14px; }
.recruitment-card {
  display: grid;
  grid-template-columns: 92px 1fr 150px;
  align-items: center;
  gap: 24px;
  padding: 20px 22px;
  border: 1px solid #d4ad79;
  border-radius: 16px;
  background: rgba(255,252,243,.92);
  box-shadow: inset 0 0 0 4px rgba(181,138,72,.07);
}
.class-number {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 16px 4px 16px 4px;
  background: linear-gradient(145deg, #475230, #2f3820);
  color: #fff0ca;
  border: 2px solid #c9a060;
  font-size: 33px;
}
.recruitment-card:nth-child(2n) .class-number { background: linear-gradient(145deg, #bd7219, #8e4a0e); }
.recruitment-card:nth-child(3n) .class-number { background: linear-gradient(145deg, #b33b19, #7d2114); }
.class-copy > span { color: var(--wine); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.class-copy h3 { margin: 5px 0 6px; color: #3c4a2d; font-size: 26px; }
.class-copy p { margin: 0; color: #5f5143; line-height: 1.5; }
.class-meta { display: flex; flex-wrap: wrap; gap: 7px 18px; margin-top: 9px; color: #77634e; font-size: 13px; }
.class-slots { display: flex; flex-direction: column; align-items: center; padding-left: 18px; border-left: 1px solid #ddc39b; text-align: center; }
.class-slots > strong { color: var(--wine); font-size: 38px; line-height: 1; }
.class-slots > span { margin: 5px 0 10px; color: #725b45; font-size: 13px; }
.class-slots a {
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--wine);
  color: #fff7e8;
  text-decoration: none;
  font-weight: 800;
}
.recruitment-empty { padding: 28px; border: 1px dashed #caaa78; border-radius: 14px; color: #78634e; text-align: center; background: rgba(255,250,240,.7); }
.why-section { margin-top: 42px; padding-top: 34px; border-top: 1px solid #d4ad79; }
.why-section > h2 { margin: 0 0 24px; color: var(--wine); text-align: center; font-size: 26px; letter-spacing: .06em; }
.why-section > h2 span { display: inline-block; padding: 7px 15px; background: var(--wine); color: #fff2d6; border-radius: 4px 15px 4px 15px; }
.why-grid { display: grid; grid-template-columns: repeat(5,1fr); }
.why-grid article { padding: 12px 16px; border-right: 1px solid #d9bf99; text-align: center; }
.why-grid article:last-child { border-right: 0; }
.why-grid b { display: block; margin-bottom: 10px; font-size: 30px; filter: grayscale(1) sepia(1) saturate(4) hue-rotate(330deg); }
.why-grid strong { display: block; color: #4a3425; font-size: 15px; }
.why-grid p { margin: 5px 0 0; color: #7b6855; font-size: 12px; line-height: 1.4; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 14px; margin-top: 30px; }
.contact-grid article { display: flex; align-items: center; gap: 17px; padding: 22px; border: 1px solid #d2ae7b; border-radius: 15px; background: rgba(255,250,240,.9); }
.contact-grid article > span { color: var(--wine); font-size: 34px; }
.contact-grid small { display: block; margin-bottom: 7px; color: var(--wine); font-weight: 800; letter-spacing: .12em; }
.contact-grid strong { color: #4c3524; font-size: 18px; line-height: 1.5; }
.contact-grid a { color: var(--wine); font-size: 25px; text-decoration: none; }
.contact-grid p { margin: 5px 0 0; color: #76624f; font-size: 12px; }

@media (max-width: 800px) {
  .site-shell .topbar { width: calc(100% - 18px); min-height: 82px; padding: 10px 12px; }
  .viet-lo-brand .brand-mark { width: 50px; height: 50px; border-radius: 15px; font-size: 27px; outline-offset: 2px; }
  .brand-hanzi { font-size: 17px; }
  .viet-lo-brand strong { font-size: 15px; letter-spacing: .06em; }
  .site-shell .topbar-actions { gap: 5px; }
  .site-shell .placement-link, .site-shell .data-button { min-height: 38px; padding: 0 9px; font-size: 11px; }
  .site-shell .topbar .placement-link { width: 38px; padding: 0; font-size: 0; }
  .site-shell .topbar .placement-link::before { content: "◎"; font-size: 17px; }
  .recruitment-aside {
    width: 100%;
    max-height: none;
    padding: 24px 14px 16px;
    border-radius: 20px;
  }
  .recruitment-list-compact { max-height: 460px; }
  .recruitment-section { width: calc(100% - 18px); padding: 30px 14px; border-radius: 20px; }
  .ornament-title { gap: 11px; }
  .ornament-title > span { width: 51px; height: 51px; font-size: 19px; }
  .ornament-title h2 { font-size: 36px; }
  .ornament-title p { font-size: 12px; }
  .recruitment-card { grid-template-columns: 62px 1fr; gap: 13px; padding: 15px 12px; }
  .class-number { width: 57px; height: 57px; font-size: 25px; }
  .class-copy h3 { font-size: 21px; }
  .class-slots { grid-column: 1/-1; flex-direction: row; justify-content: center; gap: 10px; padding: 12px 0 0; border-left: 0; border-top: 1px solid #ddc39b; }
  .class-slots > strong { font-size: 28px; }
  .class-slots > span { margin: 0; }
  .why-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .why-grid article { border: 1px solid #e0c7a3; border-radius: 12px; }
  .why-grid article:last-child { grid-column: 1/-1; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-grid article { padding: 17px; }
  .contact-grid a { font-size: 21px; }
}

@media (min-width: 901px) and (max-width: 1160px) {
  .site-shell .hero {
    width: min(940px, calc(100% - 28px));
    grid-template-columns: .85fr 1.15fr;
  }
  .site-shell .recruitment-aside {
    grid-column: 1 / -1;
    width: 100%;
    max-height: none;
  }
  .site-shell .recruitment-list-compact {
    max-height: none;
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

/* V36 final: ưu tiên bố cục ba cột trên máy tính */
@media (min-width: 1161px) {
  .site-shell .hero {
    width: min(1500px, calc(100% - 24px));
    grid-template-columns: minmax(250px,.68fr) minmax(380px,.92fr) minmax(420px,1.15fr);
    align-items: stretch;
    gap: 22px;
  }
  .site-shell .hero-copy {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }
  .site-shell .setup-card {
    grid-column: 2;
    grid-row: 1;
    height: min(680px, calc(100vh - 165px));
    min-height: 590px;
    padding: 30px 28px;
    overflow-y: auto;
  }
  .site-shell .recruitment-aside {
    grid-column: 3;
    grid-row: 1;
    width: 100%;
    height: min(680px, calc(100vh - 165px));
    min-height: 590px;
  }
  .site-shell .recruitment-list-compact {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 7px;
  }
  .site-shell .recruitment-list-compact .recruitment-card {
    grid-template-columns: 62px minmax(0,1fr) 108px;
    gap: 13px;
    padding: 16px 14px;
  }
  .site-shell .recruitment-list-compact .class-number {
    width: 57px;
    height: 57px;
    font-size: 23px;
  }
  .site-shell .recruitment-list-compact .class-copy h3 { font-size: 22px; }
  .site-shell .recruitment-list-compact .class-copy p { font-size: 14px; }
  .site-shell .recruitment-list-compact .class-meta { font-size: 12px; }
  .site-shell .recruitment-list-compact .class-slots { padding-left: 12px; }
  .site-shell .recruitment-list-compact .class-slots > strong { font-size: 27px; }
  .site-shell .recruitment-list-compact .class-slots a {
    padding: 7px 12px;
    font-size: 13px;
  }
}

/* V36: Tuyển sinh nằm cạnh bảng test; danh sách lớp cuộn trong khối lớn */
@media (min-width: 1161px) {
  .site-shell .hero {
    width: min(1500px, calc(100% - 24px));
    grid-template-columns:
      minmax(250px,.68fr)
      minmax(380px,.92fr)
      minmax(420px,1.15fr);
    align-items: stretch;
    gap: 22px;
  }
  .site-shell .hero-copy {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }
  .site-shell .setup-card {
    grid-column: 2;
    grid-row: 1;
    height: min(680px, calc(100vh - 165px));
    min-height: 590px;
    padding: 30px 28px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #b58a48 transparent;
  }
  .site-shell .recruitment-aside {
    grid-column: 3;
    grid-row: 1;
    height: min(680px, calc(100vh - 165px));
    min-height: 590px;
  }
  .site-shell .recruitment-list-compact {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 7px;
    scrollbar-width: thin;
    scrollbar-color: #b58a48 transparent;
  }
  .site-shell .recruitment-list-compact .recruitment-card {
    grid-template-columns: 62px minmax(0,1fr) 108px;
    gap: 13px;
    padding: 16px 14px;
  }
  .site-shell .recruitment-list-compact .class-number {
    width: 57px;
    height: 57px;
    font-size: 23px;
  }
  .site-shell .recruitment-list-compact .class-copy h3 { font-size: 22px; }
  .site-shell .recruitment-list-compact .class-copy p { font-size: 14px; }
  .site-shell .recruitment-list-compact .class-meta { font-size: 12px; }
  .site-shell .recruitment-list-compact .class-slots {
    padding-left: 12px;
  }
  .site-shell .recruitment-list-compact .class-slots > strong { font-size: 27px; }
  .site-shell .recruitment-list-compact .class-slots a {
    padding: 7px 12px;
    font-size: 13px;
  }
  .site-shell .aside-contact-box {
    flex: 0 0 auto;
  }
}

@media (max-width: 900px) {
  .site-shell .hero {
    width: calc(100% - 24px);
    grid-template-columns: 1fr;
  }
  .site-shell .recruitment-aside { grid-column: auto; }
}

/* V32: Cỡ chữ trang chủ cân đối, dễ đọc hơn */
.site-shell .brand small { font-size: 14px; }
.site-shell .placement-link,
.site-shell .data-button { font-size: 16px; }
.site-shell .eyebrow,
.site-shell .step-label { font-size: 14px; }
.site-shell .hero-copy h1 { font-size: clamp(58px, 5.8vw, 88px); }
.site-shell .hero-copy > p { font-size: 19px; line-height: 1.75; }
.site-shell .hero-stats strong { font-size: 30px; }
.site-shell .hero-stats span { font-size: 14px; }
.site-shell .card-heading h2 { font-size: 31px; line-height: 1.2; }
.site-shell .field label { font-size: 15px; }
.site-shell select,
.site-shell input { font-size: 16px; }
.site-shell .segmented button { font-size: 16px; }
.site-shell .set-note p { font-size: 14px; }
.site-shell .primary-button { font-size: 17px; }
.site-shell .placement-button strong { font-size: 17px; }
.site-shell .placement-button span { font-size: 14px; }
.site-shell .aside-recruitment-title small { font-size: 11px; }
.site-shell .aside-recruitment-title h2 { font-size: 32px; }
.site-shell .aside-recruitment-title p { font-size: 13px; }
.site-shell .recruitment-list-compact .class-copy > span { font-size: 11px; }
.site-shell .recruitment-list-compact .class-copy h3 { font-size: 21px; }
.site-shell .recruitment-list-compact .class-copy p { font-size: 13px; line-height: 1.45; }
.site-shell .recruitment-list-compact .class-meta { font-size: 12px; line-height: 1.4; }
.site-shell .recruitment-list-compact .class-slots > span { font-size: 12px; }
.site-shell .recruitment-list-compact .class-slots a { font-size: 13px; }
.site-shell .aside-contact-box small { font-size: 10px; }
.site-shell .aside-contact-box strong { font-size: 13px; }
.site-shell .aside-contact-link strong { font-size: 17px; }
.site-shell .why-section > h2 { font-size: 29px; }
.site-shell .why-grid strong { font-size: 17px; }
.site-shell .why-grid p { font-size: 14px; }
.site-shell .contact-grid small { font-size: 14px; }
.site-shell .contact-grid strong { font-size: 20px; }
.site-shell .contact-grid p { font-size: 14px; }
.site-shell .home-footer { font-size: 14px; }

@media (max-width: 800px) {
  .site-shell .brand small { font-size: 12px; }
  .site-shell .hero-copy h1 { font-size: 52px; }
  .site-shell .hero-copy > p { font-size: 17px; }
  .site-shell .hero-stats span { font-size: 12px; }
  .site-shell .card-heading h2 { font-size: 27px; }
  .site-shell .field label { font-size: 15px; }
  .site-shell select,
  .site-shell input,
  .site-shell .segmented button { font-size: 16px; }
  .site-shell .recruitment-list-compact .class-copy h3 { font-size: 22px; }
  .site-shell .recruitment-list-compact .class-copy p { font-size: 14px; }
  .site-shell .recruitment-list-compact .class-meta { font-size: 13px; }
}

/* V35: Khung tuyển sinh rộng bằng ô bài test, không cuộn nội dung bên trong */
@media (min-width: 1161px) {
  .site-shell .hero {
    grid-template-columns: minmax(300px,.82fr) minmax(520px,1.18fr);
    align-items: start;
  }
  .site-shell .hero-copy {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
  }
  .site-shell .setup-card {
    grid-column: 2;
    grid-row: 1;
  }
  .site-shell .recruitment-aside {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
  }
}

.site-shell .recruitment-aside {
  align-self: start;
  max-height: none;
  padding: 28px 26px 24px;
}
.site-shell .recruitment-list-compact {
  flex: none;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}
.site-shell .recruitment-list-compact .recruitment-card {
  grid-template-columns: 70px minmax(0,1fr) 125px;
  gap: 16px;
  padding: 18px 16px;
  border-radius: 16px;
}
.site-shell .recruitment-list-compact .class-number {
  width: 62px;
  height: 62px;
  font-size: 25px;
}
.site-shell .recruitment-list-compact .class-copy > span { font-size: 12px; }
.site-shell .recruitment-list-compact .class-copy h3 { font-size: 24px; }
.site-shell .recruitment-list-compact .class-copy p {
  margin-top: 5px;
  font-size: 15px;
  line-height: 1.55;
}
.site-shell .recruitment-list-compact .class-meta {
  gap: 6px 14px;
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.45;
}
.site-shell .recruitment-list-compact .class-slots {
  grid-column: 3;
  grid-row: 1;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 4px 0 4px 15px;
  border-top: 0;
  border-left: 1px solid #ddc39b;
}
.site-shell .recruitment-list-compact .class-slots > strong { font-size: 29px; }
.site-shell .recruitment-list-compact .class-slots > span { font-size: 12px; }
.site-shell .recruitment-list-compact .class-slots a {
  margin-top: 5px;
  padding: 8px 15px;
  font-size: 14px;
}

@media (min-width: 901px) and (max-width: 1160px) {
  .site-shell .recruitment-list-compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .site-shell .recruitment-aside { padding: 23px 14px 16px; }
  .site-shell .recruitment-list-compact .recruitment-card {
    grid-template-columns: 58px minmax(0,1fr);
    gap: 12px;
    padding: 15px 12px;
  }
  .site-shell .recruitment-list-compact .class-number {
    width: 54px;
    height: 54px;
    font-size: 23px;
  }
  .site-shell .recruitment-list-compact .class-copy h3 { font-size: 22px; }
  .site-shell .recruitment-list-compact .class-copy p { font-size: 14px; }
  .site-shell .recruitment-list-compact .class-meta { font-size: 12px; }
  .site-shell .recruitment-list-compact .class-slots {
    grid-column: 1 / -1;
    grid-row: auto;
    height: auto;
    flex-direction: row;
    justify-content: flex-end;
    padding: 10px 0 0;
    border-top: 1px solid #ddc39b;
    border-left: 0;
  }
}

/* V36 desktop override — phải nằm cuối tệp để thay thế bố cục V35 */
@media (min-width: 1161px) {
  .site-shell .hero {
    width: min(1500px, calc(100% - 24px));
    grid-template-columns: minmax(250px,.68fr) minmax(380px,.92fr) minmax(420px,1.15fr);
    align-items: stretch;
    gap: 22px;
  }
  .site-shell .hero-copy {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }
  .site-shell .setup-card {
    grid-column: 2;
    grid-row: 1;
    height: min(680px, calc(100vh - 165px));
    min-height: 590px;
    padding: 30px 28px;
    overflow-y: auto;
  }
  .site-shell .recruitment-aside {
    grid-column: 3;
    grid-row: 1;
    width: 100%;
    height: min(680px, calc(100vh - 165px));
    min-height: 590px;
  }
  .site-shell .recruitment-list-compact {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 7px;
  }
  .site-shell .recruitment-list-compact .recruitment-card {
    grid-template-columns: 62px minmax(0,1fr) 108px;
    gap: 13px;
    padding: 16px 14px;
  }
  .site-shell .recruitment-list-compact .class-number {
    width: 57px;
    height: 57px;
    font-size: 23px;
  }
  .site-shell .recruitment-list-compact .class-copy h3 { font-size: 22px; }
  .site-shell .recruitment-list-compact .class-copy p { font-size: 14px; }
  .site-shell .recruitment-list-compact .class-meta { font-size: 12px; }
  .site-shell .recruitment-list-compact .class-slots { padding-left: 12px; }
  .site-shell .recruitment-list-compact .class-slots > strong { font-size: 27px; }
  .site-shell .recruitment-list-compact .class-slots a {
    padding: 7px 12px;
    font-size: 13px;
  }
}

/* V37: Thu nhỏ tiêu đề cột giới thiệu để cân đối với bố cục ba cột */
@media (min-width: 1161px) {
  .site-shell .hero-copy h1 {
    font-size: clamp(46px, 3.7vw, 58px);
    line-height: 1.02;
  }
  .site-shell .hero-copy > p {
    font-size: 16px;
    line-height: 1.65;
  }
}

/* V38: Hướng dẫn học viên và bước nhập tên trước khi bắt đầu */
.student-guide {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #d8bc8a;
  border-radius: 13px;
  background: rgba(255,252,243,.82);
}
.student-guide summary {
  color: var(--wine);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.student-guide div { margin-top: 10px; }
.student-guide p { margin: 7px 0; color: #665749; font-size: 13px; line-height: 1.5; }
.student-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 18px;
}
.student-gate-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(43,28,18,.68);
  backdrop-filter: blur(5px);
}
.student-gate-card {
  position: relative;
  width: min(480px,100%);
  padding: 30px;
  border: 1px solid #d1ab73;
  border-radius: 22px;
  background: #fffaf0;
  box-shadow: 0 30px 90px rgba(65,37,19,.35);
}
.student-gate-card h2 {
  margin: 8px 0;
  color: #35291f;
  font-family: "Times New Roman",Times,serif;
  font-size: 29px;
}
.student-gate-card > p { margin: 0 0 20px; color: #786650; }
.student-gate-card label { display: block; margin: 13px 0 7px; color: #4d4034; font-weight: 800; }
.student-gate-card label b { color: var(--wine); }
.student-gate-card input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #d8c6a9;
  border-radius: 12px;
  background: #fffefa;
  font-size: 16px;
}
.student-gate-card .primary-button { width: 100%; margin-top: 20px; }
.student-gate-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f1e4d0;
  color: var(--wine);
  font-size: 24px;
  cursor: pointer;
}
.modal-open { overflow: hidden; }

@media (max-width: 600px) {
  .question-topline { grid-template-columns: 1fr auto; }
  .question-source-id { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .student-gate-card { padding: 25px 18px 20px; }
  .student-gate-card h2 { font-size: 25px; }
}
