/* EdSeer static demo — design system per docs/DESIGN.md + docs/BRAND.md.
   Zero-build, token-driven, light + dark, school-theme accent via --accent. */

/* ---------- Self-hosted fonts (latin subsets, variable) ---------- */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('fonts/bricolage-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  /* brand (brand/web/tokens.json) */
  --midnight: #0B1F3B;
  --seer-blue: #0078D4;
  --sky: #4DA9EC;
  --saffron: #FFB900;

  /* neutrals */
  --n0: #FAFAFA; --n1: #F4F4F5; --n2: #E4E4E7; --n3: #A1A1AA;
  --n4: #52525B; --n5: #27272A; --n6: #18181B;

  /* semantic */
  --ok: #107C10; --bad: #D13438; --warn: #FFB900;

  /* surfaces */
  --canvas: #F7F7F8;
  --surface: #FFFFFF;
  --surface-2: var(--n1);
  --text: var(--n6);
  --text-2: var(--n4);
  --text-3: #71717A; /* AA-safe on white for small text (was n3 #A1A1AA) */
  --border: var(--n2);
  --border-soft: #EDEDEF;

  /* accent — repainted by the school theme (JS sets these three) */
  --accent: #0078D4;
  --on-accent: #FFFFFF;
  --accent-ink: #0078D4;              /* accent usable as text on the canvas */
  --accent-hover: color-mix(in srgb, var(--accent) 88%, #000);
  --accent-pressed: color-mix(in srgb, var(--accent) 78%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 10%, var(--surface));
  --accent-softer: color-mix(in srgb, var(--accent) 5%, var(--surface));
  --focus: var(--accent);

  /* elevation */
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .05);
  --shadow-md: 0 4px 12px rgb(0 0 0 / .08);
  --shadow-lg: 0 12px 32px rgb(0 0 0 / .12);

  /* radii */
  --r-ctl: 8px; --r-card: 14px; --r-modal: 16px;

  /* type */
  --font-body: 'Segoe UI Variable Text', 'Segoe UI', Inter, system-ui, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Segoe UI Variable Display', Inter, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  /* layout */
  --sidebar-w: 264px;
  --sidebar-w-collapsed: 68px;
  --topbar-h: 56px;

  color-scheme: light;
}

[data-theme="dark"] {
  --canvas: #101014;
  --surface: #1B1B1F;
  --surface-2: #232327;
  --text: #F4F4F5;
  --text-2: #A1A1AA;
  --text-3: #9A9AA3;
  --border: #2E2E33;
  --border-soft: #26262B;
  --accent-soft: color-mix(in srgb, var(--accent) 16%, var(--surface));
  --accent-softer: color-mix(in srgb, var(--accent) 9%, var(--surface));
  /* dark swaps shadows for subtle outlines */
  --shadow-sm: 0 0 0 1px rgb(255 255 255 / .05);
  --shadow-md: 0 0 0 1px rgb(255 255 255 / .07);
  --shadow-lg: 0 0 0 1px rgb(255 255 255 / .09);
  --ok: #6CCB5F; --bad: #F1707B; --warn: #FCE100;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--canvas);
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-weight: 600; margin: 0 0 .5em; line-height: 1.25; }
h1 { font-size: 24px; } h2 { font-size: 20px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
p { margin: 0 0 1em; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { vertical-align: middle; }
button { font: inherit; color: inherit; }
code, .mono { font-family: var(--font-mono); font-size: 12.5px; }
.num, td.num { font-variant-numeric: tabular-nums; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* entrance: everything that appears animates in once (fade / 8px rise) */
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rise { animation: rise-in .25s ease-out both; }
.rise-1 { animation-delay: .03s; } .rise-2 { animation-delay: .06s; }
.rise-3 { animation-delay: .09s; } .rise-4 { animation-delay: .12s; }
.rise-5 { animation-delay: .15s; } .rise-6 { animation-delay: .18s; }

/* ---------- Buttons & controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--r-ctl);
  border: 1px solid var(--border); background: var(--surface);
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background .15s ease-out, border-color .15s ease-out, transform .15s ease-out;
  text-decoration: none; color: var(--text);
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary:active { background: var(--accent-pressed); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-lg { padding: 12px 24px; font-size: 16px; border-radius: 10px; }
.btn-icon {
  width: 36px; height: 36px; padding: 0; justify-content: center;
  border-radius: var(--r-ctl); border: 1px solid transparent; background: transparent;
  cursor: pointer; font-size: 16px; color: var(--text-2); position: relative;
}
.btn-icon:hover { background: var(--surface-2); color: var(--text); }

.input {
  width: 100%; padding: 8px 12px; border-radius: var(--r-ctl);
  border: 1px solid var(--border); background: var(--surface);
  font: inherit; color: var(--text);
}
.input::placeholder { color: var(--text-3); }
.input:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }

/* ---------- Chips & badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2);
}
.chip-ok   { background: color-mix(in srgb, var(--ok) 12%, var(--surface));   color: var(--ok); }
.chip-bad  { background: color-mix(in srgb, var(--bad) 12%, var(--surface));  color: var(--bad); }
.chip-warn { background: color-mix(in srgb, #B77400 16%, var(--surface));     color: #8A5A00; }
[data-theme="dark"] .chip-warn { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--warn); }
.chip-accent { background: var(--accent-soft); color: var(--accent-ink); }

.preview-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: color-mix(in srgb, var(--saffron) 18%, var(--surface));
  color: #7A5800; border: 1px solid color-mix(in srgb, var(--saffron) 40%, transparent);
  white-space: nowrap;
}
[data-theme="dark"] .preview-badge { color: var(--saffron); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border-radius: var(--r-card);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border-soft);
  padding: 20px;
}
[data-theme="dark"] .card { border-color: var(--border); box-shadow: none; }
.card-title { font-size: 14px; font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-title .chip { font-weight: 600; }

/* stat tiles: large, quiet, label-over-value */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat { padding: 18px 20px; }
.stat .label { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.stat .value {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 700; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.stat .trend { margin-top: 8px; }

/* feature cards */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.feature {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px 18px;
}
.feature .dot {
  flex: none; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent-ink);
}
.feature p { margin: 4px 0 0; color: var(--text-2); font-size: 13px; }
.feature h3 { margin: 3px 0 0; font-size: 14px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-card); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; font-weight: 600; color: var(--text-2); font-size: 12.5px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 10px 12px; white-space: nowrap;
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.tbl tbody tr { transition: background .15s ease-out; }
.tbl tbody tr:hover { background: var(--accent-softer); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Skeletons ---------- */
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skeleton {
  border-radius: 6px; min-height: 12px;
  background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 50%, var(--surface)) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  color: transparent !important; user-select: none;
}
.skeleton * { visibility: hidden; }

/* ---------- App shell ---------- */
body.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: none;
  background: var(--surface);
  border-right: 1px solid var(--border-soft);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  transition: width .2s ease-out;
  z-index: 40;
}
[data-theme="dark"] .sidebar { border-right-color: var(--border); }

.sidebar .brand {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px; text-decoration: none; color: var(--text);
}
.sidebar .brand svg { width: 28px; height: 28px; flex: none; }
.sidebar .brand .word { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.sidebar .brand .word b { font-weight: 700; color: var(--text); }
.sidebar .brand .word span { color: var(--seer-blue); }
[data-theme="dark"] .sidebar .brand .word span { color: var(--sky); }

.nav-search { padding: 6px 12px 10px; }
.nav-search .input { padding: 7px 10px; font-size: 13px; background: var(--surface-2); border-color: transparent; }

.nav { flex: 1; overflow-y: auto; padding: 0 8px 16px; scrollbar-width: thin; }
.nav-group { margin-top: 14px; }
.nav-group > .glabel {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-3); padding: 0 12px 6px;
}
.nav a.item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; border-radius: var(--r-ctl);
  color: var(--text-2); font-weight: 500; font-size: 13.5px;
  text-decoration: none; position: relative;
  transition: background .15s ease-out, color .15s ease-out;
}
.nav a.item .ico { width: 20px; text-align: center; flex: none; font-size: 15px; }
.nav a.item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.item.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.nav a.item.active::before {
  content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 3px; background: var(--accent);
}
.nav a.item.hidden { display: none; }
.nav-group.hidden { display: none; }

.sidebar .foot { padding: 10px 12px; border-top: 1px solid var(--border-soft); }
[data-theme="dark"] .sidebar .foot { border-top-color: var(--border); }
.sidebar .foot .btn-icon { width: 100%; justify-content: flex-start; gap: 10px; font-size: 13px; padding: 0 10px; height: 34px; }

/* collapsed */
body.app.nav-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
body.app.nav-collapsed .sidebar .word,
body.app.nav-collapsed .nav-search,
body.app.nav-collapsed .glabel,
body.app.nav-collapsed .nav a.item .lbl,
body.app.nav-collapsed .sidebar .foot .lbl { display: none; }
body.app.nav-collapsed .nav a.item { justify-content: center; padding: 8px; }
body.app.nav-collapsed .sidebar .brand { justify-content: center; padding-left: 0; padding-right: 0; }
body.app.nav-collapsed .sidebar .foot .btn-icon { justify-content: center; }

/* main column */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 8px;
  padding: 0 20px 0 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 30;
}
[data-theme="dark"] .topbar { border-bottom-color: var(--border); }

.hamburger { display: none; }

.school-switch {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 10px 5px 6px; border-radius: var(--r-ctl);
  border: 1px solid transparent; background: transparent; cursor: pointer;
  max-width: 320px;
}
.school-switch:hover { background: var(--surface-2); }
.school-switch .logo {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 12px;
  background: var(--accent);
}
.school-switch .meta { text-align: left; line-height: 1.2; min-width: 0; }
.school-switch .meta .sname { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.school-switch .meta .bname { font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.school-switch .caret { color: var(--text-3); font-size: 10px; }

.topbar .spacer { flex: 1; }

.gsearch {
  display: flex; align-items: center; gap: 8px;
  min-width: 200px; max-width: 320px; flex: 1;
  padding: 7px 12px; border-radius: var(--r-ctl);
  border: 1px solid var(--border); background: var(--canvas);
  color: var(--text-3); font-size: 13px; cursor: pointer; text-align: left;
}
.gsearch:hover { border-color: var(--text-3); }
.gsearch kbd {
  margin-left: auto; font-family: var(--font-mono); font-size: 11px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 5px; padding: 1px 6px; color: var(--text-2);
}

.theme-dots { display: flex; align-items: center; gap: 6px; padding: 0 4px; }
.theme-dots .dot {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; padding: 0; transition: transform .15s ease-out;
}
.theme-dots .dot:hover { transform: scale(1.2); }
.theme-dots .dot.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface) inset; }

.btn-icon .bubble {
  position: absolute; top: 4px; right: 4px;
  min-width: 15px; height: 15px; border-radius: 999px;
  background: var(--bad); color: #fff; font-size: 9.5px; font-weight: 700;
  display: grid; place-items: center; padding: 0 3px;
}

.ask-seer {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--accent-soft), var(--surface));
  color: var(--accent-ink); font-weight: 600; font-size: 13px; cursor: pointer;
  transition: box-shadow .15s ease-out;
}
.ask-seer:hover { box-shadow: var(--shadow-md); }
.ask-seer svg { width: 18px; height: 18px; }

/* content */
.content { padding: 24px; max-width: 1280px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .picon {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-size: 22px;
  background: var(--accent-soft);
}
.page-head .ptitle h1 { margin: 0; font-size: 24px; }
.page-head .ptitle p { margin: 4px 0 0; color: var(--text-2); max-width: 720px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.section { margin-top: 24px; }
.section > h2 { font-size: 16px; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

/* dashboard heat strip: 5-step sequential ramp of the primary */
.heat { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 8px; }
.heat .cell {
  border-radius: 8px; padding: 8px 4px 6px; text-align: center;
  color: var(--text); font-size: 11px; line-height: 1.3;
}
.heat .cell b { display: block; font-size: 12.5px; font-variant-numeric: tabular-nums; }
/* text stays ink over every step — mixing with the surface keeps AA at all 5 levels */
.heat .h0 { background: color-mix(in srgb, var(--accent) 6%,  var(--surface)); }
.heat .h1 { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.heat .h2 { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.heat .h3 { background: color-mix(in srgb, var(--accent) 48%, var(--surface)); }
.heat .h4 { background: color-mix(in srgb, var(--accent) 66%, var(--surface)); }

/* mock bar chart */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding-top: 8px; }
.bars .bar {
  flex: 1; border-radius: 6px 6px 2px 2px; min-width: 14px;
  background: color-mix(in srgb, var(--accent) 75%, var(--surface));
  position: relative;
}
.bars .bar.alt { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.bars .bar .cap {
  position: absolute; top: -18px; left: 0; right: 0; text-align: center;
  font-size: 10.5px; color: var(--text-2); font-variant-numeric: tabular-nums;
}
.bars-x { display: flex; gap: 10px; margin-top: 6px; }
.bars-x span { flex: 1; text-align: center; font-size: 11px; color: var(--text-2); min-width: 14px; }

/* ---------- Power-BI-style interactivity ---------- */
/* shared hover tooltip */
.tip {
  position: fixed; z-index: 130; pointer-events: none;
  background: #18181B; color: #F4F4F5;
  padding: 7px 11px; border-radius: 8px;
  font-size: 12.5px; line-height: 1.45; max-width: 260px;
  box-shadow: var(--shadow-lg);
}
.tip b { color: #fff; }
[data-theme="dark"] .tip { background: #F4F4F5; color: #18181B; }
[data-theme="dark"] .tip b { color: #000; }

/* filter bar */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; }
.filter-bar .fl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.filter-bar .btn-ghost { padding: 6px 12px; font-size: 13px; }

.select {
  padding: 6px 28px 6px 10px; border-radius: var(--r-ctl);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 13px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.select:hover { border-color: var(--text-3); }
.card-title .select { font-weight: 400; }

/* drill breadcrumb */
.crumb {
  border: 0; background: none; padding: 0 4px 0 0; cursor: pointer;
  color: var(--accent-ink); font: inherit; font-size: 13.5px; font-weight: 700;
}
.crumb:hover { text-decoration: underline; }

/* drillable marks */
.bars .bar[role="button"], .heat .cell[role="button"] { cursor: pointer; }
.bars .bar[role="button"]:hover { filter: brightness(.9); }
.heat .cell[role="button"]:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
@media (prefers-reduced-motion: reduce) { .heat .cell[role="button"]:hover { transform: none; } }

/* drill meters (section / band breakdown) */
.meter { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.meter .mlabel { flex: none; width: 72px; font-size: 13px; font-weight: 600; }
.meter .bar-track { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.meter .bar-fill { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width .25s ease-out; }
.meter .mval { flex: none; width: 44px; text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }

/* list mocks (approvals / announcements) */
.rowlist { display: flex; flex-direction: column; }
.rowlist .row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 4px; border-bottom: 1px solid var(--border-soft);
}
.rowlist .row:last-child { border-bottom: 0; }
.rowlist .row .ravatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--surface-2); color: var(--text-2);
}
.rowlist .row .rmain { flex: 1; min-width: 0; }
.rowlist .row .rmain .t { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rowlist .row .rmain .s { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* empty state */
.empty { text-align: center; padding: 40px 20px; color: var(--text-2); }
.empty svg { width: 56px; height: 56px; margin-bottom: 12px; opacity: .8; }
.empty p { margin: 0 0 14px; }

/* ---------- Popovers, modal, Ask Seer panel ---------- */
.pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  min-width: 280px; max-height: min(70vh, 560px); overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-card);
  box-shadow: var(--shadow-lg); padding: 8px;
  animation: rise-in .18s ease-out both;
  scrollbar-width: thin;
}
.pop .pop-title { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px 4px; }
.pop .pop-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-radius: var(--r-ctl); border: 0; background: none;
  cursor: pointer; text-align: left; font-size: 13.5px; color: var(--text); text-decoration: none;
}
.pop .pop-item:hover { background: var(--surface-2); text-decoration: none; }
.pop .pop-item.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.pop .pop-sep { height: 1px; background: var(--border-soft); margin: 6px 4px; }
.pop-anchor { position: relative; }

.overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgb(0 0 0 / .35);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh 16px 16px;
}
[data-theme="dark"] .overlay { background: rgb(0 0 0 / .55); }

.cmdk {
  width: 100%; max-width: 560px;
  background: var(--surface); border-radius: var(--r-modal);
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  overflow: hidden; animation: rise-in .2s ease-out both;
}
.cmdk .cmdk-input {
  width: 100%; border: 0; outline: 0; background: transparent;
  padding: 16px 18px; font-size: 15px; color: var(--text);
  border-bottom: 1px solid var(--border-soft);
}
.cmdk .cmdk-list { max-height: 46vh; overflow-y: auto; padding: 8px; }
.cmdk .cmdk-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--r-ctl);
  cursor: pointer; text-decoration: none; color: var(--text); font-size: 14px;
}
.cmdk .cmdk-item .ico { width: 22px; text-align: center; }
.cmdk .cmdk-item .grp { margin-left: auto; font-size: 11.5px; color: var(--text-3); }
.cmdk .cmdk-item:hover, .cmdk .cmdk-item.sel { background: var(--accent-soft); text-decoration: none; }
.cmdk .cmdk-empty { padding: 24px; text-align: center; color: var(--text-3); }

.seer-panel {
  position: fixed; right: 20px; bottom: 20px; top: calc(var(--topbar-h) + 20px);
  width: min(400px, calc(100vw - 40px)); z-index: 70;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-modal); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
  animation: rise-in .22s ease-out both;
}
.seer-panel .sp-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.seer-panel .sp-head svg { width: 22px; height: 22px; }
.seer-panel .sp-head .t { font-weight: 700; }
.seer-panel .sp-head .x { margin-left: auto; }
.seer-panel .sp-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.seer-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; }
.seer-msg.q { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.seer-msg.a { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.seer-msg.a .cite { display: block; margin-top: 6px; font-size: 11.5px; color: var(--accent-ink); }
.seer-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.seer-suggest button {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  border-radius: 999px; padding: 5px 12px; font-size: 12px; cursor: pointer;
}
.seer-suggest button:hover { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.seer-panel .sp-foot { padding: 12px; border-top: 1px solid var(--border-soft); display: flex; gap: 8px; }

/* ---------- Entry flow (login / select school / select branch) ---------- */
body.entry {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(600px 400px at 85% -10%, color-mix(in srgb, var(--seer-blue) 14%, transparent), transparent 70%),
    radial-gradient(500px 380px at -10% 100%, color-mix(in srgb, var(--saffron) 8%, transparent), transparent 70%),
    var(--canvas);
}
.entry-card {
  width: 100%; max-width: 420px;
  background: var(--surface); border-radius: var(--r-modal);
  box-shadow: var(--shadow-lg); border: 1px solid var(--border-soft);
  padding: 32px; animation: rise-in .3s ease-out both;
}
[data-theme="dark"] .entry-card { border-color: var(--border); }
.entry-card.wide { max-width: 520px; }
.entry-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.entry-brand svg { width: 34px; height: 34px; }
.entry-brand .word { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; }
.entry-brand .word span { color: var(--seer-blue); }
[data-theme="dark"] .entry-brand .word span { color: var(--sky); }
.entry-card h1 { font-size: 20px; margin-bottom: 4px; }
.entry-card .sub { color: var(--text-2); margin-bottom: 20px; }
.entry-card form { display: flex; flex-direction: column; gap: 12px; }
.entry-card label { font-size: 13px; font-weight: 600; }
.entry-card label .input { margin-top: 4px; font-size: 14px; padding: 10px 12px; }
.sso-row { display: flex; gap: 8px; }
.sso-row .btn { flex: 1; justify-content: center; font-size: 13px; }
.entry-sep { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12px; margin: 8px 0; }
.entry-sep::before, .entry-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.entry-foot { margin-top: 20px; font-size: 12.5px; color: var(--text-3); text-align: center; }

/* three-step indicator (the rule of three: sign in → school → branch) */
.stepper { display: flex; align-items: center; gap: 10px; list-style: none; margin: 0 0 18px; padding: 0; }
.stepper li { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.stepper li .n {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--text-2); font-size: 11.5px;
}
.stepper li.done .n { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); }
.stepper li.on { color: var(--accent-ink); }
.stepper li.on .n { background: var(--accent); color: var(--on-accent); }
.stepper li:not(:first-child)::before { content: ""; width: 18px; height: 1px; background: var(--border); }

/* role picker on the login card */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.role-grid button {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: var(--r-ctl);
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text); text-align: left;
  transition: border-color .15s ease-out, background .15s ease-out;
}
.role-grid button:hover { border-color: var(--accent); background: var(--accent-softer); }
.role-grid button .ri { font-size: 16px; }

.pick-list { display: flex; flex-direction: column; gap: 10px; }
.pick {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 16px; border-radius: var(--r-card);
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; text-align: left; text-decoration: none; color: var(--text);
  transition: border-color .15s ease-out, box-shadow .15s ease-out, transform .15s ease-out;
}
.pick:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-1px); text-decoration: none; }
.pick .plogo {
  width: 42px; height: 42px; border-radius: 10px; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px;
}
.pick .pmeta { flex: 1; min-width: 0; }
.pick .pmeta .pn { font-weight: 700; font-size: 15px; }
.pick .pmeta .pk { font-size: 12.5px; color: var(--text-2); }
.pick .go { color: var(--text-3); }

/* branded splash moment */
.splash {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--splash-bg, var(--midnight)); color: #fff;
  animation: none;
}
.splash svg { width: 84px; height: 84px; }
.splash .star-rise { animation: star-rise .4s ease-out .15s both; }
@keyframes star-rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.splash .sname { font-family: var(--font-display); font-weight: 700; font-size: 24px; }
.splash .stag { font-size: 13.5px; opacity: .75; }
.splash.leaving { animation: splash-out .3s ease-out .95s both; }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }

/* ---------- Landing page ---------- */
body.landing { background: var(--canvas); }
.l-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(20px, 5vw, 56px);
  background: color-mix(in srgb, var(--midnight) 92%, transparent);
  backdrop-filter: blur(10px);
}
.l-nav .brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.l-nav .brand svg { width: 26px; height: 26px; }
.l-nav .brand .word { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: #fff; letter-spacing: -.02em; }
.l-nav .brand .word span { color: var(--sky); }
.l-nav .links { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.l-nav .links a { color: rgb(255 255 255 / .75); font-size: 13.5px; font-weight: 500; }
.l-nav .links a:hover { color: #fff; text-decoration: none; }
.l-nav .links a.btn-primary, .l-nav .links a.btn-primary:hover { color: #fff; font-weight: 600; }
.l-nav .links .btn-primary { padding: 7px 16px; font-size: 13.5px; }

.hero {
  background:
    radial-gradient(900px 500px at 75% -20%, rgb(77 169 236 / .28), transparent 65%),
    radial-gradient(700px 480px at 8% 108%, rgb(0 120 212 / .30), transparent 60%),
    radial-gradient(420px 300px at 96% 88%, rgb(255 185 0 / .10), transparent 70%),
    var(--midnight);
  color: #fff;
  padding: clamp(56px, 9vw, 110px) clamp(20px, 5vw, 56px) 0;
  text-align: center; overflow: hidden;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(32px, 6vw, 58px); letter-spacing: -.02em; line-height: 1.06;
  max-width: 820px; margin: 0 auto 18px;
}
.hero h1 .see { color: var(--sky); }
.hero .sub { font-size: clamp(15px, 2vw, 18px); color: rgb(255 255 255 / .72); max-width: 640px; margin: 0 auto 30px; }
.hero .cta-row { display: flex; gap: 12px; justify-content: center; margin-bottom: 26px; flex-wrap: wrap; }
.hero .cta-row .btn { border-color: rgb(255 255 255 / .25); background: rgb(255 255 255 / .06); color: #fff; }
.hero .cta-row .btn:hover { background: rgb(255 255 255 / .12); }
.hero .cta-row .btn-primary { background: var(--seer-blue); border-color: var(--seer-blue); color: #fff; }
.hero .cta-row .btn-primary:hover { background: #106EBE; }
.hero .trust { font-size: 12.5px; color: rgb(255 255 255 / .5); margin-bottom: 44px; }

/* browser-framed product shot (pure CSS mock) */
.shot {
  max-width: 980px; margin: 0 auto; text-align: left;
  border-radius: 14px 14px 0 0; overflow: hidden;
  border: 1px solid rgb(255 255 255 / .14); border-bottom: 0;
  box-shadow: 0 -20px 80px rgb(0 0 0 / .4);
  background: #F7F7F8; color: #18181B;
}
.shot .bar {
  display: flex; align-items: center; gap: 8px;
  background: #ECECEE; padding: 9px 14px; border-bottom: 1px solid #E0E0E3;
}
.shot .bar .b-dot { width: 10px; height: 10px; border-radius: 50%; background: #D4D4D8; }
.shot .bar .b-url {
  flex: 1; max-width: 380px; margin: 0 auto;
  background: #fff; border-radius: 6px; padding: 3px 12px;
  font-size: 11.5px; color: #52525B; text-align: center;
  font-family: var(--font-mono);
}
.shot .shot-img { display: block; width: 100%; height: auto; }

/* real-screenshot gallery */
.screens { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.screen { display: block; text-decoration: none; color: var(--text); }
.screen:hover { text-decoration: none; }
.screen .frame {
  display: block; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
  transition: transform .2s ease-out, box-shadow .2s ease-out;
}
.screen:hover .frame { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.screen .frame .bar { display: flex; gap: 6px; padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border-soft); }
.screen .frame .b-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--n3); }
.screen .frame img { display: block; width: 100%; height: auto; }
.screen .scap { display: block; margin-top: 10px; font-size: 13.5px; color: var(--text-2); }
.screen .scap b { color: var(--text); }

.shot .app-mock { display: flex; min-height: 340px; font-size: 11px; }
.shot .m-side { width: 158px; flex: none; background: #fff; border-right: 1px solid #ECECEE; padding: 10px; }
.shot .m-side .mrow { display: flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: 6px; color: #52525B; }
.shot .m-side .mrow.on { background: #EFF6FC; color: #005A9E; font-weight: 600; }
.shot .m-main { flex: 1; padding: 14px; min-width: 0; }
.shot .m-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.shot .m-tile { background: #fff; border-radius: 9px; padding: 10px; box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.shot .m-tile .ml { color: #71717A; font-size: 9.5px; }
.shot .m-tile .mv { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.shot .m-wide { background: #fff; border-radius: 9px; padding: 10px; box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.shot .m-bars { display: flex; align-items: flex-end; gap: 6px; height: 74px; margin-top: 8px; }
.shot .m-bars i { flex: 1; background: #71AFE5; border-radius: 3px 3px 0 0; }
.shot .m-bars i:nth-child(2n) { background: #C7E0F4; }

.l-section { padding: clamp(48px, 7vw, 88px) clamp(20px, 5vw, 56px); max-width: 1180px; margin: 0 auto; }
.l-section > h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -.02em;
  text-align: center; margin-bottom: 8px;
}
.l-section > .l-sub { text-align: center; color: var(--text-2); max-width: 620px; margin: 0 auto 40px; font-size: 15px; }

.domain-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.domain {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--r-card); padding: 22px; box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .domain { border-color: var(--border); }
.domain h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 12px; }
.domain ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.domain ul a {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-2); font-size: 13.5px; padding: 4px 6px; margin: 0 -6px;
  border-radius: 6px;
}
.domain ul a:hover { background: var(--accent-softer); color: var(--accent-ink); text-decoration: none; }
.domain ul a .ico { width: 18px; text-align: center; }
.domain ul a .arrow { margin-left: auto; opacity: 0; transition: opacity .15s ease-out; font-size: 12px; }
.domain ul a:hover .arrow { opacity: 1; }

.india-strip {
  background: var(--midnight); color: #fff; text-align: center;
  padding: clamp(40px, 6vw, 64px) clamp(20px, 5vw, 56px);
}
.india-strip h2 { font-family: var(--font-display); font-size: clamp(22px, 3vw, 30px); font-weight: 700; margin-bottom: 8px; }
.india-strip .l-sub { color: rgb(255 255 255 / .65); max-width: 640px; margin: 0 auto 28px; }
.india-badges { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.india-badges .ib {
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid rgb(255 255 255 / .18); background: rgb(255 255 255 / .06);
  font-size: 13px; font-weight: 600;
}

.personas { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.persona {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--r-card); padding: 24px; box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .persona { border-color: var(--border); }
.persona .pico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 20px; background: var(--accent-soft); margin-bottom: 14px;
}
.persona h3 { font-size: 16px; margin-bottom: 6px; }
.persona p { color: var(--text-2); font-size: 13.5px; margin: 0; }

/* landing: routine school jobs, three steps each (Run · See · Rise) */
.flow-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: fstep; }
.flow-steps li { display: flex; align-items: flex-start; gap: 12px; font-size: 13.5px; color: var(--text-2); }
.flow-steps li b { color: var(--text); font-weight: 600; }
.flow-steps li::before {
  counter-increment: fstep; content: counter(fstep);
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent-ink);
}
.persona .pkicker {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-ink); margin-bottom: 10px;
}

.l-cta {
  text-align: center; padding: clamp(48px, 7vw, 80px) 20px;
}
.l-cta h2 { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; margin-bottom: 18px; letter-spacing: -.02em; }

.l-footer {
  background: var(--midnight); color: rgb(255 255 255 / .6);
  padding: 36px clamp(20px, 5vw, 56px);
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  font-size: 13px;
}
.l-footer .brand { display: flex; align-items: center; gap: 8px; }
.l-footer .brand svg { width: 22px; height: 22px; }
.l-footer .brand .word { font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 16px; }
.l-footer .brand .word span { color: var(--sky); }
.l-footer .tag { font-style: normal; }
.l-footer .links { margin-left: auto; display: flex; gap: 18px; }
.l-footer a { color: rgb(255 255 255 / .6); }
.l-footer a:hover { color: #fff; }

/* ---------- 404 ---------- */
.nf { text-align: center; }
.nf .code { font-family: var(--font-display); font-weight: 800; font-size: 64px; color: var(--text-3); line-height: 1; margin-bottom: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .gsearch { display: none; }
  .theme-dots { display: none; }
}

@media (max-width: 860px) {
  body { font-size: 15px; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100dvh;
    transform: translateX(-100%); transition: transform .2s ease-out;
    box-shadow: var(--shadow-lg);
  }
  body.app.nav-open .sidebar { transform: none; }
  body.app.nav-collapsed .sidebar { width: var(--sidebar-w); }
  body.app.nav-collapsed .sidebar .word,
  body.app.nav-collapsed .nav-search,
  body.app.nav-collapsed .glabel,
  body.app.nav-collapsed .nav a.item .lbl,
  body.app.nav-collapsed .sidebar .foot .lbl { display: initial; }
  body.app.nav-collapsed .nav a.item { justify-content: flex-start; padding: 7px 12px; }
  .scrim { position: fixed; inset: 0; z-index: 35; background: rgb(0 0 0 / .35); }
  .hamburger { display: inline-flex; }
  .content { padding: 16px; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .ask-seer .lbl { display: none; }
  .ask-seer { padding: 7px 10px; }
  .school-switch .meta .bname { display: none; }
  .seer-panel { left: 12px; right: 12px; width: auto; top: auto; height: 70dvh; }
}
