/* STAR Interviewer v3 design system (ink sidebar, indigo accent, serif display)
   Transcribed from the "STAR Interviewer v2" design (claude.ai/design).
   Tokens live on :root; components below are the reusable pieces each page uses. */

/* Instrument Sans is self-hosted (SIL Open Font License, see /static/fonts/OFL.txt).
   Do not load fonts.googleapis.com — that third-party request is not required. */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/instrument-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/instrument-sans-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/instrument-sans-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/instrument-sans-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/instrument-sans-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/instrument-sans-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/instrument-sans-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/instrument-sans-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/static/fonts/instrument-sans-latin-ext-400-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/static/fonts/instrument-sans-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 500; font-display: swap; src: url("/static/fonts/instrument-sans-latin-ext-500-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 500; font-display: swap; src: url("/static/fonts/instrument-sans-latin-500-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 600; font-display: swap; src: url("/static/fonts/instrument-sans-latin-ext-600-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 600; font-display: swap; src: url("/static/fonts/instrument-sans-latin-600-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 700; font-display: swap; src: url("/static/fonts/instrument-sans-latin-ext-700-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 700; font-display: swap; src: url("/static/fonts/instrument-sans-latin-700-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Instrument Serif (display headings) is self-hosted too (SIL OFL, see /static/fonts/OFL-instrument-serif.txt). */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/instrument-serif-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/instrument-serif-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #F5F6F8;
  --surface: #fff;
  --surface-2: #FAFBFC;
  --surface-hover: #EEF0F4;
  --border: #E3E6EC;
  --border-soft: #E9ECF1;
  --border-row: #EEF0F4;
  --border-input: #D5DAE3;
  --text: #0F172A;
  --text-2: #1E293B;
  --text-3: #334155;
  --text-4: #475569;
  --muted: #5B6678;
  --muted-2: #667085;
  --muted-3: #7A8496;
  --accent: #4338CA;
  --accent-hover: #3730A3;
  --accent-text: #3730A3;
  --accent-text-2: #3730A3;
  --accent-soft: #EEF0FF;
  --accent-softer: #F5F6FF;
  --accent-border: #C7CCFA;
  --danger: oklch(0.5 0.2 25);
  --danger-soft: oklch(0.97 0.02 25);
  --warn: #C2410C;
  --success: #0F766E;
  --amber-bg: #FFF7ED;
  --amber-border: #FCD9B6;
  --amber-text: #9A3412;
  /* Ink: the dark sidebar and other inverse surfaces */
  --ink: #0C1424;
  --ink-2: #121C30;
  --ink-3: #1C2740;
  --ink-border: #243047;
  --ink-text: #A9B4C7;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --radius-card: 14px;
  --radius-btn: 10px;
  --radius-input: 9px;
  --shadow-menu: 0 12px 32px -8px rgba(15, 23, 42, .18);
  --shadow-modal: 0 30px 60px -20px rgba(15, 23, 42, .4);
  --sidebar-w: 248px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: oklch(0.42 0.2 280); }
input, select, textarea, button { font: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: oklch(0.62 0.02 270); }
button { background: none; border: none; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
img, svg { display: inline-block; vertical-align: middle; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.text-danger { color: var(--danger); }
.tnum { font-variant-numeric: tabular-nums; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }
.pulse { animation: pulse 1.4s ease-in-out infinite; }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--ink);
  color: var(--ink-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}
.sb-brand { padding: 20px 18px 10px; display: flex; align-items: center; gap: 10px; color: #fff; }
.sb-brand:hover { color: #fff; }
.sb-brand img { width: 28px; height: 28px; }
.sb-brand span { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }

.sb-org-wrap { padding: 8px 12px 12px; position: relative; }
.sb-org {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--ink-border); background: var(--ink-2); color: #fff;
  cursor: pointer; text-align: left;
}
.sb-org:hover { background: var(--ink-3); }
.sb-org-avatar {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: #fff; color: var(--ink);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.sb-org-text { flex: 1; min-width: 0; }
.sb-org-name { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-org-meta { display: block; font-size: 11px; color: var(--ink-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-org-chevron { color: var(--ink-text); flex-shrink: 0; }

.sb-org-menu {
  position: absolute; left: 12px; right: 12px; top: calc(100% - 4px);
  background: var(--surface); border: 1px solid oklch(0.9 0.008 270); border-radius: 12px;
  box-shadow: var(--shadow-menu); padding: 6px; z-index: 50;
}
.menu-label { padding: 6px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); }
.menu-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; font-size: 13px; text-align: left;
  color: var(--text); cursor: pointer; background: none; border: none;
}
.menu-item:hover { background: var(--surface-hover); color: var(--text); }
.menu-item.active { background: var(--accent-soft); font-weight: 600; }
.menu-item .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item .sub { font-size: 11px; color: var(--muted-2); }
.menu-divider { height: 1px; background: oklch(0.92 0.008 270); margin: 6px 4px; }
.menu-list { max-height: 220px; overflow-y: auto; }

.sb-nav { padding: 4px 12px; display: flex; flex-direction: column; gap: 2px; }
.sb-section { padding: 10px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8794AB; }
.sb-section + .sb-section, .sb-nav .sb-section:not(:first-child) { padding-top: 16px; }
.sb-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; border: none;
  cursor: pointer; text-align: left; font-size: 13.5px; font-weight: 500;
  background: none; color: var(--ink-text); width: 100%;
}
.sb-link:hover { background: var(--ink-2); color: #fff; }
.sb-link.active { background: var(--ink-3); color: #fff; font-weight: 600; }
.sb-link svg { flex-shrink: 0; }
.sb-link .label { flex: 1; }
.sb-count { font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; color: inherit; }
.sb-count:empty { display: none; }
.sb-tag {
  font-size: 10px; font-weight: 600; letter-spacing: .04em; padding: 2px 6px; border-radius: 999px;
  background: var(--ink-3); color: var(--ink-text);
}
.sb-footer { margin-top: auto; padding: 12px; border-top: 1px solid var(--ink-border); display: flex; flex-direction: column; gap: 2px; }
.sb-footer .sb-link { color: var(--ink-text); }
.sb-footer .sb-link:hover, .sb-footer .sb-link.active { color: #fff; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 10px 10px 4px; }
.sb-user-text { flex: 1; min-width: 0; }
.sb-user-name { display: block; font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-email { display: block; font-size: 11px; color: var(--ink-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-logout { border: none; background: none; cursor: pointer; color: var(--ink-text); padding: 6px; border-radius: 6px; }
.sb-logout:hover { background: var(--ink-3); color: #fff; }
.sb-user .avatar { background: var(--ink-border); color: #fff; }

/* Mobile top bar + drawer */
.topbar {
  display: none; align-items: center; gap: 10px; padding: 10px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.topbar img { width: 26px; height: 26px; }
.topbar .brand { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; flex: 1; color: var(--text); }
.topbar-btn { padding: 6px; border-radius: 8px; color: var(--text-3); }
.topbar-btn:hover { background: var(--surface-hover); }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 39; }
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .topbar { display: flex; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .18s ease; }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.open { display: block; }
}

/* ---------- Page ---------- */
.page { padding: 36px 40px 48px; max-width: 1280px; width: 100%; margin: 0 auto; }
.page--wide { max-width: 1400px; }
.page--mid { max-width: 1120px; }
.page--form { max-width: 860px; }
.page--full { max-width: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-title { font-family: var(--font-display); font-size: 38px; font-weight: 400; line-height: 1.1; letter-spacing: -0.01em; }
.page-sub { margin-top: 6px; color: var(--muted); font-size: 15px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; border: none; background: none; padding: 0;
  color: var(--muted); font-size: 13px; cursor: pointer; margin-bottom: 14px;
}
.back-link:hover { color: var(--accent); }
.section-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
@media (max-width: 900px) { .page { padding: 20px 16px 40px; } }

/* ---------- Banner ---------- */
.banner {
  margin: 20px 32px 0; padding: 10px 14px; border-radius: 10px;
  display: flex; gap: 10px; align-items: center; font-size: 13px;
}
.banner--warn { background: var(--amber-bg); border: 1px solid var(--amber-border); color: var(--amber-text); }
.banner--danger { background: var(--danger-soft); border: 1px solid oklch(0.88 0.06 25); color: var(--danger); }
.banner--info { background: var(--accent-softer); border: 1px solid var(--accent-border); color: var(--accent-text-2); }
.banner svg { flex-shrink: 0; }
.banner.inline { margin: 0 0 16px; }
@media (max-width: 900px) { .banner { margin: 16px 16px 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-btn); border: 1px solid transparent;
  font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; line-height: 1.4;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .1); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); color: #fff; }
.btn-primary.btn-lg { padding: 12px 18px; font-size: 14px; }
.btn-secondary { background: var(--surface); border-color: var(--border-input); color: var(--text); }
.btn-secondary:hover:not(:disabled) { border-color: var(--text-4); background: var(--surface-2); color: var(--text); }
.btn-secondary.accent:hover:not(:disabled) { color: var(--accent); }
.btn-accent-soft { background: var(--accent-softer); border-color: var(--accent-border); color: var(--accent-text-2); }
.btn-accent-soft:hover:not(:disabled) { background: oklch(0.94 0.03 280); color: var(--accent-text-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: oklch(0.45 0.2 25); color: #fff; }
.btn-danger-outline { background: var(--surface); border-color: var(--border-input); color: var(--danger); }
.btn-danger-outline:hover:not(:disabled) { border-color: var(--danger); }
.btn-ghost { background: none; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-hover); color: var(--text); }
.btn-link { background: none; border: none; padding: 0; color: var(--accent); font-weight: 600; font-size: 13px; cursor: pointer; }
.btn-link:hover { color: oklch(0.42 0.2 280); }
.btn-sm { padding: 6px 12px; border-radius: 8px; font-size: 12.5px; }
.btn-xs { padding: 4px 10px; border-radius: 7px; font-size: 12px; }
.btn-icon {
  padding: 6px; border-radius: 7px; border: 1px solid transparent; background: none;
  cursor: pointer; color: var(--muted-2); display: inline-grid; place-items: center;
}
.btn-icon:hover { background: var(--surface-hover); color: var(--accent); }
.btn-icon.danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-row { display: inline-flex; gap: 2px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.btn .caret { margin-left: -2px; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.card.pad { padding: 20px 24px; }
.card.pad-sm { padding: 18px 20px; }
.card-head { padding: 14px 20px; border-bottom: 1px solid var(--border-soft); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-head .title { font-weight: 600; }
.card-head .title-lg { font-weight: 700; font-size: 15px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border-soft); background: var(--surface-2); display: flex; justify-content: flex-end; gap: 8px; }
.card-toolbar { padding: 12px 16px; border-bottom: 1px solid var(--border-soft); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.card-toolbar .count { margin-left: auto; font-size: 12.5px; color: var(--muted-2); }
.card-section { padding: 20px 24px; border-bottom: 1px solid var(--border-soft); }
.card-section:last-child { border-bottom: none; }
.card-section.soft { background: var(--surface-2); }
.card + .card { margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.card.hoverable:hover { border-color: oklch(0.8 0.05 280); box-shadow: 0 6px 20px -10px rgba(15, 23, 42, .18); }

/* Stats strip */
.stats { display: flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; margin-bottom: 24px; }
.stat { flex: 1 1 160px; padding: 18px 20px; box-shadow: -1px -1px 0 0 var(--border); }
.stat-label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.stat-value { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-value.warn { color: var(--warn); }
.stat-value.accent { color: var(--accent); }
.stat-hint { font-size: 12px; color: var(--muted-2); }
.stat-value .unit { font-size: 14px; color: var(--muted-3); font-weight: 500; }

/* Score grid (review) */
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.score-grid .stat-value { font-size: 34px; }

/* ---------- Forms ---------- */
.input, .select, .textarea {
  width: 100%; padding: 9px 12px; border-radius: var(--radius-input);
  border: 1px solid var(--border-input); background: var(--surface); font-size: 13.5px; color: var(--text);
  outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px oklch(0.5 0.2 280 / .15); }
.input.sm, .select.sm { padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.select { appearance: auto; }
.select.auto, .input.auto { width: auto; }
.select.accent { border-color: var(--accent-border); background: var(--accent-softer); font-weight: 600; color: var(--accent-text-2); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field { display: block; }
.field > span.lbl, .label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.field .hint, .hint { font-size: 12px; color: var(--muted-2); margin-top: 4px; }
.field .optional { color: var(--muted-3); font-weight: 500; }
.search { position: relative; flex: 1; min-width: 220px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted-3); pointer-events: none; }
.search .input { padding: 8px 12px 8px 34px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; }
.checkbox { accent-color: var(--accent); width: 16px; height: 16px; }
.check-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check-row .checkbox { margin-top: 3px; flex-shrink: 0; }
.check-row .t { display: block; font-weight: 600; font-size: 13.5px; }
.check-row .d { display: block; font-size: 12.5px; color: var(--muted); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .form-grid-2 { grid-template-columns: 1fr; } }
.form-error { font-size: 12.5px; color: var(--danger); }
.form-success { font-size: 12.5px; color: oklch(0.38 0.12 150); }

/* Settings rows */
.settings-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 22px 24px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
.settings-row .rt { font-weight: 700; }
.settings-row .rd { font-size: 13px; color: var(--muted); margin-top: 2px; }
@media (max-width: 700px) { .settings-row { grid-template-columns: 1fr; gap: 14px; } }

/* ---------- Chips (filter pills) ---------- */
.chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-input); cursor: pointer;
  font-size: 12.5px; font-weight: 600; background: var(--surface); color: var(--text-4);
}
.chip:hover { border-color: oklch(0.8 0.03 280); }
.chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 13.5px; }
.table.compact { min-width: 0; }
.table thead tr { color: var(--muted); font-size: 12px; text-align: left; background: var(--surface-2); letter-spacing: .04em; text-transform: uppercase; }
.table th { font-weight: 600; padding: 10px 16px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.table td { padding: 12px 16px; vertical-align: middle; }
.table td.top { vertical-align: top; }
.table tbody tr { border-bottom: 1px solid var(--border-row); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr.selected { background: oklch(0.98 0.01 280); }
.table td.dim { color: var(--text-3); }
.table td.dimmer { color: var(--muted-2); font-size: 12.5px; }
.table td.actions { text-align: right; white-space: nowrap; }
.table .th-sort { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.table .th-sort .arrow { color: var(--accent); }
.table .empty { padding: 32px 16px; text-align: center; color: var(--muted); }
.table .error { padding: 32px 16px; text-align: center; color: var(--danger); }
.table th.check, .table td.check { width: 36px; padding-right: 12px; }
.cell-person { display: flex; align-items: center; gap: 10px; }
.cell-person .name { font-weight: 600; }
.cell-person .email { font-size: 12px; color: var(--muted-2); }

/* Selection bar above table */
.select-bar { padding: 10px 16px; background: var(--accent-softer); border-bottom: 1px solid oklch(0.9 0.03 280); display: flex; align-items: center; gap: 12px; font-size: 13px; flex-wrap: wrap; }
.select-bar .n { font-weight: 600; color: var(--accent-text); }
.select-bar .clear { margin-left: auto; border: none; background: none; font-size: 12.5px; color: var(--muted); cursor: pointer; }

/* ---------- Avatars & pills ---------- */
.avatar {
  --hue: 280;
  width: 32px; height: 32px; border-radius: 999px; flex-shrink: 0;
  background: oklch(0.93 0.03 var(--hue)); color: oklch(0.42 0.14 var(--hue));
  display: grid; place-items: center; font-weight: 700; font-size: 12px;
  overflow: hidden; position: relative;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.avatar.lg { width: 56px; height: 56px; border-radius: 14px; font-size: 18px; }
.avatar.md { width: 44px; height: 44px; border-radius: 12px; font-size: 16px; }
.avatar.square { border-radius: 8px; }
.avatar.gradient { background: var(--ink); color: #fff; }

.pill {
  --hue: 270;
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: oklch(0.95 0.05 var(--hue)); color: oklch(0.38 0.12 var(--hue));
  white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.pill--neutral, .pill[data-hue="270"] { background: oklch(0.95 0.01 270); color: oklch(0.45 0.02 270); }
.pill--green { --hue: 150; }
.pill--accent { --hue: 280; }
.pill--amber { --hue: 60; }
.pill--red { --hue: 25; }
.pill--blue { --hue: 230; }
.tag { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: oklch(0.96 0.04 80); color: oklch(0.42 0.1 70); font-weight: 500; }
.tag--neutral { background: oklch(0.95 0.01 270); color: var(--text-4); }
.tag--accent { background: var(--accent-softer); color: var(--accent-text-2); }
.role-pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: oklch(0.95 0.01 270); color: var(--text-4); white-space: nowrap; }

/* Difficulty dots */
.diff-dots { display: inline-flex; gap: 2px; }
.diff-dots span { width: 10px; height: 10px; border-radius: 3px; background: oklch(0.92 0.008 270); }
.diff-dots span.on { background: var(--accent); }

/* Progress bar */
.bar { height: 4px; border-radius: 99px; background: var(--border-soft); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.bar > span.good { background: var(--success); }
.bar > span.ok { background: oklch(0.7 0.15 70); }
.bar > span.poor { background: var(--danger); }

/* Key/value list */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

/* Tabs */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: none;
  border-bottom: 2px solid transparent; background: none; cursor: pointer; font-size: 13.5px; font-weight: 600;
  white-space: nowrap; color: var(--muted); margin-bottom: -1px;
}
.tab:hover { color: var(--text-3); }
.tab.active { border-bottom-color: var(--accent); color: var(--text); }
.tab-badge { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: oklch(0.95 0.01 270); color: oklch(0.45 0.02 270); }
.tab-badge.flag { background: oklch(0.95 0.05 25); color: oklch(0.45 0.18 25); }

/* Split list/detail layout */
.split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.list-item { padding: 14px 16px; cursor: pointer; border-left: 3px solid transparent; border-bottom: 1px solid var(--border-row); }
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--surface-2); }
.list-item.active { background: var(--accent-softer); border-left-color: var(--accent); }
.list-item .t { font-weight: 600; }
.list-item .d { font-size: 12.5px; color: var(--muted); }
.row-item { padding: 12px 20px; border-bottom: 1px solid var(--border-row); display: flex; align-items: center; gap: 12px; }
.row-item:last-child { border-bottom: none; }
.row-item .grow { flex: 1; min-width: 0; }
.row-item .t { font-weight: 600; font-size: 13.5px; }
.row-item .d { font-size: 12.5px; color: var(--muted-2); }

/* Two-column grid (review) */
.cols-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; align-items: start; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

/* Pick list (selectable rows in modals) */
.pick {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border-input); background: var(--surface); cursor: pointer; width: 100%; text-align: left;
}
.pick:hover { border-color: oklch(0.7 0.1 280); }
.pick.active { border-color: var(--accent); background: var(--accent-softer); }
.pick.top { align-items: flex-start; }
.pick .grow { flex: 1; min-width: 0; }
.pick .t { display: block; font-weight: 600; }
.pick .d { display: block; font-size: 12.5px; color: var(--muted-2); }
.pick .q { display: block; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.pick .meta { display: flex; gap: 10px; margin-top: 6px; font-size: 12px; color: var(--muted-2); flex-wrap: wrap; }
.radio { width: 18px; height: 18px; border-radius: 999px; border: 2px solid oklch(0.8 0.01 270); flex-shrink: 0; }
.pick.active .radio { border: 6px solid var(--accent); }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: grid; place-items: center; padding: 24px; z-index: 100; }
.modal { background: var(--surface); border-radius: 16px; width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-modal); overflow: hidden; }
.modal.sm { max-width: 440px; }
.modal.lg { max-width: 880px; }
.modal.xl { max-width: 1100px; }
.modal-head { padding: 20px 24px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.modal-head.borderless { border-bottom: none; padding-bottom: 0; }
.modal-title { font-family: var(--font-display); font-size: 26px; font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; }
.modal-close { border: none; background: none; padding: 6px; cursor: pointer; color: var(--muted-2); border-radius: 8px; }
.modal-close:hover { background: var(--surface-hover); }
.modal-body { padding: 20px 24px; overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.modal-body.tight { gap: 8px; }
.modal-foot { padding: 14px 24px; border-top: 1px solid var(--border-soft); display: flex; align-items: center; gap: 16px; background: var(--surface-2); }
.modal-foot .spacer { flex: 1; }
.modal-foot .actions { margin-left: auto; display: flex; gap: 8px; }
.modal-foot .summary { font-size: 13px; color: oklch(0.45 0.02 270); }
.modal-foot .summary strong { color: var(--text-2); }
.modal-filters { padding: 16px 24px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.steps { display: flex; gap: 16px; margin-top: 8px; font-size: 12.5px; }
.step { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--muted-3); }
.step.active { color: var(--accent-text); }
.step.done { color: oklch(0.45 0.02 270); }
.step-num { width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: oklch(0.92 0.008 270); color: var(--muted); }
.step.active .step-num, .step.done .step-num { background: var(--accent); color: #fff; }

/* ---------- AI detection box ---------- */
.ai-box { --hue: 150; display: flex; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--border-soft); background: oklch(0.97 0.03 var(--hue)); color: oklch(0.38 0.12 var(--hue)); }
.ai-box.high { --hue: 25; }
.ai-box.medium { --hue: 70; }
.ai-box.low { --hue: 150; }
.ai-box .t { font-weight: 600; font-size: 13px; }
.ai-box p { margin: 2px 0 0; font-size: 13px; line-height: 1.5; opacity: .9; }

/* Audio player row */
.audio-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid oklch(0.92 0.008 270); background: var(--surface); margin-bottom: 12px; }
.audio-row .play { width: 34px; height: 34px; border-radius: 999px; border: none; background: var(--ink); color: #fff; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.audio-row .time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.audio-row .bar { flex: 1; }

/* Getting started steps */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0; }
.steps-grid a { display: block; height: 100%; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); padding: 14px 16px; color: var(--text); }
.steps-grid a:hover { border-color: var(--accent-border); background: var(--accent-softer); color: var(--text); }
.steps-grid .n { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text-2); }
.steps-grid .t { font-size: 13.5px; font-weight: 600; margin-top: 2px; }
.steps-grid li.done .n { color: var(--success); }
.steps-grid li.done .n::after { content: " ✓"; }
.steps-grid li.done .t { color: var(--muted); }

/* Empty state */
.empty-state { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty-state .t { font-weight: 600; color: var(--text-3); margin-bottom: 4px; }

/* Toast */
.toast { position: fixed; bottom: 20px; right: 20px; z-index: 200; padding: 12px 16px; border-radius: 10px; background: var(--text); color: #fff; font-size: 13px; box-shadow: var(--shadow-menu); }
.toast.error { background: var(--danger); }
.toast.success { background: oklch(0.45 0.14 150); }

/* Dropdown menu (page-level) */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: var(--surface); border: 1px solid oklch(0.9 0.008 270); border-radius: 12px; box-shadow: var(--shadow-menu); padding: 6px; z-index: 50; }
.dropdown-menu.left { right: auto; left: 0; }
