/* Mintrix-inspired design tokens */
:root {
  --bg: #FAFAF7;
  --bg-elev: #FFFFFF;
  --bg-sunken: #F4F4F0;
  --ink: #0E0E0C;
  --ink-2: #2A2A26;
  --ink-3: #6E6E68;
  --ink-4: #A6A69E;
  --line: #E8E8E2;
  --line-2: #D8D8D2;
  --green: #16A34A;
  --green-bg: #DCFCE7;
  --green-ink: #14532D;
  --amber: #B45309;
  --amber-bg: #FEF3C7;
  --red: #DC2626;
  --red-bg: #FEE2E2;
  --indigo: #4338CA;
  --black: #0E0E0C;
  --shadow-sm: 0 1px 2px rgba(14,14,12,.04), 0 1px 1px rgba(14,14,12,.03);
  --shadow-md: 0 1px 2px rgba(14,14,12,.04), 0 4px 16px rgba(14,14,12,.06);
  --shadow-lg: 0 1px 2px rgba(14,14,12,.04), 0 12px 32px rgba(14,14,12,.10);
  --r: 10px;
  --r-sm: 6px;
  --r-lg: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
.serif { font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif; }

/* ----- Login picker ----- */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 1fr) minmax(560px, 1.05fr);
  background: var(--bg);
}
.login-left {
  position: relative;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #0E0E0C;
  color: #FAFAF7;
  overflow: hidden;
  isolation: isolate;
}
.login-left::before {
  /* large soft radial */
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 700px 500px at 18% 22%, rgba(34,197,94,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 600px 400px at 90% 92%, rgba(250,250,247,0.05) 0%, transparent 60%);
}
.login-left::after {
  /* fine grid */
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(250,250,247,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250,250,247,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 30% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 50%, black 30%, transparent 80%);
}

.login-left .brand-mark {
  color: #FAFAF7;
}
.login-left .brand-mark .dot {
  background: #FAFAF7; color: #0E0E0C;
}
.login-left .h-eyebrow {
  color: #6B6B66;
}
.login-left .h-display {
  color: #FAFAF7;
}
.login-left .h-display .accent {
  background: linear-gradient(180deg, #4ADE80 0%, #22C55E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
  font-family: 'Source Serif 4', serif;
  font-weight: 500;
}
.login-left .lede {
  color: #C9C8C0;
}
.login-left .footer-meta {
  color: #6B6B66;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 12px;
}
.login-left .footer-meta .live {
  display: inline-flex; align-items: center; gap: 6px;
}
.login-left .footer-meta .live .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #22C55E;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.18);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

.signal-stream {
  margin-top: 36px;
  display: flex; flex-direction: column; gap: 10px;
  border-top: 1px solid rgba(250,250,247,0.08);
  padding-top: 20px;
}
.signal-stream .sl-label {
  font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: #6B6B66; margin-bottom: 4px;
  font-family: 'JetBrains Mono', monospace;
}
.signal-stream .sl-row {
  display: grid; grid-template-columns: 64px 1fr auto;
  gap: 16px; align-items: center;
  padding: 9px 0;
  font-size: 12.5px;
  border-bottom: 1px dashed rgba(250,250,247,0.06);
}
.signal-stream .sl-row:last-child { border-bottom: none; }
.signal-stream .sl-time { color: #6B6B66; font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.signal-stream .sl-text { color: #C9C8C0; }
.signal-stream .sl-text b { color: #FAFAF7; font-weight: 500; }
.signal-stream .sl-tag {
  font-size: 9.5px; padding: 3px 8px; border-radius: 999px;
  letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 500;
}
.signal-stream .sl-tag.green { background: rgba(34,197,94,0.16); color: #4ADE80; }
.signal-stream .sl-tag.amber { background: rgba(245,158,11,0.16); color: #FBBF24; }
.signal-stream .sl-tag.gray { background: rgba(250,250,247,0.08); color: #C9C8C0; }

.login-right {
  padding: 56px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  background: linear-gradient(180deg, #FAFAF7 0%, #F4F4EE 100%);
  position: relative;
}
.login-right::before {
  content: '';
  position: absolute; top: 0; right: 0; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(34,197,94,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.brand-mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 16px; letter-spacing: -0.01em;
}
.brand-mark .dot {
  width: 30px; height: 30px; border-radius: 8px; background: var(--ink);
  display: grid; place-items: center; color: white; font-weight: 700;
  font-size: 16px; letter-spacing: -0.04em;
  font-family: 'Inter', sans-serif;
}
.h-eyebrow {
  font-size: 11px; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3);
}
.h-display {
  font-size: 56px;
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
}
.h-display .accent { color: var(--green); }
.lede {
  font-size: 15.5px;
  color: var(--ink-3);
  max-width: 46ch;
  line-height: 1.6;
}

.persona-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  min-width: 0;
}
.persona-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 22px 20px;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  position: relative;
  font-family: inherit;
  color: inherit;
  min-height: 220px;
  min-width: 0;
}
.persona-card:hover {
  border-color: var(--ink-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(14, 14, 12, 0.06), 0 1px 2px rgba(14, 14, 12, 0.04);
}
.persona-card .head {
  display: flex; align-items: center; justify-content: space-between;
}
.persona-card .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: white;
  display: grid; place-items: center; font-weight: 600; font-size: 14px;
  letter-spacing: 0.02em;
  font-family: 'Inter', sans-serif;
}
.persona-card .role-pill {
  font-size: 10px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: transparent;
  padding: 0;
  border-radius: 0;
  text-align: right;
  line-height: 1.4;
  max-width: 130px;
}
.persona-card .name-block {
  display: flex; flex-direction: column; gap: 4px;
}
.persona-card h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.022em;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}
.persona-card .org {
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.005em;
}
.persona-card .sub {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  max-width: 32ch;
}
.persona-card .stat-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-3);
  margin-right: 44px;
}
.persona-card .stat-row > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 14px;
  border-left: 1px solid var(--line);
  line-height: 1.3;
}
.persona-card .stat-row > div:first-child {
  padding-left: 0;
  border-left: none;
}
.persona-card .stat-row b {
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  font-feature-settings: 'tnum' 1;
}
.persona-card .stat-row span {
  color: var(--ink-3);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.persona-card .arrow {
  position: absolute; right: 22px; bottom: 22px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: white;
  display: grid; place-items: center;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .18s ease, transform .18s ease;
}
.persona-card:hover .arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ----- App shell ----- */
.app {
  display: grid;
  grid-template-columns: 64px 1fr;
  height: 100vh;
  overflow: hidden;
}
.sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 4px;
}
.sidebar .logo {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--ink); color: white;
  display: grid; place-items: center; font-weight: 800; font-size: 16px;
  margin-bottom: 14px;
}
.sidebar .nav-btn {
  width: 40px; height: 40px; border-radius: 9px;
  display: grid; place-items: center;
  color: var(--ink-3); cursor: pointer;
  background: transparent; border: 0;
  transition: all .12s;
}
.sidebar .nav-btn:hover { background: var(--bg-sunken); color: var(--ink); }
.sidebar .nav-btn.active { background: var(--bg-sunken); color: var(--ink); }
.sidebar .spacer { flex: 1; }
.sidebar .me {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: white;
  display: grid; place-items: center; font-weight: 600; font-size: 12px;
}

.main {
  overflow-y: auto;
  background: var(--bg);
}
.topbar {
  position: sticky; top: 0; z-index: 5;
  background: rgba(250,250,247,0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 14px 32px;
  display: flex; align-items: center; gap: 16px;
}
.topbar .crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.topbar .crumbs .org-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 6px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg-elev); color: var(--ink); font-weight: 500;
}
.topbar .crumbs .org-chip .ico {
  width: 18px; height: 18px; border-radius: 4px;
  background: var(--ink); color: white; display: grid; place-items: center;
  font-size: 9px; font-weight: 700;
}
.topbar .spacer { flex: 1; }
.topbar .icon-btn {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 0; color: var(--ink-2);
}
.topbar .icon-btn:hover { background: var(--bg-sunken); }
.topbar .pill-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg-elev); cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--ink);
  font-family: inherit;
}
.topbar .pill-btn:hover { border-color: var(--ink-3); }

.page { padding: 28px 32px 56px; max-width: 1280px; }
.page-narrow { max-width: 1080px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--green-bg); color: var(--green-ink);
}
.status-pill .led {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(22,163,74,.18);
}
.status-pill.amber { background: var(--amber-bg); color: var(--amber); }
.status-pill.amber .led { background: var(--amber); box-shadow: 0 0 0 3px rgba(180,83,9,.18); }
.status-pill.red { background: var(--red-bg); color: var(--red); }
.status-pill.red .led { background: var(--red); box-shadow: 0 0 0 3px rgba(220,38,38,.18); }
.status-pill.gray { background: var(--bg-sunken); color: var(--ink-3); }
.status-pill.gray .led { background: var(--ink-4); box-shadow: 0 0 0 3px rgba(166,166,158,.25); }

.tag {
  display: inline-flex; padding: 3px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 500; background: var(--bg-sunken); color: var(--ink-2);
}
.tag.green { background: var(--green-bg); color: var(--green-ink); }
.tag.dark { background: var(--ink); color: white; }
.tag.outline { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }

.kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 18px 0 28px;
}
.kpi {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 18px;
}
.kpi .label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3);
}
.kpi .row { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.kpi .v { font-size: 30px; font-weight: 600; letter-spacing: -0.025em; }
.kpi .delta {
  font-size: 11px; padding: 3px 7px; border-radius: 6px;
  background: var(--green-bg); color: var(--green-ink); font-weight: 600;
}
.kpi .delta.neg { background: var(--red-bg); color: var(--red); }
.kpi .delta.flat { background: var(--bg-sunken); color: var(--ink-3); }
.kpi .sub { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

.greet h1 { font-size: 30px; font-weight: 600; letter-spacing: -0.025em; margin: 12px 0 6px; }
.greet p { color: var(--ink-3); margin: 0; max-width: 64ch; line-height: 1.55; font-size: 14px; }

/* The hero card on right of greeting */
.narrative-card-dark {
  background: var(--ink); color: #F4F4F0;
  border-radius: var(--r);
  padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-width: 360px;
}
.narrative-card-dark .meta {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: #A6A69E; font-weight: 600;
}
.narrative-card-dark .title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 19px; line-height: 1.3; margin: 6px 0 4px;
  font-weight: 500;
}
.narrative-card-dark .who { font-size: 12px; color: #A6A69E; }
.narrative-card-dark .icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: white; color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
  border: 0; flex: none;
}

/* school cards */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 8px 0 14px;
}
.section-head .lbl {
  font-size: 10px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
}
.section-head .links { display: flex; gap: 18px; font-size: 13px; }
.section-head .links a { color: var(--ink); font-weight: 500; text-decoration: none; }

.school-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.school-card {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px; cursor: pointer;
  transition: border-color .12s, transform .12s;
}
.school-card.focus { border-color: var(--ink); border-width: 1.5px; padding: 17px; }
.school-card:hover:not(.focus) { border-color: var(--ink-3); }
.school-card .top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 4px;
}
.school-card h4 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.school-card .meta { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.school-card .micro {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 10px;
  margin-top: 16px;
}
.school-card .micro .col .l {
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
}
.school-card .micro .col .v {
  font-size: 18px; font-weight: 600; letter-spacing: -0.02em;
  margin-top: 2px;
}
.school-card .micro .col .d { font-size: 11px; color: var(--ink-3); }
.school-card .bars {
  margin-top: 16px; height: 38px;
  display: flex; align-items: flex-end; gap: 1.5px;
}
.school-card .bars i {
  flex: 1; background: var(--green); border-radius: 1.5px;
  display: block;
}
.school-card .bars i.dim { background: var(--green); opacity: .5; }
.school-card.attendance-bars .bars i { background: #1F2937; }

.school-card .footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--ink-3);
}
.school-card .footer a { color: var(--ink); font-weight: 500; text-decoration: none; }

/* drawer */
.drawer-shade {
  position: fixed; inset: 0; background: rgba(14,14,12,.32);
  display: flex; justify-content: flex-end; z-index: 50;
  animation: fadeIn .18s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  width: 560px; max-width: 92vw; background: var(--bg-elev);
  height: 100%; padding: 22px 26px 26px;
  overflow-y: auto;
  display: flex; flex-direction: column;
  animation: slideIn .22s cubic-bezier(.22,.9,.32,1.1);
}
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer .x {
  border: 0; background: transparent; cursor: pointer; padding: 4px;
  color: var(--ink-3); font-size: 18px;
}
.drawer .head-row { display: flex; align-items: center; justify-content: space-between; }
.drawer h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.drawer .agent-row {
  display: flex; align-items: center; gap: 8px; font-size: 12px;
  color: var(--ink-3); margin: 12px 0 18px;
}
.drawer .agent-row .badge {
  width: 22px; height: 22px; border-radius: 6px; background: var(--ink); color: white;
  display: grid; place-items: center; font-size: 9px; font-weight: 700;
}
.drawer h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 26px; font-weight: 500; letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.drawer .body { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.drawer .quote {
  background: var(--bg-sunken); border-radius: var(--r);
  padding: 14px 16px; margin: 14px 0;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15px; line-height: 1.45; font-weight: 500;
}
.drawer .quote .l {
  font-family: 'Inter',sans-serif; font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 600; color: var(--ink-3);
  display: block; margin-bottom: 6px;
}
.drawer .sources {
  margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.drawer .sources .l {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin-right: 4px;
}
.drawer .actions {
  display: flex; gap: 8px; margin-top: 22px; align-items: center;
  justify-content: flex-end;
}
.btn {
  font-family: inherit; font-size: 13px; font-weight: 500;
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-elev);
  color: var(--ink-2); transition: all .12s;
}
.btn:hover { border-color: var(--ink-3); }
.btn.dark { background: var(--ink); color: white; border-color: var(--ink); }
.btn.dark:hover { background: #2A2A26; }
.btn.danger-outline { color: var(--red); }
.btn.lg { padding: 11px 18px; font-size: 14px; border-radius: 10px; }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.square { border-radius: 8px; }
.btn-link {
  background: transparent; border: 0; color: var(--ink); font-weight: 500;
  font-family: inherit; font-size: 13px; cursor: pointer; padding: 0;
}

/* signal table / list */
.card {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
}
.card .ch {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.card .ch h3 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.card .ch .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left;
  font-size: 10px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3);
  padding: 10px 18px; border-bottom: 1px solid var(--line);
  background: var(--bg-sunken);
}
.tbl td {
  padding: 12px 18px; font-size: 13px; color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--bg-sunken); cursor: pointer; }
.tbl .pri { font-weight: 500; color: var(--ink); }
.tbl .mono { font-size: 12px; color: var(--ink-3); }

/* Sparkline */
.spark { display: flex; align-items: flex-end; gap: 1.5px; height: 24px; }
.spark i { flex: 1; background: var(--green); border-radius: 1px; min-width: 2px; }
.spark.amber i { background: var(--amber); }
.spark.dark i { background: #1F2937; }

/* Sidebar list (drill view) */
.split {
  display: grid; grid-template-columns: 360px 1fr; gap: 0;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
}
.split .left { border-right: 1px solid var(--line); }
.split .left .item {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.split .left .item:hover { background: var(--bg-sunken); }
.split .left .item.active { background: var(--bg-sunken); border-left: 2px solid var(--ink); padding-left: 16px; }
.split .right { padding: 24px 26px; }

.field-row { display: flex; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.field-row .l { width: 180px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); padding-top: 4px; }
.field-row .v { flex: 1; font-size: 14px; color: var(--ink-2); }

.tab-bar {
  display: flex; gap: 4px; border-bottom: 1px solid var(--line);
  margin: 4px 0 16px;
}
.tab-bar .tab {
  padding: 10px 14px; font-size: 13px; font-weight: 500; cursor: pointer;
  color: var(--ink-3); border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 8px;
}
.tab-bar .tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.tab-bar .tab .count {
  font-size: 11px; padding: 2px 6px; border-radius: 4px;
  background: var(--bg-sunken); font-weight: 500;
}

/* Empty/edge bg */
.diff-add { background: rgba(22,163,74,.10); padding: 1px 3px; border-radius: 3px; }
.diff-rem { background: rgba(220,38,38,.10); padding: 1px 3px; border-radius: 3px; text-decoration: line-through; }

/* Mobile (parent) */
.phone-frame {
  width: 380px; height: 760px; border-radius: 36px;
  background: var(--ink); padding: 10px;
  box-shadow: var(--shadow-lg);
  margin: 24px auto;
}
.phone-screen {
  width: 100%; height: 100%; background: var(--bg);
  border-radius: 28px; overflow: hidden; position: relative;
}

/* Tweaks panel hint */
.persona-strip {
  position: fixed; right: 16px; bottom: 16px;
  background: var(--ink); color: white;
  padding: 8px 12px; border-radius: 999px;
  font-size: 12px; cursor: pointer; z-index: 30;
  box-shadow: var(--shadow-lg); font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: inherit; border: 0;
}
.persona-strip:hover { background: #2A2A26; }

/* misc utils */
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.muted { color: var(--ink-3); }
.tiny { font-size: 11px; }
.divider-dot { color: var(--ink-4); margin: 0 6px; }

/* Stepper */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.steps li {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--ink-3);
  padding: 8px 12px; border-radius: 8px; cursor: pointer;
}
.steps li.active { background: var(--bg-sunken); color: var(--ink); font-weight: 500; }
.steps li .num {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-sunken); color: var(--ink-3);
  font-size: 11px; font-weight: 600;
  border: 1px solid var(--line);
}
.steps li.active .num { background: var(--ink); color: white; border-color: var(--ink); }
.steps li.done .num { background: var(--green); color: white; border-color: var(--green); }

/* approval inline diff card */
.diff-card { background: var(--bg-sunken); border-radius: var(--r); padding: 14px 16px; margin: 12px 0; font-size: 13px; line-height: 1.55; }

.checklist { display: flex; flex-direction: column; gap: 8px; }
.checklist .ck { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-elev); }
.checklist .ck .box { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--ink-3); display: grid; place-items: center; }
.checklist .ck.done .box { background: var(--ink); border-color: var(--ink); color: white; font-size: 10px; }
.checklist .ck .lbl { font-size: 13px; flex: 1; }
.checklist .ck .meta { font-size: 11px; color: var(--ink-3); }

/* roster (teacher) */
.student-row {
  display: grid; grid-template-columns: 32px 1fr auto auto auto; gap: 12px;
  align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.student-row .av {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-sunken); display: grid; place-items: center;
  font-size: 11px; font-weight: 600; color: var(--ink-2);
}
.student-row.absent { background: rgba(180,83,9,.04); }

/* timeline */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.timeline .t-item { position: relative; padding-bottom: 18px; }
.timeline .t-item::before {
  content: ''; position: absolute; left: -19px; top: 6px;
  width: 9px; height: 9px; border-radius: 50%;
  background: white; border: 2px solid var(--ink);
}
.timeline .t-item.agent::before { border-color: var(--green); background: var(--green); }
.timeline .t-item .when { font-size: 11px; color: var(--ink-3); }
.timeline .t-item .what { font-size: 13px; color: var(--ink-2); margin-top: 2px; line-height: 1.5; }

/* small helpers */
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
