:root {
  color-scheme: light;
  --canvas: #f5f7fb;
  --canvas-deep: #eaf0f8;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --surface-muted: #f0f4fa;
  --ink: #0b1f33;
  --ink-soft: #3d5068;
  --muted: #718096;
  --line: #e2e8f1;
  --line-strong: #ced8e6;
  --sidebar: #0a1d33;
  --sidebar-soft: #142e4d;
  --sidebar-ink: #f7faff;
  --brand: #0967f2;
  --brand-strong: #0050c8;
  --brand-soft: #e8f1ff;
  --sky: #4788e8;
  --sky-soft: #eaf2ff;
  --amber: #b27632;
  --amber-soft: #f8ecdb;
  --red: #b45b4f;
  --red-soft: #f8e9e6;
  --violet: #7567d8;
  --violet-soft: #efedff;
  --shadow: 0 24px 70px rgba(20, 49, 86, 0.11);
  --shadow-small: 0 10px 30px rgba(20, 49, 86, 0.08);
  --radius-xl: 28px;
  --radius-lg: 21px;
  --radius-md: 14px;
  --radius-sm: 10px;
  font-family: "MiSans", "HarmonyOS Sans SC", "SF Pro Text", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); }

body { min-width: 320px; }

button, input, select, textarea { font: inherit; }

button { color: inherit; }

button, [role="button"] { -webkit-tap-highlight-color: transparent; }

svg { display: block; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  color: var(--sidebar-ink);
  background:
    radial-gradient(circle at 15% 2%, rgba(132, 178, 151, 0.15), transparent 31%),
    var(--sidebar);
  z-index: 20;
}

.brand-lockup { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #183327;
  background: #dbeadf;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}

.brand-name { font-weight: 720; letter-spacing: .03em; font-size: 16px; }
.brand-sub { margin-top: 2px; color: rgba(248,245,236,.52); font-size: 11px; letter-spacing: .08em; }

.workspace-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  margin: 0 2px 20px;
  border-radius: 13px;
  background: rgba(255,255,255,.07);
}

.workspace-switch button {
  border: 0;
  padding: 9px 8px;
  border-radius: 10px;
  cursor: pointer;
  background: transparent;
  color: rgba(248,245,236,.58);
  font-size: 13px;
  transition: .18s ease;
}

.workspace-switch button:hover { color: #fff; }
.workspace-switch button.active { color: #173225; background: #f4f5ef; box-shadow: 0 3px 12px rgba(0,0,0,.16); }

.nav-label { padding: 0 12px 8px; color: rgba(248,245,236,.36); font-size: 10px; letter-spacing: .16em; }
.side-nav { display: flex; flex-direction: column; gap: 5px; }

.nav-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 12px;
  padding: 0 12px;
  cursor: pointer;
  color: rgba(248,245,236,.65);
  background: transparent;
  text-align: left;
  font-size: 15px;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item:active { transform: scale(.985); }
.nav-item.active { color: #fff; background: var(--sidebar-soft); box-shadow: inset 3px 0 0 #9bc3a9; }
.nav-item .nav-icon { width: 20px; height: 20px; opacity: .92; }
.nav-count { margin-left: auto; min-width: 22px; padding: 2px 6px; border-radius: 999px; background: rgba(255,255,255,.1); text-align: center; font-size: 11px; }
.nav-item.active .nav-count { color: #173225; background: #dbeadf; }

.sidebar-foot { margin-top: auto; }
.sync-note { margin: 0 4px 12px; padding: 12px; border-radius: 13px; background: rgba(255,255,255,.055); }
.sync-line { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.sync-line .pulse { width: 7px; height: 7px; border-radius: 50%; background: #8ec3a2; box-shadow: 0 0 0 5px rgba(142,195,162,.1); }
.sync-note p { margin: 7px 0 0; color: rgba(248,245,236,.42); font-size: 11px; line-height: 1.55; }
.help-link { display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: rgba(248,245,236,.53); font-size: 12px; }

.app-main { grid-column: 2; min-width: 0; }

.topbar {
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 34px;
  background: rgba(244,241,234,.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(216,211,199,.74);
}

.topbar-left, .topbar-right, .cluster { display: flex; align-items: center; gap: 10px; }
.mobile-menu { display: none; }

.cohort-select, .role-select {
  appearance: none;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 36px 0 13px;
  outline: none;
  color: var(--ink-soft);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2372766d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
  cursor: pointer;
  transition: .16s ease;
}

.cohort-select { min-width: 220px; }
.role-select { min-width: 138px; }
.cohort-select:hover, .role-select:hover { border-color: var(--line-strong); box-shadow: var(--shadow-small); }
.cohort-select:focus, .role-select:focus { border-color: #88aa99; box-shadow: 0 0 0 3px rgba(47,107,83,.1); }

.stage-pill { padding: 7px 10px; border-radius: 999px; color: var(--brand-strong); background: var(--brand-soft); font-size: 11px; font-weight: 650; white-space: nowrap; }
.week-pill { color: var(--muted); font-size: 12px; white-space: nowrap; }

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink-soft);
  transition: .16s ease;
}

.icon-button:hover { color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow-small); }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: var(--brand); font-size: 13px; font-weight: 700; }

.page { padding: 36px 34px 64px; max-width: 1560px; margin: 0 auto; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-eyebrow { color: var(--brand); font-size: 12px; font-weight: 720; letter-spacing: .12em; text-transform: uppercase; }
.page-title { margin: 7px 0 7px; font-size: clamp(26px, 2.2vw, 36px); line-height: 1.14; letter-spacing: -.045em; font-weight: 760; }
.page-desc { margin: 0; max-width: 660px; color: var(--muted); font-size: 13px; line-height: 1.75; }

.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border-radius: 12px;
  border: 1px solid var(--line);
  cursor: pointer;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 640;
  transition: .16s ease;
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-small); border-color: var(--line-strong); }
.btn:active { transform: translateY(0) scale(.985); }
.btn-primary { color: #fff; border-color: var(--brand); background: var(--brand); }
.btn-primary:hover { border-color: var(--brand-strong); background: var(--brand-strong); }
.btn-soft { color: var(--brand-strong); border-color: transparent; background: var(--brand-soft); }
.btn-danger-soft { color: var(--red); border-color: transparent; background: var(--red-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { min-height: 34px; padding: 0 11px; border-radius: 10px; font-size: 12px; }
.btn svg, .icon-button svg { width: 17px; height: 17px; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { position: relative; overflow: hidden; min-height: 142px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 3px 14px rgba(43,47,42,.025); }
.metric-card::after { content: ""; position: absolute; width: 86px; height: 86px; right: -28px; bottom: -32px; border-radius: 50%; background: var(--metric-soft, var(--brand-soft)); opacity: .78; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.metric-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: var(--metric-color, var(--brand)); background: var(--metric-soft, var(--brand-soft)); }
.metric-icon svg { width: 17px; height: 17px; }
.metric-value { margin-top: 14px; font-size: 28px; line-height: 1; letter-spacing: -.04em; font-weight: 760; }
.metric-foot { margin-top: 10px; color: var(--muted); font-size: 11px; }
.metric-foot strong { color: var(--metric-color, var(--brand)); font-weight: 680; }

.grid-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .78fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); box-shadow: 0 3px 14px rgba(43,47,42,.025); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px 16px; }
.panel-title { margin: 0; font-size: 16px; letter-spacing: -.02em; font-weight: 720; }
.panel-sub { margin-top: 4px; color: var(--muted); font-size: 11px; }
.panel-body { padding: 0 22px 22px; }
.panel-link { border: 0; cursor: pointer; color: var(--brand); background: none; font-size: 12px; font-weight: 650; }

.progress-ring { --p: 72; --c: var(--brand); width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-muted) 0); }
.progress-ring::after { content: attr(data-label); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); font-size: 9px; font-weight: 700; }

.task-list { display: grid; gap: 2px; }
.task-item { display: grid; grid-template-columns: 42px 36px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 70px; padding: 8px 0; border-top: 1px solid var(--line); }
.task-item:first-child { border-top: 0; }
.task-time { color: var(--muted); font-size: 11px; text-align: center; }
.task-time.done { color: var(--brand); }
.check-button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; background: var(--surface); color: transparent; transition: .16s ease; }
.check-button:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.check-button.checked { border-color: var(--brand); color: #fff; background: var(--brand); }
.check-button svg { width: 15px; height: 15px; }
.task-copy { min-width: 0; }
.task-title { font-size: 13px; font-weight: 650; line-height: 1.45; }
.task-item.is-done .task-title { color: var(--muted); text-decoration: line-through; }
.task-meta { margin-top: 4px; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-arrow { color: #aaa99f; }
.task-arrow svg { width: 17px; height: 17px; }

.risk-list { display: grid; gap: 10px; }
.risk-card { width: 100%; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; cursor: pointer; background: var(--surface); text-align: left; transition: .16s ease; }
.risk-card:hover { transform: translateY(-1px); border-color: var(--line-strong); box-shadow: var(--shadow-small); }
.student-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; color: var(--avatar-ink, var(--brand-strong)); background: var(--avatar-bg, var(--brand-soft)); font-size: 13px; font-weight: 720; }
.risk-name { font-size: 13px; font-weight: 680; }
.risk-reason { margin-top: 3px; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.severity { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 680; white-space: nowrap; }
.severity::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.severity.high { color: var(--red); background: var(--red-soft); }
.severity.medium { color: var(--amber); background: var(--amber-soft); }
.severity.steady { color: var(--brand); background: var(--brand-soft); }

.session-mini { display: grid; gap: 10px; }
.session-mini-card { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.session-mini-card:first-child { border-top: 0; }
.session-time-box { padding: 8px 4px; border-radius: 11px; text-align: center; color: var(--brand-strong); background: var(--brand-soft); }
.session-time-box strong { display: block; font-size: 13px; }
.session-time-box span { display: block; margin-top: 2px; font-size: 9px; }
.session-name { font-size: 12px; font-weight: 650; }
.session-meta { margin-top: 4px; color: var(--muted); font-size: 10px; }

.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.segmented { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.54); }
.segmented button { min-height: 32px; padding: 0 13px; border: 0; border-radius: 9px; cursor: pointer; color: var(--muted); background: transparent; font-size: 12px; }
.segmented button.active { color: var(--ink); background: var(--surface); box-shadow: 0 2px 9px rgba(43,47,42,.08); }
.search-box { min-width: 260px; height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.search-box svg { width: 16px; height: 16px; color: var(--muted); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search-box input::placeholder { color: #aaa99f; }

.student-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.student-card { position: relative; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); cursor: pointer; background: var(--surface); transition: .18s ease; }
.student-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-small); }
.student-card-top { display: flex; justify-content: space-between; gap: 14px; }
.student-ident { display: flex; gap: 11px; align-items: center; min-width: 0; }
.student-name { font-size: 14px; font-weight: 720; }
.student-owner { margin-top: 3px; color: var(--muted); font-size: 10px; }
.student-progress { margin: 17px 0 13px; }
.progress-copy { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: 10px; }
.progress-copy strong { color: var(--ink-soft); }
.progress-track { height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-muted); }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.student-facts { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.fact { padding: 9px 6px; border-radius: 10px; background: var(--surface-soft); text-align: center; }
.fact span { display: block; color: var(--muted); font-size: 9px; }
.fact strong { display: block; margin-top: 4px; overflow: hidden; color: var(--ink-soft); font-size: 10px; font-weight: 630; text-overflow: ellipsis; white-space: nowrap; }
.student-action { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.student-action-text { min-width: 0; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.tag { padding: 4px 7px; border-radius: 7px; color: var(--muted); background: var(--surface-muted); font-size: 9px; }

.team-table, .connector-table { width: 100%; border-collapse: collapse; }
.team-table th, .connector-table th { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 620; text-align: left; letter-spacing: .06em; }
.team-table td, .connector-table td { padding: 15px 14px; border-bottom: 1px solid var(--line); font-size: 12px; }
.team-table tr:last-child td, .connector-table tr:last-child td { border-bottom: 0; }
.team-person { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.tiny-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: var(--brand-strong); background: var(--brand-soft); font-size: 10px; }
.completion { min-width: 120px; display: flex; align-items: center; gap: 8px; }
.completion .progress-track { flex: 1; }
.number-alert { color: var(--red); font-weight: 680; }

.week-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.week-picker { display: flex; align-items: center; gap: 10px; }
.week-title { min-width: 150px; text-align: center; }
.week-title strong { display: block; font-size: 14px; }
.week-title span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.page-lead { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.schedule-tools { display: flex; align-items: center; gap: 18px; }
.week-jump { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 650; }
.week-jump select { min-width: 112px; height: 40px; padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: 12px; outline: 0; color: var(--ink); background: var(--surface); cursor: pointer; font: inherit; }
.week-jump select:focus { border-color: #88aa99; box-shadow: 0 0 0 3px rgba(47,107,83,.1); }
.legend { display: flex; gap: 12px; color: var(--muted); font-size: 10px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 7px; height: 7px; border-radius: 50%; }

.schedule-shell { overflow-x: auto; padding-bottom: 4px; }
.schedule-grid { min-width: 980px; display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 10px; }
.day-column { min-height: 490px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.58); }
.day-column.is-today { border-color: #a8c1b1; box-shadow: inset 0 0 0 1px rgba(47,107,83,.08); }
.day-head { padding: 5px 4px 13px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.day-name { color: var(--muted); font-size: 10px; }
.day-date { margin-top: 4px; font-size: 18px; font-weight: 740; letter-spacing: -.03em; }
.today-label { padding: 4px 7px; border-radius: 999px; color: var(--brand-strong); background: var(--brand-soft); font-size: 9px; font-weight: 680; }
.day-sessions { display: grid; gap: 9px; }
.schedule-card { position: relative; min-height: 120px; display: flex; flex-direction: column; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 2px 8px rgba(43,47,42,.025); transition: .16s ease; }
.schedule-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-small); }
.schedule-card.open { border-style: dashed; border-color: #a6bcae; background: #fbfdfb; }
.schedule-card::before { content: ""; position: absolute; inset: 11px auto 11px 0; width: 3px; border-radius: 0 4px 4px 0; background: var(--tone, var(--brand)); }
.schedule-card-time { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.schedule-card-topic { margin-top: 11px; font-size: 12px; font-weight: 680; line-height: 1.45; }
.schedule-card-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.leader { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ink-soft); font-size: 10px; }
.leader-dot { width: 22px; height: 22px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 8px; color: var(--brand-strong); background: var(--brand-soft); font-size: 8px; font-weight: 700; }
.enrollment { color: var(--muted); font-size: 9px; white-space: nowrap; }
.claim-button { min-height: 29px; padding: 0 10px; border: 0; border-radius: 9px; cursor: pointer; color: #fff; background: var(--brand); font-size: 10px; font-weight: 680; }
.claim-button:hover { background: var(--brand-strong); }
.add-slot { min-height: 72px; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: 14px; cursor: pointer; color: var(--muted); background: transparent; font-size: 11px; transition: .16s ease; }
.add-slot:hover { color: var(--brand); border-color: #98b2a2; background: var(--brand-soft); }

.quality-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.quality-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.quality-head { display: flex; align-items: center; justify-content: space-between; }
.quality-score { font-size: 26px; font-weight: 760; letter-spacing: -.04em; }
.quality-score small { color: var(--muted); font-size: 10px; font-weight: 500; }
.quality-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 15px 0; }
.quality-meta div { padding: 10px; border-radius: 11px; background: var(--surface-soft); }
.quality-meta span { display: block; color: var(--muted); font-size: 9px; }
.quality-meta strong { display: block; margin-top: 3px; font-size: 12px; }
.quality-note { color: var(--ink-soft); font-size: 11px; line-height: 1.65; }

.connector-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 660; }
.connector-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.connector-status.ready { color: var(--brand); background: var(--brand-soft); }
.connector-status.waiting { color: var(--amber); background: var(--amber-soft); }
.code-pill { display: inline-block; padding: 5px 8px; border-radius: 8px; color: #526058; background: #eef1ed; font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.architecture-note { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 18px; border: 1px solid #d7e1da; border-radius: var(--radius-lg); background: var(--brand-soft); }
.architecture-note .metric-icon { background: var(--surface); }
.architecture-note h3 { margin: 0; font-size: 13px; }
.architecture-note p { margin: 5px 0 0; color: #587063; font-size: 11px; line-height: 1.7; }

.empty-state { padding: 42px 20px; text-align: center; color: var(--muted); }
.empty-state-icon { width: 46px; height: 46px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 15px; color: var(--brand); background: var(--brand-soft); }
.empty-state strong { display: block; color: var(--ink-soft); font-size: 13px; }
.empty-state p { margin: 6px auto 0; max-width: 320px; font-size: 11px; line-height: 1.6; }

.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(25,29,26,.32); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; inset: 0 0 0 auto; z-index: 90; width: min(480px, 100vw); height: 100vh; height: 100dvh; display: flex; flex-direction: column; transform: translateX(100%); overflow: hidden; overscroll-behavior: contain; background: var(--surface); box-shadow: -22px 0 70px rgba(25,29,26,.16); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.drawer.open { transform: translateX(0); }
.drawer-head { position: relative; z-index: 2; flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 24px 18px; border-bottom: 1px solid var(--line); background: rgba(255,254,250,.92); backdrop-filter: blur(14px); }
.drawer-title { margin: 0; font-size: 19px; letter-spacing: -.03em; }
.drawer-sub { margin-top: 5px; color: var(--muted); font-size: 11px; }
.drawer-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding: 22px 24px 30px; }
.drawer-section { margin-top: 24px; }
.drawer-section:first-child { margin-top: 0; }
.drawer-section-title { margin: 0 0 10px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.profile-strip { display: flex; align-items: center; gap: 13px; padding: 14px; border-radius: 16px; background: var(--surface-soft); }
.profile-strip .student-avatar { width: 46px; height: 46px; }
.profile-strip h4 { margin: 0; font-size: 14px; }
.profile-strip p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.detail-item { padding: 12px; border: 1px solid var(--line); border-radius: 13px; }
.detail-item span { display: block; color: var(--muted); font-size: 9px; }
.detail-item strong { display: block; margin-top: 5px; font-size: 11px; font-weight: 660; }
.message-card { padding: 14px; border: 1px solid #d9e5dd; border-radius: 14px; color: #425a4c; background: #f3f8f5; font-size: 12px; line-height: 1.75; }
.message-card-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 11px; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { color: var(--ink-soft); font-size: 11px; font-weight: 650; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; outline: 0; color: var(--ink); background: var(--surface); transition: .16s ease; }
.field input, .field select { height: 42px; padding: 0 12px; }
.field textarea { min-height: 94px; padding: 11px 12px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #88aa99; box-shadow: 0 0 0 3px rgba(47,107,83,.1); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drawer-actions { position: relative; z-index: 3; flex: 0 0 auto; width: 100%; display: flex; justify-content: flex-end; gap: 10px; padding: 15px 24px 20px; border-top: 1px solid var(--line); background: rgba(255,254,250,.94); backdrop-filter: blur(14px); }

.modal { position: fixed; inset: 50% auto auto 50%; z-index: 100; width: min(540px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; transform: translate(-50%,-46%) scale(.97); opacity: 0; pointer-events: none; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 28px 90px rgba(25,29,26,.22); transition: .2s ease; }
.modal.open { transform: translate(-50%,-50%) scale(1); opacity: 1; pointer-events: auto; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 24px 17px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 18px; letter-spacing: -.03em; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.modal-body { padding: 20px 24px 6px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 22px; }

.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 120; display: grid; gap: 10px; pointer-events: none; }
.toast { min-width: 280px; display: flex; align-items: center; gap: 11px; padding: 13px 15px; border: 1px solid #d3e1d7; border-radius: 14px; color: #2f4c3b; background: rgba(250,253,250,.96); box-shadow: var(--shadow); animation: toast-in .25s ease both; font-size: 12px; }
.toast-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--brand); }
.toast-icon svg { width: 14px; height: 14px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.mobile-backdrop { display: none; }

@media (max-width: 1180px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .quality-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-main { grid-template-columns: minmax(0,1fr); }
  .side-stack { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar.mobile-open { transform: translateX(0); }
  .app-main { width: 100%; }
  .topbar { height: 64px; padding: 0 16px; }
  .mobile-menu { display: grid; }
  .stage-pill, .week-pill { display: none; }
  .cohort-select { min-width: 0; max-width: 180px; }
  .role-select { display: none; }
  .page { padding: 26px 16px 48px; }
  .page-head { align-items: flex-end; }
  .page-title { font-size: 27px; }
  .student-grid, .quality-grid { grid-template-columns: 1fr; }
  .side-stack { grid-template-columns: 1fr; }
  .filter-row { align-items: stretch; flex-direction: column; }
  .search-box { min-width: 0; }
  .mobile-backdrop { position: fixed; inset: 0; z-index: 19; display: block; background: rgba(20,24,21,.32); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .mobile-backdrop.open { opacity: 1; pointer-events: auto; }
}

@media (max-width: 560px) {
  .metrics { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { min-height: 126px; padding: 15px; }
  .metric-value { font-size: 24px; }
  .page-head { display: grid; }
  .page-head .cluster { justify-content: stretch; }
  .page-head .btn { flex: 1; }
  .panel-head, .panel-body { padding-left: 16px; padding-right: 16px; }
  .task-item { grid-template-columns: 34px 32px minmax(0,1fr); gap: 8px; }
  .task-arrow { display: none; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .topbar-right .icon-button { display: none; }
  .avatar { width: 34px; height: 34px; }
  .week-toolbar { align-items: stretch; flex-direction: column; }
  .legend { justify-content: space-between; }
  .toast-region { right: 12px; bottom: 12px; left: 12px; }
  .toast { min-width: 0; }
}

/* Visual refinement: larger type, calmer density, stronger hierarchy */
html { font-size: 16px; }
body { font-size: 16px; line-height: 1.65; letter-spacing: .005em; }
.app-shell { grid-template-columns: 268px minmax(0, 1fr); }
.sidebar { width: 268px; padding: 26px 18px 20px; }
.brand-lockup { gap: 14px; padding: 4px 10px 26px; }
.brand-mark { width: 44px; height: 44px; border-radius: 15px; }
.brand-name { font-size: 19px; letter-spacing: .04em; }
.brand-sub { font-size: 12px; }
.workspace-switch { margin-bottom: 25px; }
.workspace-switch button { padding: 11px 8px; font-size: 14px; }
.nav-label { padding-bottom: 10px; font-size: 11px; }
.side-nav { gap: 7px; }
.nav-item { min-height: 50px; gap: 13px; padding: 0 14px; font-size: 15px; border-radius: 14px; }
.nav-item .nav-icon { width: 21px; height: 21px; }
.sync-note { padding: 15px; }
.sync-line { font-size: 13px; }
.sync-note p { font-size: 12px; line-height: 1.65; }
.help-link { font-size: 13px; }
.topbar { height: 80px; padding: 0 42px; }
.cohort-select, .role-select { height: 44px; font-size: 14px; border-radius: 13px; }
.cohort-select { min-width: 244px; }
.role-select { min-width: 150px; }
.stage-pill { padding: 8px 12px; font-size: 12px; }
.week-pill { font-size: 13px; }
.icon-button { width: 44px; height: 44px; border-radius: 13px; }
.avatar { width: 42px; height: 42px; font-size: 14px; }
.page { padding: 44px 42px 76px; }
.page-head { margin-bottom: 32px; }
.page-eyebrow { font-size: 13px; letter-spacing: .14em; }
.page-title { margin-top: 9px; font-size: clamp(34px, 2.75vw, 44px); line-height: 1.12; }
.page-desc { max-width: 760px; font-size: 15px; line-height: 1.8; }
.btn { min-height: 44px; padding: 0 17px; border-radius: 13px; font-size: 14px; }
.btn-sm { min-height: 36px; font-size: 13px; }
.metrics { gap: 17px; margin-bottom: 21px; }
.metric-card { min-height: 158px; padding: 23px; border-radius: 21px; }
.metric-top { font-size: 14px; }
.metric-icon { width: 39px; height: 39px; border-radius: 12px; }
.metric-icon svg { width: 19px; height: 19px; }
.metric-value { margin-top: 17px; font-size: 34px; }
.metric-foot { margin-top: 12px; font-size: 13px; }
.grid-main, .stack { gap: 21px; }
.panel-head { padding: 25px 26px 19px; }
.panel-title { font-size: 19px; }
.panel-sub { margin-top: 5px; font-size: 13px; }
.panel-body { padding: 0 26px 26px; }
.panel-link { font-size: 13px; }
.progress-ring { width: 48px; height: 48px; }
.progress-ring::after { width: 37px; height: 37px; font-size: 10px; }
.task-item { min-height: 82px; grid-template-columns: 48px 40px minmax(0,1fr) auto; gap: 14px; }
.task-time { font-size: 13px; }
.check-button { width: 34px; height: 34px; }
.task-title { font-size: 15px; }
.task-meta { margin-top: 5px; font-size: 13px; }
.risk-list { gap: 12px; }
.risk-card { padding: 15px; gap: 14px; border-radius: 16px; }
.student-avatar { width: 43px; height: 43px; border-radius: 14px; font-size: 15px; }
.risk-name { font-size: 15px; }
.risk-reason { margin-top: 4px; font-size: 12px; }
.severity { padding: 6px 9px; font-size: 11px; }
.session-mini-card { grid-template-columns: 54px minmax(0,1fr) auto; min-height: 68px; }
.session-time-box strong { font-size: 14px; }
.session-time-box span { font-size: 10px; }
.session-name { font-size: 14px; }
.session-meta { font-size: 12px; }
.architecture-note { padding: 21px; }
.architecture-note h3 { font-size: 15px; }
.architecture-note p { font-size: 13px; }
.segmented button { min-height: 37px; padding: 0 15px; font-size: 13px; }
.search-box { min-width: 300px; height: 44px; }
.search-box input { font-size: 14px; }
.student-grid { gap: 17px; }
.student-card { padding: 21px; border-radius: 20px; }
.student-name { font-size: 16px; }
.student-owner { font-size: 12px; }
.progress-copy { font-size: 12px; }
.fact { padding: 11px 7px; }
.fact span { font-size: 10px; }
.fact strong { font-size: 12px; }
.student-action-text { font-size: 12px; }
.tag { padding: 5px 8px; font-size: 10px; }
.team-table th, .connector-table th { padding: 14px 16px; font-size: 11px; }
.team-table td, .connector-table td { padding: 18px 16px; font-size: 14px; }
.week-title { min-width: 174px; }
.week-title strong { font-size: 16px; }
.week-title span { font-size: 12px; }
.legend { font-size: 12px; }
.schedule-grid { min-width: 1120px; gap: 13px; }
.day-column { padding: 14px; border-radius: 20px; }
.day-name { font-size: 12px; }
.day-date { font-size: 22px; }
.today-label { font-size: 10px; }
.day-sessions { gap: 11px; }
.schedule-card { min-height: 142px; padding: 16px; border-radius: 16px; }
.schedule-card-time { font-size: 12px; }
.schedule-card-topic { margin-top: 13px; font-size: 15px; }
.leader { font-size: 12px; }
.leader-dot { width: 26px; height: 26px; font-size: 10px; }
.enrollment { font-size: 11px; }
.claim-button { min-height: 33px; padding: 0 12px; font-size: 12px; }
.add-slot { min-height: 82px; font-size: 13px; }
.quality-card { padding: 21px; }
.quality-score { font-size: 31px; }
.quality-meta span { font-size: 10px; }
.quality-meta strong { font-size: 14px; }
.quality-note { font-size: 13px; }
.drawer { width: min(560px, 100vw); }
.drawer-head { padding: 29px 28px 22px; }
.drawer-title { font-size: 23px; }
.drawer-sub { font-size: 13px; line-height: 1.65; }
.drawer-body { padding: 26px 28px 34px; }
.drawer-section { margin-top: 29px; }
.drawer-section-title { margin-bottom: 12px; font-size: 12px; }
.profile-strip { padding: 17px; }
.profile-strip .student-avatar { width: 52px; height: 52px; }
.profile-strip h4 { font-size: 17px; }
.profile-strip p { font-size: 12px; }
.detail-item { padding: 14px; }
.detail-item span { font-size: 11px; }
.detail-item strong { font-size: 13px; }
.message-card { padding: 17px; font-size: 14px; }
.field { gap: 8px; margin-bottom: 17px; }
.field label { font-size: 13px; }
.field input, .field select { height: 46px; }
.field textarea { min-height: 110px; }
.field input, .field select, .field textarea { font-size: 14px; }
.drawer-actions { width: 100%; padding: 17px 28px 22px; }
.modal { width: min(610px, calc(100vw - 32px)); }
.modal-head { padding: 26px 28px 20px; }
.modal-head h2 { font-size: 22px; }
.modal-head p { font-size: 12px; }
.modal-body { padding: 24px 28px 8px; }
.modal-actions { padding: 16px 28px 26px; }

/* AI analysis surfaces */
.ai-button { color: #284f40; border-color: #cbdcd2; background: #edf5f0; }
.ai-button:hover { color: #fff; border-color: #315f4c; background: #315f4c; }
.ai-button-strong { color: #fff; border-color: #273e35; background: #273e35; }
.ai-page-head { padding: 6px 0 4px; }
.ai-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
  padding: 28px;
  border: 1px solid #d6e2db;
  border-radius: 25px;
  background: radial-gradient(circle at 0 0, #eef6f1, transparent 40%), #fbfdfb;
  box-shadow: var(--shadow-small);
}
.ai-orb, .ai-loader { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 19px; color: #fff; background: #2d5c49; box-shadow: 0 12px 26px rgba(45,92,73,.18); }
.ai-orb svg, .ai-loader svg { width: 25px; height: 25px; }
.ai-kicker { display: block; color: var(--brand); font-size: 11px; font-weight: 760; letter-spacing: .13em; text-transform: uppercase; }
.ai-hero h2, .ai-opportunity-panel h2 { margin: 6px 0 5px; font-size: 21px; letter-spacing: -.03em; }
.ai-hero p { margin: 0; max-width: 700px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.ai-health { min-width: 150px; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 9px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.ai-health .pulse { grid-row: 1 / 3; }
.pulse.ai-live { background: #4ca472; box-shadow: 0 0 0 5px rgba(76,164,114,.12); }
.ai-health strong { font-size: 13px; }
.ai-health small { color: var(--muted); font-size: 10px; }
.ai-analysis-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 17px; }
.ai-analysis-card { min-height: 245px; display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: 21px; background: var(--surface); transition: .18s ease; }
.ai-analysis-card:hover { transform: translateY(-2px); border-color: #cfd9d2; box-shadow: var(--shadow-small); }
.ai-card-top { display: flex; align-items: center; justify-content: space-between; }
.ai-area { padding: 5px 9px; border-radius: 999px; color: var(--muted); background: var(--surface-muted); font-size: 10px; }
.ai-analysis-card h3 { margin: 20px 0 8px; font-size: 18px; letter-spacing: -.02em; }
.ai-analysis-card p { margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.ai-analysis-card .btn { align-self: flex-start; margin-top: auto; }
.ai-opportunity-panel { display: grid; grid-template-columns: .7fr 1.3fr; gap: 32px; margin-top: 20px; padding: 27px; border-radius: 22px; color: #f4f6f3; background: #27322d; }
.ai-opportunity-panel .ai-kicker { color: #9ec5ae; }
.ai-opportunity-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.ai-opportunity-list div { padding: 15px; border-radius: 15px; background: rgba(255,255,255,.055); }
.ai-opportunity-list strong { display: block; font-size: 13px; }
.ai-opportunity-list span { display: block; margin-top: 6px; color: rgba(244,246,243,.58); font-size: 11px; line-height: 1.65; }
.ai-drawer .drawer-head { background: rgba(248,252,249,.95); }
.ai-loading { padding: 60px 20px; text-align: center; }
.ai-loader { margin: 0 auto 20px; animation: ai-breathe 1.8s ease-in-out infinite; }
.ai-loading strong { display: block; font-size: 18px; }
.ai-loading p { margin: 8px auto 24px; max-width: 340px; color: var(--muted); font-size: 13px; }
.ai-loading-lines { display: grid; gap: 8px; max-width: 320px; margin: 0 auto; }
.ai-loading-lines i { height: 9px; border-radius: 999px; background: linear-gradient(90deg,#edf1ee,#dbe7df,#edf1ee); background-size: 200% 100%; animation: ai-shimmer 1.4s linear infinite; }
.ai-loading-lines i:nth-child(2) { width: 82%; }
.ai-loading-lines i:nth-child(3) { width: 63%; }
@keyframes ai-breathe { 50% { transform: scale(1.06); box-shadow: 0 16px 35px rgba(45,92,73,.25); } }
@keyframes ai-shimmer { to { background-position: -200% 0; } }
.ai-error { margin-top: 25px; padding: 24px; border: 1px solid #ead1cc; border-radius: 18px; background: var(--red-soft); }
.ai-error h3 { margin: 15px 0 6px; font-size: 17px; }
.ai-error p { margin: 0 0 18px; color: #80534d; font-size: 13px; }
.ai-result-hero { padding: 22px; border: 1px solid #d9e6dd; border-radius: 19px; background: #f2f8f4; }
.ai-result-hero h3 { margin: 8px 0 8px; font-size: 21px; letter-spacing: -.03em; }
.ai-result-hero p { margin: 0; color: #597064; font-size: 14px; line-height: 1.75; }
.ai-action-list { display: grid; gap: 10px; }
.ai-action-list article { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: start; padding: 15px; border: 1px solid var(--line); border-radius: 15px; }
.ai-action-index { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; color: var(--brand-strong); background: var(--brand-soft); font-size: 11px; font-weight: 760; }
.ai-action-list h5 { margin: 1px 0 4px; font-size: 14px; }
.ai-action-list p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.ai-role-tag { display: inline-flex; margin: 0 0 7px; padding: 4px 7px; border-radius: 999px; color: #315f4c; background: #e8f2ec; font-size: 10px; font-weight: 700; }
.ai-bullet-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.ai-bullet-list li { position: relative; padding: 12px 13px 12px 35px; border-radius: 13px; color: var(--ink-soft); background: var(--surface-soft); font-size: 13px; line-height: 1.65; }
.ai-bullet-list li::before { content: ""; position: absolute; left: 15px; top: 20px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.ai-bullet-list.tip li::before { background: var(--violet); }
.ai-caution { display: flex; gap: 10px; margin-top: 27px; padding: 14px; border-radius: 14px; color: #756344; background: var(--amber-soft); font-size: 12px; line-height: 1.65; }
.ai-caution svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.ai-meta { margin-top: 14px; color: var(--muted); font-size: 10px; text-align: right; }

/* Stage × week × role SOP task system */
.sop-task-panel { min-width: 0; }
.sop-task-item { grid-template-columns: 82px 40px minmax(0,1fr) auto; min-height: 106px; }
.sop-task-item .task-time { padding: 6px 7px; border-radius: 9px; color: var(--brand-strong); background: var(--brand-soft); font-size: 11px; font-weight: 700; line-height: 1.35; }
.task-tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.task-tag-row span { padding: 4px 7px; border-radius: 999px; color: var(--muted); background: var(--surface-muted); font-size: 10px; line-height: 1.2; }
.task-tag-row .task-escalation { color: #8a5e27; background: var(--amber-soft); }
.role-boundary-card { display: flex; align-items: flex-start; gap: 14px; padding: 17px; border: 1px solid #d9e5dd; border-radius: 17px; background: #f3f8f5; }
.role-boundary-card .metric-icon { flex: 0 0 auto; }
.role-boundary-card h3 { margin: 1px 0 6px; font-size: 16px; }
.role-boundary-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.sop-context-list { display: grid; gap: 0; }
.sop-context-list div { display: grid; gap: 3px; padding: 12px 0; border-top: 1px solid var(--line); }
.sop-context-list div:first-child { border-top: 0; padding-top: 0; }
.sop-context-list span { color: var(--muted); font-size: 11px; }
.sop-context-list strong { font-size: 14px; line-height: 1.55; }
.sop-stage-grid { display: grid; grid-template-columns: repeat(7,minmax(145px,1fr)); gap: 11px; margin-bottom: 22px; overflow-x: auto; padding-bottom: 5px; }
.sop-stage-card { min-width: 145px; min-height: 218px; display: flex; flex-direction: column; padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.sop-stage-card.active { border-color: #8daf9b; box-shadow: inset 0 0 0 1px rgba(47,107,83,.12), var(--shadow-small); background: #fbfdfb; }
.sop-stage-card.empty { opacity: .53; }
.sop-stage-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sop-stage-index { color: var(--muted); font-size: 11px; font-weight: 760; letter-spacing: .1em; }
.sop-stage-card h3 { margin: 18px 0 8px; font-size: 16px; }
.sop-stage-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.sop-stage-foot { margin-top: auto; padding-top: 16px; display: grid; gap: 3px; }
.sop-stage-foot span { color: var(--muted); font-size: 10px; }
.sop-stage-foot strong { color: var(--brand-strong); font-size: 12px; }
.sop-overview-grid { grid-template-columns: minmax(0,1.1fr) minmax(360px,.9fr); }
.theme-week-list { display: grid; gap: 8px; }
.theme-week-item { display: grid; grid-template-columns: 46px minmax(0,1fr); align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; }
.theme-week-item.active { border-color: #a9c1b3; background: var(--brand-soft); }
.theme-week-no { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--brand-strong); background: var(--surface); font-size: 12px; font-weight: 780; }
.theme-week-item strong, .theme-week-item small { display: block; }
.theme-week-item strong { font-size: 13px; line-height: 1.55; }
.theme-week-item small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.sop-rule-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.sop-rule-list li { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 11px; align-items: start; }
.sop-rule-list li > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: var(--brand-strong); background: var(--brand-soft); font-size: 11px; font-weight: 760; }
.sop-rule-list strong { font-size: 14px; }
.sop-rule-list p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.external-claim { padding: 5px 8px; border-radius: 999px; color: var(--violet); background: var(--violet-soft); font-size: 10px; font-weight: 700; }
.sop-contract-grid .detail-item strong { line-height: 1.55; }

@media (max-width: 1180px) {
  .ai-analysis-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ai-opportunity-panel { grid-template-columns: 1fr; }
  .sop-stage-grid { grid-template-columns: repeat(7, 180px); }
  .sop-overview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { width: 280px; }
  .topbar { height: 70px; padding: 0 16px; }
  .page { padding: 32px 17px 56px; }
  .page-title { font-size: 34px; }
  .page-desc { font-size: 14px; }
  .ai-hero { grid-template-columns: auto 1fr; padding: 21px; }
  .ai-health { grid-column: 1 / -1; }
  .ai-analysis-grid { grid-template-columns: 1fr; }
  .ai-opportunity-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .page-head .cluster { flex-wrap: wrap; }
  .metrics { grid-template-columns: 1fr; }
  .metric-card { min-height: 140px; }
  .page-title { font-size: 32px; }
  .page-desc { font-size: 14px; }
  .panel-head { padding: 21px 18px 16px; }
  .panel-body { padding: 0 18px 20px; }
  .task-item { grid-template-columns: 40px 36px minmax(0,1fr); min-height: 80px; }
  .task-title { font-size: 14px; }
  .task-meta { font-size: 12px; }
  .schedule-grid { min-width: 1040px; }
  .ai-hero { grid-template-columns: 1fr; }
  .ai-orb { width: 50px; height: 50px; }
  .drawer-actions { flex-wrap: wrap; }
  .drawer-actions .btn { flex: 1; }
  .sop-task-item { grid-template-columns: 66px 34px minmax(0,1fr); gap: 9px; }
  .sop-task-item .task-time { font-size: 10px; }
  .task-tag-row span { font-size: 9px; }
  .sop-stage-grid { grid-template-columns: repeat(7, 165px); }
}

/* 2026 visual system: generous SaaS rhythm, springy switching, immersive SOP stage */
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(circle at 58% -14%, rgba(108,151,255,.16), transparent 34%),
    radial-gradient(circle at 92% 38%, rgba(211,158,255,.10), transparent 28%),
    var(--canvas);
}

.sidebar {
  background:
    radial-gradient(circle at 12% 2%, rgba(78,140,255,.28), transparent 30%),
    radial-gradient(circle at 112% 64%, rgba(152,112,255,.15), transparent 35%),
    linear-gradient(180deg, #0a1d33 0%, #08182b 100%);
  box-shadow: 16px 0 52px rgba(7,25,45,.08);
}
.brand-mark { color: #095fdc; background: linear-gradient(145deg,#fff,#dbe9ff); box-shadow: 0 10px 26px rgba(0,101,240,.22); }
.brand-sub { color: rgba(241,247,255,.58); }

.workspace-switch { position: relative; isolation: isolate; overflow: hidden; background: rgba(255,255,255,.075); }
.workspace-switch::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 12px) / 2);
  border-radius: 11px;
  background: linear-gradient(145deg,#fff,#e9f1ff);
  box-shadow: 0 8px 20px rgba(1,19,38,.28);
  transition: transform .48s cubic-bezier(.16,1,.3,1);
}
.workspace-switch.is-teaching::before { transform: translateX(calc(100% + 4px)); }
.workspace-switch button { position: relative; z-index: 1; transition: color .28s ease, transform .28s cubic-bezier(.16,1,.3,1); }
.workspace-switch button.active { color: #0a315d; background: transparent; box-shadow: none; }
.workspace-switch button:active { transform: scale(.92); }

.nav-item.active { background: linear-gradient(100deg,rgba(39,113,220,.33),rgba(82,72,174,.16)); box-shadow: inset 3px 0 0 #72a9ff; }
.nav-item.active .nav-count { color: #0758ce; background: #e4efff; }
.sync-line .pulse { background: #66a0ff; box-shadow: 0 0 0 5px rgba(87,151,255,.13); }

.topbar {
  background: rgba(247,249,253,.82);
  border-bottom-color: rgba(210,220,234,.72);
  box-shadow: 0 9px 28px rgba(29,58,94,.035);
}
.cohort-select:focus, .role-select:focus { border-color: #74a7f7; box-shadow: 0 0 0 4px rgba(9,103,242,.11); }
.stage-pill { color: #0754c1; background: #e7f0ff; }
.avatar { background: linear-gradient(145deg,#1477ff,#6356da); box-shadow: 0 9px 22px rgba(39,102,220,.24); }

.page { position: relative; }
.page > * { animation: page-rise .55s cubic-bezier(.16,1,.3,1) both; }
.page > *:nth-child(2) { animation-delay: .055s; }
.page > *:nth-child(3) { animation-delay: .1s; }
.page-title { color: #081f38; font-weight: 780; letter-spacing: -.052em; }
.page-eyebrow { color: #0967f2; }
.page-desc { color: #64748a; }
@keyframes page-rise { from { opacity: 0; transform: translateY(14px); } }

.panel, .metric-card, .student-card, .quality-card {
  border-color: #e2e9f3;
  box-shadow: 0 6px 24px rgba(35,62,99,.045);
  transition: transform .32s cubic-bezier(.16,1,.3,1), box-shadow .32s ease, border-color .32s ease;
}
.panel:hover, .metric-card:hover, .student-card:hover, .quality-card:hover { transform: translateY(-4px); border-color: #d4e0f0; box-shadow: 0 18px 44px rgba(27,65,113,.095); }
.metric-card::after { width: 126px; height: 126px; right: -46px; bottom: -58px; filter: blur(1px); }
.btn { transition: transform .28s cubic-bezier(.16,1,.3,1), box-shadow .28s ease, background .28s ease, border-color .28s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.96); }
.btn-primary { box-shadow: 0 10px 24px rgba(9,103,242,.20); }
.ai-button { color: #0757c8; border-color: #c9dcfb; background: #edf4ff; }
.ai-button:hover { color: #fff; border-color: #0967f2; background: #0967f2; }
.ai-button-strong, .ai-orb, .ai-loader { border-color: #0a4dad; background: linear-gradient(145deg,#0d6cf2,#604ed6); }
.ai-hero { border-color: #dbe6f6; background: radial-gradient(circle at 0 0,#edf4ff,transparent 43%),#fff; }
.ai-result-hero { border-color: #d8e5f8; background: #f1f6ff; }
.ai-drawer .drawer-head, .drawer-head, .drawer-actions { background: rgba(255,255,255,.94); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #74a7f7; box-shadow: 0 0 0 4px rgba(9,103,242,.10); }

.sop-stage-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(154px,1fr);
  gap: 8px;
  margin: -4px 0 14px;
  padding: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sop-stage-tabs::-webkit-scrollbar { display: none; }
.sop-stage-tabs button {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  color: #68788d;
  background: transparent;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: .38s cubic-bezier(.16,1,.3,1);
}
.sop-stage-tabs button > span { color: #9aa8b9; font-size: 11px; letter-spacing: .08em; }
.sop-stage-tabs button > i { padding: 4px 7px; border-radius: 999px; color: #0967f2; background: #e8f1ff; font-size: 10px; font-style: normal; }
.sop-stage-tabs button:hover { color: #0b2b50; background: rgba(255,255,255,.72); transform: translateY(-2px); }
.sop-stage-tabs button.active { color: #0757c8; border-color: #dae7fa; background: #fff; box-shadow: 0 10px 26px rgba(23,68,128,.09); transform: translateY(-2px); }
.sop-stage-tabs button.empty { opacity: .58; }

.sop-showcase {
  --scene-a: #5c96df;
  --scene-b: #a18de1;
  --scene-c: #f1b7df;
  min-height: 500px;
  display: grid;
  grid-template-columns: 132px minmax(0,1fr) 132px;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  padding: 30px 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 38px;
  background:
    radial-gradient(circle at 20% 90%, rgba(255,244,213,.9), transparent 29%),
    linear-gradient(120deg,var(--scene-a),var(--scene-b) 55%,var(--scene-c));
  box-shadow: 0 26px 70px rgba(65,89,153,.20), inset 0 1px 0 rgba(255,255,255,.82);
  isolation: isolate;
}
.sop-showcase-recruitment { --scene-a:#4c8fd5; --scene-b:#92a9e7; --scene-c:#f0c6df; }
.sop-showcase-prelaunch { --scene-a:#4d9bd0; --scene-b:#7ab4e5; --scene-c:#c7c1f1; }
.sop-showcase-learning { --scene-a:#5589d0; --scene-b:#9b8edb; --scene-c:#efb7df; }
.sop-showcase-practice { --scene-a:#4776ce; --scene-b:#7877dc; --scene-c:#cfa7ed; }
.sop-showcase-assessment { --scene-a:#6d74d0; --scene-b:#a17fd5; --scene-c:#efb3d3; }
.sop-showcase-buffer { --scene-a:#4e94c8; --scene-b:#75b6bd; --scene-c:#e0d8a4; }
.sop-showcase-closeout { --scene-a:#3d7fab; --scene-b:#6a90b9; --scene-c:#c6b9dd; }

.sop-peek {
  position: relative;
  min-height: 328px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
  overflow: hidden;
  border: 11px solid rgba(255,255,255,.93);
  border-radius: 32px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg,rgba(11,38,73,.05),rgba(6,31,62,.86)), linear-gradient(140deg,rgba(24,110,227,.72),rgba(91,74,185,.72));
  box-shadow: 0 22px 48px rgba(33,42,91,.18);
  text-align: left;
  transition: transform .46s cubic-bezier(.16,1,.3,1), filter .35s ease;
}
.sop-peek::before { content: ""; position: absolute; inset: -25% -80% 45%; transform: rotate(-18deg); background: rgba(255,255,255,.23); filter: blur(2px); }
.sop-peek > span, .sop-peek > strong, .sop-peek > small, .sop-peek > svg { position: relative; z-index: 1; margin-right: 12px; margin-left: 12px; }
.sop-peek > span { font-size: 11px; font-weight: 760; letter-spacing: .08em; opacity: .72; }
.sop-peek > strong { font-size: 19px; line-height: 1.3; }
.sop-peek > small { margin-bottom: 8px; font-size: 12px; opacity: .72; }
.sop-peek > svg { width: 21px; height: 21px; margin-bottom: 14px; }
.sop-peek-prev { transform: translateX(-54px) scale(.88); }
.sop-peek-next { transform: translateX(54px) scale(.88); }
.sop-peek-prev:hover { transform: translateX(-42px) scale(.92); }
.sop-peek-next:hover { transform: translateX(42px) scale(.92); }
.sop-peek:active { filter: brightness(.92); }

.sop-feature-card {
  min-width: 0;
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(250px,.78fr) minmax(360px,1.22fr);
  gap: 24px;
  padding: 28px;
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 34px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 30px 75px rgba(37,48,92,.20);
  animation: stage-card-in .58s cubic-bezier(.16,1,.3,1) both;
}
@keyframes stage-card-in { from { opacity: 0; transform: translateY(22px) scale(.965); } }
.sop-feature-copy { display: flex; flex-direction: column; min-width: 0; padding: 4px 2px 2px; }
.sop-feature-kicker { display: flex; align-items: center; gap: 8px; }
.sop-feature-kicker span { color: #0967f2; font-size: 13px; font-weight: 800; letter-spacing: .1em; }
.sop-feature-kicker i { padding: 5px 8px; border-radius: 999px; color: #586a80; background: #f0f4fa; font-size: 11px; font-style: normal; font-weight: 700; }
.sop-feature-number { display: flex; align-items: flex-end; gap: 10px; margin-top: 24px; }
.sop-feature-number strong { color: #081f38; font-size: clamp(56px,5vw,78px); line-height: .88; letter-spacing: -.08em; }
.sop-feature-number span { max-width: 72px; padding-bottom: 3px; color: #7b899b; font-size: 13px; line-height: 1.4; }
.sop-feature-copy h2 { margin: 27px 0 9px; color: #081f38; font-size: clamp(27px,2.3vw,38px); line-height: 1.08; letter-spacing: -.052em; }
.sop-feature-copy > p { margin: 0; color: #5f7086; font-size: 17px; line-height: 1.75; }
.sop-feature-meta { display: grid; gap: 9px; margin-top: auto; padding-top: 24px; color: #64758a; font-size: 14px; }
.sop-feature-meta span { display: flex; align-items: center; gap: 8px; }
.sop-feature-meta svg { width: 16px; height: 16px; color: #0967f2; }

.sop-feature-tasks {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
  border-radius: 26px;
  color: #f6f9ff;
  background:
    radial-gradient(circle at 98% 0,rgba(115,100,229,.43),transparent 34%),
    radial-gradient(circle at 0 100%,rgba(24,121,233,.28),transparent 40%),
    linear-gradient(145deg,#0b2441,#0a1a30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.sop-feature-task-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sop-feature-task-head span { display: block; color: rgba(239,245,255,.57); font-size: 10px; }
.sop-feature-task-head strong { display: block; margin-top: 0; font-size: 22px; }
.sop-feature-task-head .sop-live-dot { padding: 5px 8px; border: 1px solid rgba(134,183,255,.27); border-radius: 999px; color: #8ec0ff; background: rgba(59,129,232,.11); font-size: 9px; font-weight: 800; letter-spacing: .09em; }
.sop-feature-task-list { display: grid; align-content: center; gap: 9px; margin-top: 18px; flex: 1; }
.sop-feature-task-list article { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 12px; border: 1px solid rgba(255,255,255,.095); border-radius: 15px; background: rgba(255,255,255,.065); animation: task-slide-in .5s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--delay) * 55ms + 100ms); }
@keyframes task-slide-in { from { opacity: 0; transform: translateX(18px); } }
.sop-feature-task-index { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 10px; color: #9cc8ff; background: rgba(64,137,236,.18); font-size: 9px; font-weight: 780; }
.sop-feature-task-list article strong { display: block; overflow: hidden; color: #f7faff; font-size: 15px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.sop-feature-task-list article small { display: block; margin-top: 4px; overflow: hidden; color: rgba(225,235,250,.66); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.sop-feature-task-list article > i { padding: 5px 8px; border-radius: 999px; color: #ffd9ac; background: rgba(226,151,56,.16); font-size: 10px; font-style: normal; }
.sop-feature-empty { align-self: center; padding: 25px; border: 1px dashed rgba(255,255,255,.16); border-radius: 17px; color: rgba(236,243,255,.62); font-size: 12px; line-height: 1.8; text-align: center; }

.theme-week-item { transition: .3s cubic-bezier(.16,1,.3,1); }
.theme-week-item:hover { transform: translateX(4px); border-color: #cfe0f7; }
.theme-week-item.active { border-color: #bcd5fa; background: #eaf2ff; }
.role-boundary-card, .message-card { border-color: #dbe6f6; background: #f2f7ff; }
.architecture-note { border-color: #d7e4f7; background: #edf4ff; }

@media (max-width: 1180px) {
  .sop-showcase { grid-template-columns: 95px minmax(0,1fr) 95px; }
  .sop-feature-card { grid-template-columns: minmax(220px,.8fr) minmax(310px,1.2fr); gap: 18px; padding: 22px; }
  .sop-peek { min-height: 300px; }
}

@media (max-width: 980px) {
  .sop-showcase { min-height: 0; display: block; padding: 18px; }
  .sop-peek { display: none; }
  .sop-feature-card { min-height: 0; grid-template-columns: 1fr; }
  .sop-feature-copy { min-height: 265px; }
}

@media (max-width: 820px) {
  .topbar { background: rgba(247,249,253,.9); }
  .sop-stage-tabs { margin-right: -17px; margin-left: -5px; padding-right: 17px; }
  .sop-showcase { border-radius: 30px; }
}

@media (max-width: 560px) {
  .page { padding-top: 28px; }
  .page-head { margin-bottom: 24px; }
  .page-title { font-size: 35px; line-height: 1.08; }
  .sop-stage-tabs { grid-auto-columns: minmax(140px,auto); }
  .sop-showcase { margin-right: -5px; margin-left: -5px; padding: 10px; border-radius: 26px; }
  .sop-feature-card { gap: 13px; padding: 13px; border-radius: 23px; }
  .sop-feature-copy { min-height: 250px; padding: 12px 8px 6px; }
  .sop-feature-number { margin-top: 21px; }
  .sop-feature-copy h2 { margin-top: 24px; font-size: 31px; }
  .sop-feature-tasks { padding: 17px; border-radius: 19px; }
  .sop-feature-task-list article { grid-template-columns: 28px minmax(0,1fr); }
  .sop-feature-task-list article > i { display: none; }
  .sop-feature-task-list article strong { white-space: normal; }
  .sop-overview-grid .panel:hover, .metric-card:hover, .student-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Information hierarchy after copy audit */
.today-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
.today-work-grid { grid-template-columns: minmax(0,1fr); }
.compact-note { align-items: center; padding: 16px 18px; }
.compact-note h3 { margin: 0; }
.sop-theme-panel .theme-week-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
.sop-stage-tabs button { min-height: 56px; }
.theme-week-item strong { font-size: 16px; }
.theme-week-item small { font-size: 12px; }
.theme-week-no { font-size: 13px; }

.personal-execution-panel { max-width: 820px; }
.personal-execution-list { display: grid; gap: 10px; }
.personal-execution-list article { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; }
.personal-execution-list strong, .personal-execution-list small { display: block; }
.personal-execution-list strong { font-size: 14px; }
.personal-execution-list small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.quality-grid-personal { grid-template-columns: minmax(0,560px); }

.cohort-overview-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.cohort-overview-card { min-height: 330px; display: flex; flex-direction: column; padding: 25px; border: 1px solid var(--line); border-radius: 26px; cursor: pointer; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-small); text-align: left; transition: .35s cubic-bezier(.16,1,.3,1); }
.cohort-overview-card:hover { transform: translateY(-5px); border-color: #cbdcf5; box-shadow: var(--shadow); }
.cohort-overview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cohort-overview-head > span { color: var(--brand); font-size: 14px; font-weight: 780; }
.cohort-overview-head > i { padding: 5px 8px; border-radius: 999px; color: var(--muted); background: var(--surface-muted); font-size: 11px; font-style: normal; }
.cohort-overview-card > strong { margin-top: 28px; font-size: 48px; line-height: 1; letter-spacing: -.06em; }
.cohort-overview-card > strong small { color: var(--muted); font-size: 13px; letter-spacing: 0; }
.cohort-overview-tasks { display: grid; gap: 9px; margin-top: 24px; }
.cohort-overview-tasks span { overflow: hidden; color: var(--ink-soft); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.cohort-overview-tasks span::before { content: ""; width: 6px; height: 6px; display: inline-block; margin-right: 8px; border-radius: 50%; background: var(--brand); vertical-align: 1px; }
.cohort-overview-foot { display: flex; align-items: center; gap: 5px; margin-top: auto; padding-top: 18px; color: var(--brand); font-size: 13px; font-weight: 720; }
.cohort-overview-foot svg { width: 17px; height: 17px; }

@media (max-width: 1180px) {
  .sop-theme-panel .theme-week-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cohort-overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 560px) {
  .today-metrics, .sop-theme-panel .theme-week-list { grid-template-columns: 1fr; }
  .cohort-overview-grid { grid-template-columns: 1fr; }
  .cohort-overview-card { min-height: 285px; }
  .personal-execution-list article { grid-template-columns: auto minmax(0,1fr); }
  .personal-execution-list .severity { grid-column: 2; justify-self: start; }
}

/* Action-first task groups */
.task-group-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 18px; }
.task-group-panel { overflow: hidden; }
.task-group-panel .panel-head { padding-bottom: 18px; }
.task-group-panel .panel-body { padding-top: 0; }
.task-group-heading { display: flex; align-items: center; gap: 13px; }
.task-group-heading .metric-icon { width: 40px; height: 40px; }
.task-group-panel .task-item { grid-template-columns: 84px 40px minmax(0,1fr) 24px; }
.task-group-panel .task-time { width: auto; }

/* Learner detail uses the center of the screen and keeps its own scroll area. */
.learner-modal, .team-detail-modal {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 100;
  width: min(1120px,calc(100vw - 48px));
  height: min(860px,calc(100dvh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translate(-50%,-46%) scale(.97);
  opacity: 0;
  pointer-events: none;
  border: 1px solid #dfe7f2;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 32px 110px rgba(11,31,58,.24);
  transition: transform .28s cubic-bezier(.16,1,.3,1),opacity .2s ease;
}
.learner-modal.open, .team-detail-modal.open { transform: translate(-50%,-50%) scale(1); opacity: 1; pointer-events: auto; }
.learner-modal-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px 30px 20px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.learner-modal-head > div { min-width: 0; }
.learner-modal-head h2 { margin: 3px 0 0; overflow: hidden; color: #081f38; font-size: 27px; letter-spacing: -.045em; text-overflow: ellipsis; white-space: nowrap; }
.learner-modal-body, .team-detail-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 25px 30px 34px; }
.learner-modal-actions { flex: 0 0 auto; display: flex; justify-content: flex-end; gap: 10px; padding: 16px 30px 20px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); }
.learner-profile-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 20px; background: #f8faff; }
.learner-profile-row .profile-strip { margin: 0; }
.learner-profile-stats { display: flex; align-items: center; gap: 22px; }
.learner-profile-stats > div { display: grid; gap: 2px; text-align: right; }
.learner-profile-stats small { color: var(--muted); font-size: 12px; }
.learner-profile-stats strong { color: #081f38; font-size: 23px; }
.learner-activity-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.learner-activity-card { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: start; gap: 12px; padding: 17px; border: 1px solid #dfe7f2; border-radius: 18px; cursor: pointer; color: var(--ink); background: #fff; text-align: left; transition: .28s cubic-bezier(.16,1,.3,1); }
.learner-activity-card:hover { transform: translateY(-3px); border-color: #bcd5fa; box-shadow: 0 14px 30px rgba(32,73,130,.10); }
.learner-activity-copy { min-width: 0; }
.learner-activity-copy > span { display: block; color: var(--muted); font-size: 12px; }
.learner-activity-copy > strong { display: block; margin-top: 7px; color: #0c2949; font-size: 15px; line-height: 1.45; }
.learner-activity-copy > p { margin: 5px 0 0; color: #6d7c8f; font-size: 12px; line-height: 1.55; }
.learner-activity-card .task-arrow { align-self: center; }
.learner-modal-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.learner-modal-columns .drawer-section { min-width: 0; }
.activity-history-list { max-width: 820px; display: grid; gap: 12px; margin: 0 auto; }
.activity-history-list article { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 15px; padding: 19px; border: 1px solid var(--line); border-radius: 19px; background: #fff; }
.activity-history-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: var(--brand); background: var(--brand-soft); }
.activity-history-icon svg { width: 20px; height: 20px; }
.activity-history-meta { color: var(--muted); font-size: 12px; }
.activity-history-list h3 { margin: 6px 0 0; color: #0b294a; font-size: 17px; }
.activity-history-list p { margin: 6px 0 0; color: #66778d; font-size: 13px; }
.cohort-tag { color: #0757c8; border-color: #c9dcfb; background: #eaf2ff; font-weight: 760; }

/* Click-through execution detail */
.team-row { cursor: pointer; transition: background .2s ease; }
.team-row:hover, .team-row:focus { outline: none; background: #f4f8ff; }
.team-row-arrow { float: right; color: #8ca0b9; }
.team-row-arrow svg { width: 17px; height: 17px; vertical-align: -4px; }
.team-detail-modal { width: min(1060px,calc(100vw - 48px)); }
.team-detail-body { display: grid; gap: 24px; }
.team-detail-section > h3 { margin: 0 0 12px; color: #0b294a; font-size: 18px; }
.daily-execution-list { display: grid; gap: 8px; }
.daily-execution-list article { display: grid; grid-template-columns: 110px minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; }
.daily-execution-list article > div { display: flex; align-items: baseline; gap: 7px; }
.daily-execution-list article > div span { color: var(--muted); font-size: 11px; }
.daily-execution-list p { margin: 0; color: #5f7086; font-size: 13px; }
.team-weekly-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.team-weekly-grid article { display: grid; gap: 7px; padding: 17px; border-radius: 16px; background: #f3f7fd; }
.team-weekly-grid span { color: var(--muted); font-size: 12px; }
.team-weekly-grid strong { color: #0b294a; font-size: 24px; }
.team-member-ai > .panel { border: 0; box-shadow: none; background: transparent; }
.team-member-ai > .panel:hover { transform: none; box-shadow: none; }

/* Inline AI is part of the work surface instead of a separate destination. */
.inline-ai-stack { display: grid; gap: 18px; margin-top: 18px; }
.personal-ai-stack { max-width: 960px; }
.inline-ai-panel { overflow: hidden; border-color: #d7e4f7; background: radial-gradient(circle at 100% 0,#edf4ff,transparent 34%),#fff; }
.inline-ai-head { align-items: center; }
.inline-ai-head .panel-sub { margin-top: 5px; }
.inline-ai-body { padding-top: 0; }
.inline-ai-loading { min-height: 120px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #47617f; }
.inline-ai-loading .ai-loader { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; color: #fff; }
.inline-ai-loading svg { width: 19px; height: 19px; }
.inline-ai-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px; border-radius: 14px; color: #8a3c38; background: var(--red-soft); }
.inline-ai-empty { padding: 26px; border: 1px dashed #ccdaed; border-radius: 16px; color: var(--muted); text-align: center; }
.inline-ai-modules { display: grid; grid-template-columns: minmax(230px,.72fr) minmax(0,1.28fr); gap: 12px; }
.inline-ai-summary, .inline-ai-module { min-width: 0; padding: 18px; border: 1px solid #dfe8f5; border-radius: 17px; background: rgba(255,255,255,.86); }
.inline-ai-summary { grid-row: span 2; color: #fff; border: 0; background: linear-gradient(145deg,#0b294a,#0b5fcf); }
.inline-ai-summary > span { color: #9bc6ff; font-size: 11px; font-weight: 780; letter-spacing: .08em; }
.inline-ai-summary h3 { margin: 14px 0 0; font-size: 24px; line-height: 1.25; letter-spacing: -.04em; }
.inline-ai-summary p { margin: 10px 0 0; color: rgba(240,246,255,.76); font-size: 13px; line-height: 1.65; }
.inline-ai-module h3 { margin: 0 0 11px; color: #0b294a; font-size: 14px; }
.inline-ai-module ul { display: grid; gap: 8px; margin: 0; padding-left: 17px; color: #5c6e84; font-size: 13px; line-height: 1.55; }
.inline-action-grid { display: grid; gap: 8px; }
.inline-action-grid article { display: grid; grid-template-columns: 25px minmax(0,1fr) auto; align-items: start; gap: 10px; }
.inline-action-grid article > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; color: #0757c8; background: #eaf2ff; font-size: 11px; font-weight: 800; }
.inline-action-grid strong { color: #0b294a; font-size: 13px; }
.inline-action-grid p { margin: 3px 0 0; color: #687a8e; font-size: 12px; line-height: 1.5; }
.inline-action-grid i { padding: 4px 7px; border-radius: 999px; color: #596b80; background: #edf1f6; font-size: 10px; font-style: normal; white-space: nowrap; }

@media (max-width: 980px) {
  .task-group-grid { grid-template-columns: 1fr; }
  .learner-activity-grid, .inline-ai-modules { grid-template-columns: 1fr; }
  .inline-ai-summary { grid-row: auto; }
  .learner-modal-columns { grid-template-columns: 1fr; gap: 0; }
  .team-weekly-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 640px) {
  .learner-modal, .team-detail-modal { width: calc(100vw - 20px); height: calc(100dvh - 20px); border-radius: 23px; }
  .learner-modal-head { padding: 18px; }
  .learner-modal-head h2 { font-size: 23px; }
  .learner-modal-body, .team-detail-body { padding: 18px; }
  .learner-modal-actions { padding: 13px 18px 16px; }
  .learner-profile-row { align-items: flex-start; }
  .learner-profile-stats { align-items: flex-end; flex-direction: column; gap: 8px; }
  .daily-execution-list article { grid-template-columns: 1fr auto; }
  .daily-execution-list p { grid-column: 1 / -1; grid-row: 2; }
  .team-weekly-grid { grid-template-columns: 1fr 1fr; }
  .task-group-panel .task-item { grid-template-columns: 72px 36px minmax(0,1fr) 20px; }
}

/* Unified centered work dialogs */
.utility-modal {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 100;
  width: min(820px,calc(100vw - 48px));
  height: min(820px,calc(100dvh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translate(-50%,-46%) scale(.97);
  opacity: 0;
  pointer-events: none;
  border: 1px solid #dfe7f2;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 32px 110px rgba(11,31,58,.24);
  transition: transform .28s cubic-bezier(.16,1,.3,1),opacity .2s ease;
}
.utility-modal-wide { width: min(980px,calc(100vw - 48px)); }
.utility-modal.open { transform: translate(-50%,-50%) scale(1); opacity: 1; pointer-events: auto; }
.utility-modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 25px 30px 34px; }
.modal-session { width: min(920px,calc(100vw - 48px)); height: min(760px,calc(100dvh - 48px)); display: flex; flex-direction: column; overflow: hidden; }
.modal-session > form { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.modal-session .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-bottom: 28px; }
.modal-session .modal-actions { flex: 0 0 auto; }
.modal-inline-ai { margin-top: 26px; }
.drawer-section.modal-inline-ai { margin-top: 26px; }

/* Calm, readable AI analysis */
.learner-overview-panel { margin-bottom: 22px; padding: 31px 33px 34px; border: 1px solid #dfe7f2; border-radius: 25px; background: #fff; box-shadow: 0 10px 34px rgba(30,62,101,.055); }
.learner-overview-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.learner-overview-head span { color: #3974c5; font-size: 14px; font-weight: 800; letter-spacing: .1em; }
.learner-overview-head h2 { margin: 6px 0 0; color: #102b49; font-size: 29px; line-height: 1.3; letter-spacing: -.03em; }
.learner-overview-head > strong { color: #102b49; font-size: 39px; line-height: 1; }
.learner-overview-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-top: 25px; }
.learner-overview-metrics article { min-width: 0; min-height: 112px; padding: 20px 21px; border: 1px solid #e3eaf3; border-radius: 18px; background: #f8faff; }
.learner-overview-metrics span { display: block; color: #61748b; font-size: 15px; font-weight: 650; line-height: 1.4; }
.learner-overview-metrics strong { display: inline-block; margin-top: 12px; color: #122e4d; font-size: 35px; line-height: 1; }
.learner-overview-metrics small { margin-left: 7px; color: #718298; font-size: 13px; }
.learner-overview-focus { display: flex; align-items: baseline; gap: 16px; margin-top: 16px; padding: 16px 19px; border-radius: 15px; background: #f1f6fd; }
.learner-overview-focus span { flex: 0 0 auto; color: #3974c5; font-size: 13px; font-weight: 800; }
.learner-overview-focus strong { color: #294863; font-size: 16.5px; line-height: 1.65; }
.learner-cohort-section { margin-top: 29px; padding-top: 26px; border-top: 1px solid #e7edf5; }
.learner-cohort-section > h3 { margin: 0 0 17px; color: #183552; font-size: 19px; }
.learner-cohort-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.learner-cohort-card { min-width: 0; padding: 22px; border: 1px solid #e1e8f1; border-radius: 19px; background: #fff; }
.learner-cohort-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.learner-cohort-card > div:first-child strong { color: #102b49; font-size: 21px; }
.learner-cohort-card > div:first-child span { color: #6f8094; font-size: 15px; }
.learner-cohort-card > p { min-height: 56px; margin: 14px 0 17px; color: #4f657d; font-size: 15.5px; line-height: 1.75; }
.learner-cohort-card dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 0; }
.learner-cohort-card dl > div { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 46px; padding: 10px 12px; border-radius: 11px; background: #f6f8fb; }
.learner-cohort-card dt { color: #718195; font-size: 13px; }
.learner-cohort-card dd { margin: 0; color: #29445f; font-size: 17px; font-weight: 800; }
.learner-cohort-card dd.high { color: #b64b46; }
.learner-cohort-card dd.medium { color: #a06b22; }
.learner-overview-ai { margin-bottom: 22px; }
.inline-ai-panel { border-color: #dce6f2; background: #fff; box-shadow: 0 10px 34px rgba(30,62,101,.065); }
.inline-ai-panel:hover { transform: none; border-color: #d4e0ef; box-shadow: 0 12px 38px rgba(30,62,101,.08); }
.inline-ai-head { padding: 25px 28px 21px; border-bottom: 1px solid #e7edf5; }
.inline-ai-head .ai-kicker { color: #3974c5; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.inline-ai-head .panel-title { margin-top: 5px; color: #102b49; font-size: 21px; line-height: 1.35; letter-spacing: -.025em; }
.inline-ai-head .panel-sub { margin-top: 7px; color: #7b899b; font-size: 12px; line-height: 1.5; }
.inline-ai-body { padding: 22px 28px 28px; }
.inline-ai-modules { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.inline-ai-summary { grid-column: 1 / -1; grid-row: auto; padding: 22px 24px; color: #102b49; border: 1px solid #d8e5f5; background: #f3f7fc; }
.inline-ai-summary > span { color: #3974c5; font-size: 11px; }
.inline-ai-summary h3 { margin-top: 10px; color: #0b294a; font-size: clamp(22px,2vw,28px); line-height: 1.35; letter-spacing: -.035em; }
.inline-ai-summary p { max-width: 960px; margin-top: 9px; color: #5b6f86; font-size: 14.5px; line-height: 1.75; }
.inline-ai-module { padding: 20px 22px; border-color: #e1e8f1; background: #fff; }
.inline-ai-module h3 { margin-bottom: 14px; color: #183552; font-size: 15px; letter-spacing: -.01em; }
.inline-ai-actions { grid-column: 1 / -1; }
.inline-action-grid { gap: 0; }
.inline-action-grid article { grid-template-columns: 30px minmax(0,1fr) auto; gap: 13px; padding: 14px 0; border-bottom: 1px solid #e8edf4; }
.inline-action-grid article:first-child { padding-top: 2px; }
.inline-action-grid article:last-child { padding-bottom: 0; border-bottom: 0; }
.inline-action-grid article > span { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }
.inline-action-grid strong { color: #142f4d; font-size: 14.5px; line-height: 1.55; }
.inline-action-grid p { margin-top: 5px; color: #65768a; font-size: 13.5px; line-height: 1.7; }
.inline-action-grid i { margin-top: 2px; padding: 5px 9px; color: #52667d; background: #f0f4f8; font-size: 11px; }
.inline-ai-module ul { gap: 10px; padding-left: 19px; color: #596d84; font-size: 14px; line-height: 1.7; }
.inline-ai-empty { padding: 34px; color: #708096; font-size: 14px; }
.inline-ai-loading { min-height: 150px; font-size: 14px; }
.modal-inline-ai .inline-ai-panel { box-shadow: none; }
.modal-inline-ai .inline-ai-head { padding: 20px 21px 17px; }
.modal-inline-ai .inline-ai-head .panel-title { font-size: 19px; }
.modal-inline-ai .inline-ai-body { padding: 18px 21px 21px; }
.modal-inline-ai .inline-ai-modules { grid-template-columns: 1fr; }
.modal-inline-ai .inline-ai-summary, .modal-inline-ai .inline-ai-actions { grid-column: auto; }
.modal-inline-ai .inline-ai-summary h3 { font-size: 21px; }

@media (max-width: 760px) {
  .week-toolbar, .schedule-tools { align-items: stretch; flex-direction: column; }
  .schedule-tools { gap: 12px; }
  .week-jump { justify-content: space-between; }
  .week-jump select { flex: 1; }
  .learner-overview-panel { padding: 20px 19px; border-radius: 21px; }
  .learner-overview-head h2 { font-size: 25px; }
  .learner-overview-head > strong { font-size: 32px; }
  .learner-overview-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .learner-cohort-grid { grid-template-columns: 1fr; }
  .utility-modal, .utility-modal-wide, .modal-session { width: calc(100vw - 20px); height: calc(100dvh - 20px); border-radius: 23px; }
  .utility-modal-body { padding: 18px; }
  .inline-ai-head { align-items: flex-start; padding: 20px 19px 17px; }
  .inline-ai-head .btn { flex: 0 0 auto; }
  .inline-ai-body { padding: 17px 19px 20px; }
  .inline-ai-modules { grid-template-columns: 1fr; }
  .inline-ai-summary, .inline-ai-actions { grid-column: auto; }
  .inline-ai-summary { padding: 19px; }
  .inline-ai-summary h3 { font-size: 21px; }
  .inline-ai-summary p { font-size: 14px; }
  .inline-action-grid article { grid-template-columns: 28px minmax(0,1fr); }
  .inline-action-grid i { grid-column: 2; justify-self: start; }
}

/* Reference palette alignment: warm paper, forest green, gold and coral */
:root {
  --canvas: #f6f1e7;
  --canvas-deep: #eee8dc;
  --surface: #fffefa;
  --surface-soft: #fbf8f1;
  --surface-muted: #f3ecdf;
  --ink: #27322f;
  --ink-soft: #4f5a55;
  --muted: #6e7773;
  --line: #dcd2c3;
  --line-strong: #cfc2af;
  --sidebar: #eee8dc;
  --sidebar-soft: #fffefa;
  --sidebar-ink: #27322f;
  --brand: #254b3c;
  --brand-strong: #173d30;
  --brand-soft: #e7eee9;
  --sky: #315f4c;
  --sky-soft: #e7eee9;
  --amber: #86640f;
  --amber-soft: #f8efcf;
  --red: #b85e4b;
  --red-soft: #f7e7e1;
  --violet: #9d5e52;
  --violet-soft: #f7e7e1;
  --shadow: 0 18px 48px rgba(37, 53, 45, .10);
  --shadow-small: 0 8px 24px rgba(37, 53, 45, .07);
}

body {
  background:
    radial-gradient(circle at 58% -14%, rgba(230, 189, 85, .12), transparent 34%),
    radial-gradient(circle at 92% 38%, rgba(217, 120, 98, .07), transparent 28%),
    var(--canvas);
}

.sidebar {
  color: var(--sidebar-ink);
  border-right: 1px solid #d8d0c3;
  background: var(--sidebar);
  box-shadow: none;
}
.brand-mark {
  color: var(--brand-strong);
  background: var(--gold, #e6bd55);
  box-shadow: 0 7px 18px rgba(134, 100, 15, .16);
}
.brand-name { color: var(--ink); }
.brand-sub,
.nav-label,
.sync-note p,
.help-link { color: var(--muted); }

.workspace-switch {
  border: 1px solid var(--line);
  background: #e8e1d5;
}
.workspace-switch::before {
  background: var(--brand);
  box-shadow: 0 5px 14px rgba(37, 75, 60, .18);
}
.workspace-switch button { color: var(--muted); }
.workspace-switch button:hover { color: var(--brand-strong); }
.workspace-switch button.active { color: #fff; }

.nav-item { color: #56615c; }
.nav-item:hover { color: var(--brand); background: rgba(255, 254, 250, .7); }
.nav-item.active {
  color: var(--brand);
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(37, 75, 60, .06), inset 3px 0 0 var(--brand);
}
.nav-count { color: var(--muted); background: rgba(37, 75, 60, .07); }
.nav-item.active .nav-count { color: var(--brand); background: var(--brand-soft); }
.sync-note { border: 1px solid var(--line); background: rgba(255, 254, 250, .58); }
.sync-line { color: var(--ink-soft); }
.sync-line .pulse { background: var(--gold, #e6bd55); box-shadow: 0 0 0 5px rgba(230, 189, 85, .14); }

.topbar {
  background: rgba(255, 254, 250, .92);
  border-bottom-color: var(--line);
  box-shadow: none;
}
.cohort-select:focus,
.role-select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #769284;
  box-shadow: 0 0 0 4px rgba(37, 75, 60, .10);
}
.stage-pill { color: var(--brand); background: var(--brand-soft); }
.avatar { background: var(--brand); box-shadow: 0 7px 18px rgba(37, 75, 60, .18); }

.page-title { color: var(--ink); }
.page-eyebrow { color: var(--red); }
.page-desc { color: var(--muted); }
.btn-primary { border-color: var(--brand); background: var(--brand); box-shadow: 0 8px 20px rgba(37, 75, 60, .16); }
.btn-primary:hover { border-color: var(--brand-strong); background: var(--brand-strong); }
.btn-soft { color: var(--brand); background: var(--brand-soft); }

.panel,
.metric-card,
.student-card,
.quality-card,
.learner-overview-panel,
.learner-cohort-card,
.inline-ai-panel {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 4px 18px rgba(37, 53, 45, .035);
}
.panel:hover,
.metric-card:hover,
.student-card:hover,
.quality-card:hover,
.inline-ai-panel:hover {
  border-color: var(--line-strong);
  box-shadow: 0 14px 34px rgba(37, 53, 45, .08);
}
.metric-card::after { opacity: .62; }
.segmented { background: rgba(251, 248, 241, .78); }
.segmented button.active { color: var(--brand); background: var(--surface); }
.student-avatar,
.tiny-avatar,
.leader-dot { color: var(--brand); background: var(--brand-soft); }
.progress-track span,
.claim-button { background: var(--brand); }
.claim-button:hover { background: var(--brand-strong); }
.cohort-tag { color: var(--brand); border-color: #cbdcd2; background: var(--brand-soft); }
.team-row:hover,
.team-row:focus { background: var(--surface-soft); }
.team-weekly-grid article,
.fact,
.quality-meta div { background: var(--surface-soft); }
.day-column { background: rgba(255, 254, 250, .58); }
.day-column.is-today { border-color: #9eb4a8; box-shadow: inset 0 0 0 1px rgba(37, 75, 60, .08); }
.schedule-card.open { border-color: #9eb4a8; background: #fbfdfb; }
.architecture-note,
.role-boundary-card,
.message-card { border-color: #cfded5; background: #f1f6f3; }

.learner-modal,
.team-detail-modal,
.utility-modal,
.modal {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 32px 100px rgba(39, 50, 47, .20);
}
.learner-modal-head,
.learner-modal-actions,
.ai-drawer .drawer-head,
.drawer-head,
.drawer-actions,
.modal-head,
.modal-actions { background: rgba(255, 254, 250, .96); }
.learner-modal-head h2,
.learner-profile-stats strong,
.learner-activity-copy > strong,
.activity-history-list h3,
.team-detail-section > h3,
.team-weekly-grid strong { color: var(--ink); }
.learner-profile-row { border-color: var(--line); background: var(--surface-soft); }
.learner-activity-card,
.activity-history-list article { border-color: var(--line); background: var(--surface); }
.learner-activity-card:hover { border-color: #aebfb5; box-shadow: 0 14px 30px rgba(37, 75, 60, .09); }

.learner-overview-head span,
.learner-overview-focus span,
.inline-ai-head .ai-kicker,
.inline-ai-summary > span { color: var(--red); }
.learner-overview-head h2,
.learner-overview-head > strong,
.learner-overview-metrics strong,
.learner-cohort-card > div:first-child strong,
.learner-cohort-card dd,
.inline-ai-head .panel-title,
.inline-ai-summary h3,
.inline-ai-module h3,
.inline-action-grid strong { color: var(--ink); }
.learner-overview-metrics span,
.learner-overview-metrics small,
.learner-cohort-card > div:first-child span,
.learner-cohort-card dt,
.panel-sub,
.inline-ai-head .panel-sub { color: var(--muted); }
.learner-overview-metrics article,
.learner-cohort-card dl > div { border-color: var(--line-soft, #ebe4d8); background: var(--surface-soft); }
.learner-overview-focus { background: var(--brand-soft); }
.learner-overview-focus strong { color: var(--brand-strong); }
.learner-cohort-section { border-top-color: var(--line); }
.learner-cohort-card > p,
.inline-ai-summary p,
.inline-action-grid p,
.inline-ai-module ul { color: var(--muted); }

.ai-button { color: var(--brand); border-color: #cbdcd2; background: #edf5f0; }
.ai-button:hover { color: #fff; border-color: var(--brand); background: var(--brand); }
.ai-button-strong,
.ai-orb,
.ai-loader { border-color: var(--brand-strong); background: var(--brand); }
.ai-hero { border-color: #cfded5; background: radial-gradient(circle at 0 0, var(--brand-soft), transparent 43%), var(--surface); }
.ai-result-hero { border-color: #cfded5; background: #f1f6f3; }
.inline-ai-panel { border-color: var(--line); }
.inline-ai-head { border-bottom-color: var(--line); }
.inline-ai-summary { color: var(--ink); border-color: #cfded5; background: var(--brand-soft); }
.inline-ai-module { border-color: var(--line); background: var(--surface); }
.inline-action-grid article { border-bottom-color: var(--line-soft, #ebe4d8); }
.inline-action-grid article > span { color: var(--brand); background: var(--brand-soft); }
.inline-action-grid i { color: var(--ink-soft); background: var(--surface-muted); }
.inline-ai-empty { color: var(--muted); border-color: var(--line-strong); }

.sop-stage-tabs button { color: var(--muted); }
.sop-stage-tabs button > span { color: #8d9490; }
.sop-stage-tabs button > i { color: var(--brand); background: var(--brand-soft); }
.sop-stage-tabs button:hover { color: var(--brand); background: rgba(255, 254, 250, .72); }
.sop-stage-tabs button.active { color: var(--brand); border-color: var(--line); background: var(--surface); box-shadow: 0 8px 22px rgba(37, 75, 60, .08); }
.sop-showcase,
.sop-showcase-recruitment,
.sop-showcase-prelaunch,
.sop-showcase-learning,
.sop-showcase-practice,
.sop-showcase-assessment,
.sop-showcase-buffer,
.sop-showcase-closeout {
  --scene-a: #b8c9bf;
  --scene-b: #e6d59f;
  --scene-c: #e8b5aa;
}
.sop-showcase {
  border-color: rgba(255, 254, 250, .82);
  background:
    radial-gradient(circle at 20% 90%, rgba(248, 239, 207, .92), transparent 29%),
    linear-gradient(120deg, var(--scene-a), var(--scene-b) 55%, var(--scene-c));
  box-shadow: 0 24px 64px rgba(37, 53, 45, .15), inset 0 1px 0 rgba(255, 254, 250, .82);
}
.sop-peek {
  background: linear-gradient(180deg, rgba(23, 61, 48, .02), rgba(23, 61, 48, .92)), linear-gradient(140deg, #6f8f7f, #d6b963);
  box-shadow: 0 20px 44px rgba(37, 53, 45, .17);
}
.sop-feature-card { background: rgba(255, 254, 250, .97); box-shadow: 0 28px 68px rgba(37, 53, 45, .16); }
.sop-feature-kicker span,
.sop-feature-meta svg { color: var(--red); }
.sop-feature-kicker i { color: var(--muted); background: var(--surface-muted); }
.sop-feature-number strong,
.sop-feature-copy h2 { color: var(--ink); }
.sop-feature-number span,
.sop-feature-copy > p,
.sop-feature-meta { color: var(--muted); }
.sop-feature-tasks {
  color: #fffefa;
  background:
    radial-gradient(circle at 98% 0, rgba(230, 189, 85, .18), transparent 34%),
    radial-gradient(circle at 0 100%, rgba(217, 120, 98, .13), transparent 40%),
    linear-gradient(145deg, #254b3c, #173d30);
}
.sop-feature-task-head .sop-live-dot { color: #f8efcf; border-color: rgba(230, 189, 85, .28); background: rgba(230, 189, 85, .10); }
.sop-feature-task-index { color: #f8efcf; background: rgba(230, 189, 85, .13); }
.theme-week-item:hover { border-color: #b9cbbf; }
.theme-week-item.active { border-color: #aebfb5; background: var(--brand-soft); }

/* Readability and accessibility pass */
body { font-size: 16px; line-height: 1.55; }
.mobile-menu-close { display: none; }
.student-card { width: 100%; appearance: none; color: inherit; text-align: left; font: inherit; }
.panel-sub,
.metric-foot,
.task-meta,
.student-owner,
.progress-copy,
.session-meta,
.week-title span,
.legend,
.schedule-card-time,
.leader,
.enrollment,
.quality-note,
.daily-execution-list p,
.team-weekly-grid span,
.detail-item span,
.field label { font-size: 14px; }
.metric-top,
.fact span,
.tag,
.severity,
.connector-status,
.day-name,
.today-label { font-size: 13px; }
.fact strong,
.team-table td,
.connector-table td,
.detail-item strong { font-size: 15px; }
.team-table th,
.connector-table th { font-size: 13px; }
.metric-value { font-size: clamp(34px, 3vw, 46px); }
.panel-title { font-size: 21px; }
.learner-overview-metrics strong,
.learner-cohort-card dd { font-size: 22px; }
.learner-overview-focus span { font-size: 14px; }
.learner-overview-focus strong { font-size: 17px; }
.inline-ai-head .ai-kicker,
.inline-ai-summary > span { font-size: 13px; }
.inline-ai-head .panel-title { font-size: 22px; }
.inline-ai-head .panel-sub { font-size: 14px; }
.inline-ai-summary h3 { font-size: clamp(23px, 2vw, 29px); }
.inline-ai-summary p { font-size: 16px; line-height: 1.75; }
.inline-ai-module h3 { font-size: 17px; }
.inline-action-grid strong { font-size: 16px; line-height: 1.55; }
.inline-action-grid p { font-size: 14px; line-height: 1.7; }
.inline-action-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 9px; }
.inline-action-meta small { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.inline-action-meta svg { width: 15px; height: 15px; color: var(--brand); }
.sop-stage-tabs button { font-size: 16px; }
.sop-stage-tabs button > span { font-size: 13px; }
.sop-stage-tabs button > i,
.sop-feature-kicker i { font-size: 12px; }
.sop-feature-kicker span { font-size: 14px; }
.sop-feature-task-head span { font-size: 13px; }
.sop-feature-task-head .sop-live-dot,
.sop-feature-task-index,
.sop-feature-task-list article > i { font-size: 12px; }
.sop-feature-task-list article strong { font-size: 17px; }
.sop-feature-task-list article small { font-size: 14px; }
.modal-guidance { margin: 4px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid rgba(37, 75, 60, .38);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  .mobile-menu-close {
    position: absolute;
    top: 16px;
    right: 14px;
    z-index: 2;
    display: grid;
    color: var(--ink-soft);
    background: var(--surface);
  }
  .brand-lockup { padding-right: 48px; }
  .page { padding-top: 28px; }
}

@media (max-width: 560px) {
  .page-title { font-size: 30px; }
  .panel-title { font-size: 19px; }
  .metric-value { font-size: 36px; }
  .inline-ai-head .panel-title { font-size: 20px; }
  .inline-ai-summary h3 { font-size: 22px; }
  .sop-feature-task-list article strong { white-space: normal; }
  .sop-feature-task-list article small { white-space: normal; }
}
