/* Candidate experience layer: loads after style.css and course-polish.css.
   Header, timer, station page, summary, dashboard, account, sign-in, dark mode. */

/* ---------- header ---------- */
.topbar-inner { height: auto; min-height: 66px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.mainnav { margin-left: auto; align-items: center; }
.topbar-tools { display: flex; gap: 6px; align-items: center; order: 3; }
.mainnav { order: 2; }
.icon-toggle { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; padding: 0; }
.icon-toggle:hover { border-color: var(--muted); color: var(--ink); }
.icon-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-toggle { display: none; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

@media (max-width: 640px) {
  .topbar-inner { flex-direction: row !important; align-items: center !important; padding: 8px 16px !important; min-height: 58px; }
  .brand { font-size: 1rem; }
  .brand .mark { width: 32px; height: 32px; }
  .topbar-tools { margin-left: auto; }
  .nav-toggle { display: grid; }
  .mainnav { order: 4; width: 100%; display: none; flex-direction: column; gap: 4px; margin: 6px 0 4px; }
  .mainnav.is-open { display: flex; }
  .mainnav a { padding: 12px 14px !important; border-radius: 12px; }
}

/* ---------- footer ---------- */
.sitefoot { display: block; padding: 28px 24px; }
.sitefoot-inner { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; justify-content: space-between; }
.sitefoot-brand { display: flex; flex-direction: column; gap: 2px; }
.sitefoot-brand strong { color: #E7ECF6; font-weight: 700; }
.sitefoot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.sitefoot-note { flex-basis: 100%; margin: 6px 0 0; font-size: .8rem; color: #8F9BB6; }

/* ---------- exam clock: always visible ---------- */
body .clock { position: sticky !important; top: 0 !important; z-index: 25; }
.clock-inner { grid-template-columns: minmax(110px, auto) auto auto 1fr auto; }
.clock-q {
  font-size: .82rem; font-weight: 700; color: #DDE3F2; white-space: nowrap;
  padding: 6px 12px; border-radius: 99px; position: relative; overflow: hidden;
  background: rgba(255, 255, 255, .1);
}
.clock-q::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--qpct, 0%); background: rgba(61, 220, 151, .22); transition: width .4s; }
.clock-q[hidden] { display: none !important; }
.clock.is-low { box-shadow: 0 4px 14px rgba(20, 33, 61, .18), inset 0 -3px 0 var(--sun); }
.clock.is-last { box-shadow: 0 4px 14px rgba(20, 33, 61, .18), inset 0 -3px 0 #FF6B6B; }
.stage, .finish { scroll-margin-top: 110px !important; }

@media (max-width: 860px) {
  .clock-inner {
    grid-template-columns: auto 1fr auto !important;
    grid-template-areas: "phase q btns" "time q btns" "bar bar bar";
    padding: 8px 14px !important; gap: 2px 12px !important;
  }
  .clock-phase { grid-area: phase; order: 0 !important; font-size: .74rem; }
  .clock-time { grid-area: time; font-size: 1.5rem !important; }
  .clock-q { grid-area: q; justify-self: start; font-size: .76rem; padding: 5px 10px; }
  .clock-bar { grid-area: bar; order: 0 !important; height: 5px; margin-top: 6px; }
  .clock-btns { grid-area: btns; }
  .clock-btns .btn { min-height: 40px !important; padding: 8px 14px; font-size: .86rem; }
}
@media (max-width: 400px) {
  .clock-btns #resetBtn { padding: 8px 10px; }
  .clock-q { max-width: 112px; white-space: normal; text-align: center; line-height: 1.2; }
}

/* ---------- shorter station header on phones ---------- */
@media (max-width: 640px) {
  .st-hero-inner { padding: 14px 16px 16px !important; gap: 0; }
  .st-hero .crumbs { font-size: .78rem; margin-bottom: 6px; }
  .st-hero h1 { font-size: 1.45rem !important; margin-bottom: 8px; }
  .st-hero .st-facts > span:not(.state) { font-size: .74rem; padding: 3px 9px; }
  .st-admin { margin-top: 10px; }
  .st-admin .btn { padding: 6px 12px; min-height: 36px; font-size: .8rem; }
  .welcome-inner { padding: 22px 16px 26px !important; gap: 16px !important; }
  .welcome-text p { font-size: .95rem; margin-bottom: 14px; }
}

/* ---------- practice / mock choice and modes ---------- */
.exam-choice { background: var(--surface); border-color: var(--line); }
.exam-choice button[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; opacity: 1; }
.exam-choice button[aria-pressed="true"]:disabled { opacity: 1; cursor: default; }
.exam-choice button[aria-pressed="false"]:disabled { opacity: .45; }
.exam-choice .mock-end { border-color: var(--red); color: var(--red); }
.mode { margin-bottom: 8px !important; }
.mode button:disabled { opacity: .45; }
.mode-help { margin: 0 0 6px; font-size: .92rem; color: var(--ink-2); max-width: 46em; }
.kbd-hint { margin: 0 0 22px; font-size: .8rem; color: var(--muted); }
kbd { font: 700 .75rem var(--sans); background: var(--surface); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--ink-2); }
@media (pointer: coarse), (max-width: 760px) { .kbd-hint { display: none; } .mode-help { margin-bottom: 20px; } }
@media (max-width: 560px) {
  .mode { display: grid !important; grid-template-columns: 1fr 1fr; border-radius: 16px !important; width: 100%; gap: 4px; }
  .mode button { border-radius: 12px !important; padding: 10px 8px; }
}

/* ---------- voice settings, folded ---------- */
details.voice-settings { padding: 0; background: var(--surface); border-color: var(--line); }
.voice-summary { list-style: none; cursor: pointer; padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .92rem; color: var(--ink-2); }
.voice-summary::-webkit-details-marker { display: none; }
.voice-summary::after { content: '+'; margin-left: auto; font-weight: 800; color: var(--muted); }
details[open] > .voice-summary::after { content: '−'; }
.voice-summary svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex: none; }
.voice-body { padding: 0 16px 14px; }

/* ---------- answers and checklist ---------- */
.note-status { font-size: .78rem; color: var(--muted); min-height: 1em; margin-top: -6px; }
.self-check h4 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.self-count { font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.self-count.is-full { background: var(--green); border-color: var(--green); color: #fff; }
.self-check label, .source-marking label {
  flex-direction: row !important; align-items: flex-start; gap: 10px; margin: 2px 0 !important;
  padding: 7px 8px; border-radius: 9px; font-weight: 500; font-size: .95rem; color: var(--ink); cursor: pointer; line-height: 1.45;
}
.self-check label:hover, .source-marking label:hover { background: rgba(20, 33, 61, .05); }
.self-check input[type=checkbox], .source-marking input[type=checkbox] { width: 18px; height: 18px; margin: 2px 0 0 !important; accent-color: var(--c); flex: none; }

/* ---------- mock exam "ready?" dialog ---------- */
.mock-ready { border: 0; border-radius: 20px; padding: 26px; max-width: 420px; width: calc(100% - 32px); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.mock-ready::backdrop { background: rgba(10, 18, 34, .6); }
.mock-ready h2 { font-size: 1.3rem; margin-bottom: 12px; }
.mock-steps { margin: 0 0 12px; padding-left: 1.2em; line-height: 1.7; }
.mock-ready-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- end-of-station summary ---------- */
.summary-card { border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin: 0 0 22px; background: var(--paper); }
.summary-card.is-fresh { border-color: var(--c); }
.sum-top { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.sum-score {
  --p: 0; width: 118px; height: 118px; border-radius: 50%; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(closest-side, var(--surface) 78%, transparent 79%), conic-gradient(var(--ring, var(--c)) calc(var(--p) * 1%), var(--line) 0);
}
.sum-score.is-good { --ring: var(--green); }
.sum-score.is-mid { --ring: var(--sun); }
.sum-score.is-low { --ring: var(--red); }
.sum-score b { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.sum-score span { font-size: .72rem; color: var(--muted); margin-top: 4px; }
.sum-facts { flex: 1; min-width: 220px; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0; }
.sum-facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.sum-facts dt { font-size: .74rem; color: var(--muted); font-weight: 600; }
.sum-facts dd { margin: 2px 0 0; font-weight: 800; }
.sum-weak h3 { font-size: .95rem; margin-bottom: 8px; }
.sum-weak ul { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; }
.sum-weak li { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 10px; padding: 8px 12px; }
.sum-weak li span { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.sum-link { background: none; border: 0; padding: 0; font: 700 .92rem var(--sans); color: var(--ink); text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sum-tip { background: var(--surface); border: 1px dashed var(--c); border-radius: 10px; padding: 10px 14px; }
.sum-ok { color: var(--green); font-weight: 700; }
.sum-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 10px; }

/* ---------- pager ---------- */
.pager-domain { display: block; font-size: .78rem; font-weight: 600; color: var(--amber); margin-top: 4px; }

/* ---------- New / Old course tabs ---------- */
.course-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; margin-bottom: 22px; }
.course-tabs a { text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: .92rem; padding: 9px 18px; border-radius: 99px; display: inline-flex; gap: 8px; align-items: center; }
.course-tabs a span { font-size: .76rem; background: var(--line-soft); color: var(--muted); padding: 1px 8px; border-radius: 99px; }
.course-tabs a.is-on { background: var(--navy); color: #fff; }
.course-tabs a.is-on span { background: rgba(255, 255, 255, .18); color: #fff; }
[data-theme="dark"] .course-tabs a.is-on { background: var(--primary); }
@media (max-width: 560px) { .course-tabs { display: flex; } .course-tabs a { flex: 1; justify-content: center; } }

/* ---------- admin bulk tools ---------- */
.bulk-panel hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.bulk-publish { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.bulk-publish label { flex: 1 1 200px; }
.bulk-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- dashboard ---------- */
.ring-empty { max-width: 220px; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px dashed rgba(255, 255, 255, .25); display: flex; flex-direction: column; gap: 4px; }
.ring-empty b { color: #fff; }
.ring-empty span { color: #AEB9D0; font-size: .86rem; line-height: 1.4; }

.continue-card { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--sun); border-radius: var(--r); padding: 14px 16px 14px 18px; margin-bottom: 22px; box-shadow: var(--lift); }
.cc-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cc-kicker { font-size: .76rem; font-weight: 700; color: var(--amber); text-transform: uppercase; letter-spacing: .04em; }
.cc-text b { font-size: 1.05rem; }
.cc-meta { font-size: .84rem; color: var(--muted); }
.cc-close { background: none; border: 0; font-size: 1.4rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.cc-close:hover { color: var(--ink); }
@media (max-width: 560px) { .continue-card { flex-wrap: wrap; } .continue-card .btn { flex: 1; } }

.stats-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 30px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat-label { font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat b { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.stat b small { font-size: .9rem; color: var(--muted); font-weight: 700; }
.stat-note { font-size: .8rem; color: var(--ink-2); }
.stat-bar { height: 6px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.stat-bar span { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.stat-focus { align-self: flex-start; max-width: 100%; text-align: left; font: 700 .9rem/1.3 var(--sans); color: #fff; background: var(--c); border: 0; border-radius: 10px; padding: 6px 10px; cursor: pointer; }
@media (max-width: 860px) { .stats-strip { grid-template-columns: 1fr 1fr; } }

.domain-tip { margin: -6px 0 10px; }
.domain-tile.is-soon { display: none; }
.domain-grid.show-soon .domain-tile.is-soon { display: flex; }
.domain-more { font-family: var(--sans); border: 2px dashed var(--line); background: transparent; border-radius: var(--r); padding: 16px; color: var(--ink-2); cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; text-align: left; }
.domain-more:hover { border-color: var(--muted); color: var(--ink); }
.domain-more b { font-size: 1rem; }
.domain-more span { font-size: .8rem; }

/* ---------- account / my progress ---------- */
.account .facts dd small { font-size: .8rem; color: var(--muted); font-weight: 600; }
.acc-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 18px; }
.acc-section h2 { font-size: 1.05rem; margin-bottom: 12px; }
.sys-list, .recent-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sys-list li { display: grid; grid-template-columns: 30px minmax(0, 1.4fr) minmax(60px, 1fr) auto 44px; gap: 10px; align-items: center; font-size: .92rem; }
.sys-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--c); color: #fff; display: grid; place-items: center; }
.sys-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sys-bar { height: 7px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.sys-bar span { display: block; height: 100%; background: var(--c); }
.sys-num { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.sys-score { font-weight: 800; text-align: right; }
@media (max-width: 520px) { .sys-list li { grid-template-columns: 30px 1fr auto; } .sys-bar { grid-column: 2 / -1; } .sys-num { grid-column: 2; } }
.recent-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "title score state" "date score state"; gap: 2px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.recent-list li:last-child { border-bottom: 0; }
.recent-list li > a { grid-area: title; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-list li > .muted { grid-area: date; }
.recent-list li > .pill { grid-area: score; }
.recent-list li > .state { grid-area: state; }
.pill { font-size: .78rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: var(--primary-wash); color: var(--primary); }
.kv { margin: 0 0 10px; display: grid; gap: 6px; }
.kv div { display: flex; gap: 12px; flex-wrap: wrap; }
.kv dt { color: var(--muted); min-width: 60px; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.help-line { margin: 6px 0 0; }
.acc-pw summary { cursor: pointer; list-style: none; display: flex; align-items: center; }
.acc-pw summary::-webkit-details-marker { display: none; }
.acc-pw summary h2 { margin: 0; }
.acc-pw summary::after { content: '+'; margin-left: auto; font-weight: 800; color: var(--primary); }
.acc-pw[open] summary { margin-bottom: 14px; }
.acc-pw[open] summary::after { content: '−'; }

/* ---------- sign-in ---------- */
.pw-field { display: flex; flex-direction: column; gap: 6px; }
.pw-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pw-label-row label { display: inline; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 70px !important; }
.pw-show { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; font: 700 .82rem var(--sans); color: var(--primary); padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.pw-show:hover { background: var(--primary-wash); }
.join-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: .92rem; font-weight: 600; color: var(--ink-2); }
@media (max-width: 560px) {
  .auth-art { padding: 22px 18px 20px !important; }
  .auth-art h1 { font-size: 1.5rem !important; margin-top: 16px !important; }
  .auth-tag { font-size: .98rem; margin-bottom: 0; }
  .auth-figure { display: none; }
  .auth-panel { padding-top: 18px !important; gap: 22px; }
}

/* ---------- dark mode ---------- */
[data-theme="dark"] {
  color-scheme: dark;
  --navy: #0B1222; --navy-2: #16223D;
  --paper: #0F1629; --surface: #18213A;
  --ink: #E7EBF4; --ink-2: #BAC3D8; --muted: #8E99B3;
  --line: #2B3654; --line-soft: #222C47;
  --primary: #6474F0; --primary-2: #7C8AF5; --primary-wash: #232B55;
  --green: #43C98F; --green-wash: #12352A;
  --amber: #F0B44C; --amber-wash: #30260F; --amber-line: #5A4718;
  --red: #FF6F84; --red-wash: #3E1621;
  --lift: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
}
:where([data-theme="dark"]) a { color: #A9B3FF; }
[data-theme="dark"] .btn, [data-theme="dark"] .chip { color: var(--ink); }
[data-theme="dark"] .btn-primary, [data-theme="dark"] .btn-primary:hover { color: #fff; }
[data-theme="dark"] .btn-sun, [data-theme="dark"] .btn-clock, [data-theme="dark"] .btn-light { color: #14213D; }
[data-theme="dark"] .btn:hover, [data-theme="dark"] .chip:hover { border-color: var(--muted); }
[data-theme="dark"] .mainnav a.is-on, [data-theme="dark"] .chip.is-on { background: var(--primary); border-color: var(--primary); }
[data-theme="dark"] .clock { border-bottom: 1px solid var(--line); }
[data-theme="dark"] .vignette { color: #DCE2EE; }
[data-theme="dark"] .notes { background: #121A2F !important; }
[data-theme="dark"] .domain-tile { background: color-mix(in srgb, var(--c) 20%, var(--surface)); }
[data-theme="dark"] .domain-tile.is-on { background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 35%, transparent); }
[data-theme="dark"] .dt-bar { background: rgba(255, 255, 255, .1); }
[data-theme="dark"] .answer, [data-theme="dark"] .debrief, [data-theme="dark"] .dpill { background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
[data-theme="dark"] .answer-label, [data-theme="dark"] .debrief h3, [data-theme="dark"] .stage-case .stage-head h3,
[data-theme="dark"] .btn-reveal, [data-theme="dark"] .btn-reveal:hover, [data-theme="dark"] .dpill { color: color-mix(in srgb, var(--c) 50%, #fff); }
[data-theme="dark"] .btn-reveal:hover { background: color-mix(in srgb, var(--c) 18%, var(--surface)); }
[data-theme="dark"] .btn-reveal[aria-expanded=true] { color: #fff; }
[data-theme="dark"] .stage-body th, [data-theme="dark"] .answer th, [data-theme="dark"] .table-wrap th { background: color-mix(in srgb, var(--c) 24%, var(--surface)); color: var(--ink); }
[data-theme="dark"] .stage-update .stage-body th { background: #3A2E12; }
[data-theme="dark"] .table-wrap, [data-theme="dark"] .table-wrap th, [data-theme="dark"] .table-wrap td { border-color: var(--line); }
[data-theme="dark"] .mode-panel { background: #13283A; border-color: #24435A; }
[data-theme="dark"] .mode-panel input, [data-theme="dark"] .voice-settings select { background: var(--paper); color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .practice-score { background: #14302D; }
[data-theme="dark"] .source-marking, [data-theme="dark"] .source-marking section, [data-theme="dark"] .self-check { border-color: var(--line); }
[data-theme="dark"] .self-check label:hover, [data-theme="dark"] .source-marking label:hover { background: rgba(255, 255, 255, .05); }
[data-theme="dark"] .critical-status { background: var(--amber-wash); }
[data-theme="dark"] .clinical-viewer, [data-theme="dark"] .viewer-controls { background: var(--surface); color: var(--ink); }
[data-theme="dark"] .viewer-canvas { background: #0B1222; }
[data-theme="dark"] .voice-local-status { color: #F0B98A; }
[data-theme="dark"] .state-new { background: rgba(15, 22, 41, .85); color: var(--ink-2); }
[data-theme="dark"] .flash-ok { color: #9FE3C2; border-color: #24533F; }
[data-theme="dark"] .flash-warn, [data-theme="dark"] .form-notice { color: #F5D08A; border-color: var(--amber-line); }
[data-theme="dark"] .form-error { color: #FFB3C0; }
[data-theme="dark"] .admin-table th { background: #1C2642; }
[data-theme="dark"] .se { background: #151E35; }
[data-theme="dark"] .se[data-type=update] { background: #2A2312; }
[data-theme="dark"] .creds { border-color: var(--line); }
[data-theme="dark"] .audit-error { color: #FF8DA0; }
[data-theme="dark"] .audit-warning { color: #F5C46B; }
[data-theme="dark"] .auth-card { border-color: var(--line); }
[data-theme="dark"] kbd { background: var(--paper); }

/* Front page: system boxes are links; each opens its own station list. */
a.domain-tile { color: inherit; text-decoration: none; }
a.domain-tile:hover { border-color: var(--c); transform: translateY(-2px); box-shadow: 0 10px 24px -14px var(--c); }
a.domain-tile:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }
span.domain-tile.is-soon { cursor: default; opacity: .62; }
.domain-tile { transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.system-page .back-link { display: inline-block; margin: 4px 0 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.system-page .back-link:hover { color: var(--c); }
.system-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.system-head .dt-icon { width: 58px; height: 58px; margin: 0; flex: none; }
.system-head .dt-icon .dicon { width: 36px; height: 36px; }
.system-head h1 { margin: 0 0 2px; font-size: clamp(1.4rem, 3vw, 2rem); }
.system-head p { margin: 0; }
.crumbs a + span + a { color: inherit; }

/* ---------- Revision notes ---------- */
.rev-head { margin: 8px 0 22px; }
.rev-head h1 { margin: 0 0 6px; }
.rev-head p { margin: 0; max-width: 680px; }
.rev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rev-list a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface, #fff); border: 1px solid rgba(20, 33, 61, .1); border-radius: 14px; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.rev-list a:hover { border-color: var(--c); transform: translateY(-1px); }
.rev-icon { flex: none; width: 40px; height: 40px; border-radius: 11px; background: var(--t); color: var(--c); display: grid; place-items: center; }
.rev-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rev-title { flex: 1; font-weight: 650; line-height: 1.3; }
.rev-mark { flex: none; font-size: .75rem; font-weight: 700; color: var(--c); background: var(--t); border-radius: 99px; padding: 3px 9px; }
.rev-go { flex: none; color: var(--ink-2, #5b6578); }

body.reader-body .page, body.reader-body main { max-width: none; }
.reader { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; padding: 0 0 30px; }
.reader-top { max-width: 1180px; margin: 0 auto; padding: 16px 16px 8px; }
.reader-top h1 { margin: 4px 0 0; font-size: clamp(1.3rem, 2.6vw, 1.8rem); }
.reader-top .crumbs a + span + a { color: inherit; }
.reader-bar { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 9px 16px; background: color-mix(in srgb, var(--surface, #fff) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(20, 33, 61, .1); box-shadow: 0 6px 16px -14px rgba(20, 33, 61, .5); }
.rb-group { display: flex; align-items: center; gap: 4px; }
.rb-right { margin-left: auto; gap: 10px; }
.reader-bar button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: inherit; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.reader-bar button:hover:not(:disabled) { background: rgba(20, 33, 61, .06); }
.reader-bar button:disabled { opacity: .4; cursor: default; }
.reader-bar button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.rb-tool.is-on { background: var(--t) !important; border-color: var(--c); color: var(--c); }
.rb-color { width: 26px; min-height: 26px !important; height: 26px; padding: 0 !important; border-radius: 50% !important; background: var(--sw) !important; border: 2px solid rgba(255, 255, 255, .9) !important; box-shadow: 0 0 0 1px rgba(20, 33, 61, .25); }
.rb-color.is-on { box-shadow: 0 0 0 2px var(--c), 0 0 0 4px rgba(20, 33, 61, .15); }
#rbSize { min-height: 36px; border-radius: 10px; border: 1px solid rgba(20, 33, 61, .18); background: transparent; color: inherit; font: inherit; font-size: .88rem; padding: 0 8px; }
.rb-zoom { min-width: 46px; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums; }
#rbZoomIn, #rbZoomOut { font-size: 1.15rem; width: 36px; justify-content: center; padding: 0; }
#rbNotes.has-notes::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.rb-status { font-size: .8rem; color: var(--ink-2, #5b6578); white-space: nowrap; }
.rb-status[data-kind="ok"] { color: #1a7f4b; }
.rb-status[data-kind="err"] { color: #c0392b; }

.reader-main { display: flex; align-items: flex-start; gap: 16px; max-width: 1180px; margin: 0 auto; padding: 16px; }
.reader-pages { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: 18px; overflow-x: auto; padding-bottom: 6px; }
.reader-loading { padding: 60px 10px; color: var(--ink-2, #5b6578); text-align: center; }
.rpage { position: relative; flex: none; background: #fff; border-radius: 4px; box-shadow: 0 1px 3px rgba(20, 33, 61, .18), 0 10px 28px -16px rgba(20, 33, 61, .45); overflow: hidden; }
.rpage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rp-ink { mix-blend-mode: multiply; pointer-events: none; touch-action: auto; }
.reader:not([data-tool="scroll"]) .rp-ink { pointer-events: auto; touch-action: none; cursor: crosshair; }
.reader[data-tool="txt"] .rp-ink { cursor: text; }
.reader[data-tool="erase"] .rp-ink { cursor: cell; }
.rp-num { position: absolute; right: 8px; bottom: 6px; font-size: .7rem; color: #8a94a6; pointer-events: none; }
.rp-editor { position: absolute; z-index: 3; min-width: 120px; margin: 0; padding: 0 2px; border: 1px dashed currentColor; border-radius: 3px; background: rgba(255, 255, 255, .85); font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-weight: 500; line-height: 1.25; resize: none; overflow: hidden; outline: none; -webkit-user-select: text; user-select: text; white-space: pre; }
.reader-notes { position: sticky; top: 70px; flex: none; width: 320px; max-height: calc(100vh - 90px); display: flex; flex-direction: column; background: var(--surface, #fff); border: 1px solid rgba(20, 33, 61, .12); border-radius: 14px; box-shadow: 0 10px 28px -18px rgba(20, 33, 61, .5); }
.reader-notes[hidden] { display: none; }
.rn-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 6px; }
.rn-head h2 { margin: 0; font-size: 1rem; }
.rn-head button { border: 0; background: none; color: inherit; font-size: 1rem; cursor: pointer; padding: 4px 8px; }
#rnText { flex: 1; min-height: 320px; margin: 0 12px 12px; padding: 10px; border: 1px solid rgba(20, 33, 61, .15); border-radius: 10px; background: transparent; color: inherit; font: inherit; font-size: .92rem; line-height: 1.5; resize: none; -webkit-user-select: text; user-select: text; }
.reader-pager { display: flex; justify-content: space-between; gap: 12px; max-width: 1180px; margin: 0 auto; padding: 0 16px; flex-wrap: wrap; }
.reader-pager a { font-weight: 600; text-decoration: none; color: var(--c); }
[data-theme="dark"] .reader-bar { border-bottom-color: rgba(255, 255, 255, .08); }
[data-theme="dark"] .rev-list a, [data-theme="dark"] .reader-notes { border-color: rgba(255, 255, 255, .1); }
@media (max-width: 760px) {
  .reader-bar { gap: 6px; padding: 6px 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .reader-bar::-webkit-scrollbar { display: none; }
  .rb-group { flex: none; }
  .rb-color { width: 24px; height: 24px; min-height: 24px !important; }
  .rb-status { font-size: .72rem; }
  .rb-tool span, #rbUndo span, #rbNotes span { display: none; }
  .reader-bar button { padding: 6px 8px; }
  .rb-right { margin-left: 0; }
  .reader-main { padding: 12px 8px; flex-direction: column; }
  .reader-notes { position: fixed; left: 8px; right: 8px; bottom: 8px; top: auto; width: auto; max-height: 55vh; z-index: 40; }
  #rnText { min-height: 180px; }
}
@media print { body.reader-body * { visibility: hidden !important; } body.reader-body::after { content: "Printing is not available for revision notes."; visibility: visible; } }

/* ---------- Revision notes as web pages ---------- */
.hn-doc { --fs: 1; position: relative; flex: 1; min-width: 0; max-width: 860px; margin: 0 auto; background: var(--surface, #fff); border: 1px solid rgba(20, 33, 61, .08); border-radius: 18px; box-shadow: 0 1px 3px rgba(20, 33, 61, .08), 0 18px 40px -28px rgba(20, 33, 61, .45); padding: 22px clamp(16px, 4vw, 44px) 40px; font-size: calc(16.5px * var(--fs)); line-height: 1.62; color: var(--ink, #14213d); }
.hn-doc .crumbs { margin-bottom: 14px; }
.hn-doc .crumbs a + span + a { color: inherit; }
.hn-cover { position: relative; overflow: hidden; border-radius: 16px; padding: 26px 26px 24px; margin-bottom: 26px; color: #fff; background: radial-gradient(420px 220px at 100% 0%, color-mix(in srgb, var(--c) 70%, transparent), transparent 70%), #12304a; }
.hn-kicker { display: block; font-size: .72em; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #9fdbe3; margin-bottom: 8px; }
.hn-cover h1 { margin: 0; font-family: "Source Serif 4", Georgia, serif; font-size: clamp(1.7em, 4.2vw, 2.3em); line-height: 1.1; color: #fff; }
.hn-cover p { margin: 12px 0 0; display: inline-block; font-size: .82em; font-weight: 700; background: rgba(255, 255, 255, .14); border-radius: 99px; padding: 4px 12px; }
.hn-body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.reader[data-tool="hl"] .hn-body { -webkit-user-select: text; user-select: text; cursor: text; }
.hn-sec { margin: 0 0 8px; }
.hn-body h2 { margin: 30px 0 14px; padding: 10px 16px; border-radius: 10px; background: var(--c); color: #fff; font-family: "Source Serif 4", Georgia, serif; font-size: 1.05em; letter-spacing: .06em; text-transform: uppercase; }
.hn-body h3.hn-q { display: flex; gap: 10px; align-items: flex-start; margin: 22px 0 10px; padding: 10px 14px; border-radius: 10px; background: var(--t); font-size: 1.06em; line-height: 1.4; color: var(--ink, #14213d); }
.hn-qn { flex: none; min-width: 34px; padding: 2px 8px; border-radius: 7px; background: var(--c); color: #fff; font-size: .78em; font-weight: 800; text-align: center; line-height: 1.6; }
.hn-body h4 { margin: 14px 0 4px; font-size: .97em; color: color-mix(in srgb, var(--c) 82%, #000); }
.hn-body h5 { margin: 0 0 6px; font-size: .95em; }
.hn-body p { margin: 6px 0 10px; }
.hn-body ul { margin: 2px 0 10px; padding-left: 1.35em; }
.hn-body li { margin: 3px 0; }
.hn-body li::marker { color: var(--c); }
.hn-body ul ul { margin: 2px 0 4px; }
.hn-body ul ul li::marker { content: "◦  "; }
.hn-body strong { font-weight: 700; color: color-mix(in srgb, var(--ink, #14213d) 92%, var(--c)); }
.hn-key { margin: 12px 0 16px; padding: 12px 16px; border-left: 4px solid #e9a23b; border-radius: 10px; background: #fff6e2; font-size: .96em; }
.hn-table { margin: 10px 0 16px; overflow-x: auto; border-radius: 10px; border: 1px solid rgba(20, 33, 61, .12); }
.hn-table table { width: 100%; border-collapse: collapse; font-size: .9em; line-height: 1.45; }
.hn-table th { background: var(--c); color: #fff; text-align: left; padding: 8px 12px; font-weight: 700; }
.hn-table td { padding: 8px 12px; border-top: 1px solid rgba(20, 33, 61, .08); vertical-align: top; }
.hn-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--t) 60%, transparent); }
.hn-table td:first-child { font-weight: 600; }
.hn-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 26px; margin: 26px 0 8px; padding: 16px 20px; border-radius: 14px; background: #12304a; color: #e8f1f6; font-size: .93em; }
.hn-cols h5 { grid-column: 1 / -1; color: #ffd27a; font-size: 1.05em; }
.hn-cols strong { color: #fff; }
.hn-cols li::marker { color: #8fd1da; }
.hn-cols > div:first-child h5 { margin-bottom: 8px; }
mark.hn-hl { background: color-mix(in srgb, var(--hl) 45%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.reader[data-tool="erase"] mark.hn-hl, .reader[data-tool="erase"] .hn-note { cursor: pointer; outline: 2px dashed rgba(229, 72, 77, .5); }
.hn-layer { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.hn-layer canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.reader[data-tool="pen"] .hn-layer canvas { pointer-events: auto; touch-action: none; cursor: crosshair; }
.reader[data-tool="txt"] .hn-doc { cursor: text; }
.reader[data-tool="erase"] .hn-doc { cursor: cell; }
.hn-note { position: absolute; max-width: 240px; padding: 6px 10px; border-radius: 8px; border-left: 3px solid var(--nc); background: #fffbe6; color: #1f2937; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .35); font-size: .82em; line-height: 1.4; white-space: pre-wrap; word-break: break-word; pointer-events: auto; }
.reader[data-tool="scroll"] .hn-note, .reader[data-tool="hl"] .hn-note, .reader[data-tool="pen"] .hn-note { pointer-events: none; }
.hn-note-edit { position: absolute; z-index: 3; width: 220px; min-height: 64px; padding: 6px 10px; border: 2px solid var(--nc); border-radius: 8px; background: #fffbe6; color: #1f2937; font: inherit; font-size: .82em; line-height: 1.4; pointer-events: auto; resize: both; -webkit-user-select: text; user-select: text; }
.reader-main { align-items: flex-start; }
[data-theme="dark"] .hn-doc { border-color: rgba(255, 255, 255, .08); }
[data-theme="dark"] .hn-key { background: #3a2f17; color: #f6e7c4; }
[data-theme="dark"] .hn-body h3.hn-q { background: color-mix(in srgb, var(--c) 22%, var(--surface)); }
[data-theme="dark"] .hn-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .04); }
@media (max-width: 760px) {
  .hn-doc { border-radius: 0; border-left: 0; border-right: 0; padding: 16px 14px 30px; font-size: calc(16px * var(--fs)); }
  .hn-cover { padding: 20px 18px; }
  .hn-cols { grid-template-columns: 1fr; }
  .hn-table table { font-size: .84em; }
  .reader-main { padding: 0; }
}

/* "Join on WhatsApp" button (sign-in page) */
.btn-wa { display: inline-flex; align-items: center; gap: 8px; background: #25d366; color: #fff !important; border: 0; font-weight: 700; text-decoration: none; }
.btn-wa:hover { background: #1ebe5b; }
.btn-wa svg { width: 18px; height: 18px; fill: currentColor; }

/* Announcement video on the sign-in page */
.auth-video { margin: 18px 0 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.auth-video video { width: auto; max-width: 100%; height: min(62vh, 560px); aspect-ratio: 9 / 16; border-radius: 18px; background: #0b1e30; box-shadow: 0 22px 50px rgba(0, 0, 0, .4); }
.auth-video figcaption { font-size: .9rem; color: #C3CCE0; text-align: center; }
@media (max-width: 760px) { .auth-video { margin: 12px 0 4px; } .auth-video video { height: min(48vh, 360px); border-radius: 14px; } }

/* ---------- Course registration (register.php) ---------- */
body.reg-body { background: var(--paper); }
.reg-page { max-width: 760px; margin: 0 auto; padding: 28px 16px 56px; }
.reg-hero { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-radius: var(--r-lg); padding: 26px 28px 24px; margin-bottom: 18px; position: relative; overflow: hidden; }
.reg-hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 181, 71, .28), transparent 70%); }
.reg-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; margin-bottom: 16px; }
.reg-brand svg { width: 30px; height: 30px; }
.reg-kicker { display: block; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sun); font-weight: 800; }
.reg-hero h1 { font: 700 clamp(1.45rem, 4.4vw, 2rem)/1.2 var(--serif); margin: 6px 0 6px; color: #fff; }
.reg-hero p { margin: 0; color: rgba(255, 255, 255, .78); }
.reg-fee { display: inline-flex; align-items: baseline; gap: 10px; margin-top: 16px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 99px; padding: 7px 16px; }
.reg-fee span { font-size: .84rem; color: rgba(255, 255, 255, .75); }
.reg-fee b { font-size: 1.1rem; color: var(--sun); }
.reg-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--lift); padding: 26px 28px; }
.reg-steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 0; margin: 0 0 22px; counter-reset: rs; }
.reg-steps li { counter-increment: rs; font-size: .76rem; font-weight: 700; color: var(--muted); text-align: center; padding-top: 10px; border-top: 4px solid var(--line-soft); }
.reg-steps li::before { content: counter(rs) '. '; }
.reg-steps li.is-done { border-color: var(--green); color: var(--green); }
.reg-steps li.is-on { border-color: var(--primary); color: var(--primary); }
.reg-form:not(.is-stepped) .reg-steps, #regForm:not(.is-stepped) .reg-steps { display: none; }
.reg-step { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
#regForm:not(.is-stepped) .reg-step + .reg-step { border-top: 1px solid var(--line-soft); padding-top: 22px; margin-top: 14px; }
.reg-step legend { font: 700 1.3rem/1.25 var(--serif); color: var(--ink); padding: 0; margin-bottom: 2px; }
.reg-step legend span { display: block; font: 700 .74rem/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--primary); margin-bottom: 4px; }
.reg-step > .muted { margin: -8px 0 0; }
.reg-field { display: flex; flex-direction: column; gap: 8px; font-size: .92rem; font-weight: 600; color: var(--ink-2); }
.reg-field i, .reg-terms i { color: var(--red); font-style: normal; }
.reg-field small { font-weight: 500; color: var(--muted); }
.reg-field.has-err input:not([type=checkbox]):not([type=radio]):not([type=file]), .reg-field.has-err select { border-color: var(--red); }
.reg-err { color: var(--red); font-size: .84rem; font-weight: 600; margin: 0; }
.reg-err-top { background: var(--red-wash); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; }
.reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.reg-phone { display: grid; grid-template-columns: minmax(112px, 34%) 1fr; gap: 8px; }
.reg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.reg-chip { position: relative; display: inline-flex; flex-direction: row; margin: 0; cursor: pointer; }
.reg-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.reg-chip span { display: inline-block; padding: 9px 15px; border: 1.5px solid var(--line); border-radius: 99px; font-size: .88rem; font-weight: 600; color: var(--ink-2); background: var(--surface); transition: background .15s, border-color .15s, color .15s; }
.reg-chip:hover span { border-color: var(--primary); }
.reg-chip input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.reg-chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(57, 73, 198, .2); }
.reg-field.has-err .reg-chip span { border-color: var(--red); }
.reg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.reg-fee-line { margin: 0; font-size: 1rem; color: var(--ink-2); }
.reg-fee-line b { color: var(--ink); font-size: 1.15rem; }
.reg-pay { background: var(--primary-wash); border-radius: var(--r); padding: 16px 18px; }
.reg-pay h3 { font-size: .95rem; margin: 0 0 8px; color: var(--ink); }
.reg-pay-text { font-size: .95rem; line-height: 1.7; color: var(--ink); overflow-wrap: anywhere; }
.reg-field input[type=file] { font-size: .9rem; font-weight: 500; padding: 10px; border: 1.5px dashed var(--line); border-radius: 10px; width: 100%; background: var(--paper); }
.reg-terms { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; font-size: .88rem; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; }
.reg-terms p { margin: 0; }
.reg-terms .check { margin-top: 6px; font-weight: 700; color: var(--ink); }
.reg-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.reg-nav #regNext, .reg-nav #regSubmit { margin-left: auto; }
#regForm:not(.is-stepped) #regBack, #regForm:not(.is-stepped) #regNext { display: none; }
.reg-privacy { text-align: center; margin: 16px 0 0; }
.reg-done { text-align: center; }
.reg-done-icon { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: var(--green-wash); color: var(--green); font-size: 2rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.reg-done h2 { font: 700 1.5rem/1.2 var(--serif); margin: 0 0 8px; }
.reg-summary { text-align: left; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; background: var(--paper); border-radius: var(--r); padding: 16px 18px; margin: 18px 0; }
.reg-summary dt, .reg-app-grid dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.reg-summary dd, .reg-app-grid dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.reg-done .btn-wa { margin-bottom: 14px; }
@media (max-width: 600px) {
  .reg-page { padding: 16px 12px 40px; }
  .reg-hero { padding: 22px 18px 20px; }
  .reg-card { padding: 20px 16px; border-radius: var(--r); }
  .reg-grid, .reg-summary { grid-template-columns: 1fr; }
  .reg-steps li { font-size: 0; padding-top: 8px; }
  .reg-steps li::before { font-size: .78rem; content: counter(rs); }
  .reg-steps li.is-on { font-size: .72rem; }
  .reg-steps li.is-on::before { content: counter(rs) '. '; }
  .reg-chip span { padding: 8px 13px; font-size: .85rem; }
}

/* Login page: register call to action */
.join-register small { display: block; font-weight: 500; color: var(--muted); }
.join-wa-link { flex-basis: 100%; font-weight: 600; color: var(--green); }

/* Admin: registrations list */
.tab-new { font-style: normal; font-size: .72rem; font-weight: 800; background: var(--red); color: #fff; border-radius: 99px; padding: 2px 7px; margin-left: 4px; }
.reg-admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.reg-admin-head h2 { margin: 0; font-size: 1.1rem; }
.reg-app { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; background: var(--surface); }
.reg-app.is-new { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-wash); }
.panel .reg-app summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; margin: 0; }
.panel .reg-app summary::after { content: '+'; margin-left: auto; }
.panel .reg-app[open] summary { margin: 0; border-bottom: 1px solid var(--line-soft); }
.panel .reg-app[open] summary::after { content: '−'; }
.reg-app-name { display: flex; flex-direction: column; min-width: 0; }
.reg-tag { font-size: .72rem; font-weight: 700; background: var(--green-wash); color: var(--green); border-radius: 99px; padding: 2px 9px; }
.reg-app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 18px; padding: 14px 16px; margin: 0; }
.reg-app-grid .wide { grid-column: 1 / -1; }
.reg-app-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.reg-app-actions .inline-form { flex-wrap: wrap; }
.creds .btn-wa { margin: 8px 8px 0 0; }.reg-admin-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.reg-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.reg-kpis a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink-2); }
.reg-kpis a b { font-size: 1.7rem; color: var(--ink); line-height: 1.1; }
.reg-kpis a span { font-size: .82rem; font-weight: 600; }
.reg-kpis a.is-on { border-color: var(--primary); background: var(--primary-wash); }
.reg-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 12px; }
.reg-stat { border: 1px solid var(--line-soft); border-radius: var(--r); padding: 12px 14px; }
.reg-stat h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.reg-stat ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.reg-stat a { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 6px 9px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .88rem; overflow: hidden; }
.reg-stat a i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--primary-wash); z-index: 0; border-radius: 8px; }
.reg-stat a span, .reg-stat a b { position: relative; z-index: 1; }
.reg-stat a:hover { outline: 1.5px solid var(--primary); }
.reg-stat li.is-on a { outline: 2px solid var(--primary); }
.reg-stat-label { overflow-wrap: anywhere; }
@media (max-width: 600px) { .reg-kpis a b { font-size: 1.3rem; } .reg-kpis a { padding: 10px; } }.reg-q { display: block; line-height: 1.4; }
.reg-q small { display: block; margin-top: 2px; }
