/* Design tokens. Brand colours are GRIT's own (from its brand kit and site):
   red #D74247, blue #4277FB, yellow #F4DF38, purple #70449C, ink #1E0404, sky #D6EBFF. */
:root {
  /* brand */
  --red: #D74247; --red-strong: #C2363B; --red-soft: #FDEEEE;
  --blue: #4277FB; --blue-strong: #2C5CE0; --blue-soft: #E9F2FF; --sky: #D6EBFF;
  --yellow: #F4DF38; --yellow-soft: #FCF6C9; --yellow-ink: #6A5700;
  --purple: #70449C; --purple-soft: #F2ECF8;
  /* neutrals */
  --ink: #1E0404; --ink-2: #453F3D; --muted: #6F6866; --faint: #9A9594;
  --bg: #F5F8FC; --surface: #FFFFFF; --surface-2: #F9FAFC;
  --line: #E5E7EB; --line-2: #F0F2F5; --line-strong: #CDD2DA; --line-hover: #8F96A3;
  /* semantic */
  --good: #18744A; --good-soft: #E4F4EB; --good-line: #BFE0CC;
  --bad: #B3261E; --bad-soft: #FCEAE8;
  --warn-line: #E3C928;
  /* shape and type */
  --r: 14px; --r-sm: 10px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(30, 4, 4, .06); --shadow-2: 0 10px 28px rgba(30, 4, 4, .10);
  --display: 'Familjen Grotesk', 'Instrument Sans', system-ui, sans-serif;
  --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --side-w: 236px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 22px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
svg { width: 16px; height: 16px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.link { color: var(--blue-strong); font-weight: 500; text-underline-offset: 3px; }

/* ---------- demo bar (not part of the product) ---------- */
.demo-bar { background: var(--ink); color: #EFE9E8; font-size: 13px; position: sticky; top: 0; z-index: 10; }
.demo-inner { padding: 9px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.demo-tag { font-family: var(--display); font-weight: 700; color: var(--yellow); letter-spacing: .05em; text-transform: uppercase; font-size: 11px; }
.roles, .review-links { display: flex; gap: 2px; background: rgba(255, 255, 255, .10); padding: 3px; border-radius: 9px; }
.roles a, .review-links a { text-decoration: none; padding: 5px 11px; border-radius: 7px; color: #D9CFCE; font-weight: 500; white-space: nowrap; }
.roles a.on, .review-links a.on { background: var(--surface); color: var(--ink); }
.roles a:hover:not(.on), .review-links a:hover:not(.on) { color: #fff; }
.persona { display: flex; align-items: center; gap: 8px; color: #B9AEAD; }
.persona select { background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .22); color: #fff; border-radius: 8px; padding: 5px 8px; max-width: 170px; }
.persona option { color: var(--ink); }
.clock { display: flex; align-items: center; gap: 8px; color: #B9AEAD; margin-left: auto; }
.clock b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.clock button, .reset { white-space: nowrap; background: none; border: 1px solid rgba(255, 255, 255, .22); color: #EFE9E8; border-radius: 8px; padding: 4px 9px; }
.clock button:hover, .reset:hover { border-color: rgba(255, 255, 255, .6); }

/* ---------- dashboard shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: calc(100vh - var(--demo-h, 44px)); }
.side { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px 14px; position: sticky; top: var(--demo-h, 44px); height: calc(100vh - var(--demo-h, 44px)); overflow-y: auto; }
.brand { text-decoration: none; display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; font-family: var(--display); }
.mark { width: 32px; height: 32px; border-radius: 9px; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; font-style: italic; }
.brand b { font-size: 21px; font-weight: 700; font-style: italic; letter-spacing: .01em; line-height: 1; }
.brand small { display: block; font-family: var(--body); font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.side-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); padding: 14px 10px 6px; }
.side-nav { display: grid; gap: 2px; }
.side-nav a, .side-nav span.off { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 14px; }
.side-nav svg { width: 18px; height: 18px; color: var(--faint); }
.side-nav a:hover { background: var(--line-2); }
.side-nav a.on { background: var(--blue-soft); color: var(--ink); font-weight: 600; }
.side-nav a.on svg { color: var(--blue-strong); }
.side-nav span.off { color: var(--faint); cursor: default; }
.side-nav span.off em { margin-left: auto; font-style: normal; font-size: 11px; }
.side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid var(--line-2); flex: none; }
.side-user b { display: block; font-size: 14px; line-height: 1.25; }
.side-user small { color: var(--muted); font-size: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 13px; flex: none; text-transform: uppercase; }
.avatar.a-interviewer { background: var(--blue-strong); } .avatar.a-team { background: var(--ink); } .avatar.a-review { background: var(--red); }
.main-col { min-width: 0; }
.top { background: var(--surface); border-bottom: 1px solid var(--line); height: 60px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.crumb { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.crumb small { color: var(--muted); font-size: 14px; white-space: nowrap; }
.crumb small::after { content: '/'; margin-left: 8px; color: var(--line-strong); }
.crumb b { font-family: var(--display); font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-right { display: flex; align-items: center; gap: 12px; }
.top-right .today { font-size: 13px; color: var(--ink-2); background: var(--blue-soft); padding: 5px 11px; border-radius: var(--r-pill); font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.top .brand, .top .avatar, .mobile-nav { display: none; }

/* ---------- layout ---------- */
.view { container: view / inline-size; max-width: 1120px; margin: 0 auto; padding: 28px 28px 64px; }
.view.narrow { max-width: 760px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.sub { color: var(--muted); margin-top: 6px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; margin-bottom: 10px; }
.back:hover { color: var(--ink); }
.head-actions, .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions { margin-top: 20px; }
.actions.end { justify-content: flex-end; }
.stack { display: grid; gap: 16px; align-content: start; }
.summary { color: var(--ink-2); margin-bottom: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-1); }
.panel.empty { text-align: center; padding: 40px 20px; }
.panel.empty h3 { margin-bottom: 6px; }
.section-title { margin: 28px 0 12px; }
.note { background: var(--blue-soft); border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.note.bad { background: var(--bad-soft); color: var(--bad); margin: 12px 0; }

/* ---------- buttons, chips, segmented ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid transparent; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #3A1414; }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost { background: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #961F18; }
.btn:disabled { background: var(--line-2); color: var(--faint); border-color: transparent; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.chip-info { background: var(--blue-soft); color: var(--blue-strong); }
.chip-good { background: var(--good-soft); color: var(--good); }
.chip-warn { background: var(--yellow-soft); color: var(--yellow-ink); }
.chip-bad { background: var(--bad-soft); color: var(--bad); }
.seg { display: inline-flex; flex-wrap: wrap; background: #E7ECF3; padding: 3px; border-radius: var(--r-sm); gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 500; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.stats.four { grid-template-columns: repeat(4, 1fr); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 2px; text-align: left; min-width: 0; box-shadow: var(--shadow-1); }
.stat span { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 7px; }
.stat span::before { content: ''; width: 9px; height: 9px; border-radius: 3px; background: var(--c, var(--line-strong)); flex: none; }
.stat b { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: 12px; }
.c-red { --c: var(--red); } .c-blue { --c: var(--blue); } .c-yellow { --c: var(--yellow); } .c-purple { --c: var(--purple); } .c-green { --c: var(--good); }
.tile:hover { border-color: var(--line-hover); }
.tile.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* ---------- student home ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--red) 0%, var(--red-strong) 100%); color: #fff; border-radius: 18px; padding: 24px; margin-bottom: 20px; display: grid; gap: 20px; }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 380px; height: 380px; right: -110px; top: -150px; background: repeating-radial-gradient(circle, rgba(255, 255, 255, .16) 0 1px, transparent 1px 7px); }
.hero::after { width: 150px; height: 150px; left: 38%; bottom: -96px; background: repeating-radial-gradient(circle, rgba(255, 255, 255, .13) 0 1px, transparent 1px 5px); }
.hero > * { position: relative; z-index: 1; }
.hero-kicker { font-size: 13px; font-weight: 500; opacity: .92; margin-bottom: 4px; }
.hero h1 { font-size: 32px; }
.hero .stats { margin: 0; }
.hero .stat { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .28); box-shadow: none; }
.hero .stat span { color: #fff; font-weight: 500; }
.hero .stat span::before { display: none; }
.hero .stat b.stat-text { font-size: 19px; padding: 6px 0 5px; }
.hero .stat.miles b::after { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); margin-left: 8px; vertical-align: middle; }
@container view (min-width: 840px) { .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); align-items: center; padding: 28px; } }
.home-grid { display: grid; gap: 20px; }
@container view (min-width: 700px) { .home-grid { grid-template-columns: minmax(0, 1fr) 290px; align-items: start; } }

.jcard { container: card / inline-size; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; border-top: 4px solid var(--line-strong); box-shadow: var(--shadow-1); }
.jcard.tone-info { border-top-color: var(--blue); }
.jcard.tone-good { border-top-color: var(--good); }
.jcard.tone-warn { border-top-color: var(--yellow); }
.jcard.tone-bad { border-top-color: var(--bad); }
.jcard-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.jcard h2 { margin-bottom: 10px; font-size: 24px; }
.jcard p { color: var(--ink-2); max-width: 62ch; }
.jcard p + p { margin-top: 8px; }
.feedback { margin: 16px 0 0; padding: 12px 14px; background: var(--surface-2); border-radius: var(--r-sm); border-left: 3px solid var(--purple); color: var(--ink-2); font-size: 14px; }
.feedback span { display: block; font-size: 12px; font-weight: 600; color: var(--purple); margin-bottom: 4px; }
.feedback small { display: block; margin-top: 6px; color: var(--muted); }

.ticket { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); border: 1px solid var(--sky); border-radius: var(--r-sm); margin: 4px 0 16px; background: linear-gradient(180deg, var(--surface) 0%, var(--blue-soft) 100%); }
.ticket-when { padding: 14px 18px; display: flex; align-items: center; gap: 14px; border-right: 1px dashed #A9C6EC; }
.ticket-when > div { display: grid; gap: 2px; min-width: 0; }
.ticket-day { color: var(--ink-2); font-weight: 500; }
.ticket-time { font-family: var(--display); font-size: 32px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ticket-time small { font-size: 14px; font-weight: 600; color: var(--muted); }
.ticket-meta { margin: 0; padding: 14px 18px; display: grid; gap: 6px; font-size: 14px; }
.ticket-meta div { display: flex; justify-content: space-between; gap: 12px; }
.ticket-meta dt { color: var(--muted); }
.ticket-meta dd { margin: 0; font-weight: 500; text-align: right; }
@container view (max-width: 520px) {
  .ticket { grid-template-columns: 1fr; }
  .ticket-when { border-right: 0; border-bottom: 1px dashed #A9C6EC; }
  .jcard { padding: 18px; } .jcard h2 { font-size: 21px; }
  .hero { padding: 18px; } .hero h1 { font-size: 26px; }
  .stats { gap: 8px; } .stat { padding: 12px; } .stat b { font-size: 22px; } .hero .stat b.stat-text { font-size: 15px; padding: 5px 0; }
  .actions .btn { flex: 1 1 auto; }
}

.panel h3 { margin-bottom: 12px; }
.prog { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.prog-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: center; font-size: 14px; margin-bottom: 8px; }
.steps { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 5px; font-size: 14px; }
.steps li { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.steps li.done { color: var(--ink); }
.steps li.done svg { color: var(--good); }

/* ---------- tracks and badges ---------- */
.track { margin-bottom: 16px; }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; }
.rung { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.rung:first-child { border-top: 0; padding-top: 4px; }
.medal { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--purple-soft); color: var(--purple); font-family: var(--display); font-weight: 700; }
.rung.state-passed .medal { background: var(--purple); color: #fff; box-shadow: 0 0 0 3px var(--yellow); }
.rung.state-revoked .medal { background: var(--bad-soft); color: var(--bad); }
.rung.locked { color: var(--muted); }
.rung.locked .medal { background: var(--line-2); color: var(--faint); }
.rung-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tags { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 3px 10px; border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--muted); }
.tags li.done { color: var(--ink); border-color: var(--good-line); background: var(--good-soft); }
.tags li.done svg { color: var(--good); width: 13px; height: 13px; }

/* ---------- booking ---------- */
.day-title { margin-bottom: 14px; }
.part { margin-bottom: 16px; }
.part-label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: 8px; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.time { height: 44px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); font-weight: 600; font-variant-numeric: tabular-nums; }
.time:hover { border-color: var(--blue-strong); background: var(--blue-soft); }
.time.on { background: var(--blue-strong); border-color: var(--blue-strong); color: #fff; }
.confirm-bar { position: sticky; bottom: 12px; margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 12px 12px 18px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; box-shadow: var(--shadow-2); }
.confirm-bar.ready { border-color: var(--blue-strong); }
.confirm-bar > div { display: grid; }
.confirm-bar b { font-family: var(--display); font-size: 18px; }
.rules { margin: 20px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; display: grid; gap: 4px; }

/* ---------- interviewer ---------- */
.open-row { display: grid; grid-template-columns: 92px 1fr; gap: 16px; padding: 10px 20px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); font-size: 14px; }
.when { font-variant-numeric: tabular-nums; }
.sched { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-1); }
.sched .when { display: grid; align-content: start; }
.sched .when b { font-family: var(--display); font-size: 20px; }
.sched .when span { color: var(--muted); font-size: 13px; }
.sched-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: flex-start; }
.sched-head h3 { font-size: 18px; margin-bottom: 2px; }
.sched-body > p { margin-top: 6px; }
.sched.completed, .sched.no_show { background: var(--surface-2); box-shadow: none; }
.sched.in_progress { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
@container view (max-width: 520px) { .sched, .open-row { grid-template-columns: 1fr; gap: 8px; } .sched .when { display: flex; gap: 8px; align-items: baseline; } }

.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.choice { border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 12px; display: grid; gap: 4px; cursor: pointer; align-content: start; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.choice:hover { border-color: var(--ink); }
.choice:has(input:checked) { box-shadow: inset 0 0 0 1px currentColor; }
.choice.c-pass:has(input:checked) { border-color: var(--good); color: var(--good); background: var(--good-soft); }
.choice.c-fail:has(input:checked) { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
.choice.c-retake:has(input:checked) { border-color: var(--warn-line); color: var(--yellow-ink); background: var(--yellow-soft); }
.choice:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.field { display: grid; gap: 6px; margin-top: 12px; font-size: 14px; font-weight: 500; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field textarea, .field input, .field select, .filters select, .filters input { border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 9px 12px; background: var(--surface); font-weight: 400; width: 100%; }
.field textarea { resize: vertical; }
.form-error { color: var(--bad); font-size: 14px; margin-top: 10px; font-weight: 500; }

.grid-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow-1); }
.avail { display: grid; grid-template-columns: 76px repeat(var(--cols), minmax(88px, 1fr)); gap: 6px; min-width: 640px; }
.col-head { text-align: center; padding-bottom: 6px; line-height: 1.25; display: grid; }
.col-head span { font-size: 12px; color: var(--muted); }
.col-head.today b { color: var(--red); }
.row-head { font-size: 13px; color: var(--muted); display: flex; align-items: center; font-variant-numeric: tabular-nums; position: sticky; left: 0; background: var(--surface); }
.cell { height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--good); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 6px; }
.cell:hover:not(:disabled) { border-color: var(--ink); }
.cell.open { background: var(--good-soft); border-color: var(--good-line); }
.cell.booked { background: var(--blue-soft); border-color: var(--sky); color: var(--blue-strong); }
.cell:disabled { opacity: .45; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); }
.sw.open { background: var(--good-soft); border-color: var(--good-line); }
.sw.booked { background: var(--blue-soft); border-color: var(--sky); }

/* ---------- tables (team, interviews) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.filters select { width: auto; }
.filters input { width: 200px; margin-left: auto; }
.table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-1); }
.tr { display: grid; grid-template-columns: 1.2fr 1.5fr 1.6fr 1.3fr .7fr auto; gap: 14px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line-2); font-size: 14px; }
.t-plain .tr { grid-template-columns: 1.2fr 1.3fr 1.5fr 1.1fr 1.1fr; }
.t-mine .tr { grid-template-columns: 1.1fr 1.4fr 1fr 1fr 2fr; align-items: start; }
.tr > span { min-width: 0; }
.tr:not(.th):hover { background: var(--surface-2); }
.tr.th { border-top: 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--surface-2); }
.tr.th span:last-child:empty { width: 82px; }
.tr small { display: block; color: var(--muted); font-size: 12px; }
.tr .btn { height: 34px; padding: 0 12px; }
.flagdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-left: 8px; vertical-align: middle; }
.cap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cap .panel { display: grid; gap: 10px; padding: 16px; }
.cap-head { display: flex; align-items: center; gap: 10px; }
.cap-head b { display: block; line-height: 1.2; }
.bar { height: 8px; border-radius: var(--r-pill); background: var(--good-soft); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--blue); border-radius: var(--r-pill); }
@container view (max-width: 620px) { .stats.four { grid-template-columns: repeat(2, 1fr); } .cap { grid-template-columns: 1fr; } }
@container view (max-width: 700px) {
  .tr.th { display: none; }
  .tr, .t-plain .tr, .t-mine .tr { grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 16px; }
  .tr:nth-child(2) { border-top: 0; }
  .tr > span[data-label] { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .tr > span[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; width: 84px; flex: none; }
  .tr > span[data-label] small { display: inline; }
  .td-name { grid-row: 1; } .td-act { grid-row: 1; grid-column: 2; }
  .filters input { width: 100%; margin: 0; }
}
.detail-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.modal-card h3 { margin: 20px 0 10px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: grid; gap: 12px; font-size: 14px; }
.timeline li { position: relative; }
.timeline li::before { content: ''; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--blue); }
.timeline time, .timeline small { color: var(--muted); font-size: 12px; }

/* ---------- review pages ---------- */
.msg { display: grid; gap: 20px; padding: 28px 0; border-top: 1px solid var(--line); }
.msg:first-of-type { border-top: 0; padding-top: 0; }
@container view (min-width: 860px) { .msg { grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; } }
.msg-info { display: grid; gap: 10px; justify-items: start; }
.num { font-family: var(--display); font-weight: 700; font-size: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; }
.msg-frame .view, .pane-body .view { padding: 0; max-width: none; }
.filters.cmp { gap: 12px 24px; align-items: flex-end; }
.filters.cmp label { display: grid; gap: 6px; }
.filters.cmp label > span { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.panes { display: grid; gap: 20px; align-items: start; }
@container view (min-width: 900px) { .panes.mode-both { grid-template-columns: 1fr 1fr; } }
.pane { border: 1px solid var(--line-strong); border-radius: 18px; overflow: hidden; background: var(--bg); min-width: 0; }
.pane-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 18px; background: var(--ink); color: #fff; font-size: 13px; }
.pane-label b { font-family: var(--display); font-size: 15px; color: var(--yellow); }
.pane-label span { color: #D9CFCE; }
.pane-body { padding: 18px 18px 24px; }
.pane-body .page-head { margin-bottom: 16px; }
.pane-body h1 { font-size: 24px; }
.changes { margin-top: 20px; }
.changes ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--ink-2); }

/* ---------- modal, toast ---------- */
.modal { position: fixed; inset: 0; background: rgba(30, 4, 4, .45); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 20; }
.modal.show { display: flex; }
.modal-card { background: var(--surface); border-radius: 18px; padding: 24px; width: 100%; max-width: 560px; max-height: calc(100dvh - 32px); overflow-y: auto; box-shadow: var(--shadow-2); }
.modal-card h2 { margin-bottom: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: var(--r-sm); font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 30; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- tablet and phone: sidebar becomes a tab row ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .demo-bar { position: static; }
  .top { padding: 0 16px; height: 54px; }
  .top .brand { display: flex; padding: 0; } .top .brand small { display: none; } .top .avatar { display: grid; }
  .crumb { display: none; }
  .mobile-nav { display: flex; gap: 4px; overflow-x: auto; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 12px; scrollbar-width: none; }
  .mobile-nav a { flex: none; display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--r-pill); text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-2); }
  .mobile-nav a.on { background: var(--blue-soft); color: var(--ink); font-weight: 600; }
  .mobile-nav a.on svg { color: var(--blue-strong); }
  .view { padding: 20px 16px 56px; }
}
@media (max-width: 640px) {
  h1 { font-size: 25px; }
  .demo-inner { padding: 10px 16px; gap: 8px 10px; }
  .demo-tag { width: 100%; }
  .clock { margin-left: 0; width: 100%; }
  .clock b { margin-right: auto; } .clock span { display: none; }
  .persona { flex: 1 1 100%; } .persona select { max-width: none; flex: 1; }
  .top-right .today { display: none; }
  .choices { grid-template-columns: 1fr; }
  .head-actions { width: 100%; } .head-actions .btn { flex: 1; padding: 0 8px; }
  .modal { align-items: flex-end; padding: 0; } .modal-card { border-radius: 18px 18px 0 0; max-height: 92dvh; }
  .seg button { padding: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- dial details: fine rings, tick scales, lit markers ---------- */
:root { --lit: linear-gradient(180deg, #FF7B3E 0%, #E8371F 100%); --lit-glow: 0 0 10px rgba(232, 55, 31, .45), inset 0 1px 1px rgba(255, 255, 255, .45); --well: inset 0 1px 2px rgba(30, 4, 4, .22), inset 0 -1px 0 rgba(255, 255, 255, .9); }
.dial { background: linear-gradient(180deg, var(--surface) 0%, #F3F5F8 100%); padding: 14px 18px 12px; margin-bottom: 20px; }
.dial-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; margin-bottom: 8px; }
.dial-head h3 { margin: 0; }
.dial-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); }
.dial > .dial-legend { margin-top: 8px; }
.dial-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dial-legend .win { width: 8px; height: 16px; }
.scale { display: flex; gap: 2px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.tickday { flex: 1 0 44px; display: grid; justify-items: center; gap: 4px; padding: 6px 0 4px; border: 0; background: none; border-radius: var(--r-sm); line-height: 1.1; color: var(--ink); }
.tickday small { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.tickday b { font-family: var(--display); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tickday.today b { box-shadow: 0 0 0 1.5px var(--ink); border-radius: 7px; padding: 1px 5px; margin: -1px 0; }
button.tickday:hover { background: var(--line-2); }
.pip { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); opacity: .55; display: inline-block; }
.pip.on { background: var(--ink-2); opacity: 1; }
.win { width: 11px; height: 24px; border-radius: 6px; background: #E6E9EE; box-shadow: var(--well); display: inline-block; flex: none; }
.tickday.lit .win, .win.lit { background: var(--lit); box-shadow: var(--lit-glow); }
.tickday.lit b { color: var(--red-strong); }
.dial-clock { width: 76px; height: 76px; flex: none; }
.dial-clock .face { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.dial-clock .ring { fill: none; stroke: var(--ink); stroke-opacity: .11; stroke-width: .7; }
.dial-clock .tick { stroke: var(--ink); stroke-width: 1.3; stroke-linecap: round; }
.dial-clock .tick.hot { stroke: #E8371F; stroke-width: 3.2; }
.dial-clock .hand { stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.dial-clock .hand.hour { stroke-width: 3.6; }
.dial-clock .cap { fill: var(--ink); } .dial-clock .pin { fill: var(--surface); }
.ticks { display: flex; gap: 4px; align-items: flex-end; margin: 10px 0 6px; height: 14px; }
.ticks i { flex: 1; max-width: 22px; height: 6px; border-radius: 3px; background: #E6E9EE; box-shadow: var(--well); }
.ticks i.on { background: var(--ink); box-shadow: none; }
.ticks i.hot { background: var(--lit); box-shadow: var(--lit-glow); height: 12px; }
.panel.empty::before { content: ''; display: block; width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 50%; border: 1px solid var(--line-strong); background: repeating-radial-gradient(circle, rgba(30, 4, 4, .13) 0 1px, transparent 1px 5px), var(--surface); }
.top-right .today::before { content: ''; display: inline-block; width: 6px; height: 12px; border-radius: 3px; background: var(--lit); box-shadow: var(--lit-glow); margin-right: 8px; vertical-align: -1px; }
.num { background: var(--lit); box-shadow: var(--lit-glow); }
@container view (max-width: 520px) { .dial-clock { width: 60px; height: 60px; } .dial { padding: 12px 12px 10px; } }
@container card (max-width: 560px) {
  .ticket { grid-template-columns: 1fr; }
  .ticket-when { border-right: 0; border-bottom: 1px dashed #A9C6EC; }
}
