/* Yale Alternative Investments brand system, matched to yainvestments.org
   (see "YAI Branding/YAI_BRAND_AGENT.md"). Nine colors, Cormorant Garamond, flat surfaces, square corners. */
@font-face { font-family: "Cormorant Garamond"; src: url("brand/fonts/CormorantGaramond-VF.ttf") format("truetype"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("brand/fonts/CormorantGaramond-Italic-VF.ttf") format("truetype"); font-weight: 300 700; font-style: italic; font-display: swap; }

:root {
  --yai-navy: #011F60;
  --yai-midnight: #000F30;
  --yai-slate: #455A88;
  --yai-steel: #7688B0;
  --yai-periwinkle: #A2B3D7;
  --yai-sky: #83B7E6;
  --yai-paper: #F8F7F7;
  --yai-stone: #E8E6E6;
  --yai-white: #FFFFFF;
  --yai-overlay: rgba(1, 31, 96, 0.72);
  --yai-font: "Cormorant Garamond", "EB Garamond", Garamond, Georgia, serif;

  /* Annotation scale: classic chess-review colors, kept deliberately off-brand for instant recognition. */
  --brilliant: #1fb5ad;
  --great: #5b8fc7;
  --book: #a8835a;
  --inaccuracy: #e9b949;
  --mistake: #ee8a2b;
  --blunder: #df3f3c;

  --radius: 0;
  --rule: 1.5px solid var(--yai-slate);
  --gutter: 32px;
  font-family: var(--yai-font);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--yai-white); color: var(--yai-navy); }
/* Cormorant has a small x-height, so everything sits a size up; numbers use lining figures. */
body { min-height: 100vh; font-size: 19px; line-height: 1.5; display: flex; flex-direction: column; font-variant-numeric: lining-nums; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--yai-slate); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--yai-navy); line-height: 1.15; }

/* ---------- site header: white bar, navy badge, tracked-caps navigation (as on yainvestments.org) ---------- */
/* Measured from the live yainvestments.org (Wix) header: an 86px bar on the site's 980px content column,
   the 53px badge 70px left of that column, and tabs that grow evenly to fill it. Each tab is 10px outer
   padding around a 4px top bar, then text padded 5px 8px 8px on a 29px line. */
.site-header { background: var(--yai-white); position: sticky; top: 0; z-index: 20; }
.site-header .inner { position: relative; width: 980px; margin: 0 auto; height: 86px; }
.site-header .badge-link { position: absolute; left: -70px; top: 16px; }
.site-header .badge-link img { width: 53px; height: 53px; display: block; }
.site-nav { position: absolute; left: 0; right: 0; top: 28px; display: flex; }
.site-nav a {
  position: relative; flex: 1 1 auto; padding: 9px 18px 8px; text-align: center; white-space: nowrap;
  color: #000; font-family: var(--yai-font); font-size: 15px; font-weight: 600; line-height: 29px; letter-spacing: normal; text-transform: uppercase;
}
.site-nav a::before { content: ""; position: absolute; left: 10px; right: 10px; top: 0; height: 4px; background: transparent; }
.site-nav a:hover { color: var(--yai-steel); }
.site-nav a:hover::before { background: var(--yai-steel); }
.site-nav a.current { color: var(--yai-slate); }
.site-nav a.current::before { background: var(--yai-slate); }
/* Narrower than the column plus badge: keep the badge on screen and let the tabs shrink. */
@media (max-width: 1140px) and (min-width: 961px) {
  .site-header .inner { width: auto; margin: 0 16px 0 86px; }
  .site-nav a { padding-left: 10px; padding-right: 10px; }
}

/* ---------- tool bar: page name + the tool's own tabs ---------- */
.toolbar { background: var(--yai-navy); color: var(--yai-white); }
.toolbar .inner { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 28px; min-height: 52px; }
.toolbar .tool-name { font-size: 13px; font-weight: 700; letter-spacing: .25em; text-transform: uppercase; color: var(--yai-sky); white-space: nowrap; }
.toolbar a.tool-name:hover { color: var(--yai-white); }
.toolbar nav { display: flex; gap: 24px; }
.toolbar nav a { color: var(--yai-periwinkle); padding: 13px 0 12px; border-bottom: 2px solid transparent; font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.toolbar nav a.active, .toolbar nav a:hover { color: var(--yai-white); border-bottom-color: var(--yai-sky); }
.toolbar .spacer { flex: 1; }
.toolbar .note { color: var(--yai-periwinkle); font-size: 16px; font-style: italic; }

main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 40px var(--gutter); flex: 1; }

/* ---------- site footer: Stone band, connect line, badge, disclaimers ---------- */
.site-footer { background: var(--yai-stone); color: var(--yai-navy); margin-top: 48px; }
.site-footer .inner { max-width: 1040px; margin: 0 auto; padding: 36px var(--gutter) 28px; }
.site-footer .top { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding-bottom: 22px; border-bottom: 1px solid var(--yai-periwinkle); }
.site-footer h4 { margin: 0 0 8px; font-size: 15px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--yai-navy); }
.site-footer .links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 17px; }
.site-footer .links a { color: var(--yai-navy); border-bottom: 1px solid var(--yai-steel); }
.site-footer .badge-link img { width: 64px; height: 64px; display: block; }
.site-footer p { margin: 14px 0 0; font-size: 14px; line-height: 1.45; font-style: italic; color: var(--yai-slate); }
.site-footer .copy { font-style: normal; }

/* ---------- feedback band, above the footer (and shown even when embedded) ---------- */
.feedback { background: var(--yai-paper); border-top: 1px solid var(--yai-stone); margin-top: 48px; }
.feedback:not([hidden]) + .site-footer { margin-top: 0; }
.feedback .inner { max-width: 1040px; margin: 0 auto; padding: 32px var(--gutter); }
.feedback h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--yai-navy); }
.feedback p { margin: 0 0 12px; color: var(--yai-slate); }
.feedback textarea { display: block; width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 16px; resize: vertical;
  background: var(--yai-white); border: 1px solid var(--yai-periwinkle); border-radius: 6px; }
.feedback textarea:focus { outline: 2px solid var(--yai-sky); outline-offset: 1px; }
.feedback .row { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }

/* Embedded in the website (iframe or ?embed): the site supplies its own header and footer. */
.embedded .site-header, .embedded .site-footer { display: none; }
.embedded .toolbar { position: sticky; top: 0; z-index: 20; }

/* ---------- generic ---------- */
.btn {
  border: 1px solid var(--yai-navy); background: var(--yai-white); color: var(--yai-navy);
  padding: 9px 18px; border-radius: var(--radius); display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; line-height: 1.2;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--yai-paper); }
.btn.primary { background: var(--yai-navy); color: var(--yai-white); }
.btn.primary:hover { background: var(--yai-midnight); border-color: var(--yai-midnight); }
.btn.danger { background: var(--yai-midnight); border-color: var(--yai-midnight); color: var(--yai-white); }
.btn.big { padding: 12px 26px; font-size: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.card { background: var(--yai-white); border: 1px solid var(--yai-stone); border-radius: var(--radius); }
.muted { color: var(--yai-slate); }
.faint { color: var(--yai-slate); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.eyebrow, .section-title {
  font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .22em;
  color: var(--yai-slate); margin: 0 0 14px;
}
.section-title::after { content: ""; display: block; width: 48px; border-bottom: var(--rule); margin-top: 8px; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--yai-stone); border-top-color: var(--yai-navy);
  animation: spin .8s linear infinite; display: inline-block; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Full-width bands, as on the website's home page. They break out of <main>'s column. */
.band { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding: 64px max(var(--gutter), calc(50vw - 620px + var(--gutter))); }
.band.paper { background: var(--yai-paper); border-top: 1px solid var(--yai-stone); border-bottom: 1px solid var(--yai-stone); }
.band-title { text-align: center; font-size: 44px; font-weight: 500; margin: 0 0 8px; }
.band-intro { text-align: center; color: var(--yai-slate); font-size: 20px; margin: 0 auto 32px; max-width: 720px; }

/* ---------- home ---------- */
.photo-band {
  position: relative; margin: -40px calc(50% - 50vw) 0; padding: 88px var(--gutter) 80px; color: var(--yai-white); text-align: center;
  background: url("brand/campus.jpg") center 68% / cover no-repeat;
}
.photo-band::before { content: ""; position: absolute; inset: 0; background: var(--yai-overlay); }
.photo-band > * { position: relative; }
.photo-band .eyebrow { color: var(--yai-periwinkle); }
.photo-band h1 { color: var(--yai-white); font-size: 64px; font-weight: 500; }
.photo-band p { color: var(--yai-white); font-size: 21px; margin: 12px auto 0; max-width: 720px; }
.hero { display: flex; justify-content: space-between; align-items: end; margin-bottom: 26px; gap: 20px; flex-wrap: wrap; }
.hero h1 { font-size: 40px; font-weight: 500; }
.hero p { margin: 6px 0 0; color: var(--yai-slate); }
.quick { padding-top: 56px; }

.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.preset {
  text-align: left; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--yai-stone); background: var(--yai-white);
  display: flex; flex-direction: column; gap: 4px; min-height: 120px; transition: border-color .15s, background .15s;
}
.preset:hover { border-color: var(--yai-navy); }
.preset.selected { background: var(--yai-navy); border-color: var(--yai-navy); }
.preset .name { font-weight: 600; font-size: 19px; letter-spacing: .06em; text-transform: uppercase; color: var(--yai-navy); }
.preset .desc { color: var(--yai-navy); font-size: 17px; flex: 1; line-height: 1.35; }
.preset .count { font-size: 15px; color: var(--yai-slate); font-style: italic; }
.preset.selected .name { color: var(--yai-white); }
.preset.selected .desc, .preset.selected .count { color: var(--yai-periwinkle); }
.preset[disabled] { opacity: .4; pointer-events: none; }
/* Full rows: 2 rows of 6 for the mock interview, 2 rows of 4 for the quiz. */
.presets.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.presets.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.presets.six .preset { padding: 16px; }
.presets.six .name { font-size: 17px; }
@media (max-width: 1100px) { .presets.six { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.builder { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
.builder .card { padding: 28px; }
.groups { columns: 2; column-gap: 32px; }
.group { break-inside: avoid; margin-bottom: 20px; }
.group h4 { margin: 0 0 6px; font-size: 18px; font-weight: 600; color: var(--yai-navy); display: flex; justify-content: space-between; padding-bottom: 4px; border-bottom: var(--rule); }
.group h4 button { background: none; border: 0; color: var(--yai-slate); font-size: 13px; padding: 0; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.check { display: flex; gap: 8px; align-items: center; padding: 3px 0; font-size: 18px; cursor: pointer; }
.check input { accent-color: var(--yai-navy); }
.check .n { margin-left: auto; color: var(--yai-slate); font-size: 16px; }
.field { margin-bottom: 18px; }
.field label.lbl { display: block; font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--yai-slate); margin-bottom: 6px; }
.seg { display: inline-flex; border: 1px solid var(--yai-navy); border-radius: var(--radius); overflow: hidden; }
.seg button { background: var(--yai-white); border: 0; padding: 7px 14px; color: var(--yai-navy); font-size: 17px; }
.seg button + button { border-left: 1px solid var(--yai-navy); }
.seg button.on { background: var(--yai-navy); color: var(--yai-white); }
.field input[type=number], .field select {
  background: var(--yai-white); border: 1px solid var(--yai-stone); color: var(--yai-navy); border-radius: var(--radius); padding: 7px 10px; width: 100%;
}
.field input:focus, .field select:focus { outline: 1.5px solid var(--yai-slate); outline-offset: 0; }
.summary-box { border-top: var(--rule); margin-top: 8px; padding-top: 16px; }
.big-n { font-size: 52px; font-weight: 600; color: var(--yai-navy); line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }

/* ---------- interview (HireVue-like) ---------- */
.interview { display: grid; grid-template-columns: 1fr 1.25fr; gap: 24px; align-items: stretch; min-height: calc(100vh - 220px); }
.q-panel { padding: 30px; display: flex; flex-direction: column; gap: 18px; }
.q-progress { display: flex; gap: 4px; }
.q-progress span { flex: 1; height: 4px; background: var(--yai-stone); }
.q-progress span.done { background: var(--yai-navy); }
.q-progress span.cur { background: var(--yai-slate); }
.q-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--yai-slate); font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.q-context { font-size: 16px; line-height: 1.55; color: var(--yai-navy); background: var(--yai-paper); border-left: 3px solid var(--yai-slate); padding: 10px 14px; }
.q-context span { display: block; font-size: 13px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--yai-slate); margin-bottom: 4px; }
.scorecard .q-meta { justify-content: flex-start; letter-spacing: .15em; }
.scorecard .q-context { font-size: 15px; padding: 8px 12px; }
.q-text { font-size: 27px; line-height: 1.35; font-weight: 700; color: var(--yai-navy); }
.q-actions { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.cam-panel { position: relative; overflow: hidden; background: var(--yai-midnight); display: grid; place-items: center; }
.cam-panel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-panel.voice { background: var(--yai-navy); min-height: 420px; }
.voice-idle { padding: 24px; text-align: center; color: var(--yai-white); }
.voice-idle .eyebrow { color: var(--yai-sky); }
.voice-idle p:not(.eyebrow) { color: var(--yai-periwinkle); font-size: 20px; margin: 0 0 18px; }
.voice-idle .meter { width: 220px; margin: 0 auto; background: var(--yai-midnight); }
.voice-idle .meter i { background: var(--yai-sky); }
.player.voice { display: grid; place-items: center; background: var(--yai-navy); }
.player.voice audio { width: min(100%, 420px); }
.cam-overlay { position: absolute; inset: 0; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; }
.rec-badge { align-self: flex-start; display: flex; gap: 8px; align-items: center; background: var(--yai-navy); color: var(--yai-white); padding: 6px 12px; font-weight: 700; font-size: 13px; letter-spacing: .3em; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--yai-white); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.timer-big { align-self: flex-end; background: var(--yai-navy); color: var(--yai-white); padding: 6px 16px; font-variant-numeric: lining-nums tabular-nums; font-size: 30px; font-weight: 700; }
.timer-big.warn { color: var(--yai-sky); }
.timer-big.crit { background: var(--yai-white); color: var(--yai-navy); }
.ring-wrap { position: absolute; inset: 0; display: grid; place-items: center; background: var(--yai-overlay); }
.ring { position: relative; width: 170px; height: 170px; color: var(--yai-white); }
.ring svg { transform: rotate(-90deg); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .lbl b { font-size: 56px; display: block; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.ring .lbl small { color: var(--yai-periwinkle); font-size: 13px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; }
.meter { height: 6px; background: var(--yai-stone); overflow: hidden; width: 160px; }
.meter i { display: block; height: 100%; width: 0; background: var(--yai-slate); transition: width .08s; }
.attempts { font-size: 15px; color: var(--yai-slate); font-style: italic; }

.status { font-size: 14px; color: var(--yai-slate); display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.score-chip { font-weight: 700; padding: 2px 10px; font-variant-numeric: lining-nums tabular-nums; font-size: 18px; }

/* ---------- review (Adobe Podcast-like) ---------- */
.review-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.qtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.qtab { background: var(--yai-paper); padding: 5px 12px; font-size: 15px; color: var(--yai-slate); display: inline-flex; gap: 6px; align-items: center; border-bottom: 2px solid transparent; font-variant-numeric: lining-nums; }
.qtab.on { color: var(--yai-navy); border-bottom-color: var(--yai-navy); font-weight: 600; }
.review-top { display: grid; grid-template-columns: 1.55fr 1fr; gap: 24px; margin-bottom: 24px; }
.player { overflow: hidden; background: var(--yai-midnight); aspect-ratio: 16/9; position: relative; }
.player video { width: 100%; height: 100%; display: block; background: var(--yai-midnight); }
.player .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--yai-periwinkle); }
.scorecard { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.scorecard .q { font-weight: 700; font-size: 18px; color: var(--yai-navy); line-height: 1.35; }
.score-row { display: flex; gap: 18px; align-items: center; }
.score-num { flex: none; text-align: left; min-width: 92px; }
.score-num b { display: block; font-size: 52px; line-height: 1; font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.score-num small { font-size: 13px; font-weight: 700; letter-spacing: .25em; text-transform: uppercase; color: var(--yai-slate); }
.verdict { font-size: 17px; border-left: var(--rule); padding-left: 16px; }
.tally { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tally div { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--yai-paper); font-size: 15px; }
.tally b { margin-left: auto; font-variant-numeric: lining-nums tabular-nums; color: var(--yai-navy); }
.tally .zero { opacity: .4; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stats div { background: var(--yai-paper); padding: 8px; }
.stats b { display: block; font-size: 22px; color: var(--yai-navy); font-variant-numeric: lining-nums tabular-nums; }
.stats small { color: var(--yai-slate); font-size: 13px; line-height: 1.2; display: block; }

.editor { display: grid; grid-template-columns: 1fr 310px; gap: 24px; align-items: start; }
.transcript { padding: 30px 38px; font-size: 21px; line-height: 2.05; position: relative; background: var(--yai-white); border-top: 3px solid var(--yai-navy); box-shadow: inset 0 0 0 1px var(--yai-stone); }
.transcript p { margin: 0 0 18px; }
.w { cursor: pointer; padding: 1px 1px; transition: background .1s, color .1s; color: var(--yai-navy); }
.w:hover { background: var(--yai-paper); }
.transcript.playing .w { color: var(--yai-slate); }
.transcript.playing .w.spoken { color: var(--yai-navy); }
.w.current { background: var(--yai-navy) !important; color: var(--yai-white) !important; }
.w.filler { color: var(--yai-slate) !important; text-decoration: line-through; text-decoration-color: var(--yai-slate); }
.w.lowconf { text-decoration: underline dotted var(--yai-slate); }
.pause {
  display: inline-flex; align-items: center; font-size: 13px; color: var(--yai-slate); background: var(--yai-paper);
  padding: 0 7px; margin: 0 3px; line-height: 20px; vertical-align: 2px; cursor: pointer; font-variant-numeric: lining-nums;
}
.ann { padding: 2px 0; cursor: pointer; }
.ann.l-brilliant { background: color-mix(in srgb, var(--brilliant) 16%, transparent); box-shadow: inset 0 -2px 0 var(--brilliant); }
.ann.l-great { background: color-mix(in srgb, var(--great) 16%, transparent); box-shadow: inset 0 -2px 0 var(--great); }
.ann.l-book { background: color-mix(in srgb, var(--book) 15%, transparent); box-shadow: inset 0 -2px 0 var(--book); }
.ann.l-inaccuracy { background: color-mix(in srgb, var(--inaccuracy) 22%, transparent); box-shadow: inset 0 -2px 0 var(--inaccuracy); }
.ann.l-mistake { background: color-mix(in srgb, var(--mistake) 18%, transparent); box-shadow: inset 0 -2px 0 var(--mistake); }
.ann.l-blunder { background: color-mix(in srgb, var(--blunder) 16%, transparent); box-shadow: inset 0 -2px 0 var(--blunder); }
.ann.focus { outline: 1.5px solid var(--yai-slate); outline-offset: 2px; }
.badge { display: inline-block; vertical-align: -5px; margin-right: 3px; cursor: pointer; }
.badge svg { display: block; }

.side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; }
.moves { padding: 16px; }
.move { display: flex; gap: 10px; padding: 8px; cursor: pointer; align-items: flex-start; }
.move:hover, .move.on { background: var(--yai-paper); }
.move .txt { font-size: 15px; line-height: 1.35; }
.move .txt b { display: block; font-size: 15px; }
.move .quote { color: var(--yai-slate); font-style: italic; }

.popover {
  position: absolute; z-index: 50; width: 360px; padding: 16px 18px; background: var(--yai-white);
  border: 1px solid var(--yai-navy); border-top-width: 3px; font-size: 16px; line-height: 1.5;
}
.popover h5 { margin: 0 0 6px; font-size: 18px; display: flex; gap: 8px; align-items: center; color: var(--yai-navy); }
.popover .corr { margin-top: 10px; padding: 8px 12px; background: var(--yai-paper); border-left: 3px solid var(--yai-slate); }
.popover .corr small { display: block; color: var(--yai-slate); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .3em; }
.popover .actions { margin-top: 12px; display: flex; gap: 8px; }

details.block { padding: 0; margin-bottom: 12px; }
details.block summary { padding: 14px 20px; cursor: pointer; font-weight: 700; font-size: 18px; color: var(--yai-navy); list-style: none; display: flex; justify-content: space-between; }
details.block summary::-webkit-details-marker { display: none; }
details.block summary::after { content: "+"; color: var(--yai-slate); }
details.block[open] summary::after { content: "–"; }
details.block .body { padding: 0 20px 18px; color: var(--yai-navy); }
details.block .body p { margin: 0 0 10px; }
details.block ul { margin: 0; padding-left: 20px; }
details.block li { margin-bottom: 6px; }
details.block li::marker { color: var(--yai-slate); }
.fb-head { font-size: 13px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; margin: 14px 0 6px !important; }
.fb-head.good { color: var(--yai-navy); }
.fb-head.fix { color: var(--yai-slate); }
.source { font-size: 14px; font-style: italic; color: var(--yai-slate); }

.processing { padding: 56px; text-align: center; }
.processing h2 { margin-top: 12px; }
.processing .q-context { text-align: left; max-width: 760px; margin: 0 auto; }
.processing .steps { display: inline-flex; flex-direction: column; gap: 10px; text-align: left; margin-top: 20px; }
.processing .step { display: flex; gap: 10px; align-items: center; color: var(--yai-slate); }
.processing .step.on { color: var(--yai-navy); font-weight: 600; }
.processing .step.done { color: var(--yai-navy); }
.err { color: var(--yai-navy); font-weight: 600; }
.err::before { content: "Error · "; color: var(--yai-slate); font-weight: 700; }
.qtab .err::before { content: ""; }

/* ---------- history ---------- */
.hist { padding: 18px 22px; margin-bottom: 12px; }
.hist .top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.hist .top h3 { font-size: 20px; }
.hist .answers, .admin-session .answers { display: flex; flex-wrap: wrap; gap: 6px; }
.hist .ans, .admin-session .ans { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; background: var(--yai-paper); font-size: 15px; color: var(--yai-navy); box-shadow: inset 0 0 0 1px transparent; font-variant-numeric: lining-nums; }
.hist .ans:hover { box-shadow: inset 0 0 0 1.5px var(--yai-slate); }

.empty { padding: 56px; text-align: center; color: var(--yai-slate); }
.empty h2 { margin-bottom: 8px; }

@media (max-width: 960px) {
  :root { --gutter: 16px; }
  .builder, .interview, .review-top, .editor { grid-template-columns: minmax(0, 1fr); }
  .groups { columns: 1; }
  .side { position: static; max-height: none; }
  main { padding: 24px var(--gutter); }
  .site-header { position: static; }
  .site-header .inner { width: auto; height: auto; margin: 0; padding: 12px var(--gutter) 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .site-header .badge-link { position: static; }
  .site-header .badge-link img { width: 44px; height: 44px; }
  .site-nav { position: static; flex-basis: 100%; overflow-x: auto; }
  .site-nav a { flex: 0 0 auto; padding: 9px 10px 8px; }
  .toolbar .inner { flex-wrap: wrap; gap: 4px 20px; padding-top: 6px; }
  .toolbar .note { display: none; }
  .photo-band { margin-top: -24px; padding: 56px var(--gutter) 48px; }
  .photo-band h1 { font-size: 42px; }
  .photo-band .eyebrow { letter-spacing: .14em; }
  .photo-band p { font-size: 18px; }
  .presets.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .band { padding-top: 44px; padding-bottom: 44px; }
  .band-title { font-size: 34px; }
  .site-footer .top { flex-direction: column-reverse; }
}
@media (max-width: 700px) {
  .presets.six, .presets.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .btn.big { width: 100%; justify-content: center; }
}

/* ---------- text answer mode ---------- */
.write-panel { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 24px; min-height: 420px; }
.write-panel.navy { background: var(--yai-navy); color: var(--yai-white); }
.write-idle { margin: auto 0; padding: 12px; }
.write-idle .eyebrow { color: var(--yai-sky); }
.write-idle p:last-child { color: var(--yai-periwinkle); font-size: 20px; margin: 0; }
.write-head { display: flex; align-items: center; gap: 14px; }
.write-head .eyebrow { margin: 0; }
.write-head .wc { margin-left: auto; color: var(--yai-slate); font-size: 15px; font-variant-numeric: lining-nums tabular-nums; }
.write-head .timer-big { align-self: center; font-size: 22px; padding: 2px 12px; }
.write-panel textarea {
  flex: 1; min-height: 360px; resize: vertical; width: 100%; padding: 16px 18px; background: var(--yai-white);
  border: 1px solid var(--yai-stone); border-radius: var(--radius); font: inherit; font-size: 19px; line-height: 1.6; color: var(--yai-navy);
}
.write-panel textarea:focus { outline: 1.5px solid var(--yai-slate); outline-offset: 0; border-color: transparent; }
.write-panel textarea[readonly] { color: var(--yai-slate); background: var(--yai-paper); }
.sc-col { display: flex; flex-direction: column; gap: 14px; }
.review-top.text { grid-template-columns: 1fr; }
.review-top.text .scorecard { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px 32px; align-items: start; }
.stats.two { grid-template-columns: repeat(2, 1fr); }
.transcript.text-mode { line-height: 1.85; }
.transcript.text-mode .w { cursor: default; }
@media (max-width: 960px) { .review-top.text .scorecard { grid-template-columns: 1fr; } }

/* ---------- coach (chat page + drawer) ---------- */
/* Floating tab at the bottom right, the edge the drawer slides out from. Hidden under the open drawer. */
.coach-toggle {
  position: fixed; right: 20px; bottom: 20px; z-index: 35; display: flex; align-items: center; gap: 10px;
  background: var(--yai-navy); border: 1px solid var(--yai-navy); color: var(--yai-white); padding: 10px 18px;
  font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 15, 48, .2);
}
.coach-toggle::before { content: "‹"; font-size: 20px; line-height: 0; letter-spacing: 0; color: var(--yai-sky); }
.coach-toggle:hover { background: var(--yai-white); color: var(--yai-navy); }
.coach-toggle[hidden] { display: none; }

.coach-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 2fr); gap: 6px; margin-bottom: 20px; }
.coach-stats div { background: var(--yai-paper); padding: 10px 14px; min-width: 0; }
.coach-stats b { display: block; font-size: 26px; line-height: 1.15; color: var(--yai-navy); font-variant-numeric: lining-nums tabular-nums; }
.coach-stats .wide b { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coach-stats small { color: var(--yai-slate); font-size: 13px; }

.coach-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 20px; align-items: start; }
.chat-list { padding: 16px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 92px; max-height: calc(100vh - 120px); overflow: auto; }
.chat-list .btn { justify-content: center; }
.chat-list .items { display: flex; flex-direction: column; }
.chat-list .item { display: flex; align-items: flex-start; border-left: 2px solid transparent; }
.chat-list .item.on { border-left-color: var(--yai-navy); background: var(--yai-paper); }
.chat-list .item:hover { background: var(--yai-paper); }
.chat-list .item a { flex: 1; min-width: 0; padding: 7px 10px; font-size: 16px; line-height: 1.3; color: var(--yai-navy); overflow-wrap: anywhere; }
.chat-list .item small { display: block; color: var(--yai-slate); font-size: 13px; }
.chat-list .item button { background: none; border: 0; color: var(--yai-steel); font-size: 20px; padding: 4px 8px; line-height: 1; }
.chat-list .item button:hover { color: var(--yai-navy); }
.chat-list .muted { font-size: 15px; margin: 0; }
.coach-main { height: calc(100vh - 400px); min-height: 480px; display: flex; }

.chat { display: flex; flex-direction: column; flex: 1; min-height: 0; width: 100%; }
.chat-log { flex: 1; overflow-y: auto; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 100%; font-size: 18px; line-height: 1.5; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; max-width: 85%; background: var(--yai-paper); border: 1px solid var(--yai-stone); padding: 8px 14px; }
.msg.bot { align-self: stretch; border-left: 3px solid var(--yai-navy); padding: 2px 0 2px 16px; }
.msg p { margin: 0 0 10px; }
.msg > :last-child { margin-bottom: 0; }
.msg h4 { margin: 14px 0 6px; font-size: 19px; font-weight: 700; color: var(--yai-navy); }
.msg ul, .msg ol { margin: 0 0 10px; padding-left: 22px; }
.msg li { margin-bottom: 4px; }
.msg li::marker { color: var(--yai-slate); }
.msg code { font-family: Consolas, "Courier New", monospace; font-size: .82em; background: var(--yai-paper); padding: 1px 5px; }
.msg pre { background: var(--yai-paper); padding: 10px 12px; overflow-x: auto; margin: 0 0 10px; }
.msg pre code { padding: 0; background: none; }
.md-table { overflow-x: auto; margin: 0 0 10px; }
.msg table { border-collapse: collapse; font-size: 16px; }
.msg th, .msg td { border: 1px solid var(--yai-stone); padding: 5px 10px; text-align: left; vertical-align: top; }
.msg th { background: var(--yai-paper); font-weight: 700; }
.msg .err { font-size: 16px; margin-top: 8px; }
.tool-status { display: flex; gap: 8px; align-items: center; color: var(--yai-slate); font-size: 15px; font-style: italic; margin-top: 4px; }
.chat-empty { margin: auto 0; text-align: center; padding: 20px 8px; }
.chat-empty p { max-width: 460px; margin: 0 auto 16px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.suggest button { background: var(--yai-white); border: 1px solid var(--yai-stone); padding: 6px 14px; font-size: 16px; color: var(--yai-navy); text-align: left; }
.suggest button:hover { border-color: var(--yai-navy); }
.chat-input { display: flex; gap: 10px; align-items: flex-end; padding: 14px 16px; border-top: 1px solid var(--yai-stone); }
.chat-input textarea {
  flex: 1; min-width: 0; resize: none; max-height: 200px; padding: 9px 12px; font-size: 18px; line-height: 1.4;
  border: 1px solid var(--yai-stone); border-radius: var(--radius); background: var(--yai-white); color: var(--yai-navy);
}
.chat-input textarea:focus { outline: 1.5px solid var(--yai-slate); outline-offset: 0; border-color: transparent; }

.coach-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: 440px; max-width: 100%;
  background: var(--yai-white); border-left: 3px solid var(--yai-navy); box-shadow: -8px 0 24px rgba(1, 31, 96, .12);
  display: flex; flex-direction: column; animation: slide-in .18s ease-out;
}
.coach-drawer[hidden] { display: none; }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.cd-head { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--yai-navy); }
.cd-head .eyebrow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; margin: 0 auto 0 0; color: var(--yai-sky); font-size: 13px; }
.cd-link { white-space: nowrap; background: none; border: 0; padding: 0; color: var(--yai-periwinkle); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.cd-link:hover { color: var(--yai-white); }
.cd-close { background: none; border: 0; color: var(--yai-white); font-size: 26px; line-height: 1; padding: 0 2px; }
.cd-ctx { padding: 8px 16px; background: var(--yai-paper); border-bottom: 1px solid var(--yai-stone); font-size: 15px; color: var(--yai-navy);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-ctx span { font-size: 12px; font-weight: 700; letter-spacing: .25em; text-transform: uppercase; color: var(--yai-slate); margin-right: 6px; }
.cd-body { flex: 1; min-height: 0; display: flex; }
.coach-drawer .chat-log { padding: 16px; }
.coach-drawer .msg { font-size: 17px; }
.coach-drawer .chat-input { padding: 12px; }

@media (max-width: 960px) {
  .coach-layout { grid-template-columns: minmax(0, 1fr); }
  .chat-list { position: static; max-height: 220px; }
  .coach-main { height: 70vh; }
  .coach-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .coach-stats .wide { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .coach-drawer { width: 100%; border-left: 0; }
  .coach-toggle { right: 12px; bottom: 12px; }
  .chat-log { padding: 16px; }
  .msg.user { max-width: 95%; }
}
.msg blockquote { margin: 0 0 10px; padding: 8px 14px; background: var(--yai-paper); border-left: 3px solid var(--yai-slate); }
.msg blockquote > :last-child { margin-bottom: 0; }

/* Login */
.login { max-width: 460px; margin: 24px auto; padding: 36px 40px; }
.login h2 { font-size: 32px; margin: 4px 0 10px; }
.login .muted { margin: 0 0 22px; font-size: 18px; }
.login input[type=email], .login input.pin {
  background: var(--yai-white); border: 1px solid var(--yai-stone); color: var(--yai-navy); border-radius: var(--radius); padding: 9px 12px; width: 100%; font-size: 18px;
}
.login input.pin { font-size: 28px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.login input:focus { outline: 1.5px solid var(--yai-slate); outline-offset: 0; }
.login .btn { width: 100%; }
.login .err { margin: 14px 0 0; }
.login-alt { margin: 18px 0 0; font-size: 16px; text-align: center; }
.linkish { background: none; border: 0; padding: 0; color: var(--yai-slate); text-decoration: underline; text-underline-offset: 3px; }
.sign-out { background: none; border: 0; color: var(--yai-periwinkle); font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 0 0 0 14px; }
.sign-out:hover { color: var(--yai-white); }
body[data-authed="0"] .toolbar nav, body[data-authed="0"] .coach-toggle { visibility: hidden; }

/* ---------- quiz + flashcards ---------- */
.quiz { max-width: 860px; margin: 0 auto; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.quiz .q-text { font-size: 24px; }
.options { display: grid; gap: 10px; }
.option { display: flex; gap: 14px; align-items: center; text-align: left; background: var(--yai-white); border: 1px solid var(--yai-stone);
  border-radius: var(--radius); padding: 14px 16px; font: inherit; font-size: 19px; color: var(--yai-navy); cursor: pointer; }
.option:hover:not(:disabled) { border-color: var(--yai-slate); background: var(--yai-paper); }
.option:disabled { cursor: default; }
.option .key { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--yai-slate);
  font-size: 14px; font-weight: 700; color: var(--yai-slate); }
.option.right { background: var(--yai-navy); border-color: var(--yai-navy); color: var(--yai-white); }
.option.right .key { border-color: var(--yai-sky); color: var(--yai-sky); }
.option.wrong { border-color: var(--yai-steel); color: var(--yai-steel); text-decoration: line-through; }
.option.wrong .key { border-color: var(--yai-steel); color: var(--yai-steel); }
.mc-feedback { border-left: 3px solid var(--yai-slate); background: var(--yai-paper); padding: 12px 16px; font-size: 18px; line-height: 1.5; }
.mc-feedback.right { border-left-color: var(--yai-navy); }
.acc { color: var(--yai-steel); }
.missed { padding: 14px 0; border-top: 1px solid var(--yai-stone); }
.missed p { margin: 4px 0; }
.missed .stem { font-weight: 700; font-size: 18px; color: var(--yai-navy); }

/* deck browser */
.deck { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.deck-filters { padding: 20px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.deck-filters input[type=search] { width: 100%; margin-bottom: 16px; }
.deck-filters .field { margin-bottom: 16px; }
.deck-topics .groups { columns: 1; }
.deck-topics .group h4 { font-size: 16px; }
.deck-topics .check { font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--yai-white); border: 1px solid var(--yai-stone); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 15px;
  color: var(--yai-slate); cursor: pointer; }
.chip:hover { border-color: var(--yai-slate); }
.chip.on { background: var(--yai-navy); border-color: var(--yai-navy); color: var(--yai-white); }
.chip .n { opacity: .7; font-variant-numeric: lining-nums tabular-nums; }
.deck-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; margin-bottom: 14px;
  position: sticky; top: 0; z-index: 2; }
.deck-bar b { font-size: 22px; font-variant-numeric: lining-nums tabular-nums; }
.check.small { font-size: 16px; padding: 0; }
.fc-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto; gap: 20px; padding: 16px 18px; margin-bottom: 10px; align-items: start; }
.fc-term b { font-size: 19px; color: var(--yai-navy); line-height: 1.3; }
.fc-meta { font-size: 13px; color: var(--yai-steel); margin-top: 4px; letter-spacing: .04em; }
.fc-def { font-size: 17px; line-height: 1.5; color: var(--yai-navy); border-left: 1px solid var(--yai-stone); padding-left: 20px; }
.fc-def.equation, .fc-back.equation { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 15px; }
.fc-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; min-width: 190px; }
.mini-seg { display: inline-flex; border: 1px solid var(--yai-stone); border-radius: 999px; overflow: hidden; }
.mini-seg button { background: none; border: 0; padding: 3px 10px; font: inherit; font-size: 14px; color: var(--yai-steel); cursor: pointer; }
.mini-seg button + button { border-left: 1px solid var(--yai-stone); }
.mini-seg button.on { background: var(--yai-navy); color: var(--yai-white); }
.star { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--yai-periwinkle); cursor: pointer; padding: 0 2px; }
.star.on { color: var(--yai-navy); }
.fc-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--yai-paper); border: 1px solid var(--yai-stone); border-radius: 999px;
  padding: 1px 4px 1px 10px; font-size: 14px; color: var(--yai-slate); }
.tag-chip button { background: none; border: 0; color: var(--yai-steel); cursor: pointer; font-size: 15px; padding: 0 4px; }
.add-tag { font-size: 14px; }
.tag-in { width: 120px; font-size: 14px; padding: 2px 8px; }

/* study mode */
.fc-wrap { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.study-head { display: flex; justify-content: space-between; align-items: center; }
.study-count { font-size: 18px; color: var(--yai-slate); font-variant-numeric: lining-nums tabular-nums; }
.study-count b { color: var(--yai-navy); font-size: 22px; }
.study-progress { height: 4px; background: var(--yai-stone); overflow: hidden; }
.study-progress i { display: block; height: 100%; background: var(--yai-navy); transition: width .25s; }
.study-progress.big { height: 8px; margin: 18px 0 12px; }
.tally-row { display: flex; justify-content: space-between; gap: 10px; }
.pill { border-radius: 999px; padding: 3px 12px; font-size: 15px; font-variant-numeric: lining-nums tabular-nums; }
.pill.learning { border: 1px solid var(--yai-steel); color: var(--yai-steel); }
.pill.known { background: var(--yai-navy); color: var(--yai-white); }
.flip { position: relative; height: 360px; perspective: 1600px; cursor: pointer; outline: none; }
.flip-inner { position: absolute; inset: 0; transition: transform .45s cubic-bezier(.4, .2, .2, 1); transform-style: preserve-3d; }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; padding: 40px 48px; text-align: center; background: var(--yai-white);
  border: 1px solid var(--yai-stone); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(1, 31, 96, .08); color: var(--yai-navy); overflow: auto; }
.flip .face.back { transform: rotateY(180deg); background: var(--yai-paper); }
.flip:focus-visible .face { border-color: var(--yai-slate); }
.fc-front { font-size: 32px; font-weight: 600; line-height: 1.25; }
.fc-back { font-size: 22px; line-height: 1.5; max-width: 620px; }
.fc-hint { font-size: 15px; position: absolute; bottom: 18px; }
.star.on-card { position: absolute; top: 16px; right: 18px; z-index: 3; font-size: 26px; }
.study-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sort small { opacity: .6; margin-left: 6px; }
.sort.learning { border-color: var(--yai-steel); color: var(--yai-slate); }
.sort.known { background: var(--yai-navy); border-color: var(--yai-navy); color: var(--yai-white); }
.fc-summary { max-width: 760px; margin: 0 auto; padding: 36px; text-align: center; }
.missed-cards { text-align: left; margin: 20px 0; padding: 0; list-style: none; max-height: 320px; overflow: auto; border-top: 1px solid var(--yai-stone); }
.missed-cards li { padding: 10px 0; border-bottom: 1px solid var(--yai-stone); font-size: 16px; }
.missed-cards b { display: block; color: var(--yai-navy); }
@media (max-width: 960px) {
  .deck { grid-template-columns: 1fr; }
  .deck-filters { position: static; max-height: none; }
  .fc-row { grid-template-columns: 1fr; gap: 10px; }
  .fc-def { border-left: 0; padding-left: 0; }
  .fc-side { align-items: flex-start; }
  .fc-tags { justify-content: flex-start; }
}
@media (max-width: 700px) { .fc-front { font-size: 26px; } .flip { height: 320px; } .flip .face { padding: 32px 22px; } .quiz { padding: 20px; } }

/* ---------- toolbar dropdowns ---------- */
.nav-dd { position: relative; }
.nav-dd-btn { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--yai-periwinkle); padding: 13px 0 12px; font: inherit;
  font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.nav-dd-btn::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.nav-dd.active .nav-dd-btn, .nav-dd-btn:hover, .nav-dd-btn[aria-expanded="true"] { color: var(--yai-white); border-bottom-color: var(--yai-sky); }
.nav-menu { position: absolute; top: 100%; left: -14px; z-index: 30; min-width: 200px; background: var(--yai-white); border: 1px solid var(--yai-stone);
  border-radius: var(--radius); box-shadow: 0 10px 28px rgba(0, 15, 48, .18); padding: 6px 0; }
.nav-menu[hidden] { display: none; }
.toolbar nav .nav-menu a { display: block; color: var(--yai-navy); padding: 10px 16px; border: 0; font-size: 13px; white-space: nowrap; }
.toolbar nav .nav-menu a:hover, .toolbar nav .nav-menu a.active { background: var(--yai-paper); color: var(--yai-navy); }
.toolbar nav .nav-menu a.active { box-shadow: inset 3px 0 var(--yai-navy); }

/* ---------- quiz history ---------- */
a.quiz-hist { display: block; color: inherit; }
a.quiz-hist:hover { border-color: var(--yai-slate); }
.review-item { margin-bottom: 18px; }
.review-item .option { cursor: default; }
.option .yours { display: inline-block; font-size: 14px; font-style: italic; opacity: .85; text-decoration: none; }

/* ---------- landing ---------- */
.landing-band { padding-bottom: 96px; }
.landing-band h1 { font-size: 72px; }
.btn.light { background: var(--yai-white); color: var(--yai-navy); border-color: var(--yai-white); }
.btn.light:hover { background: var(--yai-paper); }
.btn.ghost { background: transparent; color: var(--yai-white); border-color: var(--yai-periwinkle); }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.landing-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: -44px auto 48px; max-width: 980px; position: relative; }
.stat-tile { background: var(--yai-white); border: 1px solid var(--yai-stone); border-radius: var(--radius); padding: 18px 22px;
  box-shadow: 0 8px 24px rgba(1, 31, 96, .08); display: flex; flex-direction: column; gap: 2px; }
.stat-tile b { font-size: 40px; font-weight: 600; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; color: var(--yai-navy); }
.stat-tile b small { font-size: 20px; color: var(--yai-steel); font-weight: 500; }
.stat-tile span { font-size: 17px; color: var(--yai-navy); }
.stat-tile small { font-size: 15px; color: var(--yai-slate); font-style: italic; }
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 64px; }
.feature { padding: 28px 30px; display: flex; flex-direction: column; gap: 10px; }
.feature.wide { grid-column: 1 / -1; }
.feature h2 { font-size: 32px; font-weight: 500; margin: 0; }
.feature p { margin: 0; font-size: 18px; line-height: 1.5; color: var(--yai-navy); }
.feature-points { margin: 4px 0 0; padding-left: 20px; font-size: 17px; color: var(--yai-slate); line-height: 1.6; }
.feature-links { margin-top: auto; padding-top: 12px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.loop { margin-bottom: -40px; }
.steps-row { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 0; margin: 0 auto; max-width: 1080px; }
.steps-row li { counter-increment: step; background: var(--yai-white); border: 1px solid var(--yai-stone); border-radius: var(--radius); padding: 20px; }
.steps-row li::before { content: counter(step, decimal-leading-zero); display: block; font-size: 13px; font-weight: 700; letter-spacing: .25em; color: var(--yai-slate); margin-bottom: 6px; }
.steps-row b { display: block; font-size: 21px; font-weight: 600; margin-bottom: 4px; }
.steps-row span { color: var(--yai-slate); font-size: 17px; line-height: 1.45; }
@media (max-width: 960px) {
  .landing-band h1 { font-size: 48px; }
  .landing-stats { grid-template-columns: 1fr; margin-top: -36px; }
  .features { grid-template-columns: 1fr; }
  .steps-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .steps-row { grid-template-columns: 1fr; } }

/* ---------- in-place copy editing (admins) ---------- */
.edit-fab { position: fixed; right: 20px; bottom: 76px; z-index: 40; box-shadow: 0 8px 24px rgba(0, 15, 48, .2); }
.edit-fab[hidden] { display: none; }
.editing-copy .ed { outline: 1.5px dashed var(--yai-sky); outline-offset: 3px; border-radius: 2px; cursor: text; min-width: 1ch; display: inline-block; }
.editing-copy .ed:hover { outline-color: var(--yai-slate); background: rgba(131, 183, 230, .12); }
.editing-copy .ed:focus { outline: 2px solid var(--yai-navy); background: rgba(255, 255, 255, .92); color: var(--yai-navy); }
.editing-copy .photo-band .ed:focus { background: rgba(0, 15, 48, .55); color: var(--yai-white); outline-color: var(--yai-sky); }
.editing-copy .btn .ed:focus { color: inherit; background: transparent; }
.edit-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px max(var(--gutter), calc(50vw - 620px + var(--gutter))); background: var(--yai-white); border-top: 2px solid var(--yai-navy);
  box-shadow: 0 -8px 24px rgba(0, 15, 48, .12); font-size: 16px; color: var(--yai-navy); }
.edit-bar > div { flex: 1; min-width: 280px; line-height: 1.5; }
.edit-bar code { background: var(--yai-paper); border: 1px solid var(--yai-stone); padding: 0 4px; font-size: 13px; }
.edit-bar #edStatus.err { color: var(--yai-navy); font-weight: 700; }
.editing-copy main { padding-bottom: 120px; }

/* ---------- admin ---------- */
.toolbar nav a[hidden] { display: none; }
.admin-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.admin-tiles .stat-tile { box-shadow: none; }
.admin-tiles .stat-tile b { font-size: 34px; }
.admin-tabs { margin-bottom: 14px; }
.admin-panel { padding: 18px 20px; margin-bottom: 22px; }
.admin-panel[hidden] { display: none; }
.admin-h { font-size: 22px; font-weight: 500; margin: 8px 0 10px; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: lining-nums tabular-nums; }
table.data th { text-align: left; border-bottom: var(--rule); padding: 0; white-space: nowrap; }
table.data th button { background: none; border: 0; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--yai-slate); padding: 8px 6px; cursor: pointer; width: 100%; text-align: inherit; }
table.data th.num, table.data td.num { text-align: right; }
table.data td { padding: 9px 6px; border-bottom: 1px solid var(--yai-stone); color: var(--yai-navy); vertical-align: top; }
table.data tr[data-href] { cursor: pointer; }
table.data tr[data-href]:hover td, table.data tr[data-href]:focus td { background: var(--yai-paper); }
.cell-sub { font-size: 13px; }
.role-pill { display: inline-block; border: 1px solid var(--yai-slate); border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--yai-slate); vertical-align: middle; }
.admin-session { padding: 12px 0; border-bottom: 1px solid var(--yai-stone); }
.admin-session:last-child { border-bottom: 0; }
.admin-session .top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.privacy-note { font-size: 15px; font-style: italic; text-align: center; margin: 4px 0 0; }
@media (max-width: 960px) { .admin-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
