/*
 * The public site and the candidate's panel.
 * Layout: one 1180px column on a cool grey ground, white rounded panels,
 * teal for anything the candidate acts on.
 */
@font-face { font-family: Yekan; font-weight: 300; font-display: swap; src: url(/fonts/IRANYekanWebLight.woff2) format("woff2"); }
@font-face { font-family: Yekan; font-weight: 400; font-display: swap; src: url(/fonts/IRANYekanWebRegular.woff2) format("woff2"); }
@font-face { font-family: Yekan; font-weight: 500; font-display: swap; src: url(/fonts/IRANYekanWebMedium.woff2) format("woff2"); }
@font-face { font-family: Yekan; font-weight: 700; font-display: swap; src: url(/fonts/IRANYekanWebBold.woff2) format("woff2"); }
@font-face { font-family: Yekan; font-weight: 800; font-display: swap; src: url(/fonts/IRANYekanWebExtraBold.woff2) format("woff2"); }

:root {
    --teal: #13a983;
    --teal-dark: #0c8466;
    --teal-soft: #e1f5ef;
    --ink: #172033;
    --ink-2: #3b4559;
    --muted: #7d879a;
    --line: #e6eaf0;
    --ground: #f3f5f8;
    --panel: #ffffff;
    --red: #e04848;
    --red-soft: #fdeceb;
    --amber: #b7791f;
    --amber-soft: #fdf3dc;
    --blue: #2b6fd6;
    --blue-soft: #e6effd;
    --radius: 18px;
    --shadow: 0 1px 2px rgba(23, 32, 51, .04), 0 8px 24px rgba(23, 32, 51, .05);
    --font: Yekan, Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 15px/1.85 var(--font); }
body:not(.xm-body):not(.auth-body) { display: flex; flex-direction: column; min-height: 100vh; }
img { max-width: 100%; height: auto; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--teal); }
h1, h2, h3, h4 { line-height: 1.5; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(19, 169, 131, .45); outline-offset: 2px; border-radius: 6px; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; top: -40px; right: 16px; background: var(--teal); color: #fff; padding: 6px 12px; border-radius: 8px; z-index: 50; }
.skip-link:focus { top: 8px; color: #fff; }
.muted { color: var(--muted); }
.ltr { direction: ltr; unicode-bidi: plaintext; }
.num { font-variant-numeric: tabular-nums; }

/* ---- buttons, forms --------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 12px 22px; font-weight: 700; cursor: pointer; text-align: center; transition: background .15s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 8px 18px rgba(19, 169, 131, .25); }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-light { background: var(--ground); color: var(--ink); }
.btn-light:hover { background: #e9edf2; color: var(--ink); }
.btn-outline { background: transparent; color: var(--teal-dark); box-shadow: inset 0 0 0 2px var(--teal); }
.btn-danger { background: var(--red); color: #fff; }
.btn-block { width: 100%; }
.btn-white { background: #fff; color: var(--teal-dark); }
.btn-white:hover { background: #f1fbf8; color: var(--teal-dark); }
.btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-sm { padding: 8px 14px; border-radius: 10px; font-size: 13.5px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-weight: 500; font-size: 14px; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 11px 14px; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(19, 169, 131, .15); }
.field .hint { color: var(--muted); font-size: 12.5px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.choice { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.choice input { accent-color: var(--teal); width: 18px; height: 18px; }

/* ---- header ---------------------------------------------------------- */
.site-header { background: #fff; border-bottom: 1px dashed var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.site-header-row { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 18px; white-space: nowrap; flex: none; }
.brand:hover { color: var(--ink); }
.brand-logo { height: 34px; width: auto; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--teal); position: relative; flex: none; }
.brand-mark::after { content: ''; position: absolute; inset: 8px 9px 9px 8px; border: 3px solid #fff; border-top: 0; border-left: 0; transform: rotate(45deg) translate(-1px, -3px); width: 7px; height: 13px; inset: auto; top: 6px; right: 11px; }
.site-nav { min-width: 0; }
.site-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 8px 9px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: 14.5px; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--teal-dark); background: var(--teal-soft); }
.site-actions { margin-right: auto; display: flex; align-items: center; gap: 8px; flex: none; white-space: nowrap; }
.icon-btn, .account-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--ground); color: var(--ink); border-radius: 12px; padding: 9px 12px; position: relative; font-weight: 500; font-size: 14px; }
.icon-btn svg, .account-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .dot { position: absolute; top: -4px; left: -4px; background: var(--red); color: #fff; font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.account-btn span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.login-btn { background: var(--teal); color: #fff; border-radius: 12px; padding: 9px 16px; font-weight: 700; font-size: 14px; }
.login-btn:hover { background: var(--teal-dark); color: #fff; }
.nav-toggle { display: none; background: var(--ground); border: 0; border-radius: 10px; width: 42px; height: 42px; padding: 11px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; margin: 4px 0; }
/* below this a full menu no longer fits on one line: use the menu button */
@media (max-width: 1180px) {
    .site-header-row { gap: 12px; flex-wrap: wrap; }
    .nav-toggle { display: block; order: -1; }
    .site-nav { display: none; flex-basis: 100%; order: 5; padding-bottom: 12px; }
    .nav-open .site-nav { display: block; }
    .site-nav ul { flex-direction: column; }
    .account-btn span { display: none; }
}

/* ---- test-mode bar --------------------------------------------------- */
.debug-bar { display: flex; align-items: center; justify-content: center; gap: 8px; background: #b7791f; color: #fff; font-size: 13px; font-weight: 600; padding: 7px 16px; text-align: center; line-height: 1.6; }
.debug-bar span { width: 8px; height: 8px; border-radius: 50%; background: #fff; flex: none; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* ---- footer ---------------------------------------------------------- */
.site-main { flex: 1 0 auto; padding-block: 28px 64px; }
.site-footer { background: #fff; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; padding-block: 40px 32px; }
.footer-col-wide ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.footer-brand p { color: var(--muted); font-size: 13.5px; margin: 14px 0 12px; max-width: 42ch; }
.footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-contact li { display: flex; align-items: center; gap: 8px; }
.footer-contact svg, .socials svg, .link-more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.footer-contact svg { color: var(--teal); }
.footer-contact a { color: var(--ink); font-weight: 600; }
.footer-col h2 { font-size: 15px; font-weight: 800; margin-bottom: 14px; color: var(--ink); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-col a { color: var(--ink-2); }
.footer-col a:hover { color: var(--teal-dark); }
.footer-col p { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }
.footer-seal { margin-top: 16px; }
.newsletter { display: flex; background: var(--ground); border-radius: 14px; padding: 5px; }
.newsletter input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 12px; }
.newsletter input:focus { outline: 0; }
.newsletter button { border: 0; background: var(--teal); color: #fff; border-radius: 10px; padding: 8px 18px; font-weight: 700; cursor: pointer; }
.newsletter button:hover { background: var(--teal-dark); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-block: 16px; color: var(--muted); font-size: 13px; }
.socials { display: flex; gap: 8px; }
.socials a { width: 36px; height: 36px; border-radius: 10px; background: var(--ground); color: var(--ink-2); display: grid; place-items: center; }
.socials a:hover { background: var(--teal-soft); color: var(--teal-dark); }
@media (max-width: 960px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-block: 30px 24px; } }

/* ---- toasts ---------------------------------------------------------- */
.toast { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 24px; z-index: 60; display: flex; align-items: center; gap: 14px; max-width: min(440px, calc(100vw - 48px)); padding: 12px 16px; border-radius: 14px; color: #fff; box-shadow: var(--shadow); animation: toast-in .25s ease-out; }
.toast-ok { background: var(--teal); }
.toast-error { background: var(--red); }
.toast button { background: none; border: 0; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } .btn { transition: none; } }

/* ---- panels and sections --------------------------------------------- */
.panel { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; }
.section-title::before { content: ''; width: 4px; height: 20px; border-radius: 2px; background: var(--teal); }
.page-title { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.page-lede { color: var(--muted); margin-bottom: 22px; max-width: 70ch; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.result-count { color: var(--muted); font-size: 13.5px; margin: -6px 0 12px; }
.result-count b { color: var(--ink); }
/* breadcrumbs */
.crumbs ol { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; color: var(--muted); }
.crumbs li { display: flex; align-items: center; gap: 4px; }
.crumbs li + li::before { content: '‹'; color: #b6bfcc; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--teal-dark); }
.crumbs [aria-current] { color: var(--ink-2); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- home ------------------------------------------------------------ */
.hero { position: relative; border-radius: 24px; overflow: hidden; background: var(--teal); color: #fff; }
.hero-slide { display: none; }
.hero-slide.is-active { display: block; }
.hero-slide img { display: block; width: 100%; aspect-ratio: 1180 / 300; object-fit: cover; }
.hero-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.hero-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .5); padding: 0; cursor: pointer; }
.hero-dots button[aria-current="true"] { background: #fff; width: 22px; border-radius: 5px; }
.hero-text { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 24px; padding: 40px 48px; background: linear-gradient(135deg, #13a983, #0f8f70); }
.hero-text h1 { font-size: clamp(22px, 3.4vw, 34px); font-weight: 800; }
.hero-text p { opacity: .92; margin: 10px 0 20px; }
.hero-eyebrow { display: inline-block; background: rgba(255, 255, 255, .16); border-radius: 999px; padding: 2px 12px; font-size: 13px; font-weight: 600; margin: 0 0 12px !important; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-stats { list-style: none; margin: 0; padding: 0 48px 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; background: linear-gradient(135deg, #13a983, #0f8f70); }
.hero-stats li { background: rgba(255, 255, 255, .12); border-radius: 16px; padding: 12px 16px; }
.hero-stats b { display: block; font-size: 24px; font-weight: 800; line-height: 1.5; }
.hero-stats span { font-size: 13px; opacity: .9; }
.hero-art { justify-self: center; width: min(260px, 100%); }
@media (max-width: 760px) { .hero-text { grid-template-columns: minmax(0, 1fr); padding: 28px 22px; } .hero-art { display: none; } .hero-stats { padding: 0 22px 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero-stats b { font-size: 20px; } }

.rail-nav { display: flex; gap: 6px; }
.rail-nav button { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--teal); color: #fff; cursor: pointer; font-size: 16px; }
.rail-nav button:disabled { background: #cfd6df; cursor: default; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 250px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }

.xcard { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 18px 16px; color: var(--ink); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.xcard::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--teal); }
.xcard-upcoming::before { background: var(--blue); }
.xcard-finished::before { background: #c6ced8; }
.xcard:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 1px 2px rgba(23, 32, 51, .05), 0 16px 34px rgba(23, 32, 51, .1); }
.xcard-cover { margin: -18px -18px 4px; aspect-ratio: 16 / 9; background: var(--teal-soft); }
.xcard-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xcard-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.xcard-title { font-size: 15.5px; font-weight: 800; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.5em; }
.xcard-facts { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.xcard-facts > span { display: flex; align-items: center; gap: 8px; }
.xcard-facts svg, .xcard-cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.xcard-facts svg { color: #9aa4b5; }
.xcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); }
.xcard-price { font-weight: 800; font-size: 15px; white-space: nowrap; }
.xcard-price.is-free { color: var(--teal-dark); }
.xcard-price del { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 4px; }
.xcard-cta { display: inline-flex; align-items: center; gap: 2px; color: var(--teal-dark); font-weight: 700; font-size: 13.5px; background: var(--teal-soft); border-radius: 10px; padding: 5px 10px 5px 8px; white-space: nowrap; transition: background .15s, color .15s; }
.xcard:hover .xcard-cta { background: var(--teal); color: #fff; }
.xcard-finished .xcard-cta { background: var(--ground); color: var(--ink-2); }
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 8px; padding: 1px 9px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip-running { background: var(--teal-soft); color: var(--teal-dark); }
.chip-upcoming { background: var(--blue-soft); color: var(--blue); }
.chip-finished { background: var(--red-soft); color: var(--red); }
.chip-muted { background: var(--ground); color: var(--muted); }
.chip-mine { background: #effaf6; color: var(--teal-dark); box-shadow: inset 0 0 0 1px #bfe8da; }
.chip-warn { background: var(--amber-soft); color: var(--amber); }

.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feature { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 18px; text-align: center; }
.feature-icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--teal-soft); display: grid; place-items: center; }
.feature-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 15.5px; font-weight: 800; margin-bottom: 8px; }
.feature ul { list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: 13px; line-height: 2.1; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .features { grid-template-columns: minmax(0, 1fr); } }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { background: var(--panel); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); counter-increment: step; position: relative; padding-top: 52px; }
.step::before { content: counter(step); position: absolute; top: 18px; right: 22px; width: 26px; height: 26px; border-radius: 8px; background: var(--teal); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.step h3 { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.step p { color: var(--muted); margin: 0; font-size: 13.5px; }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.faq-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 32px; align-items: start; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.faq-section .section-title { margin-bottom: 8px; }
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; transition: background .15s; }
.faq details[open] { background: #fafbfc; }
.faq summary { cursor: pointer; font-weight: 700; padding: 10px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--teal); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--ink-2); font-size: 14px; margin: 0 0 12px; }
.cta-band { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; background: linear-gradient(135deg, var(--ink), #24344f); color: #fff; border-radius: 24px; padding: 30px 36px; }
.cta-band h2 { font-size: 21px; font-weight: 800; margin-bottom: 4px; }
.cta-band p { margin: 0; opacity: .8; }
@media (max-width: 760px) { .faq-section { grid-template-columns: minmax(0, 1fr); padding: 22px 18px; gap: 18px; } .cta-band { padding: 24px 22px; } }

/* ---- exam list ------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 20px; }
.filters .field { min-width: 180px; flex: 1; }
.filters .search { flex: 3; }
.exam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }

/* ---- inner page header (exam page) ---------------------------------- */
.page-head { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 28px; margin-bottom: 22px; position: relative; overflow: hidden; }
.page-head h1 { font-size: clamp(20px, 2.6vw, 26px); font-weight: 800; margin: 8px 0 14px; }
.page-head-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.page-head-facts { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 0; }
.page-head-facts li { padding-inline: 22px; border-inline-start: 1px solid var(--line); }
.page-head-facts li:first-child { padding-inline-start: 0; border: 0; }
.page-head-facts span { display: block; font-size: 12.5px; color: var(--muted); }
.page-head-facts b { font-size: 15px; font-weight: 800; }
@media (max-width: 640px) { .page-head { padding: 18px; } .page-head-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .page-head-facts li { padding: 0; border: 0; } }

.exam-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.buy-box .price-row { margin: 0 0 14px; }
.price-row .price.is-free { color: var(--teal-dark); }
.countdown { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; }
.countdown-label { font-size: 13px; opacity: .78; }
.countdown-value { font-weight: 800; font-size: 16px; direction: rtl; }
.hint-center { text-align: center; color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; padding-inline: 4px; }
.share-row .btn-light { background: #fff; box-shadow: var(--shadow); }
.share-row .btn-light:hover { background: var(--teal-soft); color: var(--teal-dark); }
.rules-list { margin: 0; padding-inline-start: 20px; line-height: 2.1; }
.rules-list li::marker { color: var(--teal); }
.share { display: block; width: 120px; max-width: 100%; height: 8px; border-radius: 4px; background: var(--ground); overflow: hidden; }
.share i { display: block; height: 100%; background: var(--teal); border-radius: inherit; }

/* ---- exam page ------------------------------------------------------- */
.exam-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 22px; align-items: start; }
.exam-layout .panel h1 { font-size: 20px; font-weight: 800; margin-bottom: 18px; }
.rich { line-height: 2.1; overflow-wrap: anywhere; }
.rich table { border-collapse: collapse; max-width: 100%; }
.rich td, .rich th { border: 1px solid var(--line); padding: 6px 10px; }
.rich figure { margin: 0; overflow-x: auto; }
.exam-aside { position: sticky; top: 96px; display: grid; gap: 16px; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; }
.facts li span:first-child { color: var(--muted); }
.facts li b { font-weight: 700; text-align: left; }
.facts-sep { border-top: 1px solid var(--line); margin: 10px 0 6px; }
.price-row { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 16px; }
.price-row .price { font-size: 18px; font-weight: 800; }
.price-row del { color: var(--muted); margin-left: 8px; font-size: 13px; }
.notice { border-radius: 12px; padding: 10px 14px; font-size: 13.5px; margin-top: 12px; }
.notice-info { background: var(--blue-soft); color: #234d8f; }
.notice-warn { background: var(--amber-soft); color: #7a5414; }
.notice-ok { background: var(--teal-soft); color: var(--teal-dark); }
.stars { color: #f5a623; letter-spacing: 1px; }
@media (max-width: 960px) { .exam-layout { grid-template-columns: minmax(0, 1fr); } .exam-aside { position: static; order: -1; } }

/* ---- questions in the report's answer key (the exam itself: exam.css)  */
.question { padding: 20px 0; margin: 0; min-width: 0; border: 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
legend.question-text { float: right; width: 100%; padding: 0; font-size: inherit; line-height: inherit; }
legend.question-text + * { clear: both; }
.question:last-child { border-bottom: 0; }
.question-text { display: flex; gap: 6px; font-weight: 700; margin-bottom: 14px; }
.question-text .rich { min-width: 0; }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; }
.answer { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 14px; cursor: pointer; transition: border-color .12s, background .12s; }
.answer:hover { border-color: #b9e3d6; }
.answer input { position: absolute; opacity: 0; pointer-events: none; }
.answer .box { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid #c3cbd6; display: grid; place-items: center; margin-top: 3px; }
.answer input:checked ~ .box { background: var(--teal); border-color: var(--teal); }
.answer input:checked ~ .box::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.answer:has(input:checked) { border-color: var(--teal); background: #f2fbf8; }
.answer input:focus-visible ~ .box { outline: 3px solid rgba(19, 169, 131, .45); outline-offset: 2px; }
.answer .letter { color: var(--muted); font-size: 13px; }
.answer .rich { min-width: 0; }
@media (max-width: 640px) { .answers { grid-template-columns: 1fr; } }

.progress { color: var(--muted); font-size: 13.5px; }

dialog.confirm { border: 0; border-radius: 20px; padding: 26px; max-width: 420px; width: calc(100% - 32px); box-shadow: var(--shadow); }
dialog.confirm::backdrop { background: rgba(23, 32, 51, .45); }
dialog.confirm h2 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
dialog.confirm .actions { display: flex; gap: 10px; margin-top: 18px; }

/* ---- report card ----------------------------------------------------- */
.report { max-width: 980px; margin: 0 auto; }
.report-sheet { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.report-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 22px 26px; border-bottom: 2px solid var(--ink); }
.report-head .brand-mark { width: 44px; height: 44px; border-radius: 12px; }
.report-head h1 { font-size: 18px; font-weight: 800; }
.report-head .muted { font-size: 13px; }
.report-id { text-align: left; font-size: 12.5px; color: var(--muted); }
.report-person { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.report-person div { padding: 12px 18px; border-left: 1px solid var(--line); }
.report-person div:last-child { border-left: 0; }
.report-person span { display: block; color: var(--muted); font-size: 12px; }
.report-person b { font-size: 14.5px; }
.report-scores { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 18px 22px; background: #f7f9fb; border-bottom: 1px solid var(--line); }
.score-tile { background: #fff; border-radius: 14px; padding: 14px 16px; border: 1px solid var(--line); }
.score-tile span { color: var(--muted); font-size: 12.5px; display: block; }
.score-tile b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.score-tile.is-main { background: var(--teal); border-color: var(--teal); color: #fff; }
.score-tile.is-main span { color: rgba(255, 255, 255, .85); }
.report-body { padding: 18px 22px 24px; }
.report-table-wrap { overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; min-width: 640px; }
.report-table th { background: #f1f4f7; font-weight: 700; padding: 10px 8px; border: 1px solid var(--line); white-space: nowrap; }
.report-table td { padding: 9px 8px; border: 1px solid var(--line); text-align: center; }
.report-table td:first-child, .report-table th:first-child { text-align: right; }
.report-table tfoot td { font-weight: 800; background: #f7f9fb; }
.bar-cell { display: grid; grid-template-columns: 1fr 52px; align-items: center; gap: 8px; min-width: 130px; }
.bar { height: 8px; border-radius: 4px; background: var(--ground); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--teal); border-radius: 4px; }
.bar.is-negative i { background: var(--red); }
.report-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 18px; }
.report-box { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.report-box h2 { font-size: 14.5px; font-weight: 800; margin-bottom: 8px; }
.report-box ul { list-style: none; margin: 0; padding: 0; }
.report-box li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.report-box li:last-child { border-bottom: 0; }
.report-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.report-note { color: var(--muted); font-size: 12.5px; margin-top: 12px; }
.key-list .question { padding: 14px 0; }
.key-mark { font-size: 12px; font-weight: 700; border-radius: 8px; padding: 1px 8px; margin-right: 6px; }
.key-mark.ok { background: var(--teal-soft); color: var(--teal-dark); }
.key-mark.bad { background: var(--red-soft); color: var(--red); }
.key-mark.blank { background: var(--ground); color: var(--muted); }
.answer.is-key { border-color: var(--teal); background: #f2fbf8; }
.answer.is-wrong { border-color: #f3b4b4; background: #fff6f6; }
@media (max-width: 760px) {
    .report-head { grid-template-columns: auto 1fr; }
    .report-id { grid-column: 1 / -1; text-align: right; }
    .report-person, .report-scores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-person div:nth-child(2n) { border-left: 0; }
    .report-grid { grid-template-columns: minmax(0, 1fr); }
}
@media print {
    .site-header, .site-footer, .report-actions, .no-print, .toast { display: none !important; }
    body { background: #fff; }
    .site-main { padding: 0; }
    .report-sheet { box-shadow: none; border: 1px solid #ccc; }
}

/* ---- strategic plans ------------------------------------------------- */
.plans-table { width: 100%; border-collapse: collapse; }
.plans-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); }
.plans-table td:last-child { text-align: left; white-space: nowrap; }
.plan-category { font-size: 15.5px; font-weight: 800; margin: 22px 0 6px; }
.plan-category:first-child { margin-top: 0; }

/* ---- candidate panel ------------------------------------------------- */
.panel-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }
.panel-nav { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; position: sticky; top: 96px; }
.panel-user { display: flex; align-items: center; gap: 12px; padding: 6px 6px 14px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.panel-user .avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); display: grid; place-items: center; font-weight: 800; font-size: 18px; flex: none; }
.panel-user b { display: block; }
.panel-user span { color: var(--muted); font-size: 12.5px; }
.panel-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.panel-nav a, .panel-nav button { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); background: none; border: 0; text-align: right; cursor: pointer; font-size: 14.5px; }
.panel-nav a:hover, .panel-nav button:hover { background: var(--ground); color: var(--ink); }
.panel-nav a[aria-current="page"] { background: var(--teal-soft); color: var(--teal-dark); font-weight: 700; }
.panel-nav .count { background: var(--red); color: #fff; font-size: 11px; border-radius: 9px; padding: 0 7px; }
.panel-nav form { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--line); }
.panel-nav button { color: var(--red); }
@media (max-width: 900px) { .panel-layout { grid-template-columns: minmax(0, 1fr); } .panel-nav { position: static; } .panel-nav ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.stat span { color: var(--muted); font-size: 13px; display: block; }
.stat b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.list { display: grid; gap: 12px; }
.list-item { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: #fff; border-radius: 16px; padding: 12px; box-shadow: var(--shadow); }
.list-item img { width: 76px; height: 58px; object-fit: cover; border-radius: 10px; background: var(--teal-soft); }
.list-item h3 { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }
.list-item .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: 12.5px; align-items: center; }
@media (max-width: 560px) { .list-item { grid-template-columns: 60px minmax(0, 1fr); } .list-item img { width: 60px; height: 48px; } .list-item > .btn, .list-item > a.btn { grid-column: 1 / -1; } }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: right; color: var(--muted); font-weight: 500; font-size: 13px; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 7px 14px; border-radius: 10px; background: #fff; color: var(--ink-2); font-size: 14px; box-shadow: var(--shadow); }
.tabs a[aria-current="page"] { background: var(--ink); color: #fff; }

/* ---- auth ------------------------------------------------------------ */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 500px at 80% -10%, #d6f1e8, transparent), var(--ground); }
.auth-card { width: min(420px, 100%); background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 32px 28px; }
.auth-card .brand { margin-bottom: 20px; }
.auth-card h1 { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.auth-card .lede { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.otp { letter-spacing: 10px; text-align: center; font-size: 22px; font-weight: 800; direction: ltr; }
.auth-foot { margin-top: 16px; font-size: 12.5px; color: var(--muted); text-align: center; }

.xcard-article::before { display: none; }

/* report: the answer key opens on demand */
.key-summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.key-summary::-webkit-details-marker { display: none; }
.key-toggle { display: inline-flex; align-items: center; gap: 6px; background: var(--teal-soft); color: var(--teal-dark); font-weight: 700; font-size: 13.5px; border-radius: 10px; padding: 6px 12px; }
.key-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
details[open] > .key-summary .key-toggle svg { transform: rotate(180deg); }
details[open] > .key-summary { margin-bottom: 8px; }
.key-toggle .when-open, details[open] > .key-summary .when-closed { display: none; }
details[open] > .key-summary .when-open { display: inline; }

/* ---- phones ---------------------------------------------------------- */
@media (max-width: 900px) {
    /* the panel menu becomes a row of tabs that scrolls sideways */
    .panel-nav { padding: 10px; display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .panel-nav::-webkit-scrollbar { display: none; }
    .panel-user { display: none; }
    .panel-nav ul { display: flex !important; gap: 6px; flex: none; }
    .panel-nav li { flex: none; }
    .panel-nav a { white-space: nowrap; gap: 8px; padding: 8px 14px; background: var(--ground); }
    .panel-nav form { margin: 0; padding: 0; border: 0; flex: none; }
    .panel-nav button { white-space: nowrap; padding: 8px 14px; }
}
@media (max-width: 640px) {
    .panel { padding: 18px; }
    .page-title { font-size: 20px; }
    .section { margin-top: 28px; }
    .lessons-table th:nth-child(3), .lessons-table td:nth-child(3) { display: none; }
    /* tables marked .table-stack: one card per row */
    .table-stack thead { display: none; }
    .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
    .table-stack tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
    .table-stack tr:last-child { border-bottom: 0; }
    .table-stack td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; }
    .table-stack td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; text-align: right; flex: none; }
    .table-stack td:first-child { display: block; text-align: right; font-weight: 700; }
    .table-stack td:first-child::before { display: none; }
    /* a shorter footer */
    .footer-grid { gap: 22px; }
    .footer-col ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; gap: 8px 18px; }
    .footer-col h2 { margin-bottom: 10px; }
    .footer-bottom { justify-content: center; text-align: center; }
}

/* ---- courses ---------------------------------------------------------- */
.xcard-course::before { display: none; }
.xcard-cover { position: relative; }
.xcard-play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .15s; background: rgba(11, 18, 32, .25); }
.xcard-play svg { width: 46px; height: 46px; padding: 12px; border-radius: 50%; background: rgba(255, 255, 255, .92); fill: var(--teal-dark); }
.xcard:hover .xcard-play { opacity: 1; }
.xcard-teacher { color: var(--ink-2); font-size: 13px; margin-top: -4px; }
.xcard-facts-row { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.xcard-progress { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--teal-dark); font-weight: 700; }
.xcard-progress .bar, .row-progress .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--ground); overflow: hidden; }
.xcard-progress .bar i, .row-progress .bar i { display: block; height: 100%; background: var(--teal); border-radius: inherit; }

.course-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: center; background: linear-gradient(135deg, var(--ink), #24344f); color: #fff; border-radius: 24px; padding: 28px 32px; margin-bottom: 22px; }
.course-hero .crumbs a, .course-hero .crumbs ol { color: #aab6c8; }
.course-hero .crumbs [aria-current] { color: #dfe6f0; }
.course-hero h1 { font-size: clamp(22px, 3vw, 32px); font-weight: 800; margin: 10px 0 8px; }
.course-summary { color: #c9d3e1; margin: 0 0 14px; max-width: 60ch; }
.course-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: #dfe6f0; font-size: 14px; }
.course-facts li { display: flex; align-items: center; gap: 6px; }
.course-facts svg { width: 18px; height: 18px; fill: none; stroke: #3fd3a6; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.course-hero .chip-muted { background: rgba(255, 255, 255, .12); color: #dfe6f0; }
.course-hero-media { position: relative; display: block; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; background: #0b1220; }
.course-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; }
.course-hero-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--ink); font-weight: 700; font-size: 14px; border-radius: 999px; padding: 10px 18px 10px 14px; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); white-space: nowrap; }
.course-hero-play svg { width: 20px; height: 20px; fill: var(--teal); }
@media (max-width: 860px) { .course-hero { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 18px; } }

.curriculum { border: 1px solid var(--line); border-radius: 14px; margin-top: 10px; overflow: hidden; }
.curriculum summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; background: #fafbfc; list-style: none; font-size: 13.5px; }
.curriculum summary::-webkit-details-marker { display: none; }
.curriculum summary::before { content: '+'; color: var(--teal); font-size: 18px; font-weight: 700; width: 14px; }
.curriculum[open] summary::before { content: '−'; }
.curriculum-title { font-weight: 800; font-size: 14.5px; flex: 1; }
.curriculum-list { list-style: none; margin: 0; padding: 4px 0; }
.curriculum-list li { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 14px; }
.curriculum-list li + li { border-top: 1px dashed var(--line); }
.curriculum-list a { color: var(--ink); }
.curriculum-list a:hover { color: var(--teal-dark); }
.curriculum-icon { width: 26px; height: 26px; border-radius: 50%; background: var(--ground); display: grid; place-items: center; flex: none; color: var(--muted); }
.curriculum-icon svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.curriculum-list li.is-done .curriculum-icon { background: var(--teal); color: #fff; }
.curriculum-time { margin-inline-start: auto; color: var(--muted); font-size: 12.5px; }

.teacher-card { display: flex; align-items: center; gap: 18px; }
.teacher-card img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: var(--teal-soft); flex: none; }
.teacher-card h2 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.teacher-card p { color: var(--ink-2); margin: 0; font-size: 14px; }
.cta-band-soft { background: var(--teal-soft); color: var(--ink); margin-top: 0; }
.cta-band-soft p { opacity: 1; color: var(--ink-2); }
.course-progress { margin-bottom: 14px; }
.course-progress-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.course-progress-row b { color: var(--teal-dark); font-size: 16px; }
.course-progress-bar { height: 10px; border-radius: 5px; background: var(--ground); overflow: hidden; }
.course-progress-bar i { display: block; height: 100%; background: linear-gradient(90deg, #3fd3a6, var(--teal)); border-radius: inherit; }
.course-includes { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.course-includes li { display: flex; gap: 8px; align-items: flex-start; }
.course-includes li::before { content: '✓'; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); font-size: 11px; font-weight: 800; display: grid; place-items: center; line-height: 1; }

.course-row { grid-template-columns: 120px minmax(0, 1fr) auto; }
.course-row img { width: 120px; height: 68px; }
.row-progress { display: flex; align-items: center; gap: 10px; margin-top: 8px; max-width: 360px; font-size: 13px; color: var(--teal-dark); }
.row-actions { display: grid; gap: 6px; }
@media (max-width: 560px) { .course-row { grid-template-columns: 84px minmax(0, 1fr); } .course-row img { width: 84px; height: 50px; } .row-actions { grid-column: 1 / -1; grid-auto-flow: column; } }

/* ---- the app bar on phones -------------------------------------------- */
.mobile-nav { display: none; }
@media (max-width: 760px) {
    .mobile-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; inset: auto 0 0 0; z-index: 30; background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); }
    .mobile-nav a { display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: 11.5px; font-weight: 600; padding: 4px 0; border-radius: 12px; }
    .mobile-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .mobile-nav a[aria-current="page"] { color: var(--teal-dark); }
    .mobile-nav a[aria-current="page"] svg { stroke-width: 2.2; }
    .site-footer { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
    .toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- live classes: cards, class page --------------------------------- */
.btn-lg { padding: 13px 20px; font-size: 16px; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #0e1524; color: #fff; }
.chip-live { background: var(--red); color: #fff; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--red); margin-inline-end: 8px; vertical-align: middle; animation: live-pulse 1.4s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(224, 72, 72, .5); } 50% { opacity: .55; box-shadow: 0 0 0 6px rgba(224, 72, 72, 0); } }
.xcard-live .xcard-cover { position: relative; }
.xcard-live.is-live::before { background: var(--red); }
.live-badge { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; background: var(--red); color: #fff; font-weight: 800; font-size: 12.5px; border-radius: 8px; padding: 3px 10px; box-shadow: 0 6px 16px rgba(224, 72, 72, .35); }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: live-pulse 1.4s ease-in-out infinite; }
.live-badge-lg { top: 16px; right: 16px; font-size: 14px; padding: 5px 14px; }
.live-date { position: absolute; bottom: 10px; left: 10px; display: grid; justify-items: center; min-width: 52px; background: #fff; color: var(--ink); border-radius: 12px; padding: 4px 8px 5px; line-height: 1.3; box-shadow: 0 6px 16px rgba(23, 32, 51, .18); }
.live-date b { font-size: 20px; font-weight: 800; }
.live-date small { font-size: 11.5px; color: var(--muted); }
.steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .steps-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps-4 { grid-template-columns: minmax(0, 1fr); } }
.live-hero .course-hero-media img { opacity: .95; }
.countdown-live { justify-content: center; background: var(--red); }
.countdown-live .countdown-label { opacity: 1; font-weight: 800; }
.countdown-live .live-dot { background: #fff; }
.live-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.live-features > div { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 10px; align-items: start; background: var(--ground); border-radius: 14px; padding: 12px 14px; }
.live-features svg { grid-row: span 2; width: 36px; height: 36px; padding: 7px; border-radius: 10px; background: var(--teal-soft); fill: none; stroke: var(--teal-dark); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.live-features b { font-size: 14px; }
.live-features span { color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.live-cal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; }
.live-parts li { padding-inline: 4px; }
