/* INOX Learning (tanker-safety coach for INOX Air Products). Light app, dark stage.
   Flavour of INOX Air Products without their marks, colours read from their SOP video: their green for the
   one primary action (variables keep the old name --yellow), their blue for selection and links,
   Poppins (which also carries Devanagari for Hindi lessons). */
@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(/fonts/poppins-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(/fonts/poppins-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(/fonts/poppins-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(/fonts/poppins-devanagari-400-normal.woff2) format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(/fonts/poppins-devanagari-500-normal.woff2) format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(/fonts/poppins-devanagari-600-normal.woff2) format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }

html { font-size: 106.25%; }   /* 17px base: this is read on a meeting-room screen */
:root {
  /* Neutrals are tinted toward the brand blue so nothing is a dead grey. */
  --bg: oklch(0.975 0.004 264);
  --surface: oklch(0.995 0.002 264);
  --sunken: oklch(0.955 0.006 264);
  --ink: oklch(0.23 0.03 264);
  --muted: oklch(0.44 0.025 264);
  --dim: oklch(0.54 0.02 264);
  --line: oklch(0.905 0.008 264);
  --line-strong: oklch(0.82 0.012 264);
  --yellow: oklch(0.72 0.17 143);        /* INOX green, about #4cb848 */
  --yellow-hover: oklch(0.67 0.17 143);
  --yellow-ink: oklch(0.2 0.05 150);
  --blue: oklch(0.52 0.135 252);          /* INOX blue, about #1c6fb5 */
  --blue-soft: oklch(0.95 0.025 252);
  --ok: oklch(0.47 0.12 152); --ok-soft: oklch(0.95 0.045 152);
  --warn: oklch(0.5 0.12 65); --warn-soft: oklch(0.955 0.055 88);
  --err: oklch(0.5 0.17 27); --err-soft: oklch(0.955 0.03 27);
  --r: 12px; --r-sm: 8px;
  --shadow: 0 1px 2px oklch(0.23 0.03 264 / 0.06), 0 8px 24px oklch(0.23 0.03 264 / 0.06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --rail: 244px;
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 400 1rem/1.55 Poppins, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; min-height: 100dvh; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.012em; text-wrap: balance; }
h1 { font-size: 2rem; line-height: 1.18; }
h2 { font-size: 1.3125rem; line-height: 1.3; }
h3 { font-size: 1rem; line-height: 1.4; }
p { margin: 0; max-width: 72ch; } a { color: var(--blue); text-underline-offset: 3px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 0.875rem; }
.eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }

/* ---------- app frame ---------- */
.app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100dvh; }
.rail { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100dvh; }
.rail nav { display: grid; gap: 2px; }
.rail nav a { padding: 10px 12px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.9375rem; transition: background 0.15s var(--ease), color 0.15s var(--ease); }
.rail nav a:hover { background: var(--sunken); color: var(--ink); }
.rail nav a.on { background: var(--blue-soft); color: var(--blue); }
.rail .me { margin-top: auto; display: grid; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.rail .me b { font-weight: 500; display: block; line-height: 1.3; }
.page { padding: 36px 44px 80px; max-width: 1180px; width: 100%; }
.shell { max-width: 900px; margin: 0 auto; padding: 0 24px 80px; }
.top { display: flex; align-items: center; gap: 16px; padding: 18px 0; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.top .who { margin-left: auto; text-align: right; line-height: 1.3; }
.top .who > div { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; color: var(--ink); text-decoration: none; }
.brand i { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--yellow); display: block; position: relative; }
.brand i::after { content: ""; position: absolute; inset: 8px 8px 8px 11px; background: var(--yellow-ink); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.for-client { font-size: 0.75rem; color: var(--dim); font-weight: 500; }
.nav { display: none; }

/* ---------- primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.card.flat { background: var(--sunken); border-color: transparent; }
.stack { display: grid; gap: 16px; align-content: start; } .stack.tight { gap: 6px; } .stack.wide { gap: 32px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .row.end { justify-content: flex-end; } .grow { flex: 1; min-width: 0; }
.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.head { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
button, .btn { font: inherit; font-weight: 500; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 18px; background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; justify-content: center; min-height: 44px; transition: background 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.1s var(--ease); }
button:hover, .btn:hover { background: var(--sunken); }
button:active, .btn:active { transform: translateY(1px); }
button.primary, .btn.primary { background: var(--yellow); border-color: var(--yellow); color: var(--yellow-ink); font-weight: 600; }
button.primary:hover, .btn.primary:hover { background: var(--yellow-hover); border-color: var(--yellow-hover); }
button.ghost, .btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.ghost:hover, .btn.ghost:hover { background: var(--sunken); color: var(--ink); }
button.danger { color: var(--err); }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
:is(button, a, input, textarea, select, summary):focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
label { display: grid; gap: 6px; font-size: 0.875rem; font-weight: 500; color: var(--muted); }
input, textarea, select { font: inherit; font-weight: 400; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 44px; transition: border-color 0.15s var(--ease); }
input:hover, textarea:hover, select:hover { border-color: var(--dim); }
input:disabled, textarea:disabled { background: var(--sunken); border-color: var(--line); color: var(--ink); opacity: 1; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--blue); flex: none; margin-top: 2px; }
input[type=file] { padding: 8px; }
label.check { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); font-size: 1rem; font-weight: 400; cursor: pointer; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
th { text-align: left; font-weight: 600; color: var(--dim); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--sunken); }
.scroll { overflow-x: auto; }
.card.table { padding: 6px 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.8125rem; font-weight: 500; background: var(--sunken); color: var(--muted); white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.chip.ok { background: var(--ok-soft); color: var(--ok); } .chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.err { background: var(--err-soft); color: var(--err); } .chip.gold { background: var(--blue-soft); color: var(--blue); }
.banner { border-radius: var(--r-sm); padding: 12px 16px; background: var(--warn-soft); color: oklch(0.34 0.08 65); font-size: 0.9375rem; }
.banner.err { background: var(--err-soft); color: oklch(0.36 0.12 27); }
.banner.info { background: var(--blue-soft); color: oklch(0.32 0.09 264); }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); background: var(--ink); color: var(--surface); padding: 12px 18px; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); max-width: min(92vw, 560px); z-index: 60; box-shadow: var(--shadow); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--blue); animation: sp 0.8s linear infinite; display: inline-block; flex: none; }
@keyframes sp { to { transform: rotate(360deg); } }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.seg { background: var(--sunken); border-radius: var(--r-sm); padding: 14px; display: grid; gap: 10px; }
details { border-top: 1px solid var(--line); padding: 14px 0; } details:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; gap: 12px; align-items: center; border-radius: 6px; } summary::-webkit-details-marker { display: none; }
summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--dim); border-bottom: 2px solid var(--dim); transform: rotate(45deg) translateY(-3px); transition: transform 0.2s var(--ease); flex: none; }
details[open] > summary::after { transform: rotate(225deg) translateY(-2px); }
summary:has(.num)::after { margin-left: 12px; }
.modal { position: fixed; inset: 0; background: oklch(0.23 0.03 264 / 0.45); display: grid; place-items: center; padding: 16px; z-index: 50; overflow: auto; }
.modal .card { width: min(100%, 560px); max-height: 92dvh; overflow: auto; box-shadow: var(--shadow); }

/* ---------- sign in ---------- */
.login-wrap { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.login-side { background: var(--ink); color: oklch(0.96 0.005 95); padding: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login-side .brand { color: inherit; }
.login-side h1 { font-size: 2.5rem; line-height: 1.12; max-width: 15ch; }
.login-side h1 em { font-style: normal; color: var(--yellow); }
.login-side ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; counter-reset: s; max-width: 40ch; }
.login-side li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 12px; color: oklch(0.82 0.015 264); }
.login-side li::before { content: counter(s); font-weight: 600; color: var(--yellow); }
.login-side .for-client { color: oklch(0.72 0.02 264); }
.login-main { display: grid; place-items: center; padding: 32px; }
.login { width: min(100%, 380px); display: grid; gap: 18px; }

/* ---------- trainee home ---------- */
.training { display: grid; gap: 20px; }
.stepper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: st; }
.stepper > div { counter-increment: st; position: relative; padding-top: 34px; font-size: 0.875rem; color: var(--dim); font-weight: 500; }
.stepper > div::before { content: counter(st); position: absolute; top: 0; left: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 600; background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--dim); z-index: 1; }
.stepper > div::after { content: ""; position: absolute; top: 11px; left: 24px; right: 0; height: 2px; background: var(--line); }
.stepper > div:last-child::after { display: none; }
.stepper > div.done { color: var(--ink); } .stepper > div.done::before { content: "✓"; background: var(--ok); border-color: var(--ok); color: var(--surface); } .stepper > div.done::after { background: var(--ok); }
.stepper > div.now { color: var(--ink); } .stepper > div.now::before { background: var(--yellow); border-color: var(--yellow); color: var(--yellow-ink); }
.stepper small { display: block; font-weight: 400; color: var(--dim); }

/* ---------- trainer overview ---------- */
.dist { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--sunken); gap: 2px; }
.dist i { display: block; min-width: 3px; }
.dist .p, .key .p::before { background: var(--ok); } .dist .t, .key .t::before { background: oklch(0.72 0.14 80); } .dist .r, .key .r::before { background: var(--err); } .dist .g, .key .g::before { background: var(--line-strong); }
.key { display: flex; gap: 22px; flex-wrap: wrap; font-size: 0.9375rem; }
.key span { display: inline-flex; align-items: baseline; gap: 8px; } .key span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; align-self: center; }
.key b { font-weight: 600; font-variant-numeric: tabular-nums; }
.todo { display: grid; }
.todo a { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 4px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; border-radius: 6px; }
.todo a:first-child { border-top: 0; } .todo a:hover { background: var(--sunken); }
.todo small { grid-column: 1 / -1; color: var(--muted); }
.cell-bar { display: grid; grid-template-columns: 2.5ch minmax(60px, 160px); gap: 10px; align-items: center; }

/* ---------- marks, scorecards ---------- */
.score-head { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.score-big { font-size: 4rem; font-weight: 600; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.score-big small { font-size: 1.125rem; font-weight: 500; color: var(--dim); letter-spacing: 0; }
.passbar { position: relative; height: 12px; border-radius: 6px; background: var(--sunken); margin: 26px 0 6px; }
.passbar i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--c, var(--blue)); }
.passbar b { position: absolute; top: -22px; transform: translateX(-50%); font-size: 0.75rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.passbar b::after { content: ""; position: absolute; left: 50%; top: 20px; width: 2px; height: 16px; background: var(--ink); }
.meter { display: grid; grid-template-columns: 190px 1fr auto; gap: 14px; align-items: center; font-size: 0.9375rem; }
.meter .num { white-space: nowrap; font-weight: 500; }
.bar { height: 8px; border-radius: 4px; background: var(--sunken); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.verdict { display: grid; grid-template-columns: 112px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.verdict:first-child { border-top: 0; }
.mark { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; justify-self: start; white-space: nowrap; margin-top: 1px; }
.mark.y { background: var(--ok-soft); color: var(--ok); } .mark.h { background: var(--warn-soft); color: var(--warn); } .mark.n { background: var(--err-soft); color: var(--err); }
blockquote { margin: 6px 0 0; padding: 8px 12px; background: var(--sunken); border-radius: var(--r-sm); font-size: 0.875rem; color: var(--muted); max-width: 72ch; }
.line { padding: 4px 0; font-size: 0.9375rem; max-width: 78ch; } .line b { font-weight: 600; color: var(--dim); margin-right: 8px; font-size: 0.8125rem; } .line.t b { color: var(--blue); }
.who-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; align-items: baseline; width: 100%; }
.who-row small { color: var(--muted); font-weight: 400; grid-column: 1; }

/* ---------- the live stage: the lights go down ---------- */
.stage {
  --bg: oklch(0.16 0.02 264); --surface: oklch(0.21 0.022 264); --sunken: oklch(0.25 0.024 264);
  --ink: oklch(0.965 0.005 95); --muted: oklch(0.78 0.015 264); --dim: oklch(0.64 0.018 264);
  --line: oklch(0.3 0.02 264); --line-strong: oklch(0.4 0.02 264); --blue: oklch(0.78 0.1 264); --blue-soft: oklch(0.3 0.06 264);
  position: fixed; inset: 0; z-index: 10; background: var(--bg); color: var(--ink);
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "head head" "mid side" "foot side";
}
.stage header { grid-area: head; display: flex; align-items: center; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.stage header .title { font-weight: 600; } .stage header .sub { color: var(--muted); font-size: 0.875rem; }
.stage .mid { grid-area: mid; display: grid; place-items: center; padding: 20px 24px 8px; min-height: 0; position: relative; overflow: hidden auto; }
.stage .mid > div:first-child { width: 100%; height: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.stage .mid > .card { max-height: 100%; overflow: auto; background: var(--surface); border-color: var(--line); max-width: 560px; width: 100%; }
.stage aside { grid-area: side; border-left: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 20px; min-height: 0; overflow: auto; }
.stage footer { grid-area: foot; padding: 8px 24px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 12px; max-width: 1040px; width: 100%; margin: 0 auto; }
.avatar-video { flex: 0 1 auto; min-height: 0; height: auto; max-height: 100%; width: auto; max-width: 100%; aspect-ratio: 16/9; border-radius: 14px; background: oklch(0.1 0.01 264); object-fit: cover; }
.presence { width: min(42vh, 60vw, 320px); aspect-ratio: 1; border-radius: 50%; position: relative; display: grid; place-items: center; flex: none; }
.presence .core { width: 52%; aspect-ratio: 1; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font-size: 2.5rem; font-weight: 600; color: var(--yellow-ink); transition: transform 0.25s var(--ease), background 0.25s var(--ease); }
.presence .ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--yellow); opacity: 0; }
.presence.speaking .ring { animation: ring 1.8s var(--ease) infinite; } .presence.speaking .ring:nth-child(2) { animation-delay: 0.6s; } .presence.speaking .ring:nth-child(3) { animation-delay: 1.2s; }
.presence.speaking .core { transform: scale(1.05); }
.presence.listening .core { background: var(--blue); color: oklch(0.16 0.02 264); }
.presence.thinking .core { animation: breathe 1.2s ease-in-out infinite; }
@keyframes ring { from { transform: scale(0.55); opacity: 0.7; } to { transform: scale(1); opacity: 0; } }
@keyframes breathe { 50% { transform: scale(0.95); opacity: 0.8; } }
.who-card { text-align: center; flex: none; }
.who-card .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 80vw; }
/* Captions read like subtitles: the line being said is bright, what came before fades back. */
.caption { height: 7.4em; overflow: auto; font-size: 1.125rem; line-height: 1.5; padding: 2px 4px; display: flex; flex-direction: column; gap: 6px; }
.caption > div { color: var(--dim); transition: color 0.3s var(--ease); flex: none; }
.caption > div:last-child, .caption > div:nth-last-child(2):has(+ .state) { color: var(--ink); }
.caption .you { padding-left: 14px; position: relative; } .caption .you::before { content: "You"; position: absolute; left: -36px; font-size: 0.75rem; font-weight: 600; color: var(--blue); top: 0.35em; }
.caption:has(.you) { padding-left: 44px; }
.caption .state { color: var(--dim); font-size: 0.875rem; }
.talk { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.mic { width: 52px; height: 52px; min-height: 0; border-radius: 50%; padding: 0; font-size: 1.25rem; }
.mic.on { background: var(--blue); border-color: var(--blue); color: oklch(0.16 0.02 264); }
.next-row { display: flex; gap: 16px; align-items: center; }
.plan { display: grid; gap: 2px; counter-reset: pl; margin: 0; padding: 0; list-style: none; }
.plan li { counter-increment: pl; display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 8px 8px; border-radius: 8px; color: var(--dim); font-size: 0.9375rem; align-items: start; }
.plan li::before { content: counter(pl); width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-size: 0.75rem; font-weight: 600; margin-top: 1px; }
.plan li.done { color: var(--muted); } .plan li.done::before { content: "✓"; background: oklch(0.62 0.13 152); border-color: transparent; color: oklch(0.16 0.02 264); }
.plan li.now { color: var(--ink); background: var(--surface); font-weight: 500; } .plan li.now::before { background: var(--yellow); border-color: var(--yellow); color: var(--yellow-ink); }
.selfview { position: relative; width: 100%; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; background: oklch(0.1 0.01 264); margin-top: auto; flex: none; }
.selfview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.selfview small { position: absolute; left: 8px; bottom: 8px; font-size: 0.75rem; font-weight: 500; background: oklch(0.1 0.01 264 / 0.7); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
button.pulse { animation: pulse 1.4s var(--ease) infinite; }
@keyframes pulse { 50% { transform: scale(1.04); } }

/* ---------- smaller screens: the same app, edited down ---------- */
@media (max-width: 980px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { min-width: 0; position: static; height: auto; flex-direction: row; align-items: center; padding: 10px 16px; gap: 12px; border-right: 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
  .rail nav { display: flex; overflow-x: auto; order: 3; width: 100%; scrollbar-width: none; }
  .rail nav a { white-space: nowrap; }
  .rail .me { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; align-items: center; } .rail .me > div { display: none; }
  .rail nav { min-width: 0; } .rail > .stack .for-client { display: none; }
  .app, .page { min-width: 0; }
  .page { padding: 24px 16px 72px; }
  .login-wrap { grid-template-columns: 1fr; } .login-side { padding: 28px 24px; gap: 20px; } .login-side h1 { font-size: 1.75rem; } .login-side ol { display: none; }
  .stage { grid-template-columns: 1fr; grid-template-areas: "head" "mid" "foot"; }
  .stage aside { display: contents; } .stage aside .plan, .stage aside .eyebrow, .stage aside .hint { display: none; }
  .selfview { position: absolute; top: 74px; right: 14px; width: 92px; margin: 0; z-index: 2; }
}
@media (max-width: 640px) {
  h1 { font-size: 1.5rem; } .card { padding: 18px; } .shell { padding: 0 16px 72px; }
  .score-head { grid-template-columns: 1fr; gap: 12px; } .score-big { font-size: 3.25rem; }
  .meter { grid-template-columns: 1fr auto; } .meter .bar { grid-column: 1 / -1; order: 3; }
  .verdict { grid-template-columns: 1fr; gap: 6px; }
  .top .who small { display: none; } .top .who > div { max-width: 34vw; font-size: 0.875rem; }
  .stage header, .stage .mid, .stage footer { padding-left: 16px; padding-right: 16px; }
  .caption { font-size: 1rem; height: 6.6em; } .next-row .hint { display: none; } .next-row { justify-content: flex-end; }
  .stepper small { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- before-you-start screen ---------- */
.what { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: w; }
.what li { counter-increment: w; display: grid; grid-template-columns: 30px 1fr; gap: 12px; font-size: 1.0625rem; }
.what li::before { content: counter(w); width: 26px; height: 26px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 0.8125rem; font-weight: 600; margin-top: 1px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: grid; gap: 2px; justify-items: start; text-align: left; padding: 14px 16px; height: auto; }
.choice b { font-weight: 600; } .choice small { color: var(--muted); font-weight: 400; font-size: 0.875rem; }
.choice[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.facts { display: grid; gap: 10px; }
.facts > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; font-size: 0.9375rem; } .facts b { font-weight: 600; }
/* ---------- stage captions: only what is being said, unless the transcript is opened ---------- */
.caption { height: auto; min-height: 5.2em; max-height: 9em; font-size: 1.375rem; line-height: 1.4; justify-content: flex-end; }
.caption:not(.all) > div:not(:nth-last-child(-n+2)) { display: none; }
/* A long reply pushes the line before it off the top: fade it out there instead of leaving a clipped sliver. */
.caption:not(.all) { overflow: hidden; padding-top: 0.8em; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 0.8em); mask-image: linear-gradient(to bottom, transparent 0, #000 0.8em); }
.caption:not(.all) > div:nth-last-child(2):not(:has(+ .state)) { font-size: 1rem; }
.caption.all { height: 34vh; max-height: 34vh; font-size: 1.0625rem; justify-content: flex-start; background: var(--surface); border-radius: var(--r-sm); padding: 12px 16px 12px 52px; }
.next-row > button { flex: none; }
/* ---------- a small "more" menu ---------- */
.more { position: relative; border: 0; padding: 0; }
.more > summary { border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 16px; min-height: 44px; background: var(--surface); }
.more > summary::after { margin-left: 4px; }
.more > div { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 8px; display: grid; gap: 4px; min-width: 280px; }
.more > div button { justify-content: flex-start; border-color: transparent; }
.debrief { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.debrief ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; } .debrief li { padding-left: 18px; position: relative; }
.debrief li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); } .debrief .next li::before { background: oklch(0.72 0.14 80); }
.section { display: grid; gap: 14px; }
@media (max-width: 640px) { .caption { font-size: 1.125rem; } .debrief { grid-template-columns: 1fr; } .choices { grid-template-columns: 1fr; } .facts > div { grid-template-columns: 1fr; gap: 2px; } }

.choice { justify-content: stretch; align-content: center; }
.ready { max-width: 640px; } .ready.two { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.ready aside .facts > div { grid-template-columns: 1fr; gap: 2px; }
.caption .you { padding-left: 0; } .caption .you::before { left: -44px; } .caption:has(.you) { padding-left: 48px; }
.mic svg { display: block; }
.passbar { margin-bottom: 0; }
@media (max-width: 760px) { .ready.two { grid-template-columns: 1fr; gap: 24px; } }

.todo a { align-items: start; } .todo a > .chip { align-self: start; justify-self: end; }
.todo a > b { min-width: 0; }

/* ---------- 16 Nov: libraries, places, rules ---------- */
.hint-line { font-weight: 400; color: var(--dim); font-size: 0.8125rem; }
.sum-note { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; font-weight: 400; margin-top: 2px; max-width: 70ch; overflow: hidden; overflow-wrap: anywhere; }
summary { flex-wrap: wrap; }
details.off > summary { opacity: 0.55; }
.add-line { color: var(--blue); font-weight: 500; }
details.plain { border-top: 0; padding: 0; } details.plain > summary { font-size: 0.875rem; color: var(--muted); }
.picks { display: grid; gap: 8px 20px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); padding-left: 2px; }
.picks label.check { font-size: 0.9375rem; } .picks input:disabled + span { color: var(--dim); }
.grid2.align-start { align-items: start; }
table.places { table-layout: fixed; } table.places th:nth-child(1) { width: 46%; } table.places th:nth-child(2) { width: 26%; } table.places th:nth-child(3) { width: 12%; }
table.places td { vertical-align: middle; padding-top: 8px; padding-bottom: 8px; }
.more > div { min-width: 340px; } .more > div button { white-space: nowrap; text-align: left; }
.table-head { padding: 12px 12px 4px; }
.modal .card.wide { width: min(100%, 760px); }
.filters select { width: auto; flex: 1 1 150px; min-width: 0; }
.try-video { width: 100%; aspect-ratio: 16 / 9; background: oklch(0.2 0.02 264); border-radius: var(--r-sm); object-fit: cover; }
blockquote.was { text-decoration: line-through; opacity: 0.7; }
input[type="search"] { width: 100%; }
summary > .grow { flex-basis: 170px; }

/* ---------- 18 Nov: the stage keeps one size ---------- */
.stage .mid > div:first-child { gap: 10px; }
.avatar-frame { flex: 1 1 0; min-height: 0; width: 100%; container-type: size; position: relative; display: grid; place-items: center; }
.avatar-frame .avatar-video { width: min(100cqw, calc(100cqh * 16 / 9)); height: auto; max-width: none; max-height: none; aspect-ratio: 16 / 9; object-fit: cover; }
.caption, .caption:not(.all) { height: 5.8em; min-height: 5.8em; max-height: 5.8em; flex: none; }
.stage footer { position: relative; }
.log-panel { position: absolute; left: 24px; right: 24px; bottom: calc(100% + 8px); max-height: 52vh; overflow: auto; display: grid; gap: 10px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow); z-index: 5; font-size: 1rem; line-height: 1.45; }
.log-panel .you { color: var(--muted); } .log-panel .you::before { content: "You: "; font-weight: 600; color: var(--blue); }
.frame-note { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 10px; background: var(--yellow); color: oklch(0.2 0.03 264); font-weight: 600; text-align: center; z-index: 4; }

/* ---------- INOX, 24 Nov: the SOP video beside the trainer ---------- */
.stage .mid > div.duo:first-child { display: grid; flex-direction: initial; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.45fr); gap: 20px; align-items: stretch; }
.duo .trainer-col { display: flex; flex-direction: column; gap: 10px; min-height: 0; min-width: 0; height: 100%; width: 100%; align-items: center; justify-content: center; }
.screen { display: flex; flex-direction: column; gap: 10px; min-height: 0; min-width: 0; height: 100%; width: 100%; justify-content: center; }
.shot-head { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.sop-chip { flex: none; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; padding: 4px 9px; border-radius: 6px; background: var(--yellow); color: var(--yellow-ink); }
.screen.question .sop-chip { background: var(--blue); color: oklch(0.98 0.01 252); }
.screen.question .sop-chip::before { content: "Question · "; }
.shot-label { flex: 1; min-width: 0; font-weight: 500; font-size: 0.9375rem; line-height: 1.3; }
.shot-head button { flex: none; padding: 6px 12px; font-size: 0.8125rem; }
.shot { flex: 1 1 0; min-height: 0; container-type: size; display: grid; place-items: center; position: relative; }
.shot-media { width: min(100cqw, calc(100cqh * 16 / 9)); aspect-ratio: 16 / 9; height: auto; border-radius: 14px; background: oklch(0.1 0.01 264); object-fit: contain; display: block; }
.screen.flash .shot-media { animation: flash 0.9s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 0 var(--yellow); } 40% { box-shadow: 0 0 0 5px var(--yellow); } 100% { box-shadow: 0 0 0 0 transparent; } }
.steps { display: flex; flex-wrap: wrap; gap: 6px; }
.steps button { padding: 5px 10px; font-size: 0.8125rem; border-radius: 999px; background: var(--sunken); border: 1px solid var(--line); color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps button b { color: var(--ink); font-weight: 600; margin-right: 6px; }
.steps button.on { background: var(--blue-soft); border-color: var(--blue); color: var(--ink); }
.screen-note { font-size: 0.8125rem; color: var(--dim); }
@media (max-width: 980px) {
  .stage .mid > div.duo:first-child { grid-template-columns: 1fr; grid-template-rows: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 12px; }
  .steps { display: none; }
}
.screen-wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 0.9375rem; background: oklch(0.12 0.01 264 / 0.72); border-radius: 14px; pointer-events: none; }
