/* Frontline Coach. Direction: "dark glass data cockpit" from the design library
   (graphite ground, borderless soft-shadow cards, light-weight Geist), with a
   cinema-marquee gold accent in place of ice blue. */
@font-face { font-family: Geist; src: url(/fonts/Geist-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/fonts/GeistMono-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #18191d; --lift: rgba(255,255,255,.05); --card: #222429; --card2: #2a2d33; --well: #1d1f23;
  --ink: #ecf2fa; --muted: #a8b2c1; --dim: #737c8b; --line: rgba(205,215,232,.08); --ring: rgba(205,215,232,.24);
  --accent: #e2b04a; --accent2: #b98a2c; --accent-ink: #1a1408;
  --ok: #4fc16f; --warn: #f0a24a; --err: #f6867b;
  --r: 16px; --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 12px 32px rgba(0,0,0,.28);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 400 16px/1.5 Geist, system-ui, sans-serif; -webkit-font-smoothing: antialiased; min-height: 100dvh; }
h1, h2, h3 { font-weight: 500; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.15; font-weight: 400; }
h2 { font-size: 20px; } h3 { font-size: 16px; }
p { margin: 0; } a { color: var(--accent); }
.num { font-family: "Geist Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 13.5px; }
.shell { max-width: 1120px; margin: 0 auto; padding: 0 20px 80px; }
.top { display: flex; align-items: center; gap: 16px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
.top .who > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.top button { white-space: nowrap; padding: 8px 12px; }
.brand i { flex: none; width: 26px; height: 26px; border-radius: 8px; background: radial-gradient(120% 120% at 20% 10%, #f6d68a, var(--accent) 45%, var(--accent2)); display: block; position: relative; }
.brand i::after { content: ""; position: absolute; inset: 8px 7px 8px 10px; background: var(--accent-ink); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.top .who { margin-left: auto; text-align: right; line-height: 1.25; }
.nav { display: flex; gap: 4px; overflow-x: auto; padding: 4px; background: var(--well); border-radius: 14px; margin-bottom: 24px; scrollbar-width: none; }
.nav a { padding: 9px 16px; border-radius: 10px; color: var(--muted); text-decoration: none; white-space: nowrap; font-size: 14.5px; }
.nav a.on { background: var(--card2); color: var(--ink); }
.card { background: var(--card); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; background: var(--well); }
.stack { display: grid; gap: 16px; } .stack.tight { gap: 8px; } .stack.wide { gap: 28px; }
.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(280px, 1fr)); }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.tile b { display: block; font: 300 38px/1 "Geist Mono", monospace; letter-spacing: -.04em; margin-top: 10px; }
.tile.hero { background: radial-gradient(90% 60% at 80% 110%, rgba(246,214,138,.55), transparent), linear-gradient(170deg, #3a2a10, #7a5a1c 70%, #b98a2c); color: #fff7e2; }
button, .btn { font: inherit; font-weight: 500; border: 0; border-radius: 12px; padding: 11px 18px; background: var(--card2); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; justify-content: center; min-height: 44px; }
button:hover, .btn:hover { background: #33373e; }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); }
button.primary:hover, .btn.primary:hover { background: #edc063; }
button.ghost { background: transparent; color: var(--muted); } button.danger { color: var(--err); }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label { display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
input, textarea, select { font: inherit; color: var(--ink); background: var(--well); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
label.check { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: 15px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; font-weight: 500; color: var(--dim); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; padding: 8px 10px; }
td { padding: 12px 10px; border-top: 1px solid var(--line); vertical-align: top; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--lift); }
.scroll { overflow-x: auto; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; background: var(--card2); color: var(--muted); white-space: nowrap; }
.chip.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.chip.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.chip.err { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }
.chip.gold { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.banner { border-radius: 12px; padding: 12px 16px; background: color-mix(in srgb, var(--warn) 12%, transparent); color: #ffd9a8; font-size: 14.5px; }
.banner.err { background: color-mix(in srgb, var(--err) 12%, transparent); color: #ffc9c2; }
.banner.info { background: var(--lift); color: var(--muted); }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #0f1012; color: var(--ink); padding: 12px 18px; border-radius: 12px; opacity: 0; pointer-events: none; transition: .25s; max-width: min(92vw, 520px); z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.center { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login { width: min(100%, 400px); }
.steps { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--dim); flex-wrap: wrap; }
.steps span { display: inline-flex; gap: 6px; align-items: center; }
.steps span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--card2); }
.steps span.done { color: var(--ok); } .steps span.done::before { background: var(--ok); }
.steps span.now { color: var(--accent); } .steps span.now::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(226,176,74,.18); }
/* live session stage */
.stage { position: fixed; inset: 0; background: radial-gradient(70% 55% at 50% 0%, #2a2416 0%, var(--bg) 70%); display: grid; grid-template-rows: auto 1fr auto; z-index: 10; }
.stage header { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.stage .mid { display: grid; place-items: center; padding: 8px 18px; min-height: 0; position: relative; }
.presence { width: min(52vh, 74vw, 360px); aspect-ratio: 1; border-radius: 50%; position: relative; display: grid; place-items: center; }
.presence .core { width: 46%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(120% 120% at 25% 15%, #f6d68a, var(--accent) 45%, #7a5a1c); display: grid; place-items: center; font: 500 clamp(28px, 6vh, 46px)/1 Geist; color: var(--accent-ink); box-shadow: 0 0 60px rgba(226,176,74,.25); transition: transform .2s; }
.presence .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(226,176,74,.28); opacity: 0; }
.presence.speaking .ring { animation: ring 1.8s ease-out infinite; } .presence.speaking .ring:nth-child(2) { animation-delay: .6s; } .presence.speaking .ring:nth-child(3) { animation-delay: 1.2s; }
.presence.speaking .core { transform: scale(1.04); }
.presence.listening .core { background: radial-gradient(120% 120% at 25% 15%, #d7e6ff, #8fb2e8 45%, #3d5c93); box-shadow: 0 0 60px rgba(143,178,232,.25); }
.presence.thinking .core { animation: breathe 1.2s ease-in-out infinite; }
@keyframes ring { from { transform: scale(.5); opacity: .9; } to { transform: scale(1); opacity: 0; } }
@keyframes breathe { 50% { transform: scale(.94); opacity: .8; } }
.avatar-video { width: min(100%, 880px); max-height: 100%; aspect-ratio: 16/9; border-radius: 20px; background: #000; object-fit: cover; box-shadow: var(--shadow); }
.who-card { text-align: center; margin-top: 14px; }
.who-card .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 80vw; margin: 0 auto; }
.selfview { position: absolute; right: 18px; bottom: 10px; width: clamp(92px, 16vw, 170px); aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.selfview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.selfview small { position: absolute; left: 6px; bottom: 5px; font-size: 11px; background: rgba(0,0,0,.55); padding: 1px 6px; border-radius: 6px; }
.stage footer { padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 10px; max-width: 880px; width: 100%; margin: 0 auto; }
.caption { min-height: 76px; max-height: 26vh; overflow: auto; background: rgba(0,0,0,.28); border-radius: 14px; padding: 12px 14px; font-size: 17px; line-height: 1.45; }
.caption .you { color: #b9d2ff; } .caption .state { color: var(--dim); font-size: 13.5px; }
.talk { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.mic { width: 56px; height: 56px; border-radius: 50%; padding: 0; background: var(--card2); font-size: 22px; }
.mic.on { background: #8fb2e8; color: #0c1626; box-shadow: 0 0 0 6px rgba(143,178,232,.2); }
.bar { height: 6px; border-radius: 4px; background: var(--card2); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
/* scorecard */
.score-hero { display: grid; gap: 20px; grid-template-columns: auto 1fr; align-items: center; }
.dial { --p: 0; width: 132px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--c, var(--accent)) calc(var(--p) * 1%), var(--card2) 0); display: grid; place-items: center; }
.dial div { width: 104px; aspect-ratio: 1; border-radius: 50%; background: var(--card); display: grid; place-items: center; font: 300 34px/1 "Geist Mono", monospace; letter-spacing: -.04em; }
.meter { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: center; font-size: 14.5px; }
.meter .num { white-space: nowrap; }
.verdict { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.verdict:first-child { border-top: 0; }
.mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; margin-top: 2px; }
.mark.y { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); } .mark.h { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); } .mark.n { background: color-mix(in srgb, var(--err) 18%, transparent); color: var(--err); }
blockquote { margin: 4px 0 0; padding: 6px 10px; border-left: 2px solid var(--accent2); background: var(--well); border-radius: 0 8px 8px 0; font-size: 14px; color: var(--muted); }
details { border-top: 1px solid var(--line); padding: 12px 0; } details:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; gap: 10px; align-items: center; } summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; margin-left: auto; color: var(--dim); } details[open] summary::after { content: "–"; }
.line { padding: 4px 0; font-size: 14.5px; } .line b { font-weight: 500; color: var(--dim); margin-right: 8px; } .line.t b { color: #b9d2ff; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; z-index: 40; overflow: auto; }
.modal .card { width: min(100%, 560px); max-height: 92dvh; overflow: auto; }
.seg { background: var(--well); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--card2); border-top-color: var(--accent); animation: sp .8s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .shell { padding: 0 16px 72px; } .card { padding: 18px; } .score-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .score-hero .row { justify-content: center; }
  .meter { grid-template-columns: 1fr auto; } .meter .bar { grid-column: 1 / -1; order: 3; }
  .top { gap: 8px; } .top .who small { display: none; } .top .who > div { max-width: 30vw; font-size: 14px; } .caption { font-size: 16px; }
  summary { flex-wrap: wrap; row-gap: 2px; } summary > span:first-child { white-space: nowrap; } summary > .muted { order: 5; flex-basis: 100%; }
  .selfview { top: 0; bottom: auto; right: 14px; width: 84px; }
  .presence { width: min(40vh, 62vw); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
summary:has(.num)::after { margin-left: 12px; }
.selfview small { white-space: nowrap; font-size: 10.5px; }
