@font-face {
  font-family: 'Geist';
  src: url('/assets/fonts/geist-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/*
  Paper, ink and one blue.
  Blue marks where you are and what to do next; green marks finished work;
  yellow is reserved for the trainee's own notes (the jot-down reminder, the avatar).
*/
:root {
  --paper: #f6f5f1;
  --paper-deep: #eeece6;
  --paper-soft: #fbfaf7;
  --surface: #ffffff;
  --line: #e7e4dc;
  --line-strong: #d6d2c8;

  --ink: #1f1e1b;
  --ink-2: #57544d;
  --ink-3: #85817a;
  --ink-4: #b3afa6;

  --brand: #2456e8;
  --brand-hover: #1b45c4;
  --brand-ink: #1a3fae;
  --brand-soft: #edf1fd;
  --brand-border: #cbd7fa;

  --note: #ffe27a;
  --note-soft: #fff4c2;
  --note-ink: #4a3b00;

  --ok: #2c8a57;
  --ok-soft: #e8f4ec;
  --ok-border: #c3e1cd;
  --warn: #8a6100;
  --warn-soft: #fff4c2;
  --warn-border: #f1dc8a;
  --danger: #cf3f2a;
  --danger-soft: #fcefec;

  /* aliases kept for older selectors */
  --bg: var(--paper);
  --surface-soft: var(--paper-soft);
  --surface-tint: var(--paper);
  --border: var(--line);
  --border-strong: var(--line-strong);
  --s2: var(--brand); --s2-soft: var(--brand-soft); --s2-border: var(--brand-border);
  --s3: var(--ink); --s3-soft: var(--paper-deep); --s3-border: var(--line-strong);
  --exam: var(--ink); --exam-soft: var(--paper-deep); --exam-border: var(--line-strong);

  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Songti SC', 'STSong', serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --shadow-xs: 0 1px 2px rgba(31, 30, 27, 0.04);
  --shadow-sm: 0 1px 2px rgba(31, 30, 27, 0.04), 0 4px 14px -6px rgba(31, 30, 27, 0.08);
  --shadow-md: 0 2px 4px rgba(31, 30, 27, 0.04), 0 16px 32px -14px rgba(31, 30, 27, 0.20);
  --shadow-lg: 0 30px 60px -24px rgba(31, 30, 27, 0.28);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --rail-w: 240px;
  --syllabus-w: 300px;
  --ref-w: 368px;
  --topbar-h: 58px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  min-height: 100vh;
}
::selection { background: var(--note); color: var(--ink); }
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { position: fixed; left: 16px; top: 16px; z-index: 200; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 999px; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.icon { flex: none; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 17px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  transition: transform 0.18s var(--ease), box-shadow 0.2s var(--ease), background 0.16s, border-color 0.16s, color 0.16s;
}
.btn .icon:last-child:not(:first-child) { transition: transform 0.22s var(--ease); }
.btn:hover:not(:disabled) .icon:last-child:not(:first-child) { transform: translateX(2px); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.is-loading { opacity: 0.88; cursor: wait; }
.btn.is-loading .icon { display: none; }
.btn.is-loading::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  45% { transform: translateX(5px); }
  70% { transform: translateX(-3px); }
  90% { transform: translateX(2px); }
}
.is-shake { animation: shake 0.36s var(--ease); border-color: var(--danger) !important; }
.btn--sm { height: 32px; padding: 0 13px; font-size: 12.5px; }
.btn--lg { height: 46px; padding: 0 22px; font-size: 14.5px; }
.btn--xs { height: 28px; padding: 0 10px; font-size: 12px; }

.btn--brand, .btn--obsidian, .btn--emerald, .btn--amber, .btn--violet {
  background: var(--ink);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 2px rgba(31, 30, 27, 0.2);
}
.btn--brand:hover:not(:disabled), .btn--obsidian:hover:not(:disabled), .btn--emerald:hover:not(:disabled),
.btn--amber:hover:not(:disabled), .btn--violet:hover:not(:disabled) {
  background: #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 18px -8px rgba(31, 30, 27, 0.5);
}

.btn--outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--outline:hover:not(:disabled) { border-color: var(--ink); }

.btn--ghost { color: var(--ink-2); background: transparent; }
.btn--ghost:hover:not(:disabled) { background: var(--paper-deep); color: var(--ink); }

.btn--soft-brand { background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand-border); }
.btn--soft-brand:hover:not(:disabled) { background: #e2e9fc; }

.btn--hero-white { background: #fff; color: var(--ink); }
.btn--hero-white:hover:not(:disabled) { background: var(--note); }
.btn--hero-glass { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.24); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.text-link:hover { color: var(--ink); border-bottom-color: var(--ink); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--paper-deep); color: var(--ink); }

/* ==================== FORMS ==================== */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field input:not([type=file]), .field textarea, .field select,
.search-wrap input:not([type=file]) {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 14px;
  font-size: 14px;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
.field input:not([type=file]) { height: 44px; }
.field select { height: 44px; }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.75; background: var(--paper-soft); }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--ink-4); }
.field input:focus, .field textarea:focus, .field select:focus,
.search-wrap input:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(36, 86, 232, 0.12);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field-meta { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.password-field { position: relative; display: flex; align-items: center; }
.password-field input { padding-right: 44px; }
.password-toggle { position: absolute; right: 5px; }
.field-error { margin: 2px 0 0; color: var(--danger); font-size: 13px; font-weight: 500; }

/* ==================== LOGIN ==================== */
.login-topbar {
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 245, 241, 0.86);
  backdrop-filter: blur(12px);
}
.login-topbar-inner {
  max-width: 1080px;
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.login-logo { height: 26px; width: auto; }
.login-cohort { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }

.login-stage { max-width: 1080px; margin: 0 auto; padding: 24px 28px 64px; }
.login-frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  min-height: 560px;
}
.login-pane-form { padding: 56px 52px; display: flex; flex-direction: column; justify-content: center; }
.login-badge { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 14px; }
.login-head h1 { margin: 0 0 10px; font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }
.login-head h1 em { font-style: normal; background: linear-gradient(transparent 60%, var(--note) 60%, var(--note) 90%, transparent 90%); }
.login-head p { margin: 0 0 30px; font-size: 14px; color: var(--ink-2); }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-submit { width: 100%; margin-top: 8px; }
.login-help { margin: 22px 0 0; font-size: 12.5px; color: var(--ink-3); }

.login-pane-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 44px 44px 40px;
  background: var(--paper);
  border-left: 1px solid var(--line);
  overflow: hidden;
}
.login-year {
  position: absolute;
  right: -14px;
  bottom: -46px;
  font-family: var(--serif);
  font-size: 150px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.04em;
  color: var(--paper-deep);
  pointer-events: none;
  user-select: none;
}
.login-visual-content { position: relative; z-index: 1; }
.visual-kicker { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 10px; }
.login-visual-content h2 { margin: 0 0 30px; font-size: 24px; font-weight: 700; line-height: 1.35; letter-spacing: -0.02em; }
.login-roadmap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.login-roadmap li {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 22px;
}
.login-roadmap li:last-child { padding-bottom: 0; }
.login-roadmap li:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 40px;
  bottom: 4px;
  border-left: 1.5px dashed var(--line-strong);
}
.rm-step {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
}
.rm-step.is-s1 { background: var(--ink); color: #fff; border-color: var(--ink); }
.login-roadmap strong { display: block; font-size: 14.5px; font-weight: 650; margin: 3px 0 3px; }
.login-roadmap p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.login-visual-foot { position: relative; z-index: 1; font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.login-visual-foot::before { content: ''; width: 18px; border-top: 1px solid var(--ink-4); }

/* ==================== APP SHELL ==================== */
.app-shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }
.app-shell > main { min-width: 0; max-width: 100%; }
.app-shell--player { grid-template-columns: minmax(0, 1fr); }

.nav-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--paper-soft);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  z-index: 30;
}
.rail-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 8px 18px; }
.rail-brand img { height: 24px; width: auto; }
.rail-tag { font-size: 11px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.rail-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.rail-section { font-size: 11.5px; font-weight: 600; color: var(--ink-4); letter-spacing: 0.04em; padding: 18px 10px 6px; }
.rail-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.rail-link .icon { color: var(--ink-3); transition: color 0.16s; }
.rail-link:hover { background: var(--paper-deep); color: var(--ink); }
.rail-link:hover .icon { color: var(--ink); }
.rail-link.is-active { background: var(--surface); border-color: var(--line); color: var(--ink); font-weight: 650; box-shadow: var(--shadow-xs); }
.rail-link.is-active .icon { color: var(--brand); }
.rail-link.is-locked, .rail-link.is-locked .icon { color: var(--ink-4); }
.rail-link-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-meta { font-size: 11.5px; font-weight: 600; color: var(--ink-4); font-variant-numeric: tabular-nums; }

.rail-cmdk {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-3);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.rail-cmdk:hover { border-color: var(--line-strong); color: var(--ink); }
.rail-cmdk span { display: inline-flex; align-items: center; gap: 7px; }
kbd {
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-3);
}

.rail-footer { border-top: 1px solid var(--line); padding-top: 12px; display: flex; align-items: center; gap: 10px; }
.rail-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--note);
  color: var(--note-ink);
  font-size: 13.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
}
.rail-user { flex: 1; min-width: 0; }
.rail-user strong { display: block; font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-user span { display: block; font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 40;
  height: 54px;
  padding: 0 12px;
  background: rgba(246, 245, 241, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
}
.mobile-bar img { height: 21px; width: auto; }
.rail-backdrop { display: none; position: fixed; inset: 0; background: rgba(31, 30, 27, 0.32); backdrop-filter: blur(2px); z-index: 45; }

/* ==================== HOME ==================== */
.main-canvas { min-width: 0; padding: 44px 44px 80px; }
.container-md { max-width: 1040px; margin: 0 auto; }
.container-lg { max-width: 1240px; margin: 0 auto; }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.home > *, .stage-inner > * { animation: rise 0.42s var(--ease) both; }
.home > :nth-child(2), .stage-inner > :nth-child(2) { animation-delay: 0.04s; }
.home > :nth-child(3), .stage-inner > :nth-child(3) { animation-delay: 0.08s; }
.home > :nth-child(4), .stage-inner > :nth-child(4) { animation-delay: 0.12s; }
.home > :nth-child(n+5), .stage-inner > :nth-child(n+5) { animation-delay: 0.16s; }

.home-greet { margin-bottom: 26px; }
.home-date { margin: 0 0 8px; font-size: 13px; font-weight: 550; color: var(--ink-3); }
.home-greet h1 { margin: 0 0 10px; font-size: 34px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.2; }
.name-mark { background: linear-gradient(transparent 62%, var(--note) 62%, var(--note) 92%, transparent 92%); padding: 0 2px; }
.home-intro { margin: 0; max-width: 640px; font-size: 14px; color: var(--ink-2); }

.home-top { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; }
.next-card, .stamp-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.next-card { padding: 26px 28px 24px; display: flex; flex-direction: column; }
.next-label {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--brand-ink);
  margin-bottom: 12px;
}
.next-label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 0 rgba(36, 86, 232, 0.45);
  animation: pulse 2.2s var(--ease) infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(36, 86, 232, 0.4); } 70%, 100% { box-shadow: 0 0 0 8px rgba(36, 86, 232, 0); } }
.next-title { margin: 0 0 8px; font-size: 23px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.3; }
.next-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; }
.next-hint { margin: 0 0 14px; font-size: 14px; color: var(--ink-2); max-width: 520px; }
.next-actions { margin-top: auto; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.stamp-card { padding: 22px 22px 18px; display: flex; flex-direction: column; }
.stamp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.stamp-head strong { font-size: 15px; font-weight: 700; }
.stamp-head strong .num:first-child { font-family: var(--serif); font-size: 26px; font-weight: 400; margin-left: 4px; }
.stamp-total { color: var(--ink-4); font-weight: 500; }
.stamp-head > span { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.stamps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 6px; }
.stamp { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.stamp-face {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1.5px dashed var(--line-strong);
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink-4);
  transition: transform 0.3s var(--spring);
}
.stamp.is-done .stamp-face {
  border: 2px solid var(--ok);
  background: var(--ok-soft);
  color: var(--ok);
  transform: rotate(var(--tilt, -6deg));
  box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4px rgba(44, 138, 87, 0.35);
}
.stamp.is-done:hover .stamp-face { transform: rotate(0deg) scale(1.06); }
.stamp small { font-size: 11px; font-weight: 550; color: var(--ink-3); white-space: nowrap; }
.stamp.is-done small { color: var(--ink); }
.stamp-foot { margin: 16px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--ink-3); }

.sec-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 44px 0 14px; }
.sec-head h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.sec-head p { margin: 0; font-size: 13px; color: var(--ink-3); }
.sec-pill { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--paper-deep); color: var(--ink-2); }

.roadmap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.stage-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.stage-card:not(.is-locked):hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stage-card.is-locked { background: transparent; border: 1.5px dashed var(--line-strong); box-shadow: none; }
.stage-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.stage-num { font-family: var(--serif); font-size: 34px; line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.stage-card.is-locked .stage-num { color: var(--ink-4); }
.stage-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.stage-state::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.stage-state--now { color: var(--brand-ink); }
.stage-state--ok { color: var(--ok); }
.stage-state--wait { color: var(--ink-3); }
.stage-card h3 { margin: 0 0 4px; font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
.stage-card-desc { margin: 0 0 16px; font-size: 13px; color: var(--ink-2); }
.stage-card.is-locked h3 { color: var(--ink-2); }

.route { display: flex; flex-direction: column; flex: 1; margin-bottom: 14px; }
.route-step {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 7px 8px 7px 6px;
  margin: 0 -6px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13.3px;
  font-weight: 550;
  color: var(--ink);
  transition: background 0.15s;
}
.route-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 14.25px;
  top: 25px;
  height: calc(100% - 18px);
  border-left: 1.5px solid var(--line);
}
.route-step.is-done:not(:last-child)::after { border-left-color: var(--ok-border); }
.route-step:hover:not(.is-locked) { background: var(--paper); }
.route-dot {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  color: #fff;
}
.route-dot .icon { width: 11px; height: 11px; stroke-width: 2.6; }
.route-step.is-done .route-dot { background: var(--ok); border-color: var(--ok); }
.route-step.is-done .route-label { color: var(--ink-2); }
.route-step.is-locked { color: var(--ink-4); cursor: default; }
.route-step.is-locked .route-dot { border-style: dashed; color: var(--ink-4); background: transparent; }
.route-step.is-locked .route-dot .icon { width: 9px; height: 9px; stroke-width: 2.2; }
.route-step.is-current .route-dot { border: 2px solid var(--brand); }
.route-step.is-current .route-dot::after { content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--brand); }
.route-step.is-current .route-label { font-weight: 650; }
.route-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-here {
  position: relative;
  font-size: 11px;
  font-weight: 650;
  color: #fff;
  background: var(--brand);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.3s var(--spring);
}
.route-step:hover .route-here { transform: translateX(-2px) rotate(-3deg); }

.stage-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.stage-count { font-size: 12.5px; color: var(--ink-3); }
.stage-count b { font-size: 14px; font-weight: 700; color: var(--ink); }
.foot-lock { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-4); }
.foot-lock .icon { width: 13px; height: 13px; }

.s3-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.s3-showcase-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.s3-showcase-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.s3-thumb-strip {
  height: 136px;
  margin: 8px 8px 0;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  background: var(--paper);
}
.s3-thumb-strip svg { max-height: 108px; }
.s3-mini-cover {
  width: 66px;
  height: 94px;
  border-radius: 4px 7px 7px 4px;
  object-fit: cover;
  box-shadow: 0 10px 18px -8px rgba(31, 30, 27, 0.45);
  transition: transform 0.35s var(--spring);
}
.s3-mini-cover:nth-child(1) { transform: rotate(-5deg) translateY(4px); }
.s3-mini-cover:nth-child(3) { transform: rotate(5deg) translateY(4px); }
.s3-showcase-card:hover .s3-mini-cover:nth-child(1) { transform: rotate(-9deg) translate(-6px, 2px); }
.s3-showcase-card:hover .s3-mini-cover:nth-child(2) { transform: translateY(-6px); }
.s3-showcase-card:hover .s3-mini-cover:nth-child(3) { transform: rotate(9deg) translate(6px, 2px); }
.s3-showcase-body { padding: 16px 18px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.s3-showcase-body strong { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.s3-showcase-body p { margin: 0; font-size: 13px; color: var(--ink-2); }
.s3-showcase-foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
}
.s3-showcase-foot span { display: inline-flex; align-items: center; gap: 5px; }
.s3-showcase-foot > .icon { transition: transform 0.22s var(--ease), color 0.15s; }
.s3-showcase-card:hover .s3-showcase-foot > .icon { transform: translateX(3px); color: var(--ink); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.8px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--paper-deep);
  color: var(--ink-2);
}
.chip .icon { width: 12px; height: 12px; }
.chip--ok { background: var(--ok-soft); color: var(--ok); }
.chip--brand { background: var(--brand-soft); color: var(--brand-ink); }
.chip--warn { background: var(--note-soft); color: var(--note-ink); }
.chip--s3, .chip--muted { background: var(--paper-deep); color: var(--ink-2); }

.ai-note-bar {
  margin: 40px 0 0;
  padding-top: 18px;
  border-top: 1px dashed var(--line-strong);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-3);
}
.ai-note-bar .icon { color: var(--ink-4); }

/* ==================== LEARNING PLAYER ==================== */
.player-shell { display: flex; flex-direction: column; height: 100vh; overflow: hidden; background: var(--paper); }
.player-topbar {
  height: var(--topbar-h);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  background: var(--paper-soft);
  border-bottom: 1px solid var(--line);
  z-index: 30;
}
.player-top-left, .player-top-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.player-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: var(--surface);
  white-space: nowrap;
  flex: none;
  transition: border-color 0.15s, color 0.15s;
}
.player-back:hover { border-color: var(--ink); color: var(--ink); }
.player-crumb { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-progress-pill { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.player-progress-bar { width: 88px; height: 6px; border-radius: 999px; background: var(--paper-deep); overflow: hidden; }
.player-progress-bar i { display: block; height: 100%; border-radius: 999px; background: var(--ok); transition: width 0.5s var(--ease); }

.player-body { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--syllabus-w) minmax(0, 1fr); position: relative; }
.player-body.is-syllabus-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.player-body.is-ref-open { grid-template-columns: var(--syllabus-w) minmax(0, 1fr) var(--ref-w); }
.player-body.is-syllabus-collapsed.is-ref-open { grid-template-columns: 0 minmax(0, 1fr) var(--ref-w); }

.syllabus { border-right: 1px solid var(--line); background: var(--paper-soft); overflow-y: auto; padding: 14px 12px 28px; transition: opacity 0.2s; }
.player-body.is-syllabus-collapsed .syllabus { overflow: hidden; padding: 0; border-right: 0; opacity: 0; pointer-events: none; }
.syl-group { margin-bottom: 10px; }
.syl-group-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}
.syl-group-head:hover { background: var(--paper-deep); }
.syl-group.has-active:not(.is-open) .syl-group-head { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-xs); }
.syl-group-title { font-size: 13px; font-weight: 650; color: var(--ink); letter-spacing: 0.01em; display: inline-flex; align-items: center; gap: 7px; }
.syl-group.has-active:not(.is-open) .syl-group-title::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--brand); flex: none; }
.syl-group-right { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.syl-group-badge { font-size: 11px; font-weight: 600; color: var(--ink-4); }
.syl-chevron { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; color: var(--ink-3); transition: transform 0.22s var(--ease); }
.syl-chevron .icon { width: 14px; height: 14px; }
.syl-group.is-open .syl-chevron { transform: rotate(180deg); color: var(--ink); }
.syl-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.syl-branch-row { display: flex; align-items: center; gap: 4px; border-radius: 11px; }
.syl-branch-row .syl-item { flex: 1; min-width: 0; }
.syl-branch-row.has-active { background: var(--surface); border: 1px solid var(--line); }
.syl-sub-toggle {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.22s var(--ease);
}
.syl-sub-toggle:hover { background: var(--paper-deep); color: var(--ink); }
.syl-sub-toggle .icon { width: 14px; height: 14px; transition: transform 0.22s var(--ease); }
.syl-branch.is-open .syl-sub-toggle .icon { transform: rotate(180deg); }
.syl-sublist { list-style: none; margin: 2px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.syl-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 11px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.syl-item:hover { background: var(--paper-deep); color: var(--ink); }
.syl-item.is-active { background: var(--surface); border-color: var(--line); color: var(--ink); font-weight: 650; box-shadow: var(--shadow-xs); }
.syl-item.is-done { color: var(--ink); }
.syl-item.is-locked { color: var(--ink-4); }
.syl-item.is-child { padding-left: 26px; font-size: 12.4px; }
.syl-icon { width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; color: var(--ink-3); }
.syl-icon .icon { width: 14px; height: 14px; }
.syl-item.is-active .syl-icon { background: var(--brand); color: #fff; }
.syl-item.is-done .syl-icon { background: var(--ok-soft); color: var(--ok); }
.syl-item.is-locked .syl-icon { color: var(--ink-4); }
.syl-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stage-pane { min-width: 0; display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.stage-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 36px 40px 56px; }
.stage-scroll--reader { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.stage-inner { max-width: 860px; margin: 0 auto; }
.stage-inner--wide { max-width: 1000px; }

.stage-header { margin-bottom: 26px; }
.stage-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 10px; }
.stage-eyebrow::before { content: ''; width: 16px; border-top: 1.5px solid var(--ink-4); }
.stage-header h1 { margin: 0 0 8px; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.28; }
.stage-header p { margin: 0; font-size: 14px; color: var(--ink-2); max-width: 680px; }

.stage-footer {
  flex: none;
  height: 60px;
  padding: 0 20px;
  background: var(--paper-soft);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.stage-footer-meta { font-size: 12px; font-weight: 600; color: var(--ink-4); }

.ref-drawer { border-left: 1px solid var(--line); background: var(--paper-soft); display: flex; flex-direction: column; min-height: 0; }
.ref-head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ref-tabs { display: flex; gap: 2px; background: var(--paper-deep); padding: 3px; border-radius: 999px; }
.ref-tab { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.ref-tab.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }
.ref-body { flex: 1; overflow-y: auto; padding: 14px; }

/* shared list rows (reference drawer file list) */
.mini-step {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12.8px;
  font-weight: 550;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s;
}
.mini-step:hover { border-color: var(--ink-4); }
.mini-step-num { width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; flex: none; background: var(--paper-deep); color: var(--ink-2); }
.mini-step-num .icon { width: 13px; height: 13px; }
.mini-step-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==================== VIDEO + JOT-DOWN NOTE ==================== */
.video-split-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 12px 12px 12px 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
}
.video-thumb-link { position: relative; display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--ink); }
.video-thumb-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.video-thumb-link:hover .video-thumb-img { transform: scale(1.03); }
.video-thumb-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s var(--spring);
}
.video-thumb-play .icon, .film-play-fab .icon { width: 30px; height: 30px; margin-left: 3px; }
.video-thumb-play .icon circle, .film-play-fab .icon circle { display: none; }
.video-thumb-play .icon path, .film-play-fab .icon path { fill: currentColor; stroke-linejoin: round; }
.video-thumb-link:hover .video-thumb-play { transform: translate(-50%, -50%) scale(1.1); }
.video-thumb-dur { position: absolute; right: 10px; bottom: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(31, 30, 27, 0.78); color: #fff; font-size: 11.5px; font-weight: 600; }
.video-split-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 10px 0; }
.video-split-body .sec-pill { align-self: flex-start; }
.video-split-body h2 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.4; letter-spacing: -0.02em; }
.video-split-body p { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }

/* The verbatim "jot it down" reminder: a taped sticky note, the one loud thing on the page. */
.video-verbatim-alert {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  align-items: flex-start;
  padding: 26px 26px 22px;
  margin: 0 6px 30px;
  border-radius: 4px 4px 22px 4px;
  background: var(--note-soft);
  box-shadow: 0 1px 0 rgba(74, 59, 0, 0.06), 0 18px 30px -20px rgba(74, 59, 0, 0.55);
  transform: rotate(-0.5deg);
  transition: transform 0.35s var(--spring);
}
.video-verbatim-alert:hover { transform: rotate(0deg); }
.video-verbatim-alert::before {
  content: '';
  position: absolute;
  top: -11px;
  left: 50%;
  width: 96px;
  height: 22px;
  transform: translateX(-50%) rotate(2deg);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(74, 59, 0, 0.06);
  box-shadow: 0 1px 2px rgba(74, 59, 0, 0.08);
}
.video-alert-icon { width: 40px; height: 40px; border-radius: 999px; background: var(--ink); color: var(--note); display: grid; place-items: center; }
.video-alert-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--note);
  font-size: 11.5px;
  font-weight: 650;
  margin-bottom: 10px;
}
.video-alert-quote { margin: 0 0 8px; font-size: 18px; font-weight: 700; line-height: 1.6; color: #2b2508; letter-spacing: -0.01em; }
.video-alert-sub { margin: 0; font-size: 13.3px; font-weight: 500; color: #5e5020; line-height: 1.7; }

.inline-task-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 24px 26px; box-shadow: var(--shadow-sm); }
.inline-task-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.inline-task-head h3 { margin: 0; font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-task-head p { margin: 4px 0 0; font-size: 13px; color: var(--ink-3); }
.inline-task-card .submit-card { border: 0; padding: 0; box-shadow: none; background: transparent; }

/* ==================== COMPANY ==================== */
.company-channels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.channel-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.channel-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.channel-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}
.channel-num {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.channel-qr-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  flex: 1;
  margin-bottom: 18px;
}
.channel-qr-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 10px 10px 9px;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.channel-qr-frame img {
  width: 110px;
  height: 110px;
  border-radius: 10px;
  background: #fff;
  padding: 5px;
  border: 1px solid var(--line);
}
.channel-qr-frame span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
}
.channel-qr-copy h2 {
  margin: 2px 0 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.channel-qr-copy p {
  margin: 0;
  font-size: 13.3px;
  color: var(--ink-2);
  line-height: 1.72;
}
.channel-qr-copy strong { color: var(--ink); font-weight: 650; }
.channel-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  min-height: 47px;
}
.channel-foot-hint { font-size: 12.5px; color: var(--ink-3); }

.company-section {
  margin-top: 28px;
}
.company-sec-head {
  margin-bottom: 14px;
}
.company-sec-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brand);
  margin-bottom: 4px;
}
.company-sec-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.company-overview-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px 26px;
  box-shadow: var(--shadow-xs);
}
.company-brand-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}
.company-brand-head img { height: 24px; width: auto; }
.company-fact-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.company-brand-tag {
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-2);
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.company-slogan {
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.5;
}
.company-pillars {
  display: grid;
  grid-template-columns: 1.28fr 1fr;
  gap: 14px;
  margin-bottom: 26px;
}
.company-pillar {
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.company-pillar--dark {
  background: var(--ink);
  color: #f6f5f1;
  box-shadow: 0 14px 30px -22px rgba(24, 23, 20, 0.72);
}
.company-pillar--accent {
  background: linear-gradient(135deg, #edf2ff 0%, #f5f7fc 100%);
  border: 1px solid rgba(36, 86, 232, 0.16);
  color: var(--ink);
}
.company-pillar-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.company-pillar--dark .company-pillar-eyebrow { color: rgba(246, 245, 241, 0.68); }
.company-pillar--accent .company-pillar-eyebrow { color: var(--brand); }
.company-pillar--accent .company-pillar-eyebrow svg { width: 14px; height: 14px; }
.company-pillar-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #5b8cff;
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.24);
}
.company-pillar--dark h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 740;
  letter-spacing: -0.02em;
  color: #ffffff;
}
.company-loop-track {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.company-loop-node {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12.5px;
  font-weight: 650;
  color: #ffffff;
}
.company-loop-node em {
  font-style: normal;
  font-family: var(--serif);
  font-size: 11px;
  color: #8eb0ff;
}
.company-loop-arrow {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
  font-weight: 600;
}
.company-launch-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.company-launch-stat {
  display: flex;
  align-items: baseline;
  gap: 3px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(36, 86, 232, 0.14);
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}
.company-launch-stat strong {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  color: var(--brand);
}
.company-launch-stat span {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
}
.company-launch-copy strong {
  display: block;
  font-size: 15.5px;
  font-weight: 750;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.company-launch-copy p {
  margin: 0;
  font-size: 12.6px;
  color: var(--ink-2);
  line-height: 1.6;
}

.company-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.company-subhead-left {
  display: flex;
  align-items: center;
  gap: 9px;
}
.company-subhead-bar {
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: var(--brand);
}
.company-subhead h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 740;
  color: var(--ink);
}
.company-subhead span {
  font-size: 12px;
  color: var(--ink-3);
}
.company-kw-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.company-kw-card {
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease), background 0.22s var(--ease);
}
.company-kw-card:hover {
  transform: translateY(-2px);
  background: #ffffff;
  border-color: var(--line-strong);
  box-shadow: 0 12px 24px -20px rgba(31, 30, 27, 0.35);
}
.company-kw-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}
.company-kw-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.company-kw-icon svg { width: 17px; height: 17px; }
.company-kw-icon--brand { background: var(--brand-soft); color: var(--brand); }
.company-kw-icon--ink { background: #eceae3; color: var(--ink); }
.company-kw-icon--ok { background: var(--ok-soft); color: var(--ok); }
.company-kw-icon--amber { background: #fdf3d7; color: #a36a00; }
.company-kw-num {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  opacity: 0.72;
}
.company-kw-card h4 {
  margin: 0 0 6px;
  font-size: 14.8px;
  font-weight: 740;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.company-kw-lead {
  margin: 0 0 4px;
  font-size: 12.8px;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.55;
}
.company-kw-desc {
  margin: 0;
  font-size: 12.8px;
  color: var(--ink-2);
  line-height: 1.65;
}
.company-kw-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.company-kw-pills span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 8px;
}

.company-lead-note {
  background: var(--note-soft);
  border-radius: 4px 16px 16px 4px;
  border-left: 3px solid #d4a61e;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 13.5px;
  color: #3a310c;
  line-height: 1.75;
}
.company-lead-note strong { color: #1f1a06; font-weight: 700; }

.company-block {
  margin-bottom: 24px;
}
.company-block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.company-block-num {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand);
}
.company-block-title h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 720;
  color: var(--ink);
}

.company-honors-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.company-honor-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 15px 17px;
  box-shadow: var(--shadow-xs);
}
.company-honor-level {
  display: inline-block;
  font-size: 11px;
  font-weight: 650;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 7px;
}
.company-honor-item strong {
  display: block;
  font-size: 14px;
  font-weight: 720;
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 5px;
}
.company-honor-item p {
  margin: 0;
  font-size: 12.6px;
  color: var(--ink-2);
  line-height: 1.65;
}

.company-tip-line {
  margin: 10px 0 0;
  font-size: 12.6px;
  color: var(--ink-3);
  line-height: 1.65;
}

.company-clients-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 18px 20px 14px;
  box-shadow: var(--shadow-xs);
}
.company-clients-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}
.company-clients-card figcaption {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-3);
}

.company-cases-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.company-case-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.company-case-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.company-case-head h4 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 740;
  color: var(--ink);
}
.company-case-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.company-case-kpi {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 11px 13px;
}
.company-case-kpi strong {
  display: block;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.2;
  margin-bottom: 3px;
}
.company-case-kpi span {
  display: block;
  font-size: 11.8px;
  color: var(--ink-3);
}
.company-case-part {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.68;
}
.company-case-lbl {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.company-case-part p { margin: 0; }
.company-case-part ul {
  margin: 0;
  padding-left: 17px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.company-case-result {
  margin-top: auto;
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--ok-soft);
  color: #1c5a37;
  font-size: 13px;
  line-height: 1.55;
}
.company-case-result strong { color: #16492c; }

.company-events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.company-event-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 17px;
  box-shadow: var(--shadow-xs);
}
.company-event-sector {
  display: inline-block;
  font-size: 11px;
  font-weight: 650;
  color: var(--ink-2);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.company-event-card h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 720;
  color: var(--ink);
  line-height: 1.45;
}
.company-event-card p {
  margin: 0;
  font-size: 12.6px;
  color: var(--ink-2);
  line-height: 1.65;
}

.company-next-bar {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 22px;
  border-radius: var(--radius-xl);
  background: var(--paper-soft);
  border: 1px dashed var(--line-strong);
}
.company-next-bar strong { display: block; font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.company-next-bar > div > span { display: block; font-size: 13px; color: var(--ink-3); }

@media (max-width: 900px) {
  .company-pillars,
  .company-kw-grid,
  .company-honors-grid,
  .company-cases-grid,
  .company-events-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 540px) {
  .company-overview-card,
  .company-case-card { padding: 18px 16px; }
  .company-clients-card { padding: 12px; }
}

/* ==================== TASKS & SUBMISSION ==================== */
.task-prompt-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--shadow-xs); }
.task-prompt-card .prose p, .task-prompt-card p { margin: 0 0 10px; font-size: 14.5px; color: var(--ink); line-height: 1.8; }
.task-prompt-card .prose p:last-child, .task-prompt-card p:last-child { margin-bottom: 0; }
.prompt-flow { display: flex; flex-direction: column; gap: 12px; }
.prompt-row,
.prompt-step {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14.3px;
  color: var(--ink-2);
  line-height: 1.78;
}
.prompt-row strong,
.prompt-step strong,
.prompt-plain strong { color: var(--ink); font-weight: 700; }
.prompt-sym {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.prompt-sym svg { width: 14px; height: 14px; }
.prompt-sym--brand { background: var(--brand-soft); border-color: rgba(36, 86, 232, 0.16); color: var(--brand); }
.prompt-sym--amber { background: #fdf3d7; border-color: rgba(163, 106, 0, 0.18); color: #a36a00; }
.prompt-sym--ink { background: #eceae3; border-color: var(--line); color: var(--ink); }
.prompt-sym--ok { background: #ffffff; border-color: var(--ok-border); color: var(--ok); }
.prompt-step-badge {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.prompt-req {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 13px;
  background: var(--ok-soft);
  border: 1px solid var(--ok-border);
  font-size: 13.8px;
  color: #1c5a37;
  line-height: 1.65;
  margin-top: 2px;
}
.prompt-req .prompt-sym {
  background: #ffffff;
  border-color: var(--ok-border);
  margin-top: 0;
}
.prompt-req strong { color: #123f25; font-weight: 740; }
.prompt-plain { margin: 0; font-size: 14.3px; color: var(--ink-2); line-height: 1.78; }
.task-examples { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--paper); }
.task-examples-title { font-size: 12.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 8px; }
.task-examples ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }

.carryover-card { background: var(--note-soft); border-radius: 4px 4px 18px 4px; padding: 18px 20px; margin-bottom: 16px; box-shadow: 0 14px 26px -22px rgba(74, 59, 0, 0.6); }
.carryover-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.carryover-title { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; color: #2b2508; }
.carryover-body { background: rgba(255, 255, 255, 0.7); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; color: var(--ink); white-space: pre-wrap; max-height: 170px; overflow-y: auto; line-height: 1.7; }

.submit-receipt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 15px 18px;
  margin-bottom: 16px;
  border-radius: var(--radius-lg);
  background: var(--ok-soft);
  border: 1px solid var(--ok-border);
  color: var(--ink);
  animation: popIn 0.35s var(--spring);
}
.submit-receipt-main { display: flex; align-items: flex-start; gap: 12px; min-width: 0; flex: 1; }
.submit-receipt-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--ok);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 1px;
}
.submit-receipt-icon .icon { width: 15px; height: 15px; stroke-width: 2.4; }
.submit-receipt-icon .icon path { stroke-dasharray: 26; stroke-dashoffset: 26; animation: drawCheck 0.45s 0.12s var(--ease) forwards; }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.submit-receipt strong { display: block; font-size: 14.5px; font-weight: 700; color: var(--ok); margin-bottom: 2px; }
.submit-receipt-main > div > span { display: block; font-size: 13px; color: var(--ink-2); }

.submit-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.mode-switch-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.mode-tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--paper-deep); gap: 2px; }
.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.18s, box-shadow 0.2s;
}
.mode-tab:hover:not(.is-active) { color: var(--ink); }
.mode-tab.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(31, 30, 27, 0.08), 0 2px 8px -2px rgba(31, 30, 27, 0.12); }
.mode-hint-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ok); }
.mode-hint-badge .icon { width: 14px; height: 14px; }

.task-fields { display: flex; flex-direction: column; gap: 16px; }
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 34px 24px;
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--line-strong);
  background: var(--paper-soft);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.dropzone:hover, .dropzone.is-drag, .dropzone.drag-over { border-color: var(--ink); background: var(--paper); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone-icon { width: 46px; height: 46px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); display: grid; place-items: center; transition: transform 0.3s var(--spring); }
.dropzone:hover .dropzone-icon { transform: translateY(-3px); }
.dropzone strong { font-size: 14.5px; font-weight: 650; color: var(--ink); }
.dropzone span { font-size: 12.5px; color: var(--ink-3); }

.file-picked { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); }
.file-picked-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.file-picked-name { font-size: 13.5px; font-weight: 650; color: var(--brand-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.submit-bar { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.draft-note { font-size: 12.5px; color: var(--ink-3); }

.history-section { margin-top: 22px; }
.history-title { font-size: 13px; font-weight: 650; color: var(--ink-2); margin: 0 0 10px; }
.history-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 15px 18px; margin-bottom: 10px; }
.history-card.is-just-submitted { border-color: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); animation: popIn 0.4s var(--spring); }
.history-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.answer-label { font-size: 12px; font-weight: 650; color: var(--ink-3); margin: 10px 0 4px; }
.answer-label:first-child { margin-top: 0; }
.answer-body { font-size: 13.5px; color: var(--ink); white-space: pre-wrap; line-height: 1.7; }

.lock-gate-card { border: 1.5px dashed var(--line-strong); border-radius: var(--radius-xl); padding: 44px 32px 40px; text-align: center; max-width: 540px; margin: 32px auto; }
.lock-gate-badge { width: 56px; height: 56px; border-radius: 999px; margin: 0 auto 18px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-3); display: grid; place-items: center; }
.lock-gate-card h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.lock-gate-card p { margin: 0 auto 24px; font-size: 14px; color: var(--ink-2); max-width: 440px; }

.unlock-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px 16px 22px;
  margin-bottom: 22px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: #fff;
  animation: popIn 0.5s var(--spring);
}
@keyframes popIn { from { opacity: 0; transform: translateY(-8px) scale(0.97); } to { opacity: 1; transform: none; } }
.unlock-banner strong { display: block; font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.unlock-banner strong::before { content: '✦'; color: var(--note); margin-right: 8px; }
.unlock-banner > div > span { font-size: 13px; color: rgba(255, 255, 255, 0.72); }

/* ==================== MATERIALS & GLOSSARY ==================== */
.mat-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 30px 0 12px; }
.mat-group-head:first-of-type { margin-top: 0; }
.mat-group-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.mat-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.mat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.mat-cover {
  position: relative;
  height: 138px;
  margin: 8px 8px 0;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px;
  color: var(--ink);
  background: var(--paper);
}
.mat-cover--law { background: var(--brand-soft); color: var(--brand-ink); }
.mat-cover--whitepaper { background: var(--ink); color: #fff; }
.mat-cover--report { background: var(--paper); }
.mat-cover--map { padding: 0; background: var(--paper-deep); }
.mat-cover--map img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.mat-card:hover .mat-cover--map img { transform: scale(1.04); }
.mat-cover-pattern { position: absolute; right: -14px; bottom: -14px; width: 108px; height: 108px; opacity: 0.12; pointer-events: none; }
.mat-cover-tag { align-self: flex-start; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.7); color: var(--ink-2); font-size: 11px; font-weight: 650; }
.mat-cover--whitepaper .mat-cover-tag { background: rgba(255, 255, 255, 0.14); color: #fff; }
.mat-cover--map .mat-cover-tag { position: absolute; top: 10px; left: 10px; background: rgba(255, 255, 255, 0.9); color: var(--ink); }
.mat-cover-pages { font-family: var(--serif); font-size: 34px; font-weight: 400; letter-spacing: -0.02em; line-height: 1; }
.mat-cover-pages small { font-family: var(--font); font-size: 12px; font-weight: 600; opacity: 0.7; margin-left: 5px; }
.mat-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mat-body h3 { margin: 0; font-size: 14px; font-weight: 650; line-height: 1.5; color: var(--ink); }
.mat-meta { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.mat-open-cta { color: var(--ink-2); font-weight: 600; transition: color 0.15s; }
.mat-card:hover .mat-open-cta { color: var(--ink); }

.term-toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.search-wrap { position: relative; display: flex; align-items: center; }
.search-wrap .icon { position: absolute; left: 14px; color: var(--ink-3); pointer-events: none; }
.search-wrap input:not([type=file]) { padding-left: 40px; height: 44px; border-radius: 999px; }
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.pill-btn:hover { border-color: var(--ink-4); color: var(--ink); }
.pill-btn.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ==================== TOOLS, BOOKS, FILMS ==================== */
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tool-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tool-diagram-box { height: 156px; margin: 8px 8px 0; border-radius: 14px; padding: 14px 18px; background: var(--paper); display: flex; align-items: center; justify-content: center; }
.tool-diagram-box svg { width: 100%; height: 100%; max-width: 340px; }
.tool-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; }
.tool-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tool-card-head h3 { margin: 0; font-size: 17px; font-weight: 700; color: var(--ink); }
.tool-card-head .chip { font-family: var(--serif); font-weight: 400; font-size: 12.5px; }
.tool-purpose { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.tool-desc { margin: 2px 0 0; font-size: 13.3px; color: var(--ink-2); line-height: 1.7; }

.books-gallery { display: flex; flex-direction: column; gap: 16px; }
.book-card {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 22px 24px 22px 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s var(--ease);
}
.book-card:hover { box-shadow: var(--shadow-md); }
.book-cover-wrap {
  position: relative;
  align-self: flex-start;
  border-radius: 3px 8px 8px 3px;
  overflow: hidden;
  aspect-ratio: 2 / 2.85;
  background: var(--paper-deep);
  box-shadow: 0 1px 2px rgba(31, 30, 27, 0.2), 0 16px 26px -14px rgba(31, 30, 27, 0.5);
  transform: rotate(-1.5deg);
  transition: transform 0.4s var(--spring);
}
.book-card:hover .book-cover-wrap { transform: rotate(0) translateY(-3px); }
.book-cover-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.14) 0%, rgba(255,255,255,0.18) 3%, transparent 9%); pointer-events: none; }
.book-cover-img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.book-info { display: flex; flex-direction: column; min-width: 0; }
.book-info-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.book-info-top .chip { margin-bottom: 8px; }
.book-info h3 { margin: 0 0 3px; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.book-author { font-size: 13px; font-weight: 550; color: var(--ink-3); }
.book-desc { font-size: 14px; color: var(--ink-2); line-height: 1.8; }
.book-desc p { margin: 0 0 8px; }
.book-desc p:last-child { margin-bottom: 0; }
.book-toggle { margin-top: 10px; align-self: flex-start; border: 0; background: transparent; padding: 4px 0; color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line-strong); }
.book-toggle:hover { border-bottom-color: var(--ink); }

.films-intro-card { position: relative; padding: 4px 0 4px 20px; margin-bottom: 26px; font-size: 14.5px; color: var(--ink-2); line-height: 1.85; border-left: 2px solid var(--ink); }
.films-wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.film-poster-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.film-poster-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.film-poster-media { position: relative; aspect-ratio: 2 / 2.9; margin: 8px 8px 0; border-radius: 12px; overflow: hidden; background: var(--paper-deep); }
.film-poster-media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform 0.6s var(--ease); }
.film-poster-card:hover .film-poster-media img { transform: scale(1.04); }
.film-play-fab {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(6px) scale(0.9);
  transition: opacity 0.22s, transform 0.35s var(--spring);
}
.film-poster-card:hover .film-play-fab, .film-poster-card:focus-visible .film-play-fab { opacity: 1; transform: none; }
.film-poster-body { padding: 14px 16px 8px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.film-poster-body .chip { align-self: flex-start; margin-bottom: 6px; }
.film-poster-body h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.film-poster-body p { margin: 0; font-size: 12.8px; color: var(--ink-2); line-height: 1.55; }
.film-poster-foot { padding: 10px 16px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.film-poster-foot span:first-child { color: var(--ink-3); font-weight: 550; }

/* ==================== INLINE PDF / PANORAMA READER ==================== */
.reader-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--paper-deep);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.reader-viewport {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 84px;
  gap: 16px;
}
.reader-viewport--image { justify-content: center; cursor: grab; overflow: hidden; padding: 0; }
.reader-viewport--image.is-panning { cursor: grabbing; }
.reader-canvas-wrap {
  background: #fff;
  box-shadow: 0 12px 32px rgba(31, 30, 27, 0.14);
  border-radius: 6px;
  overflow: hidden;
}
.reader-float-pill {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(31, 30, 27, 0.88);
  backdrop-filter: blur(12px);
  color: #fff;
  box-shadow: 0 12px 28px rgba(31, 30, 27, 0.28);
}
.reader-float-pill button, .reader-float-pill a {
  border: 0;
  background: transparent;
  color: #fff;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.reader-float-pill button:hover:not(:disabled), .reader-float-pill a:hover { background: rgba(255, 255, 255, 0.16); }
.reader-float-pill button:disabled { opacity: 0.4; cursor: not-allowed; }
.reader-pill-sep { width: 1px; height: 16px; background: rgba(255, 255, 255, 0.22); }
.reader-pill-info { padding: 0 8px; font-size: 12px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.9); }

/* ==================== RECORDS & ADMIN WORKBENCH ==================== */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head h1 { margin: 0 0 4px; font-size: 25px; font-weight: 760; letter-spacing: -0.025em; }
.page-head p { margin: 0; font-size: 13.8px; color: var(--ink-2); }
.page-head-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}
.kpi-card::after {
  display: none;
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--ink);
}
.kpi-card:nth-child(2)::after { background: var(--ink); }
.kpi-card:nth-child(3)::after { background: var(--ink); }
.kpi-card:nth-child(4)::after { background: var(--ink); }
.kpi-label { font-size: 12px; font-weight: 650; color: var(--ink-3); margin-bottom: 6px; }
.kpi-val { font-size: 26px; font-weight: 780; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.admin-split {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.admin-master, .admin-detail, .records-list-card, .matrix-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.admin-master { overflow: hidden; }
.student-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s;
}
.student-row:last-child { border-bottom: 0; }
.student-row:hover { background: var(--surface-soft); }
.student-row.is-selected { background: var(--brand-soft); }
.student-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--note);
  color: var(--note-ink);
  font-size: 13.5px;
  font-weight: 750;
  display: grid;
  place-items: center;
  flex: none;
}
.student-row-main { flex: 1; min-width: 0; }
.student-row-name { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.student-row-name strong { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-row-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.admin-detail { padding: 22px 24px; min-height: 420px; }

.matrix-wrap { overflow-x: auto; }
.matrix-table { width: 100%; border-collapse: collapse; min-width: 780px; }
.matrix-table th, .matrix-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; }
.matrix-table th { background: var(--surface-soft); font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.matrix-table tbody tr:hover { background: var(--surface-soft); }
.matrix-dot {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
}
.matrix-dot.is-done { background: var(--ok-soft); color: var(--ok); }
.matrix-dot.is-miss { background: var(--paper-deep); color: var(--ink-4); }

.records-list-card { overflow: hidden; }
.record-row {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.record-row:last-child { border-bottom: 0; }
.record-row-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ==================== DIALOGS, CMD+K, TOAST, CONFETTI ==================== */
dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 0;
  max-width: 520px;
  width: calc(100vw - 32px);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  color: var(--ink);
}
dialog::backdrop { background: rgba(31, 30, 27, 0.42); backdrop-filter: blur(4px); }
.dlg-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dlg-head h2 { margin: 0; font-size: 17px; font-weight: 740; }
.dlg-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.dlg-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

.cmdk-dialog { max-width: 580px; margin-top: 10vh; }
.cmdk-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.cmdk-input-row input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 15px;
  background: transparent;
}
.cmdk-list { max-height: 360px; overflow-y: auto; padding: 8px; }
.cmdk-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.cmdk-item.is-active, .cmdk-item:hover { background: var(--brand-soft); color: var(--brand); }

.cred-box {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--brand-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cred-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }

.toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(31, 30, 27, 0.28);
  max-width: calc(100vw - 32px);
}
.confetti-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 180; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-3); font-size: 14px; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1100px) {
  .roadmap-grid, .s3-preview-grid { grid-template-columns: 1fr; }
  .films-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login-frame { grid-template-columns: 1fr; }
  .login-pane-form { padding: 36px 26px; }
  .login-pane-visual { padding: 32px 26px; border-left: 0; border-top: 1px solid var(--line); }
  .login-year { font-size: 132px; bottom: -30px; }
  .app-shell { grid-template-columns: 1fr; }
  .mobile-bar { display: flex; }
  .nav-rail { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); transition: transform 0.28s var(--ease); z-index: 50; }
  .nav-rail.is-open { transform: translateX(0); }
  .rail-backdrop.is-open { display: block; }
  .main-canvas { padding: 24px 16px 60px; }
  .home-greet h1 { font-size: 27px; }
  .home-top { grid-template-columns: 1fr; }
  .next-card { padding: 22px 20px; }
  .player-body, .player-body.is-ref-open { grid-template-columns: minmax(0, 1fr); }
  .syllabus { position: fixed; left: 0; top: var(--topbar-h); bottom: 0; width: 300px; z-index: 50; transform: translateX(-100%); transition: transform 0.28s var(--ease); box-shadow: var(--shadow-lg); }
  .syllabus.is-mobile-open { transform: translateX(0); opacity: 1; pointer-events: auto; }
  .ref-drawer { position: fixed; right: 0; top: var(--topbar-h); bottom: 0; width: min(360px, 92vw); z-index: 50; box-shadow: var(--shadow-lg); }
  .stage-scroll { padding: 22px 16px 40px; }
  .stage-header h1 { font-size: 23px; }
  .tools-grid, .company-channels, .video-split-card { grid-template-columns: 1fr; }
  .video-split-body { padding: 4px 6px 8px; }
  .book-card { grid-template-columns: 104px minmax(0, 1fr); gap: 18px; padding: 18px; }
  .films-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .player-progress-pill { display: none; }
}
@media (max-width: 540px) {
  .book-card { grid-template-columns: 1fr; }
  .channel-qr-row { grid-template-columns: 1fr; }
  .channel-qr-frame { width: fit-content; }
  .book-cover-wrap { max-width: 150px; }
  .book-info-top { flex-direction: column; }
  .films-wall { grid-template-columns: 1fr 1fr; }
  .film-poster-foot span:first-child { display: none; }
  .video-verbatim-alert { grid-template-columns: 1fr; padding: 24px 18px 18px; margin: 0 2px 26px; }
  .video-alert-quote { font-size: 16.5px; }
  .stamps { gap: 10px 2px; }
  .stage-footer { padding: 0 12px; gap: 8px; }
  .stage-footer-meta { display: none; }
  .stage-footer > div { min-width: 0; max-width: 48%; }
  .stage-footer .btn { max-width: 100%; overflow: hidden; }
  .stage-footer .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .inline-task-card, .submit-card { padding: 18px 16px; }
  .submit-bar .btn { width: 100%; white-space: normal; height: auto; min-height: 44px; padding: 10px 14px; line-height: 1.35; }
  .mode-tabs { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .mode-tab { justify-content: center; padding: 0 10px; }
  .player-crumb { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .video-verbatim-alert, .book-cover-wrap { transform: none; }
}

/* ==================== READER, DIALOG & CMDK COMPATIBILITY ==================== */
.inline-reader {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  position: relative;
  background: var(--paper-deep);
}
.inline-reader-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.inline-reader-title { min-width: 0; }
.inline-reader-title strong { display: block; font-size: 14.5px; font-weight: 720; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-reader-title span { display: block; font-size: 12px; color: var(--ink-3); }
.inline-reader-surface {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 20px 92px;
  outline: none;
}
.inline-reader-doc {
  display: flex;
  justify-content: center;
  align-items: center;
}
.inline-reader-doc canvas, .inline-reader-doc img {
  display: block;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 14px 36px rgba(31, 30, 27, 0.16);
}
.inline-reader-msg {
  margin: 14px 0 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-2);
}
.inline-reader-msg.is-error { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }

.floating-pill-bar {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(31, 30, 27, 0.90);
  backdrop-filter: blur(12px);
  color: #fff;
  box-shadow: 0 14px 32px rgba(31, 30, 27, 0.30);
}
.floating-pill-bar .icon-btn,
.floating-pill-bar .btn--ghost { color: #fff; border-radius: 999px; }
.floating-pill-bar .icon-btn:hover,
.floating-pill-bar .btn--ghost:hover { background: rgba(255, 255, 255, 0.16); color: #fff; border-color: transparent; }
.pill-page-input {
  width: 44px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  text-align: center;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.pill-zoom { font-size: 12.5px; font-weight: 650; min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.pill-sep { width: 1px; height: 18px; background: rgba(255, 255, 255, 0.22); margin: 0 3px; }
.tabular { font-variant-numeric: tabular-nums; }

/* Dialogs & Batch Table */
.dialog-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.dialog-head h2 { margin: 0; font-size: 17px; font-weight: 740; }
.dialog-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-3); }
.dialog-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.seg-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  background: var(--paper-deep);
  border: 1px solid var(--border);
  gap: 4px;
}
.seg-switch button {
  border: 0;
  background: transparent;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-2);
  cursor: pointer;
}
.seg-switch button.is-active { background: var(--surface); color: var(--brand); box-shadow: 0 2px 8px rgba(31, 30, 27, 0.08); }
.batch-table-wrap { max-height: 280px; overflow: auto; border: 1px solid var(--border); border-radius: 11px; }
.batch-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.batch-table th, .batch-table td { padding: 8px 11px; border-bottom: 1px solid var(--border); text-align: left; }
.batch-table th { background: var(--surface-soft); font-weight: 700; color: var(--ink-2); }
.cred-box dt { color: var(--ink-3); font-weight: 600; }
.cred-box dd { margin: 0; font-family: var(--mono); font-weight: 700; color: var(--ink); }

/* Cmd+K Palette */
.cmdk-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.cmdk-search input { flex: 1; border: 0; outline: none; font-size: 14.5px; background: transparent; }
.kbd {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink-3);
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 11px;
  font-family: var(--mono);
  cursor: pointer;
}
.cmdk-results { max-height: 360px; overflow-y: auto; padding: 8px; }
.cmdk-group-title { font-size: 11px; font-weight: 700; color: var(--ink-4); padding: 8px 10px 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.cmdk-item-sub { font-size: 12px; color: var(--ink-3); margin-left: auto; }
.cmdk-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink-3);
  background: var(--surface-soft);
}

/* Picked File Bar & Feedback & Progress */
.picked-bar {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  color: var(--brand);
}
.picked-bar-copy { flex: 1; min-width: 0; }
.picked-bar-copy strong { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picked-bar-copy small { display: block; font-size: 12px; color: var(--ink-3); }
.feedback-line {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  background: var(--brand-soft);
  color: var(--brand);
}
.feedback-line.is-error { background: var(--danger-soft); color: var(--danger); }
.feedback-line.is-success { background: var(--ok-soft); color: var(--ok); }
.upload-progress { width: 100%; height: 7px; margin-top: 10px; accent-color: var(--brand); }
.meta-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; }
.meta-tag.is-done { background: var(--ok-soft); color: var(--ok); }
.meta-tag.is-active { background: var(--brand-soft); color: var(--brand); }
.meta-tag.is-warn { background: var(--warn-soft); color: var(--warn); }

.term-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.term-section h3 { margin: 0 0 11px; font-size: 14.5px; font-weight: 740; color: var(--ink); }
.term-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.term-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 9px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 12.8px;
  font-weight: 550;
  color: var(--ink);
}
.empty-box {
  text-align: center;
  padding: 36px 20px;
  color: var(--ink-3);
  font-size: 13.5px;
}
.app-shell.menu-open .nav-rail { transform: translateX(0); }
.app-shell.menu-open .rail-backdrop { display: block; }
.player-shell.is-collapsed .player-body { grid-template-columns: 0 minmax(0, 1fr); }
.player-shell.is-collapsed .player-body.is-ref-open { grid-template-columns: 0 minmax(0, 1fr) var(--ref-w); }
.player-shell.is-collapsed .syllabus { overflow: hidden; padding: 0; border-right: 0; opacity: 0; pointer-events: none; }
.player-shell.is-mobile-syl .syllabus { transform: translateX(0); opacity: 1; pointer-events: auto; }
.admin-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.admin-detail-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 760; }
.admin-detail-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 18px; }
.admin-sub-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.admin-sub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

