/* Nền tảng cho DOM mới; không phải bản vá tự động.
   Chỉ nạp ở index.html. KHÔNG thêm .th-* vào #login hoặc trang de/*.html. */
:where(.th-header,.th-home,.th-footer,.th-chooser) {
  --th-green:#246b24; --th-dark:#155a20; --th-ink:#17231b;
  --th-muted:#526158; --th-line:#dde6dc; --th-mint:#eef7e8;
  color:var(--th-ink); font-family:"Nunito",system-ui,sans-serif;
  line-height:1.55;
}
:where(.th-header,.th-home,.th-footer,.th-chooser),
:where(.th-header,.th-home,.th-footer,.th-chooser) *,
:where(.th-header,.th-home,.th-footer,.th-chooser) *::before,
:where(.th-header,.th-home,.th-footer,.th-chooser) *::after {box-sizing:border-box}
:where(.th-header,.th-home,.th-footer,.th-chooser) :is(button,a):focus-visible {
  outline:3px solid #246b24; outline-offset:4px;
}
:where(.th-header,.th-home,.th-footer,.th-chooser) :is(img,svg) {max-width:100%}
.th-container {width:100%;max-width:1200px;margin-inline:auto;
  padding-inline:max(16px,env(safe-area-inset-left,0px)) max(16px,env(safe-area-inset-right,0px))}
.th-home.scene {background:#fff}
.th-header .th-header-inner {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;padding-block:16px}
.th-header .brand {min-width:0;flex:1 1 280px}
.th-header .brand-logo {width:48px;height:48px;flex:none;object-fit:contain}
.th-header .brand-name {font-family:inherit;font-size:clamp(16px,2vw,22px);line-height:1.2;white-space:normal;overflow-wrap:anywhere;min-width:0}
.th-header .th-nav {display:flex;flex-wrap:wrap;align-items:center;gap:12px;min-width:0}
.th-header .th-nav a {display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;text-decoration:none}
.th-home .th-hero {display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:32px;align-items:center;padding-block:40px}
.th-home .th-hero > * {min-width:0}
.th-home .th-hero h1 {font-size:clamp(32px,4.3vw,58px);font-weight:800;line-height:1.13;margin:0 0 20px;text-wrap:balance}
.th-home .th-hero p {font-size:18px;margin:0 0 24px}
.th-home .th-hero-media {position:relative;min-width:0;background:url("backgrounds/hero-halo.svg") center/contain no-repeat}
.th-home .th-hero-photo {display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;object-position:50% 40%;border-radius:32px 32px 16px 32px}
:where(.th-home,.th-footer,.th-chooser) .th-actions {display:flex;flex-wrap:wrap;align-items:center;gap:12px}
:where(.th-home,.th-footer,.th-chooser) .th-btn {display:inline-flex;justify-content:center;align-items:center;gap:10px;min-height:44px;max-width:100%;padding:12px 20px;border:1px solid var(--th-green);border-radius:12px;background:var(--th-green);color:#fff;font:inherit;font-weight:800;text-decoration:none;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
:where(.th-home,.th-footer,.th-chooser) .th-btn-secondary {background:#fff;color:var(--th-green)}
:where(.th-home,.th-footer,.th-chooser) .th-btn:disabled {background:#eef0ed;color:#526158;border-color:#d9dfd7;cursor:not-allowed}
:where(.th-header,.th-home,.th-footer,.th-chooser) .th-icon {width:24px;height:24px;flex:none;display:inline-block;color:inherit}
.th-home .th-benefits {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;background:var(--th-dark);color:white;border-radius:12px;padding:16px 8px;margin:0;list-style:none}
.th-home .th-benefits li {display:flex;align-items:center;justify-content:center;gap:12px;min-width:0;padding:8px 16px;font-weight:800}
.th-home .th-benefits li+li {border-left:1px solid #ffffff66}
.th-home .th-levels {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px;padding-block:16px 32px}
.th-home .th-level {min-width:0;padding:16px 12px;border:1px solid var(--th-line);border-radius:16px;background:#fff;color:var(--th-green);text-align:center;overflow-wrap:anywhere}
.th-home .th-level button {width:100%;min-height:44px;white-space:normal}
.th-footer .th-contact-layout {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding-block:24px}
.th-footer .th-consult {display:flex;flex-wrap:wrap;align-items:center;gap:16px;padding:20px 24px;border-radius:16px;background:#155a20 url("backgrounds/consult-strip.svg") center/cover no-repeat;color:#fff;min-width:0}
.th-footer .th-consult p {flex:1 1 260px;margin:0;font-weight:800;min-width:0}
.th-footer .th-consult a {color:#fff;min-height:44px;display:inline-flex;align-items:center;white-space:normal}
.th-footer .th-social {display:flex;flex-wrap:wrap;gap:8px}
.th-chooser-overlay.sheet-bg {position:fixed;inset:0;z-index:80;display:flex;align-items:center;justify-content:center;padding:16px;background:rgb(10 30 15 / 50%)}
.th-chooser.sheet {width:100%;max-width:1200px;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;background:white;border-radius:24px;padding:24px;min-width:0}
.th-chooser .th-dialog-head {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px}
.th-chooser .th-dialog-head > * {min-width:0}
.th-chooser .th-close {min-width:44px;min-height:44px;background:#fff;color:var(--th-green);border:1px solid var(--th-line);border-radius:10px}
.th-chooser .th-level-switch {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;width:100%}
.th-chooser .th-level-switch button {min-width:0;min-height:44px;white-space:normal;padding:8px;overflow-wrap:anywhere}
.th-chooser .th-resume {display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:24px;padding:24px;margin-block:24px;background:#eef7e8 url("backgrounds/resume-panel.svg") center/cover no-repeat;border-radius:20px}
.th-chooser .th-resume > * {min-width:0}
.th-chooser .th-resume h3 {margin:0 0 8px}
.th-chooser .th-resume progress {display:block;width:100%;height:12px;accent-color:var(--th-green)}
.th-chooser .th-filters {display:flex;flex-wrap:wrap;gap:12px;margin-block:24px}
.th-chooser .th-exam-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;list-style:none;padding:0;margin:0}
.th-chooser .th-exam-card {min-width:0;display:flex;flex-direction:column;gap:16px;border:1px solid var(--th-line);border-radius:18px;padding:24px;background:#fff url("backgrounds/card-wave.svg") right bottom/100% 100px no-repeat;overflow-wrap:anywhere}
.th-chooser .th-exam-card h3 {font:800 28px/1.2 "Nunito",system-ui,sans-serif;margin:0;color:var(--th-green)}
.th-chooser .th-exam-card p {margin:0;color:var(--th-muted)}
.th-chooser .th-exam-card .th-btn {margin-top:auto}
:where(.th-home,.th-footer,.th-chooser) [hidden] {display:none!important}
@media (max-width:1023px) {
 .th-home .th-hero {grid-template-columns:minmax(0,1fr)}
 .th-home .th-hero-media {max-width:680px;width:100%;margin-inline:auto}
 .th-home .th-levels {grid-template-columns:repeat(3,minmax(0,1fr))}
 .th-chooser .th-exam-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
 .th-footer .th-contact-layout {grid-template-columns:minmax(0,1fr)}
}
@media (max-width:767px) {
 .th-home .th-hero {gap:24px;padding-block:28px}
 .th-home .th-hero h1 {font-size:clamp(28px,6.8vw,40px)}
 .th-home .th-hero p {font-size:16px}
 .th-home .th-benefits {grid-template-columns:minmax(0,1fr)}
 .th-home .th-benefits li {justify-content:flex-start}
 .th-home .th-benefits li+li {border-left:0;border-top:1px solid #ffffff44}
 .th-chooser-overlay.sheet-bg {padding:8px}
 .th-chooser.sheet {padding:16px;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);border-radius:16px;padding-bottom:max(16px,env(safe-area-inset-bottom,0px))}
 .th-chooser .th-exam-grid {grid-template-columns:minmax(0,1fr)}
 .th-chooser .th-level-switch {grid-template-columns:repeat(3,minmax(0,1fr))}
 .th-chooser .th-resume {grid-template-columns:minmax(0,1fr);gap:12px;padding:20px}
 .th-chooser .th-resume > .th-btn {width:100%}
}
@media (max-width:479px) {
 .th-header .th-nav {width:100%;justify-content:space-between;gap:4px}
 .th-header .brand-logo {width:40px;height:40px}
 .th-home .th-levels,.th-chooser .th-level-switch {grid-template-columns:repeat(2,minmax(0,1fr))}
 .th-home .th-actions > .th-btn {width:100%}
 .th-footer .th-consult {padding:20px 16px}
 .th-footer .th-social > * {flex:1 1 120px}
}
@media (prefers-reduced-motion:reduce) {
 :where(.th-header,.th-home,.th-footer,.th-chooser) * {animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
