/* My Digital Guru — shared styles for the public site and admin. Tokens follow the Phase 2 designs. */
:root {
  --ink: #13203D;
  --muted: #4A5672;
  --primary: #1D3F8F;
  --primary-dark: #152F6B;
  --accent: #F2A03D;
  --accent-dark: #E08A22;
  --surface: #F4F6FB;
  --line: #DCE1EC;
  --line-strong: #B9C2D6;
  --ok: #17713A;
  --ok-bg: #DDF3E4;
  --bad: #B4441A;
  --bad-bg: #FBE9E2;
  --warm-bg: #FFF1DE;
  --warm-ink: #7A4A06;
  --radius: 14px;
  --font-body: 'Mukta', system-ui, sans-serif;
  --font-display: 'Baloo 2', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-body); font-size: 17px; line-height: 1.55; color: var(--ink); background: #fff; }
h1, h2, h3, .h2, .h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; }
h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; }
.h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; }
.h3 { font-size: 22px; font-weight: 700; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted); }
.help { font-weight: 400; color: var(--muted); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.section { padding-top: 56px; padding-bottom: 56px; }
.section-tint { background: var(--surface); }
.stack, .stack-sm, .stack-lg { display: flex; flex-direction: column; }
.stack { gap: 16px; } .stack-sm { gap: 8px; } .stack-lg { gap: 28px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; }
.row-end { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: 19px; margin: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 10px; font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; border: 2px solid transparent; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-dark); color: var(--ink); }
.btn-ghost { background: #fff; color: var(--primary); border-color: var(--primary); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: #F7C27A; cursor: pointer; text-decoration: underline; min-height: 32px; }

/* Cards, tags, pills */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #E8EEFB; color: var(--primary); }
.tag-warm { background: var(--warm-bg); color: var(--warm-ink); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.pill-on { background: var(--ok-bg); color: var(--ok); }
.pill-off { background: #ECEEF3; color: var(--muted); }
.pill-info { background: #E8EEFB; color: var(--primary); }

/* Public site */
.topstrip { background: var(--ink); color: #fff; font-size: 14px; padding: 8px 0; }
.topstrip a, .topstrip span { color: #fff; text-decoration: none; }
.topstrip .strip-link { color: #F7C27A; font-weight: 600; }
.site-header { border-bottom: 1px solid var(--line); padding: 12px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 10px 0; }
.hero { background: var(--surface); padding: 64px 0; }
.hero-grid { margin: 0 auto; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.price-card { display: flex; flex-direction: column; gap: 12px; }
.price-card.featured { border: 2px solid var(--primary); }
.price-card .btn { margin-top: auto; }
.price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.price { font-family: var(--font-display); font-size: 40px; font-weight: 800; line-height: 1; }
.offer-note { font-size: 14px; font-weight: 700; color: var(--warm-ink); }
.feature-list { margin: 0; padding-left: 20px; color: var(--muted); }
.site-footer { background: #0E1830; color: #D5DBEA; font-size: 15px; padding-top: 48px; }
.site-footer a { color: #D5DBEA; }
.site-footer strong { color: #fff; }
.footer-brand { font-family: var(--font-display); font-size: 22px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.footer-bottom { border-top: 1px solid #24345C; margin-top: 32px; padding-top: 16px; padding-bottom: 24px; }

/* Forms */
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local], input[type=tel], input[type=search], input[type=date], input[type=url], select, textarea {
  font: inherit; font-size: 16px; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line-strong); border-radius: 8px; color: var(--ink); background: #fff; width: 100%;
}
textarea { min-height: auto; }
[aria-invalid="true"] { border-color: var(--bad) !important; }
.field-error { color: var(--bad); font-size: 14px; font-weight: 600; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; min-height: 44px; }
label.check input { width: 20px; height: 20px; }
.radio-row { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; }
.radio-row input[type=datetime-local] { width: auto; flex: 1 1 220px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.alert { border-radius: 10px; padding: 12px 16px; font-weight: 600; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.alert.ok { background: var(--ok-bg); color: #0F5129; }
.alert.bad { background: var(--bad-bg); color: #7A2A0E; }
.alert.warn { background: var(--warm-bg); color: var(--warm-ink); font-weight: 500; }

/* Auth */
.auth-page { background: var(--surface); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 32px; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 20px; }
.auth-card h1 { font-size: 28px; }

/* Admin */
.admin { background: var(--surface); font-size: 16px; }
.admin-shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.admin-side { flex: 1 1 220px; max-width: 260px; background: var(--ink); padding: 20px 12px; display: flex; flex-direction: column; gap: 16px; }
.admin-brand { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: #fff; padding: 0 14px; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav a, .admin-nav-later { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 8px; color: #D5DBEA; text-decoration: none; font-weight: 600; }
.admin-nav a.on { background: #1E2E54; color: #fff; }
.admin-nav-later { color: #7F8BA8; font-weight: 500; cursor: default; }
.admin-user { margin-top: auto; padding: 0 14px; color: #D5DBEA; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.admin-main { flex: 999 1 560px; min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-end; }
.page-head h1 { font-size: 30px; }
.page-head p { margin: 4px 0 0; }
.back { font-weight: 600; text-decoration: none; display: inline-block; margin-bottom: 4px; }
.table-box { overflow-x: auto; padding: 0; }
.card.table-box { padding: 0; }
table { border-collapse: collapse; width: 100%; min-width: 640px; }
th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); }
td { padding: 14px; border-bottom: 1px solid #EEF1F6; vertical-align: middle; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat b { display: block; font-family: var(--font-display); font-size: 32px; }
.edit-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.edit-grid > form { flex: 2 1 480px; min-width: 0; }
.edit-grid > .stack { flex: 1 1 300px; min-width: 0; }
.history-row { border-bottom: 1px solid #EEF1F6; padding: 8px 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.history-row:last-child { border-bottom: 0; }

@media (max-width: 640px) {
  .admin-side { max-width: none; }
  .admin-main { padding: 16px; }
  .card { padding: 16px; }
}

/* ---------- Phase 4: public site ---------- */
.small { font-size: 14px; }
.h4 { font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1.25; margin: 0; }
.center { text-align: center; }
.narrow { max-width: 760px; }
.align-end { align-items: flex-end; }
.row-wrap.tight { gap: 6px 10px; }
.more-link { font-weight: 700; text-decoration: none; }
.hide-sm { }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.menu-btn { display: none; }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; }
.main-nav a[aria-current="page"] { color: var(--primary); box-shadow: inset 0 -3px 0 var(--accent); }
.main-nav .nav-cta { color: var(--ink); box-shadow: none; padding: 0 16px; }

.hero-grid { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; max-width: none; }
.hero-copy { flex: 1 1 480px; min-width: 0; }
.hero-card { flex: 1 1 340px; min-width: 0; box-shadow: 0 12px 32px rgba(19,32,61,.10); }
.hero-course { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #EEF1F6; text-decoration: none; color: var(--ink); min-height: 52px; }
.hero-course > span:first-child { display: flex; flex-direction: column; }
.hero-course .muted { font-size: 14px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.course-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.course-card:hover { border-color: var(--primary); box-shadow: 0 8px 20px rgba(19,32,61,.08); color: var(--ink); }
.course-card-foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 15px; }
.course-card-foot .more-link { color: var(--primary); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.step-num { font-family: var(--font-display); font-size: 32px; font-weight: 800; color: var(--primary); line-height: 1; }

.exam-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.exam-grid { flex: 2 1 480px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.exam-layout > form { flex: 1 1 300px; min-width: 0; }
.exam-card { display: flex; flex-direction: column; gap: 6px; border-top: 5px solid var(--primary); padding: 18px; }

.band-dark { background: var(--ink); color: #fff; }
.band-dark h1, .band-dark h2 { color: #fff; }
.band-text { color: #D5DBEA; margin: 0; max-width: 720px; }
.eyebrow-light { color: #F7C27A; }
.franchise-band { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.franchise-band > .stack { flex: 1 1 440px; min-width: 0; align-items: flex-start; }
.band-stats { flex: 1 1 360px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.band-stats div { background: #1E2E54; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.band-stats b { font-family: var(--font-display); font-size: 26px; }
.band-stats span { color: #D5DBEA; font-size: 15px; }

.faq summary { font-weight: 700; cursor: pointer; min-height: 28px; }
.faq p { margin: 10px 0 0; }

.page-hero { background: var(--surface); padding: 40px 0; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs-light, .crumbs-light a { color: #C4CCE0; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.cta-card { gap: 16px; }

.course-layout, .franchise-layout, .contact-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.course-main, .course-layout > .prose, .franchise-layout > .stack-lg, .contact-layout > .stack { flex: 2 1 520px; min-width: 0; }
.course-side, .franchise-layout > form, .contact-layout > #form { flex: 1 1 320px; min-width: 0; position: sticky; top: 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0; }
.facts div { background: var(--surface); border-radius: 12px; padding: 14px; }
.facts dt { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 700; font-size: 18px; }
.prose h2 { font-size: 26px; margin: 28px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 20px; margin: 20px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose li { margin-bottom: 4px; }
.tick-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tick-list li { padding-left: 28px; position: relative; }
.tick-list li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 12px; height: 7px; border-left: 3px solid var(--ok); border-bottom: 3px solid var(--ok); transform: rotate(-45deg); }
.steps-list { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 10px; }
.fees { min-width: 0; }
.fees td:last-child { font-weight: 700; text-align: right; white-space: nowrap; }
.plain-fieldset { border: 0; padding: 0; margin: 0; }
.plain-fieldset legend { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.consent span { font-weight: 400; font-size: 15px; }
label.check.consent { align-items: flex-start; }
label.check.consent input { margin-top: 3px; flex: none; }
.app-no { font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: .02em; }
address { font-style: normal; }
.map { width: 100%; height: 300px; border: 0; border-radius: var(--radius); }
.wa-float { position: fixed; right: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 50%; background: #17713A; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.2); z-index: 20; }
.wa-float:hover { color: #fff; background: #0F5129; }

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: #fff; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
  .main-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid #EEF1F6; }
  .main-nav .nav-cta { margin-top: 12px; border: 0; justify-content: center; }
  .course-side, .franchise-layout > form, .contact-layout > #form { position: static; }
}

@media (max-width: 640px) {
  .hide-sm { display: none; }
  .hero { padding: 36px 0; }
  .section { padding-top: 40px; padding-bottom: 40px; }
}

/* ---------- Phase 4: admin ---------- */
.admin-nav-heading { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8F9BB8; padding: 14px 14px 4px; }
.admin-nav a { justify-content: space-between; gap: 8px; }
.nav-badge { background: var(--accent); color: var(--ink); border-radius: 999px; font-size: 12px; font-weight: 800; min-width: 22px; height: 22px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; }
.view-site { color: #F7C27A; font-weight: 600; margin-bottom: 6px; }
.pill-warm { background: var(--warm-bg); color: var(--warm-ink); }
.pill-bad { background: var(--bad-bg); color: #7A2A0E; }
.nowrap { white-space: nowrap; }
.card-pad { padding: 18px 18px 0; }
.stat-link { text-decoration: none; color: var(--ink); }
.stat-link:hover { border-color: var(--primary); color: var(--ink); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 16px; }
.filter-bar label { flex: 1 1 200px; min-width: 0; }
.stage-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.list-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid #EEF1F6; text-decoration: none; color: var(--ink); min-height: 48px; }
.list-row:last-child { border-bottom: 0; }
.detail-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 0; }
.detail-list dt { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.detail-list dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.message-box { margin-top: 16px; background: var(--surface); border-radius: 10px; padding: 14px; white-space: normal; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; }
.url-field { display: flex; align-items: center; gap: 4px; }
.url-field input { flex: 1; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.5; }
.seo-row { border: 0; border-bottom: 1px solid #EEF1F6; padding: 0 0 16px; margin: 0; display: grid; gap: 10px; }
.seo-row legend { font-family: var(--font-display); font-size: 19px; font-weight: 700; padding: 0; margin-bottom: 6px; }
.char-count { font-size: 12px; font-weight: 500; color: var(--muted); align-self: flex-end; }
.char-count.over { color: var(--bad); font-weight: 700; }
.preview { max-height: 420px; overflow: auto; font-size: 15px; }
.preview h2 { font-size: 20px; }

/* ---------- Phase 5: student accounts ---------- */
.btn-danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.btn-danger:hover { background: var(--bad); color: #fff; }
.auth-form { max-width: 640px; }
.narrow-wide { max-width: 900px; }
.guardian { border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 16px; margin: 0; }
.guardian legend { padding: 0 6px; }
.student-bar { background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 0; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.big-num { font-family: var(--font-display); font-size: 56px; font-weight: 800; line-height: 1; color: var(--primary); }
.ref-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 24px; font-weight: 700; letter-spacing: .08em; }
table.compact { min-width: 0; }
table.compact td, table.compact th { padding: 8px 10px; }
.filter-bar.plain { padding: 0; }
.danger-zone { border-top: 1px solid #EEF1F6; padding-top: 14px; }
.alert.warn p, p.alert { margin: 0; }

/* ---------- Setup page ---------- */
.setup-card { max-width: 620px; }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list .mark { width: 26px; height: 26px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.check-list li.ok .mark { background: var(--ok-bg); color: var(--ok); }
.check-list li.bad .mark { background: var(--bad-bg); color: var(--bad); }
.setup-log { margin: 0; padding-left: 20px; font-size: 14px; color: var(--muted); }
code { background: var(--surface); padding: 1px 6px; border-radius: 4px; font-size: .9em; }

/* ---------- Phase 6: tests and results ---------- */
.result-top { display: flex; flex-wrap: wrap; gap: 16px; }
.score-card { display: flex; align-items: center; gap: 16px; flex: 1 1 320px; }
.stat-row { flex: 2 1 420px; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; display: flex; flex-direction: column; }
.stat-box b { font-family: var(--font-display); font-size: 26px; }
.stat-box span { font-size: 14px; color: var(--muted); }
.good { color: var(--ok); } .badc { color: var(--bad); }
.bar { height: 10px; border-radius: 5px; background: #E3E7F0; }
.bar i { display: block; height: 10px; border-radius: 5px; background: var(--primary); }
.rv { border: 1px solid var(--line); border-left-width: 6px; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.rv-right { border-left-color: var(--ok); } .rv-wrong { border-left-color: var(--bad); } .rv-skip { border-left-color: #9AA6C0; }
.rv-q { margin: 0; font-size: 17px; }
.rv-opts { margin: 0; padding-left: 26px; display: flex; flex-direction: column; gap: 4px; }
.rv-opts li { padding: 4px 8px; border-radius: 6px; }
.rv-opts li.c { background: var(--ok-bg); color: #0F5129; font-weight: 600; }
.rv-opts li.x { background: var(--bad-bg); color: #7A2A0E; }
.rv-mark { font-size: 13px; font-weight: 700; }
.rv-ex { background: var(--surface); border-radius: 8px; padding: 10px; font-size: 15px; }
button.chip { cursor: pointer; font: inherit; font-size: 15px; font-weight: 600; }
.q-text-cell { max-width: 420px; }
.pick-list { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.pick-list label { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; padding: 8px 12px; border-bottom: 1px solid #EEF1F6; }
.pick-list label:last-child { border-bottom: 0; }
.pick-list input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.section-block { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }

/* Phase 6 admin: question bank and test builder */
.edit-grid > .table-box { flex: 2 1 480px; min-width: 0; }
.edit-grid > form.card, .edit-grid > div.card:not(.stack) { flex: 1 1 320px; min-width: 0; }
.lang-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.lang-cols fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.answer-pick { border: 2px solid var(--line, #D6DCE8); border-radius: 10px; padding: 4px 14px; font-weight: 700; }
.answer-pick:has(input:checked) { border-color: var(--ok); background: var(--ok-bg); }
label.inline { flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; }
label.inline select, label.inline input { width: auto; }
.plain-label { display: inline; font-weight: 400; font-size: inherit; cursor: pointer; }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.q-list { margin: 0; padding-left: 26px; display: flex; flex-direction: column; gap: 10px; }
.q-list li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; border-bottom: 1px solid #EEF1F6; padding-bottom: 10px; }
.q-list li > div:first-child { flex: 1 1 320px; min-width: 0; }
.q-list li::marker { color: var(--muted); font-weight: 700; }
.h3-input { font-weight: 700; font-size: 18px; max-width: 320px; }
.num-input { width: 80px !important; }
.add-row select, .add-row input { width: auto; min-height: 36px; padding: 4px 8px; }
pre.log { white-space: pre-wrap; font-size: 13px; background: #F5F7FB; padding: 10px; border-radius: 8px; max-height: 260px; overflow: auto; margin: 6px 0 0; }
td details summary { cursor: pointer; color: var(--primary); }
.table-box > h2, .table-box > p { padding: 0 14px; }
.table-box > h2 { padding-top: 6px; }
.section-block > .row-between > form { flex-wrap: nowrap; }
.section-block > .row-between > form input { min-width: 0; }
.card > fieldset, .card fieldset.stack-sm { border: 0; padding: 0; margin: 0; min-width: 0; }

/* Phase 7: checkout, orders, payments admin */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 860px) { .checkout-grid { grid-template-columns: 1fr; } }
.checkout-sum { position: sticky; top: 16px; }
.checkout-sum .total { border-top: 1px solid var(--line); padding-top: 10px; font-size: 18px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; min-width: 0; text-transform: uppercase; }
.pay-methods { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pay-method { border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; align-items: flex-start !important; }
.pay-method:has(input:checked) { border-color: var(--primary); background: #F2F5FC; }
.pay-method input { margin-top: 4px; }
details.terms summary { cursor: pointer; color: var(--primary); font-weight: 600; }
details.terms ul { padding-left: 18px; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.order-hero { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--radius); }
.order-hero p { margin: 4px 0 0; }
.order-hero.ok { background: var(--ok-bg); }
.order-hero.warm { background: var(--warm-bg); }
.order-hero.bad { background: var(--bad-bg); }
.order-icon { flex: none; width: 44px; height: 44px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; }
.order-hero.ok .order-icon { color: var(--ok); } .order-hero.warm .order-icon { color: var(--warm-ink); } .order-hero.bad .order-icon { color: var(--bad); }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-strip .card { display: flex; flex-direction: column; gap: 4px; padding: 16px; color: inherit; text-decoration: none; }
.stat-strip strong { font-size: 22px; font-family: var(--font-display); }
dl.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 14px; margin: 0; }
dl.kv dt { color: var(--muted); font-weight: 600; }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { dl.kv { grid-template-columns: 1fr; } dl.kv dd { margin-bottom: 6px; } }
.centre-row { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.narrow-form { max-width: 860px; }
