/* H4Path design tokens — mirrors DESIGN.md exactly. Do not hand-invent new
   hex values here; edit DESIGN.md first, then sync this file.

   v2 (2026-08-27): adopts the "H4Path Visual Direction" mockup — Knowt-style
   geometry (huge radii, zero shadows, pastel-filled tiles) instead of the
   original rounded-card-with-shadow system. Existing selector names are kept
   wherever possible so templates didn't need rewriting, just their values. */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Figtree:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* --- ink & ground ----------------------------------------------- */
  --text-primary:    #16232E;   /* was #263447 */
  --text-secondary:  #5A6B7A;   /* was #6B7A8F */
  --ink-3:            #8C99A4;
  --surface:          #FFFFFF;
  --bg-page:          #F5F7F4;   /* was #FAF9F7 — cool neutral, pastels carry the warmth now */
  --sidebar-tint:     #EDF0EC;   /* was #F3EFE9 */
  --border:           #E4E6E1;   /* was #E6E2DC */
  --border-soft:      #F0F2EE;

  /* --- signature accent -------------------------------------------- */
  --accent-interactive:       #16232E;  /* was blue #2F6FBF — ink for action now, per design direction */
  --accent-interactive-hover: #2C3F4E;
  --mint:        #50D2C2;
  --mint-deep:   #1DA897;   /* text-safe */
  --mint-wash:   #DAF4F1;

  /* --- pastel tile fills (About page cards, school tiles) ---------- */
  --lilac:  #EDE2F6;
  --peach:  #FFEEE2;
  --sky:    #E2F1FA;
  --butter: #FFE6A2;
  --blush:  #FCE4EC;
  --sage:   #EBF2DF;

  /* --- semantic ------------------------------------------------------ */
  --amber:      #FE9923;
  --amber-wash: #FFF4E6;
  --rose:       #F24646;

  --navy-structural: var(--text-primary); /* legacy alias — headings no longer get a separate navy tone */

  --bubble-user-bg:     #EDF0EC;
  --bubble-bot-bg:      #FFFFFF;
  --bubble-bot-border:  #E4E6E1;

  --trust-badge-bg:     var(--mint-wash);
  --trust-badge-border: #BFEAE4;
  --trust-badge-text:   var(--mint-deep);
  --trust-badge-icon:   var(--mint-deep);

  --status-flag-bg:     var(--amber-wash);
  --status-flag-border: #FFE1B8;
  --status-flag-text:   var(--text-secondary);
  --status-flag-icon:   var(--amber);

  /* --- Typography ---------------------------------------------------- */
  --font-family:  'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', 'Figtree', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;
  --fs-brand: 17px;
  --fs-heading: 16px;
  --fs-body: 14.5px;
  --fs-label: 13px;
  --fs-caption: 12px;
  --fs-meta: 11px;
  --fw-body: 400;
  --fw-strong: 700;
  --fw-black: 800;
  --ls-tight: -0.004em;
  --ls-display: -0.022em;

  /* --- Radius: the headline change — huge radii, one hard-edged
     exception (the freshness .stamp) --------------------------------- */
  --radius-xs: 12px;    /* was 8px */
  --radius-sm: 14px;    /* was 10px */
  --radius-md: 24px;    /* was 14px */
  --radius-lg: 32px;    /* was 18px — default card radius */
  --radius-xl: 48px;    /* was 20px — hero/panel radius */
  --radius-full: 9999px;

  /* --- Spacing --------------------------------------------------------- */
  --gap-tight: 8px;
  --gap-default: 12px;
  --padding-control: 12px;
  --padding-card: 16px;
  --padding-card-lg: 18px;
  --section-gap: 22px;
  --page-margin: 24px;
  --anim-fast: 120ms;
  --anim-medium: 200ms;
  --anim-slow: 360ms;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--fs-body);
  font-weight: var(--fw-body);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-interactive); text-decoration: none; }
a:hover { color: var(--accent-interactive-hover); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--fw-strong);
  letter-spacing: var(--ls-display);
  text-wrap: balance;
  color: var(--text-primary);
  margin: 0 0 var(--gap-default);
}

:focus-visible {
  outline: 3px solid var(--mint-deep);
  outline-offset: 2px;
  border-radius: 6px;
}

.icon { display: inline-flex; vertical-align: -2px; flex-shrink: 0; }

/* --- Page intro: soft tinted header panel for consumer pages only.
   Never applied to the Curator Dashboard (locked utilitarian/no-warmth rule). --- */
.page-intro {
  background: var(--sage);
  border-radius: var(--radius-xl);
  padding: 40px var(--padding-card-lg);
  margin-bottom: var(--section-gap);
}
.page-intro h1 { margin-bottom: 4px; font-size: 30px; }
.page-intro p { margin: 0; color: var(--text-secondary); }
.page-intro .lede { font-size: 17px; }

/* --- Brand monogram: sidebar + Login card --- */
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--mint);
  color: #0B2B27;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: var(--fw-black);
  letter-spacing: -0.04em;
  flex-shrink: 0;
}

button, .btn {
  font-family: var(--font-display);
  font-weight: var(--fw-strong);
  font-size: var(--fs-label);
  letter-spacing: -0.01em;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-interactive);
  color: #FFFFFF;
  padding: var(--padding-control) var(--padding-card);
}
.btn-primary {
  transition: transform var(--anim-fast) ease, background-color var(--anim-fast) ease;
}
.btn-primary:hover { background: var(--accent-interactive-hover); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }
.btn-danger {
  background: var(--surface);
  color: var(--rose);
  border-color: var(--rose);
  padding: var(--padding-control) var(--padding-card);
}
.btn-danger:hover { background: var(--rose); color: #FFFFFF; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn { transition: transform var(--anim-fast) ease, border-color var(--anim-fast) ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Utility: hide elements when `.hidden` is toggled by JS (used by HTMX handlers) */
.hidden { display: none !important; }

/* --- App shell: top nav bar + full-width content panel (Chatbot/FAQ/Forum/Curator).
   Bounded to the viewport so the nav is a fixed-height sibling that never
   scrolls — `.main-content` is the only part of the page that scrolls,
   below the nav, never underneath/behind it. --- */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  gap: var(--gap-default);
  padding: var(--gap-default);
  background: var(--bg-page);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border-radius: var(--radius-full);
  padding: 10px 12px 10px 20px;
  flex-shrink: 0;
}

.topnav .brand {
  display: flex;
  align-items: center;
  gap: var(--gap-tight);
  font-family: var(--font-display);
  font-size: var(--fs-brand);
  font-weight: var(--fw-black);
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-right: 20px;
}

.topnav-links { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }

.topnav a.nav-item {
  display: inline-block;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}
.topnav a.nav-item.active {
  background: var(--sidebar-tint);
  color: var(--text-primary);
  font-weight: var(--fw-strong);
}

.topnav .topnav-divider { width: 1px; height: 20px; background: var(--border); margin: 0 6px; flex-shrink: 0; }
.topnav .spacer { flex: 1; }

.btn-sm { padding: 8px 16px; font-size: 13.5px; }

.main-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0 auto;
  padding: var(--section-gap) var(--page-margin);
  max-width: 1100px;
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-lg);
}

/* --- Centered-card shell (Login) --- */
.centered-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  max-width: 380px;
  width: 100%;
  text-align: center;
}

/* --- Sign-out card: floats over the current page as a <dialog> (base_app.html),
   reusing .login-card; also rendered standalone by account/logout.html. --- */
.signout-dialog {
  margin: auto;
  color: var(--text-primary);
  animation: bubble-fade-in var(--anim-medium) ease both;
}
.signout-dialog::backdrop { background: rgba(22, 35, 46, .35); }
.signout-title {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 8px 0;
}
.signout-cancel {
  display: inline-block;
  margin-top: 14px;
  background: none;
  border: none;
  padding: 6px 12px;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: var(--fs-label);
  text-decoration: none;
}
.signout-cancel:hover { color: var(--text-primary); }

/* "By continuing, you agree to the Terms of Use" line (Sign-in card) and the About page link */
.terms-note {
  margin: 14px 0 0 0;
  font-size: var(--fs-caption);
  color: var(--text-secondary);
}
.terms-note a, a.terms-note { color: var(--text-secondary); text-decoration: underline; }
.terms-note a:hover, a.terms-note:hover { color: var(--text-primary); }

/* --- Trust Badge --- */
.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--gap-tight);
  background: var(--trust-badge-bg);
  border: 1px solid var(--trust-badge-border);
  color: var(--trust-badge-text);
  border-radius: var(--radius-md);
  padding: var(--padding-control) var(--padding-card);
  font-size: var(--fs-caption);
  margin-top: var(--gap-tight);
}
.trust-badge .icon { color: var(--trust-badge-icon); }
.trust-badge .date { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-meta); }

/* --- Chat citations: small, acknowledgeable footnotes, not a callout box
   (unlike .trust-badge above, which is a deliberately prominent element
   elsewhere, e.g. the About page) --- */
.citation-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--gap-tight);
}
.citation-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  background: var(--bg-page);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: var(--fs-meta);
  line-height: 1.5;
}
.citation-chip .icon { width: 11px; height: 11px; flex-shrink: 0; color: var(--trust-badge-icon); }
.citation-chip a { color: inherit; text-decoration: underline; text-decoration-color: var(--border); }
.citation-chip span[title] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Status-Dependency Flag (and empty/error states share this register) --- */
.status-flag {
  display: flex;
  gap: var(--gap-default);
  background: var(--status-flag-bg);
  border: none;
  color: var(--status-flag-text);
  border-radius: var(--radius-md);
  padding: 15px 18px;
  margin-top: var(--gap-tight);
  font-size: var(--fs-body);
  line-height: 1.5;
}
.status-flag .icon { color: var(--status-flag-icon); margin-top: 1px; }
.status-flag .title { display: block; font-family: var(--font-display); font-weight: var(--fw-strong); font-size: var(--fs-label); color: var(--text-primary); }

/* --- Freshness stamp: the one deliberately hard-edged element --- */
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--mint-deep);
  background: var(--mint-wash);
  border-radius: 4px;
  padding: 4px 9px;
}
.stamp .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }
.stamp.stale { color: var(--amber); background: var(--amber-wash); }
.stamp.stale .dot { background: var(--amber); }

/* --- Pastel tile fills, reusable on any card-shaped element --- */
.t-lilac  { background: var(--lilac); }
.t-peach  { background: var(--peach); }
.t-sky    { background: var(--sky); }
.t-butter { background: var(--butter); }
.t-blush  { background: var(--blush); }
.t-sage   { background: var(--sage); }
.t-mint   { background: var(--mint-wash); }

/* --- Chat page: `.main-content` already scrolls per the app-shell rules
   above, but the chat page wants only its inner thread to scroll (with
   the composer pinned below it), not the whole panel — so it opts out
   of `.main-content`'s own scrollbar and becomes a flex column instead. --- */
.chat-shell .main-content { display: flex; flex-direction: column; overflow: hidden; }

.chat-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
/* Shorter intro banner here than other pages — the chat page is bounded
   to the viewport, so a tall intro eats directly into the thread's
   scrollable space. */
.chat-page .page-intro {
  padding: 16px var(--padding-card-lg);
  margin-bottom: var(--gap-default);
  flex-shrink: 0;
}
.chat-page .page-intro h1 { font-size: 22px; }
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: var(--gap-default);
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
.bubble { max-width: 75%; padding: 14px 20px; font-size: var(--fs-body); }
.bubble-user {
  align-self: flex-end;
  background: var(--bubble-user-bg);
  color: var(--text-primary);
  border-radius: var(--radius-md) var(--radius-md) 8px var(--radius-md);
}
.bubble-bot {
  align-self: flex-start;
  background: var(--bubble-bot-bg);
  border: 1px solid var(--bubble-bot-border);
  color: var(--text-primary);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 8px;
}
@media (max-width: 600px) {
  .bubble-user { border-radius: var(--radius-sm) var(--radius-sm) 5px var(--radius-sm); }
  .bubble-bot { border-radius: var(--radius-sm) var(--radius-sm) var(--radius-sm) 5px; }
}

.composer {
  display: flex;
  gap: var(--gap-tight);
  align-items: center;
  flex-wrap: wrap;  /* lets .composer-note sit on its own line, still inside the sticky bar */
  margin-top: var(--section-gap);
  position: sticky;
  bottom: 0;
  background: var(--bg-page);
  padding-top: var(--gap-tight);
}
.composer input[type="text"] {
  flex: 1;
  font-family: inherit;
  font-size: var(--fs-body);
  padding: var(--padding-control) 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
}
.composer button {
  padding: var(--padding-control) var(--padding-card);
  /* center contents (text and optional spinner) vertically */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.composer-note {
  flex-basis: 100%;
  margin: 0;
  text-align: center;
  font-size: var(--fs-caption);
  color: var(--ink-3);
}

/* Ensure the send-button spinner is hidden when `.hidden` is applied */
#sendButtonSpinner.hidden { display: none !important; }
#sendButtonSpinner { vertical-align: middle; }

/* --- Verified/Unverified badge (Forum) --- */
.verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: var(--fs-caption);
  font-weight: var(--fw-strong);
}
.verify-badge.verified {
  background: var(--trust-badge-bg);
  border: none;
  color: var(--trust-badge-text);
}
.verify-badge.community {
  background: var(--sidebar-tint);
  border: none;
  color: var(--text-secondary);
}

/* --- Forum thread row --- */
.thread-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--surface);
  margin-bottom: var(--gap-default);
  transition: transform var(--anim-medium) ease;
}
.thread-row:hover { transform: translateY(-3px); }
.thread-row .body { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.thread-row h3 { font-size: 16.5px; font-weight: 700; line-height: 1.3; margin: 0; }
.thread-row .sub { font-size: 13px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; }

/* --- Answer/question count badge (Forum thread rows) --- */
.count-badge {
  flex: 0 0 68px;
  text-align: center;
  border-radius: var(--radius-md);
  background: var(--bg-page);
  padding: 12px 6px;
}
.count-badge .v {
  font-family: var(--font-display); font-weight: var(--fw-black); font-size: 21px;
  font-variant-numeric: tabular-nums; line-height: 1; color: var(--text-primary);
}
.count-badge .k {
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); margin-top: 5px;
}

/* --- Auth button --- */
.auth-button-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-tight);
  width: 100%;
  background: var(--accent-interactive);
  border: none;
  border-radius: var(--radius-full);
  padding: 15px 24px;
  font-family: var(--font-display);
  font-size: var(--fs-body);
  font-weight: var(--fw-strong);
  color: #FFFFFF;
}
.auth-button-google:hover {
  background: var(--accent-interactive-hover);
  color: #FFFFFF;
}
.auth-button-google .icon-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--accent-interactive);
  font-size: 12px;
  font-weight: var(--fw-strong);
  flex-shrink: 0;
}

/* --- Category tag pill / FAQ list item --- */
.tag-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  background: var(--sidebar-tint);
  border-radius: var(--radius-full);
  padding: 5px 13px;
  font-size: var(--fs-caption);
  font-weight: var(--fw-strong);
  color: var(--text-secondary);
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: var(--gap-default);
  transition: transform var(--anim-medium) ease;
}

/* Consumer-surface-only accent (FAQ/Forum cards) — never applied in the
   Curator Dashboard, which stays on plain .card per the locked voice split. */
.card-accent { border-left: 3px solid var(--mint-deep); }

/* Subtle lift on hover — no shadow, this system uses hairlines only */
.card:hover { transform: translateY(-3px); }

/* Bubble fade-in for chat messages and temporary loading bubble */
@keyframes bubble-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.bubble { animation: bubble-fade-in var(--anim-slow) ease both; }

/* Respect users' reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .btn-primary, .btn, .card { transition: none !important; transform: none !important; }
  .bubble, .signout-dialog { animation: none !important; }
}

/* --- Curator Dashboard: denser/utilitarian — inherits the new type and
   mono data treatment, but stays plain: no pastels, no warmth. --- */
.curator-shell .app-shell { background: var(--bg-page); }
.curator-shell .main-content { max-width: none; }
.curator-table { width: 100%; border-collapse: collapse; font-size: var(--fs-caption); }
.curator-table th {
  text-align: left;
  padding: 9px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.curator-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}
.curator-search-field {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--ink-3);
}
.curator-form .field {
  margin-bottom: var(--gap-default);
}
.curator-form label {
  display: block;
  font-size: var(--fs-caption);
  margin-bottom: 4px;
}
.curator-form .required { color: var(--amber); }
.curator-form input, .curator-form select, .curator-form textarea {
  width: 100%;
  font-family: inherit;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
}
.curator-form .checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-default);
  margin-bottom: var(--gap-tight);
}
.curator-form .checkbox-option {
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  font-size: var(--fs-caption);
  margin-bottom: 0;
}
.curator-form .checkbox-option input {
  width: auto;
}

.status-pill {
  display: inline-block;
  font-family: var(--font-mono);
  border-radius: 5px;
  padding: 3px 9px;
  font-size: 10.5px;
  font-weight: 500;
}
.status-pill.live { background: var(--trust-badge-bg); color: var(--trust-badge-text); border: none; }
.status-pill.needs-reverification { background: var(--status-flag-bg); color: var(--amber); border: none; }
.status-pill.pending-review { background: var(--sidebar-tint); color: var(--text-secondary); border: none; }
.status-pill.rejected { background: var(--amber-wash); color: var(--rose); border: none; }

.staging-toolbar {
  display: flex;
  align-items: center;
  gap: var(--gap-default);
  margin-bottom: var(--gap-default);
  padding: 10px 14px;
  background: var(--sidebar-tint);
  border-radius: var(--radius-xs);
}
.staging-toolbar .select-all-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-caption);
  color: var(--text-secondary);
}
.staging-toolbar .selected-count {
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  margin-right: auto;
}
.staging-entry-select {
  margin-right: var(--gap-tight);
}

.school-group {
  margin-bottom: var(--gap-default);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  overflow: hidden;
}
.school-group[open] { padding-bottom: var(--gap-tight); }

.school-group-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  user-select: none;
  font-family: var(--font-display);
  font-weight: var(--fw-strong);
  font-size: var(--fs-heading);
  color: var(--text-primary);
  background: var(--sidebar-tint);
  padding: 12px 14px;
  margin: 0;
}
.school-group-heading::-webkit-details-marker { display: none; }
.school-group-heading::before {
  content: "▸";
  display: inline-block;
  font-size: 11px;
  color: var(--ink-3);
  transition: transform var(--anim-fast) ease;
}
.school-group[open] > .school-group-heading::before { transform: rotate(90deg); }

.school-select-all {
  width: auto;
  cursor: pointer;
}

.school-group-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 500;
  color: var(--ink-3);
  background: var(--surface);
  border-radius: var(--radius-full);
  padding: 2px 9px;
}

.school-group > .card {
  margin-left: 14px;
  margin-right: 14px;
}
.school-group > .card:first-of-type { margin-top: var(--gap-tight); }
.school-group > .card:last-of-type { margin-bottom: 14px; }

.curator-table .school-group-row th {
  padding: 0;
  background: var(--sidebar-tint);
  border-bottom: 1px solid var(--border);
}
.school-group-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: none;
  padding: 12px 10px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-display);
  font-weight: var(--fw-strong);
  font-size: var(--fs-heading);
  color: var(--text-primary);
}
.school-group-caret {
  font-size: 11px;
  color: var(--ink-3);
  transition: transform var(--anim-fast) ease;
}
.school-group-toggle[aria-expanded="false"] .school-group-caret { transform: rotate(-90deg); }
.curator-table tbody.school-group.collapsed tr:not(.school-group-row) { display: none; }
.curator-table tbody.school-group + tbody.school-group .school-group-row th { border-top: 1px solid var(--border); }

/* --- Mobile: top nav bar densifies and scrolls horizontally --- */
@media (max-width: 700px) {
  .app-shell { padding: var(--gap-tight); gap: var(--gap-tight); }
  .topnav {
    border-radius: var(--radius-md);
    padding: 8px 10px;
  }
  .topnav .brand { margin-right: 10px; }
  .topnav-links { flex-wrap: nowrap; overflow-x: auto; }
  .main-content { padding: var(--gap-default); max-width: 100%; border-radius: var(--radius-md); }
}
