/* Four Corner Academy — design tokens derived from the academy logo (navy mortarboard, teal→blue mark). */
:root {
  --navy: #0B2A5B; --navy-2: #123B7A; --blue: #1D6FB8; --teal: #2AAFBE; --teal-soft: #E3F5F7;
  --ink: #0E1A2B; --ink-2: #33425A; --muted: #5A6A80; --line: #D9E1EB; --line-2: #E9EEF4;
  --paper: #FFFFFF; --ground: #F4F7FB; --surface: #FFFFFF; --surface-2: #F7F9FC;
  --good: #1B7A4C; --good-bg: #E6F4EC; --warn: #9A5B00; --warn-bg: #FFF4DF; --bad: #B42318; --bad-bg: #FDECEA; --info-bg: #E8F1FB;
  --link: #1A5FA3; --focus: #2AAFBE; --logo-plate: #FFFFFF;
  --mark: linear-gradient(135deg, #2BB8C2 0%, #1D6FB8 100%);
  --shadow: 0 1px 2px rgba(11, 42, 91, .06), 0 6px 20px rgba(11, 42, 91, .06);
  --radius: 10px; --radius-sm: 6px;
  --f-display: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --f-body: "Public Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E7EEF7; --ink-2: #C3CFDE; --muted: #97A7BC; --line: #26374F; --line-2: #1C2A3E;
    --paper: #0C1524; --ground: #0A1220; --surface: #111C2E; --surface-2: #15223A;
    --navy: #CFE0F7; --navy-2: #A9C6EE; --blue: #5AA7EC; --teal: #4BC9D5; --teal-soft: #13313A;
    --good: #5CCB93; --good-bg: #10301F; --warn: #F0B45A; --warn-bg: #33250C; --bad: #FF8A7F; --bad-bg: #3A1614; --info-bg: #13263F;
    --link: #8EC3FF; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #E7EEF7; --ink-2: #C3CFDE; --muted: #97A7BC; --line: #26374F; --line-2: #1C2A3E;
  --paper: #0C1524; --ground: #0A1220; --surface: #111C2E; --surface-2: #15223A;
  --navy: #CFE0F7; --navy-2: #A9C6EE; --blue: #5AA7EC; --teal: #4BC9D5; --teal-soft: #13313A;
  --good: #5CCB93; --good-bg: #10301F; --warn: #F0B45A; --warn-bg: #33250C; --bad: #FF8A7F; --bad-bg: #3A1614; --info-bg: #13263F;
  --link: #8EC3FF; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font: 15.5px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: 2px; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--f-display); color: var(--navy); line-height: 1.2; text-wrap: balance; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.02rem; font-family: var(--f-body); font-weight: 700; color: var(--ink); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { top: 12px; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.eyebrow { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); font-weight: 700; margin-bottom: .6rem; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 760px; }
.prose { max-width: 68ch; }

/* ---------- demo banner */
.demo-banner { background: #0B2A5B; color: #EAF3FF; font-size: .86rem; padding-block: 8px; }
.demo-banner .wrap { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.demo-banner b { color: #7FE3EC; }
.demo-banner button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: 3px 12px; font: inherit; cursor: pointer; }
.demo-banner button:hover { background: rgba(255,255,255,.12); }

/* ---------- header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo-plate { background: var(--logo-plate); border-radius: 8px; padding: 2px; display: inline-flex; line-height: 0; }
.brand img { height: 60px; width: 60px; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 11px; border-radius: 6px; font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--surface-2); color: var(--navy); }
.nav a[aria-current="page"] { color: var(--navy); background: var(--teal-soft); }
.header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.header-actions .menu-btn { display: none; }
@media (max-width: 380px) { .header-actions { gap: 5px; } .header-actions .btn-sm { padding: 6px 8px; font-size: .8rem; } .site-header .brand img { width: 46px; height: 46px; } }
@media (max-width: 1100px) {
  .header-actions .menu-btn { display: inline-flex; }
  .site-header .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 14px; }
  .site-header.open .nav { display: flex; }
  .header-actions .hide-sm { display: none; }
}

/* ---------- buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; padding: 10px 18px; font: 600 .95rem/1.2 var(--f-body); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .btn-primary { background: #2C79C9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { background: #2C79C9; } }
.btn-primary:hover { background: var(--navy-2); }
.btn-teal { background: var(--mark); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--navy); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--blue); }
.btn-ghost { background: transparent; color: var(--link); padding-inline: 8px; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .86rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: 6px; color: var(--ink); }
.field { margin-bottom: 16px; }
.hint { font-size: .84rem; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: 15px/1.4 var(--f-body);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--focus) 45%, transparent); border-color: var(--teal); }
.field-error { color: var(--bad); font-size: .86rem; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- surfaces */
main { min-height: 60vh; }
.section { padding-block: 48px; }
.section-tight { padding-block: 28px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel + .panel { margin-top: 16px; }
/* side-by-side layouts: panels in a grid row must not inherit the stacked-panel gap, or they sit lower than their neighbours */
:is(.audience-grid, .grid-2, .cards, .kpis, .dash-grid, .grid-3, .cols) > .panel + .panel { margin-top: 0; }
.panel-flush { padding: 0; overflow: hidden; }
.panel h3:first-child, .panel h2:first-child { margin-top: 0; }
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: 32px 26px; }
.page-head p { color: var(--ink-2); max-width: 70ch; margin-bottom: 0; }
.backbar { padding-top: 14px; padding-bottom: 0; }
.btn-back { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; font-size: .92rem; color: var(--surface); background: var(--navy); border: 2px solid var(--navy); border-radius: 999px; padding: 7px 18px 7px 13px; cursor: pointer; box-shadow: 0 2px 6px rgba(6,16,31,.18); }
.btn-back:hover { background: var(--navy-2); border-color: var(--navy-2); }
.btn-back:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.btn-back span { font-size: 1.05rem; line-height: 1; }
.crumbs { font-size: .86rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.stack > * + * { margin-top: 16px; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

/* ---------- pills / status */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); border-color: transparent; }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.pill.info { background: var(--info-bg); color: var(--link); border-color: transparent; }
.pill.teal { background: var(--teal-soft); color: var(--teal); border-color: transparent; }
.notice { border-radius: 8px; padding: 12px 14px; background: var(--info-bg); color: var(--ink); border-left: 4px solid var(--blue); font-size: .94rem; }
.notice.warn { background: var(--warn-bg); border-left-color: var(--warn); }
.notice.bad { background: var(--bad-bg); border-left-color: var(--bad); }
.notice.good { background: var(--good-bg); border-left-color: var(--good); }
.notice p:last-child { margin-bottom: 0; }

/* ---------- hero */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: 56px; }
.hero p.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 56ch; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 28px; padding-block: 36px; } }
/* photos */
.hero-photo { margin: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 18px 40px rgba(6,16,31,.16); aspect-ratio: 16 / 9; background: var(--surface-2); }
.hero-photo img, .head-photo img, .auth-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.journey-band { background: var(--ground); }
.journey.journey-row ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 14px; }
.journey.journey-row li { grid-template-columns: 1fr; border-bottom: 0; padding: 0; gap: 8px; align-content: start; }
@media (max-width: 900px) { .journey.journey-row ol { grid-template-columns: 1fr; } .journey.journey-row li { grid-template-columns: 34px 1fr; } }
.page-head--photo .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 36px; align-items: center; }
.head-photo { margin: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; box-shadow: 0 10px 28px rgba(6,16,31,.14); }
@media (max-width: 860px) { .page-head--photo .wrap { grid-template-columns: 1fr; } .head-photo { display: none; } }
.auth-wrap { display: grid; grid-template-columns: 420px minmax(0, 460px); gap: 44px; justify-content: center; align-items: center; }
.auth-photo { margin: 0; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 5; box-shadow: 0 18px 40px rgba(6,16,31,.16); }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: minmax(0, 460px); } .auth-photo { display: none; } }
.journey { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.journey ol { list-style: none; padding: 0; margin: 0; counter-reset: j; }
.journey li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.journey li:last-child { border-bottom: 0; }
.journey li::before { counter-increment: j; content: counter(j); width: 30px; height: 30px; border-radius: 50%; background: var(--mark); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.journey b { display: block; color: var(--navy); }
.journey span { color: var(--muted); font-size: .9rem; }
.honesty { font-size: .86rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; }

/* ---------- cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.course-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.course-card .band { height: 6px; background: var(--mark); }
.course-card.restricted .band { background: repeating-linear-gradient(135deg, var(--line) 0 8px, var(--line-2) 8px 16px); }
.course-card .body { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-card .code { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); }
.course-card h3 { margin: 0; font-size: 1.15rem; }
.course-card h3 a { color: var(--navy); text-decoration: none; }
.course-card h3 a:hover { text-decoration: underline; }
.course-card .desc { color: var(--ink-2); font-size: .93rem; flex: 1; }
.course-card .meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.course-card .foot { border-top: 1px solid var(--line-2); padding: 12px 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.progress { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--mark); border-radius: 99px; }
.progress-label { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: 4px; }
.audience-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.audience-grid .panel h4 { margin-bottom: 4px; }

/* ---------- dashboard */
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .dash-grid { grid-template-columns: 1fr; } }
.continue { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--teal); border-radius: var(--radius); padding: 20px 22px; }
@media (max-width: 640px) { .continue { grid-template-columns: 1fr; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi b { display: block; font: 600 1.6rem/1.1 var(--f-display); color: var(--navy); font-variant-numeric: tabular-nums; }
.kpi span { font-size: .82rem; color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 12px 0; border-bottom: 1px solid var(--line-2); display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.list > li:last-child { border-bottom: 0; }
.empty { text-align: center; padding: 26px 16px; color: var(--muted); }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; }

/* ---------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- learning shell */
.learn { display: grid; grid-template-columns: 320px minmax(0, 1fr); min-height: calc(100vh - 73px); }
.learn-side { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 0; overflow-y: auto; max-height: calc(100vh - 73px); position: sticky; top: 73px; }
.learn-side h2 { font-size: 1.05rem; padding: 0 18px; margin-bottom: 4px; }
.learn-side .course-prog { padding: 0 18px 12px; border-bottom: 1px solid var(--line); }
.mod { border-bottom: 1px solid var(--line-2); }
.mod > h3 { font: 700 .78rem/1.3 var(--f-body); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 14px 18px 6px; margin: 0; }
.lesson-link { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 9px 18px; text-decoration: none; color: var(--ink); font-size: .92rem; align-items: start; }
.lesson-link:hover { background: var(--surface-2); }
.lesson-link[aria-current="page"] { background: var(--teal-soft); box-shadow: inset 3px 0 0 var(--teal); }
.lesson-link.locked { color: var(--muted); }
.lesson-link small { display: block; color: var(--muted); font-size: .78rem; }
.st { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 11px; margin-top: 1px; }
.st.done { background: var(--good); border-color: var(--good); color: #fff; }
.st.part { border-color: var(--teal); background: conic-gradient(var(--teal) var(--p, 0%), transparent 0); }
.st.lock { border-style: dashed; }
.learn-main { padding: 26px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.side-toggle { display: none; }
@media (max-width: 900px) {
  .learn { grid-template-columns: 1fr; }
  .learn-side { position: static; max-height: none; display: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .learn.side-open .learn-side { display: block; }
  .side-toggle { display: inline-flex; margin-bottom: 12px; }
}
.player { background: #06101F; border-radius: 12px; overflow: hidden; position: relative; aspect-ratio: 16 / 9; max-width: 100%; }
.player iframe, .player #yt, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #06101F; }
.player video::cue { font-family: var(--f-body); font-size: 1.05rem; background: rgba(6,16,31,.82); color: #fff; }
.player-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 0; }
.player-bar .progress { flex: 1; min-width: 120px; }
.speed { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.speed button { background: var(--surface); border: 0; padding: 6px 10px; font: 600 .82rem var(--f-body); color: var(--ink-2); cursor: pointer; border-right: 1px solid var(--line); }
.speed button:last-child { border-right: 0; }
.speed button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.sim-player { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #D8E6F7; padding: 20px; background: radial-gradient(120% 90% at 20% 10%, #123B7A 0%, #06101F 70%); }
.sim-player h3 { color: #fff; font-size: clamp(1rem, .8rem + 1vw, 1.5rem); max-width: 30ch; }
.sim-player .time { font-family: var(--f-mono); font-size: 1.1rem; color: #7FE3EC; }
.sim-player .caption { background: rgba(0,0,0,.72); color: #fff; padding: 6px 10px; border-radius: 4px; max-width: 60ch; font-size: .95rem; min-height: 2.2em; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 18px 0 14px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font: 600 .92rem var(--f-body); color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--teal); }
.transcript { max-height: 420px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.transcript p { max-width: 72ch; }
.resource { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.resource summary { padding: 12px 14px; cursor: pointer; font-weight: 600; }
.resource .md { padding: 0 16px 14px; }
.md table { font-size: .88rem; margin: 10px 0; }
.md ul { padding-left: 1.2em; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.req { display: flex; gap: 10px; align-items: center; font-size: .92rem; }
.flag { background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); color: var(--ink); border-radius: 8px; padding: 10px 14px; font-size: .9rem; }

/* ---------- assessments */
.exam-shell { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .exam-shell { grid-template-columns: 1fr; } .exam-aside { order: -1; } }
.exam-aside { position: sticky; top: 90px; }
.timer { font: 600 1.6rem/1 var(--f-mono); color: var(--navy); font-variant-numeric: tabular-nums; }
.timer.low { color: var(--bad); }
.qnav { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; margin: 12px 0; }
.qnav button { height: 38px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 .86rem var(--f-mono); cursor: pointer; position: relative; }
.qnav button.answered { background: var(--teal-soft); border-color: var(--teal); }
.qnav button.current { outline: 2px solid var(--navy); outline-offset: 1px; }
.qnav button.flagged::after { content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.question { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.question .qhead { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .84rem; margin-bottom: 8px; }
.question .prompt { font-size: 1.08rem; color: var(--ink); margin-bottom: 16px; white-space: pre-line; }
.opt { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; font-weight: 400; font-size: .98rem; background: var(--surface); }
.opt:hover { border-color: var(--blue); }
.opt input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--navy); }
.opt.sel { border-color: var(--navy); background: var(--info-bg); }
.opt.right { border-color: var(--good); background: var(--good-bg); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt.missed { border: 2px dashed var(--good); background: var(--surface); }
.opt .opt-tag { align-self: center; font-size: .78rem; font-weight: 600; white-space: nowrap; padding: 2px 8px; border-radius: 999px; }
.opt.right .opt-tag { color: var(--good); background: var(--surface); }
.opt.wrong .opt-tag { color: var(--bad); background: var(--surface); }
.opt.missed .opt-tag { color: var(--good); background: var(--good-bg); }
@media (max-width: 560px) { .opt { grid-template-columns: 22px 1fr; } .opt .opt-tag { grid-column: 2; justify-self: start; } }
.feedback { margin-top: 14px; border-radius: 8px; padding: 12px 14px; font-size: .95rem; }
.feedback.ok { background: var(--good-bg); border-left: 4px solid var(--good); }
.feedback.no { background: var(--bad-bg); border-left: 4px solid var(--bad); }
.save-state { font-size: .82rem; color: var(--muted); }
.score-hero { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
@media (max-width: 640px) { .score-hero { grid-template-columns: 1fr; } }
.score-ring { width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ring, var(--teal)) calc(var(--pct) * 1%), var(--line-2) 0); }
.score-ring > div { width: 104px; height: 104px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.score-ring b { font: 600 1.7rem/1 var(--f-display); color: var(--navy); }
.score-ring small { display: block; color: var(--muted); font-size: .75rem; }
.qresult { border-top: 1px solid var(--line-2); padding: 14px 0; }
.qresult:first-child { border-top: 0; }

/* ---------- certificate */
.cert { background: #FFFFFF; color: #0E1A2B; border: 1px solid #C9D6E6; border-radius: 6px; padding: clamp(22px, 5vw, 56px); position: relative; max-width: 980px; margin: 0 auto; box-shadow: var(--shadow); }
.cert::before { content: ""; position: absolute; inset: 12px; border: 2px solid #0B2A5B; border-radius: 3px; pointer-events: none; }
.cert::after { content: ""; position: absolute; inset: 18px; border: 1px solid #2AAFBE; border-radius: 2px; pointer-events: none; }
.cert-inner { position: relative; display: grid; gap: 14px; text-align: center; justify-items: center; }
.cert img.logo { width: 150px; height: 150px; }
.cert .cred { font: 600 .9rem var(--f-body); letter-spacing: .28em; text-transform: uppercase; color: #1D6FB8; }
.cert .name { font: 600 clamp(1.8rem, 1.2rem + 2.4vw, 3rem)/1.1 var(--f-display); color: #0B2A5B; border-bottom: 1px solid #C9D6E6; padding: 0 24px 8px; }
.cert .ctitle { font: 600 clamp(1.1rem, .9rem + 1vw, 1.5rem)/1.3 var(--f-display); color: #0E1A2B; max-width: 40ch; }
.cert .foot { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: end; width: 100%; margin-top: 18px; font-size: .82rem; color: #3A4A60; }
.cert .foot > div:first-child { text-align: left; } .cert .foot > div:last-child { text-align: right; }
.cert .qr svg { width: 96px; height: 96px; display: block; }
.cert .id { font-family: var(--f-mono); color: #0B2A5B; font-weight: 600; }
.cert .sig { display: grid; justify-items: center; gap: 2px; margin-top: 6px; }
.cert .sig img { width: 200px; height: auto; display: block; margin-bottom: -8px; }
.cert .sig-line { width: 260px; border-top: 1px solid #0B2A5B; }
.cert .sig-name { font-weight: 600; color: #0B2A5B; font-size: .92rem; margin-top: 4px; }
.cert .sig-title { font-size: .78rem; color: #3A4A60; }
.cert .disclaimer { font-size: .72rem; color: #5A6A80; max-width: 70ch; }
@media (max-width: 640px) { .cert .foot { grid-template-columns: 1fr; text-align: center; } .cert .foot > div { text-align: center !important; } .cert .qr { justify-self: center; } }
.cert.revoked .cert-inner { opacity: .35; }
.cert .stamp { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg); border: 4px solid var(--bad); color: var(--bad); font: 800 2rem var(--f-body); letter-spacing: .2em; padding: 6px 18px; z-index: 2; background: rgba(255,255,255,.85); }

/* ---------- admin */
.admin { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - 73px); }
.admin-nav { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 10px; }
.admin-nav a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-size: .93rem; font-weight: 500; }
.admin-nav a:hover { background: var(--surface-2); }
.admin-nav a[aria-current="page"] { background: var(--teal-soft); color: var(--navy); font-weight: 700; }
.admin-nav .grp { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 14px 12px 4px; font-weight: 700; }
.admin-main { padding: 26px clamp(16px, 3vw, 36px) 60px; min-width: 0; }
@media (max-width: 900px) { .admin { grid-template-columns: 1fr; } .admin-nav { display: flex; flex-wrap: wrap; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); } .admin-nav .grp { display: none; } }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.toolbar .field { margin: 0; min-width: 150px; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 52px; gap: 10px; align-items: center; font-size: .88rem; }
.bar-track { height: 14px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.bar-track > i { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.bar-track.good > i { background: var(--good); }
.qedit { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: var(--surface); margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .92rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }

/* ---------- footer, toast, modal */
.site-footer { background: #0B2A5B; color: #C9D8EC; margin-top: 60px; padding-block: 36px; font-size: .9rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer a { color: #EAF3FF; }
.site-footer h4 { color: #fff; font-size: .9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }
.toast-host { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); right: 18px; left: 18px; display: grid; justify-items: end; gap: 8px; z-index: 60; pointer-events: none; }
.toast { background: #0B2A5B; color: #fff; padding: 12px 16px; border-radius: 8px; box-shadow: var(--shadow); max-width: 440px; pointer-events: auto; font-size: .93rem; }
.toast.bad { background: #8F1C13; } .toast.good { background: #14613C; }
.modal-back { position: fixed; inset: 0; background: rgba(6, 16, 31, .55); display: grid; place-items: center; z-index: 70; padding: 16px; }
.modal { background: var(--surface); border-radius: 12px; max-width: 540px; width: 100%; padding: 24px; box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto; }
.modal h2 { font-size: 1.3rem; }
.loading { padding: 60px 20px; text-align: center; color: var(--muted); }
.loading::before { content: ""; display: block; width: 28px; height: 28px; margin: 0 auto 12px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--teal); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
@media print {
  @page { size: letter landscape; margin: 0.35in; }
  body { background: #fff; } .site-header, .site-footer, .demo-banner, .no-print, .toast-host, .backbar, .skip-link { display: none !important; }
  .cert { box-shadow: none; border: 0; break-inside: avoid; page-break-inside: avoid; padding: 40px 56px; max-width: none; min-height: 7.55in; box-sizing: border-box; display: grid; align-content: center; } main { min-height: 0; }
  .section-tight:has(#cert) { padding: 0 !important; }
  .cert-inner { gap: 9px; } .cert img.logo { width: 112px; height: 112px; } .cert .name { font-size: 2.5rem; }
  .cert .sig { margin-top: 0; } .cert .sig img { width: 150px; margin-bottom: -6px; } .cert .foot { margin-top: 6px; } .cert .qr svg { width: 84px; height: 84px; }
}

/* ---------- lesson calculators */
.tab-try { color: var(--teal) !important; font-weight: 700; }
.try-callout { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 14px; padding: 14px 16px; border: 1px solid var(--teal); border-left-width: 4px; border-radius: 10px; background: var(--teal-soft); }
.try-callout b { display: block; color: var(--navy); }
.tools { padding-top: 6px; }
.calc { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--surface); margin-bottom: 16px; }
.calc h3 { margin: 0 0 12px; font-size: 1.1rem; }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 720px) { .calc-grid { grid-template-columns: 1fr; } .try-callout { flex-direction: column; align-items: flex-start; } }
.calc-field { display: block; margin-bottom: 10px; font-weight: 400; }
.calc-field > span:first-child { display: block; font-size: .86rem; color: var(--ink-2); margin-bottom: 4px; }
.calc-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 0 10px; }
.calc-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,111,184,.18); }
.calc-input input { border: 0; outline: 0; background: transparent; width: 100%; padding: 9px 4px; font: inherit; font-variant-numeric: tabular-nums; min-width: 0; box-shadow: none; }
.calc-unit { color: var(--muted); font-size: .95rem; }
.calc-out { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 14px; }
.calc-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .93rem; }
.calc-row:last-child { border-bottom: 0; }
.calc-row.strong { font-size: 1.02rem; }
.calc-row.strong b { color: var(--navy); }
.calc-row.good b { color: var(--good); } .calc-row.bad b { color: var(--bad); } .calc-row.warn b { color: var(--warn); }
.calc-note { margin: 12px 0 6px; }

/* ---------- glossary & flashcards */
.gl-toolbar { align-items: end; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; align-self: end; margin-bottom: 2px; }
.seg button { font: inherit; font-weight: 600; font-size: .92rem; padding: 9px 16px; border: 0; background: var(--surface); color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.gl-list { margin: 0; display: grid; gap: 12px; }
.gl-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.gl-item dt { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; color: var(--navy); margin-bottom: 6px; }
.gl-item dd { margin: 0; } .gl-item dd p { margin: 0 0 8px; }
.gl-watch { background: var(--warn-bg); border-left: 3px solid var(--warn); padding: 8px 12px; border-radius: 6px; font-size: .93rem; }
.gl-src { margin: 0 !important; }
.fc-wrap { max-width: 720px; margin: 0 auto; }
.fc-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.fc { display: block; width: 100%; min-height: 300px; border: 0; padding: 0; background: none; cursor: pointer; perspective: 1400px; font: inherit; text-align: left; }
.fc:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: 16px; }
.fc-inner { position: relative; display: block; min-height: 300px; transition: transform .45s ease; transform-style: preserve-3d; }
.fc.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 28px 32px; border-radius: 16px; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(6,16,31,.10); }
.fc-front { background: linear-gradient(135deg, var(--navy) 0%, #123B7A 100%); color: #fff; align-items: center; text-align: center; }
.fc-front .eyebrow { color: #9fe3ea; } .fc-front .muted { color: #c9d6ea !important; }
.fc-term { font-family: var(--f-display); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 700; line-height: 1.2; }
.fc-back { background: var(--surface); transform: rotateY(180deg); overflow-y: auto; }
.fc-def { font-size: 1.08rem; color: var(--ink); }
.fc-watch { background: var(--warn-bg); border-left: 3px solid var(--warn); padding: 10px 12px; border-radius: 6px; font-size: .95rem; }
.fc-actions { justify-content: space-between; margin-top: 16px; }
@media (prefers-reduced-motion: reduce) { .fc-inner { transition: none; } }
@media (max-width: 600px) { .fc, .fc-inner { min-height: 360px; } .fc-face { padding: 22px; } .fc-actions { justify-content: center; } }

/* ---------- dashboard progress map */
.pmap-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.pmap-head h2 { margin: 0; font-size: 1.3rem; }
.pmap-sum { color: var(--muted); font-size: .92rem; }
.pmap-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; position: relative; }
.pmap-step { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-right: 18px; }
.pmap-step::before { content: ""; position: absolute; top: 19px; left: 40px; right: 0; height: 3px; background: var(--line); border-radius: 2px; }
.pmap-step:last-child::before { display: none; }
.pmap-step.done::before { background: var(--teal); }
.pmap-dot { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface); border: 2px solid var(--line); color: var(--muted); }
.pmap-step.done .pmap-dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.pmap-step.active .pmap-dot, .pmap-step.next .pmap-dot { border-color: var(--navy); color: var(--navy); }
.pmap-step.current .pmap-dot { background: var(--navy); color: #fff; box-shadow: 0 0 0 5px rgba(11,42,91,.14); }
.pmap-step.locked .pmap-dot { background: var(--surface-2); border-style: dashed; }
.pmap-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; width: 100%; }
.pmap-title { font-weight: 700; color: var(--navy); text-decoration: none; line-height: 1.3; }
.pmap-title:hover { text-decoration: underline; }
.pmap-step.locked .pmap-title { color: var(--ink-2); }
.pmap-bar { height: 6px; background: var(--line-2); border-radius: 4px; overflow: hidden; margin: 4px 0 2px; max-width: 220px; }
.pmap-bar i { display: block; height: 100%; background: var(--mark); }
.pmap-state { color: var(--muted); }
.pmap-step.done .pmap-state { color: var(--good); font-weight: 600; }
.pmap-step.current .pmap-state { color: var(--navy); font-weight: 600; }
.pmap-next { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.pmap-next .btn { margin-left: auto; }
@media (max-width: 720px) {
  .pmap-steps { grid-auto-flow: row; gap: 14px; }
  .pmap-step { flex-direction: row; padding-right: 0; }
  .pmap-step::before { top: 42px; bottom: -14px; left: 19px; right: auto; width: 3px; height: auto; }
  .pmap-next .btn { margin-left: 0; }
}

/* ---------- UX audit fixes (Sept 2026) */
main:focus, main:focus-visible { outline: none; }                       /* programmatic focus on page change — no ring around the whole page */
.wrap.narrow { max-width: 1180px; } .wrap.narrow > * { max-width: 760px; } /* narrow pages align with the header's left edge */
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.cols > * { min-width: 0; }
.grid-2 > .field { margin-bottom: 16px; }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; gap: 0; } }
details.resource > summary { padding-left: 1.4em; text-indent: -1.1em; }
.nowrap { white-space: nowrap; }
@media (max-width: 700px) {
  .toolbar .field, .toolbar .seg { flex: 1 1 100%; min-width: 0; }
  .toolbar .field input, .toolbar .field select { width: 100%; }
  .tabs { flex-wrap: wrap; overflow-x: visible; }
}
/* sign-in style pages: the header already shows the logo on desktop */
@media (min-width: 901px) { .auth-form .logo-plate { display: none; } .auth-form > div:first-child:has(.logo-plate) { display: none; } }
@media (min-width: 901px) { .course-cols > aside { position: sticky; top: 16px; } }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } .course-cols > aside { order: -1; } }
.btn.is-locked { opacity: .75; cursor: not-allowed; }
.learn-side::after { content: ""; position: sticky; bottom: -18px; display: block; height: 26px; margin-top: -26px; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
@media (max-width: 900px) { .exam-shell:not(.timed) .exam-aside { order: 1; position: static; } }
.az { position: sticky; top: 72px; z-index: 5; display: flex; flex-wrap: wrap; gap: 2px; padding: 8px 10px; margin-bottom: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 4px 12px rgba(6,16,31,.06); }
.az a, .az span { min-width: 28px; text-align: center; padding: 4px 0; border-radius: 6px; font-weight: 700; font-size: .9rem; }
.az a { color: var(--navy); text-decoration: none; } .az a:hover { background: var(--info-bg); }
.az span { color: var(--line); }
.gl-item { scroll-margin-top: 140px; transition: box-shadow .3s; } .gl-item.flash { box-shadow: 0 0 0 3px var(--teal); }
.admin-nav-m { display: none; }
@media (max-width: 900px) { .admin-nav { display: none !important; } .admin-nav-m { display: block; margin: 0 16px 16px; } .admin-nav-m select { width: 100%; margin-top: 4px; } }
tr.row-muted td { color: var(--muted); } tr.row-muted a { color: var(--muted); }
.menu { position: relative; display: inline-block; }
.menu > summary { list-style: none; cursor: pointer; } .menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(6,16,31,.16); padding: 6px; display: grid; }
.menu-list button { font: inherit; font-size: .93rem; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 6px; color: var(--ink); cursor: pointer; }
.menu-list button:hover, .menu-list button:focus-visible { background: var(--surface-2); }
.menu-list button.danger { color: var(--bad); }
.menu-list hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 0; }
@media (max-width: 600px) { .learner-actions > * { flex: 1 1 100%; } .learner-actions .btn { width: 100%; } .menu-list { left: 0; right: auto; } .menu > summary { width: 100%; } }
.btn-danger-outline { color: var(--bad) !important; border-color: var(--bad) !important; }
.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 800px) { .kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

summary .pill { margin-left: 8px; }

/* slide lessons */
.slide-frame { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #0b2655; aspect-ratio: 16 / 9; }
.slide-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.slide-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 8px; }
.slide-bar #sl-next { min-width: 9.5em; }
.slide-dots { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 12px; }
.slide-dots button { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); background: transparent; padding: 0; cursor: pointer; }
.slide-dots button.seen { background: var(--teal); border-color: var(--teal); }
.slide-dots button[aria-current="true"] { outline: 2px solid var(--navy); outline-offset: 2px; }
.slide-notes { margin: 6px 0 18px; }
.slide-notes h2 { font-size: 1.15rem; margin: 0 0 8px; }
.slide-notes p { margin: 0; line-height: 1.65; }
.transcript h3 { margin: 18px 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.transcript h3:first-child { margin-top: 0; }

/* ---------- Academy Guide (floating helper, lower right) */
.guide { position: fixed; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 55; display: grid; justify-items: end; gap: 10px; font-size: .95rem; }
.guide[hidden] { display: none; }
body.has-guide .toast-host { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
.guide button { font: inherit; }
.guide-launch { display: inline-flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; border-radius: 999px; border: 2px solid var(--navy); background: var(--navy); color: var(--surface); font-weight: 700; cursor: pointer; box-shadow: 0 10px 28px rgba(6,16,31,.28); }
.guide-launch:hover { background: var(--navy-2); border-color: var(--navy-2); }
.guide-launch:focus-visible, .guide button:focus-visible, .guide a:focus-visible, .guide input:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.guide-launch img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #fff; }
.guide-launch[hidden] { display: none; }
.guide-bubble { position: relative; max-width: 290px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 12px 38px 12px 14px; box-shadow: 0 12px 30px rgba(6,16,31,.18); cursor: pointer; }
.guide-bubble p { margin: 0; font-size: .92rem; line-height: 1.45; }
.guide-bubble::after { content: ""; position: absolute; right: 34px; bottom: -8px; width: 14px; height: 14px; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.guide-x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; }
.guide-x:hover { background: var(--surface-2); color: var(--ink); }
.guide-panel { width: min(390px, calc(100vw - 36px)); max-height: min(660px, calc(100vh - 36px)); display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 22px 50px rgba(6,16,31,.28); overflow: hidden; }
.guide-panel[hidden] { display: none; }
.guide-panel.is-exp { width: min(600px, calc(100vw - 36px)); max-height: min(860px, calc(100vh - 36px)); }
.guide-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 10px; background: var(--navy); color: var(--surface); }
.guide-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: transparent; border: 0; color: inherit; text-align: left; padding: 2px; border-radius: 8px; cursor: default; }
.guide-panel.is-min .guide-title { cursor: pointer; }
.guide-title img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #fff; flex: none; }
.guide-title span { display: grid; line-height: 1.2; } .guide-title small { opacity: .8; font-size: .78rem; }
.guide-tools { display: flex; gap: 2px; }
.guide-tools button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }
.guide-tools button:hover { background: rgba(255,255,255,.14); }
.guide-panel.is-min { width: min(300px, calc(100vw - 36px)); }
.guide-panel.is-min .guide-body, .guide-panel.is-min .guide-ask, .guide-panel.is-min [data-g="mute"], .guide-panel.is-min [data-g="expand"] { display: none; }
.guide-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.guide-body > * { flex: none; }
.guide.is-logo .guide-launch img, .guide.is-logo .guide-title img, .guide.is-logo .guide-say--intro img { object-fit: contain; padding: 3px; }
body.guide-open .toast-host { right: calc(430px + env(safe-area-inset-right, 0px)); }
.guide-stage { border-radius: 12px; overflow: hidden; background: #0B2A5B; aspect-ratio: 16 / 9; }
.guide-stage video { width: 100%; height: 100%; display: block; object-fit: cover; background: #0B2A5B; }
.guide-stage--still { display: grid; place-items: center; aspect-ratio: auto; padding: 14px; background: var(--teal-soft); }
.guide-stage--still img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #fff; }
.guide-say h3 { font-size: 1.05rem; margin: 0 0 6px; }
.guide-say p { margin: 0 0 8px; line-height: 1.55; } .guide-say p:last-child { margin-bottom: 0; }
.guide-say--intro { display: flex; gap: 12px; align-items: flex-start; }
.guide-say--intro img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; background: #fff; border: 1px solid var(--line); }
.guide-kicker { font-size: .74rem !important; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); margin-bottom: 4px !important; }
.guide-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-topics { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.guide-topics button { border: 1px solid var(--line); background: var(--surface-2); color: var(--navy); border-radius: 999px; padding: 6px 12px; font-size: .86rem; font-weight: 600; cursor: pointer; text-align: left; }
.guide-topics button:hover { border-color: var(--navy); }
.guide-topics button[aria-pressed="true"] { background: var(--navy); color: var(--surface); border-color: var(--navy); }
.guide-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.guide-results button { width: 100%; display: grid; gap: 2px; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 9px 11px; cursor: pointer; }
.guide-results button:hover { border-color: var(--navy); background: var(--surface-2); }
.guide-results small { color: var(--muted); font-size: .82rem; }
.guide-tag { justify-self: start; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--teal); }
.guide-back { margin: 0; }
.guide-ask { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface-2); }
.guide-ask input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
@media (max-width: 640px) {
  .guide { right: calc(12px + env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .guide-launch { padding: 5px; } .guide-launch span { display: none; } .guide-launch img { width: 48px; height: 48px; }
  .guide.is-open { inset: 0; right: 0; bottom: 0; }
  .guide.is-open .guide-panel { width: 100vw; max-width: none; height: 100dvh; max-height: none; border-radius: 0; border: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .guide.is-open .guide-body { flex: 1; }
  .guide-exp { display: none !important; }
  body.guide-sheet { overflow: hidden; }
  body.has-guide .toast-host { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  body.guide-open .toast-host { right: 18px; top: calc(12px + env(safe-area-inset-top, 0px)); bottom: auto; }
}
.guide.is-quiet .guide-launch { padding: 4px; } .guide.is-quiet .guide-launch span { display: none; } .guide.is-quiet .guide-launch img { width: 42px; height: 42px; }
@media print { .guide { display: none !important; } }
