:root {
  --bg: oklch(97.5% 0.006 75);
  --stage-fg: oklch(24% 0.015 270);
  --stage-muted: oklch(48% 0.018 270);
  --surface: oklch(100% 0 0);
  --surface-2: oklch(96% 0.006 75);
  --border: oklch(89% 0.007 75);
  --text: oklch(22% 0.015 270);
  --text-muted: oklch(50% 0.016 270);
  --text-faint: oklch(64% 0.012 270);
  --accent: oklch(53% 0.21 25);
  --accent-strong: oklch(45% 0.2 25);
  --accent-tint: oklch(94.5% 0.032 25);
  --accent-tint-fg: oklch(42% 0.17 25);
  --accent-fg: oklch(99% 0.003 90);
  --ink: oklch(27% 0.012 270);
  --ink-tint: oklch(93% 0.007 270);
  --ink-fg: oklch(99% 0.003 90);
  --danger: oklch(55% 0.19 25);
  --frame-bezel: oklch(88% 0.008 270);
  --frame-shadow: oklch(20% 0.02 270 / 0.16);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(17% 0.014 270);
    --stage-fg: oklch(93% 0.006 270);
    --stage-muted: oklch(68% 0.016 270);
    --surface: oklch(22% 0.014 270);
    --surface-2: oklch(26% 0.014 270);
    --border: oklch(33% 0.016 270);
    --text: oklch(93% 0.006 270);
    --text-muted: oklch(70% 0.016 270);
    --text-faint: oklch(55% 0.014 270);
    --accent: oklch(66% 0.19 25);
    --accent-strong: oklch(73% 0.18 25);
    --accent-tint: oklch(30% 0.07 25);
    --accent-tint-fg: oklch(86% 0.08 25);
    --accent-fg: oklch(14% 0.01 25);
    --ink: oklch(88% 0.008 270);
    --ink-tint: oklch(32% 0.014 270);
    --ink-fg: oklch(16% 0.01 270);
    --frame-bezel: oklch(30% 0.014 270);
    --frame-shadow: oklch(3% 0.01 270 / 0.5);
  }
}
:root[data-theme="dark"] {
  --bg: oklch(17% 0.014 270);
  --stage-fg: oklch(93% 0.006 270);
  --stage-muted: oklch(68% 0.016 270);
  --surface: oklch(22% 0.014 270);
  --surface-2: oklch(26% 0.014 270);
  --border: oklch(33% 0.016 270);
  --text: oklch(93% 0.006 270);
  --text-muted: oklch(70% 0.016 270);
  --text-faint: oklch(55% 0.014 270);
  --accent: oklch(66% 0.19 25);
  --accent-strong: oklch(73% 0.18 25);
  --accent-tint: oklch(30% 0.07 25);
  --accent-tint-fg: oklch(86% 0.08 25);
  --accent-fg: oklch(14% 0.01 25);
  --ink: oklch(88% 0.008 270);
  --ink-tint: oklch(32% 0.014 270);
  --ink-fg: oklch(16% 0.01 270);
  --frame-bezel: oklch(30% 0.014 270);
  --frame-shadow: oklch(3% 0.01 270 / 0.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Chrome tints autofilled fields yellow by default (e.g. your own email
   autofilling into the sign-in field) — force it to keep the site's own
   surface color and text color instead, in both themes. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
  box-shadow: 0 0 0 1000px var(--surface) inset;
  transition: background-color 5000s ease-in-out 0s;
}
body {
  background: var(--bg);
  color: var(--stage-fg);
  font-family: 'Manrope', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 64px;
}
a { color: var(--accent); }
svg { display: block; }

/* ---------- site nav / footer (marketing chrome around the app) ---------- */
.site-nav { width: 100%; max-width: 1120px; margin: 0 auto 44px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-nav-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.site-nav-brand .bar { width: 5px; height: 18px; border-radius: 3px; background: var(--accent); flex-shrink: 0; }
.site-nav-brand .word { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 15.5px; color: var(--stage-fg); }
.site-nav-links { display: flex; align-items: center; gap: 26px; }
.site-nav-links a { font-size: 13.5px; font-weight: 600; color: var(--stage-muted); text-decoration: none; }
.site-nav-links a:hover, .site-nav-links a.active { color: var(--stage-fg); }
.site-nav-actions { display: flex; align-items: center; gap: 14px; }
.auth-action, .inbox-btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; font: inherit; font-size: 13px; font-weight: 700; color: var(--stage-fg); border-radius: 999px; border: 1.5px solid var(--border); cursor: pointer; }
.auth-action { padding: 0 18px; background: none; text-decoration: none; }
.auth-action:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
@media (max-width: 640px) {
  .site-nav-links { display: none; }
}

.site-footer { width: 100%; max-width: 1120px; margin: 56px auto 0; padding: 24px 20px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.site-footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.site-footer-links a { font-size: 12.5px; font-weight: 600; color: var(--stage-muted); text-decoration: none; }
.site-footer-links a:hover { color: var(--stage-fg); }
.site-footer-note { font-size: 11.5px; color: var(--text-faint); max-width: 480px; }

/* ---------- how it works ---------- */
.how-it-works { width: 100%; max-width: 1120px; margin: 60px auto 0; padding: 0 20px; }
.how-it-works h2 { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 22px; font-weight: 700; text-align: center; margin: 0 0 8px; text-wrap: balance; }
.how-it-works .subhead { text-align: center; color: var(--stage-muted); font-size: 14px; margin: 0 0 32px; }
.how-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.how-step { display: flex; flex-direction: column; gap: 8px; }
.how-step .num { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 13px; font-weight: 700; color: var(--accent); }
.how-step h3 { font-size: 15px; font-weight: 700; margin: 0; color: var(--stage-fg); }
.how-step p { font-size: 13px; line-height: 1.55; color: var(--stage-muted); margin: 0; }

/* ---------- doc pages (privacy / about / faq / terms) ---------- */
body.doc-page { display: block; padding: 32px 20px 80px; }
.doc { max-width: 640px; margin: 0 auto; }
.doc h1 { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 26px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 6px; }
.doc .updated { font-size: 12.5px; color: var(--text-faint); margin-bottom: 32px; }
.doc h2 { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 16px; font-weight: 600; margin: 34px 0 10px; }
.doc h3 { font-size: 14.5px; font-weight: 700; color: var(--text); margin: 22px 0 6px; }
.doc p { font-size: 14px; line-height: 1.65; color: var(--text-muted); margin: 0 0 14px; max-width: 62ch; }
.doc ul { margin: 0 0 14px; padding-left: 20px; }
.doc li { font-size: 14px; line-height: 1.65; color: var(--text-muted); margin-bottom: 6px; }
.doc strong { color: var(--text); }
.doc a { color: var(--accent); }
.doc .callout { border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px; padding: 16px 18px; margin: 8px 0 14px; }
.doc .callout p:last-child { margin-bottom: 0; }
.doc .callout .hero-btn { display: inline-flex; align-items: center; text-decoration: none; margin-top: 10px; }

/* screenshots embedded in a doc page (e.g. the printable how-it-works guide) */
.doc .shot { margin: 14px 0 6px; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 3px var(--frame-shadow); }
.doc .shot-caption { font-size: 11.5px; color: var(--text-faint); margin: 8px 0 22px; }

.stage-header { width: 100%; max-width: 640px; margin: 0 auto 34px; text-align: center; }
.stage-header .kicker { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.stage-header .kicker::before { content: ''; width: 16px; height: 3px; border-radius: 2px; background: var(--accent); }
.stage-header h1 { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 30px; letter-spacing: -0.015em; margin: 0 0 10px; text-wrap: balance; }
.stage-header h1 .or { display: block; font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 15.5px; font-weight: 700; margin: 4px 0; }
.stage-header p { font-size: 14.5px; line-height: 1.55; color: var(--stage-muted); margin: 0; text-wrap: balance; }

.hero-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.hero-btn { font: inherit; font-size: 13.5px; font-weight: 700; padding: 11px 20px; border-radius: 999px; cursor: pointer; border: 1.5px solid var(--border); background: var(--surface); color: var(--stage-fg); }
.hero-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.hero-btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.hero-btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

.hero-warning { margin: 22px auto 0; max-width: 480px; background: var(--accent-tint); color: var(--accent-tint-fg); border-radius: 12px; padding: 12px 18px; font-size: 12.5px; line-height: 1.5; text-align: left; }
.hero-warning strong { font-weight: 800; }

/* recent listings — up to 6, 3 per row, more air above (from the buttons)
   than below (into the lede, which it introduces) */
.recent-listings { margin-top: 64px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.recent-listings-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.recent-listings-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; width: 100%; }
.recent-listings-list li { display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--stage-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-listings-list .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.recent-listings-list .dot.drop { background: var(--accent); }
.recent-listings-list .dot.need { background: var(--ink); }
@media (max-width: 560px) {
  .recent-listings-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* short explanation between the hero and "how it works" */
.lede { max-width: 560px; margin: 28px auto 0; text-align: center; }
.lede h2 { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 15.5px; font-weight: 700; margin: 0 0 8px; }
.lede p { font-size: 13.5px; line-height: 1.6; color: var(--stage-muted); margin: 0 0 10px; }
.lede p:last-child { margin-bottom: 0; }

/* trust section — plain text, no card, sits after the board */
.trust { width: 100%; max-width: 560px; margin: 56px auto 0; text-align: center; }
.trust h2 { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 15.5px; font-weight: 700; margin: 0 0 10px; }
.trust p { font-size: 13.5px; line-height: 1.6; color: var(--stage-muted); margin: 0 0 10px; max-width: 58ch; margin-left: auto; margin-right: auto; }
.trust p:last-child { margin-bottom: 0; }
.trust strong { color: var(--stage-fg); }

.affiliation-note { max-width: 560px; margin: 20px auto 0; text-align: center; font-size: 11.5px; line-height: 1.6; color: var(--text-faint); }
.affiliation-note strong { color: var(--text-muted); }

/* Each screen is a normal block of page content, not a bounded card with
   its own scrollbar — the page itself scrolls. Only one is shown at a time. */
.screen {
  display: none;
  width: 100%;
  max-width: 560px;
  margin: 0 auto 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 1px 3px var(--frame-shadow);
  overflow: hidden;
}
.screen.active { display: block; }
#screen-board { max-width: 640px; margin-top: 48px; }

.topbar { display: flex; align-items: center; gap: 12px; padding: 16px 26px 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: -4px; border-radius: 8px; cursor: pointer; border: none; background: transparent; color: var(--text); flex-shrink: 0; }
.iconbtn:hover { background: var(--surface-2); }
.inbox-btn { position: relative; gap: 7px; padding: 0 16px 0 14px; background: var(--surface-2); }
.inbox-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.inbox-dot { position: absolute; top: 7px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface-2); }
.iconbtn:focus-visible, .chip:focus-visible, .card:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- auth ---------- */
.auth-body { display: flex; flex-direction: column; align-items: stretch; padding: 28px 30px 32px; gap: 22px; }
.auth-brand { display: flex; align-items: center; gap: 8px; justify-content: center; }
.auth-brand .bar { width: 5px; height: 19px; border-radius: 3px; background: var(--accent); }
.auth-brand .word { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.auth-copy { text-align: center; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; padding: 0 8px; }
.auth-field label { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 6px; display: block; }
.auth-error { font-size: 11.5px; color: var(--danger); min-height: 14px; }
.auth-sent { display: none; text-align: center; padding: 18px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.auth-sent p { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin: 6px 0 0; }
.auth-sent .again { font-size: 12px; font-weight: 700; color: var(--accent); cursor: pointer; margin-top: 12px; display: inline-block; }
.auth-consent { font-size: 11px; line-height: 1.5; color: var(--text-faint); }
.auth-consent a { color: var(--text-muted); text-decoration: underline; }

.account-head { display: flex; align-items: center; gap: 12px; }
.text-btn { align-self: flex-start; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--text-muted); background: none; border: none; cursor: pointer; padding: 2px; }
.text-btn:hover { color: var(--text); }
.danger-zone { border: 1px solid var(--border); border-radius: 12px; padding: 14px 15px; display: flex; flex-direction: column; gap: 8px; }
.danger-title { font-size: 12.5px; font-weight: 700; color: var(--text); }
.danger-copy { font-size: 11px; line-height: 1.5; color: var(--text-muted); }
.danger-copy a { color: var(--text-muted); text-decoration: underline; }
.btn-danger { align-self: flex-start; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--danger); background: none; border: 1.5px solid var(--danger); border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.btn-danger:hover { background: var(--danger); color: white; }

/* ---------- board ---------- */
.search-bar { position: relative; padding: 20px 26px; background: var(--surface); border-bottom: 1px solid var(--border); }
.search-bar svg { position: absolute; left: 32px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.search-bar input { width: 100%; font: inherit; font-size: 13.5px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 9px 14px 9px 35px; outline: none; -webkit-appearance: none; appearance: none; }
.search-bar input::-webkit-search-cancel-button,
.search-bar input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search-bar input:focus { border-color: var(--accent); }
.search-bar input::placeholder { color: var(--text-faint); }

.filters { flex-shrink: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 14px 0 15px; }
.chiprow { display: flex; gap: 9px; overflow-x: auto; padding: 0 26px; scrollbar-width: none; }
.chiprow::-webkit-scrollbar { display: none; }
.chip { font: inherit; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); white-space: nowrap; cursor: pointer; flex-shrink: 0; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--ink-fg); border-color: var(--ink); }
.chip[aria-pressed="true"]:hover { border-color: var(--ink); color: var(--ink-fg); }
.chip-group + .chip-group { margin-top: 18px; }
.chip-group-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); padding: 0 26px 7px; }
.disclaimer { display: flex; align-items: center; gap: 6px; padding: 14px 26px 0; font-size: 11.5px; color: var(--text-muted); }

.board-scroll { padding: 24px 26px 100px; display: flex; flex-direction: column; gap: 18px; }
.thread-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 16px 16px 18px; }
.thread-head .course { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 600; font-size: 15.5px; }
.thread-head .term { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.thread-cols { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 14px; }
.thread-cols.one-col { grid-template-columns: 1fr; }
.col-label { display: flex; align-items: center; gap: 6px; margin-bottom: 9px; }
.col-label .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.col-label .dot.drop { background: var(--accent); }
.col-label .dot.need { background: var(--ink); }
.col-label span.txt { font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text-muted); }
.col-list { display: flex; flex-direction: column; gap: 10px; }
.empty-note { font-size: 11px; color: var(--text-faint); font-style: italic; padding: 2px 2px; }

.card { text-align: left; width: 100%; font: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 11px; display: flex; flex-direction: column; gap: 5px; cursor: pointer; color: inherit; transition: box-shadow .12s ease, transform .12s ease, border-color .12s ease; }
.card:hover { box-shadow: 0 3px 10px var(--frame-shadow); border-color: var(--text-faint); }
.card:active { transform: scale(0.98); }
.card.mine:hover { border-color: var(--danger); }
.card.mine .msg-cta { color: var(--danger); }
.card .section { font-size: 12.5px; font-weight: 600; }
.card .campus { font-size: 10.5px; color: var(--text-muted); }
.card .note { font-size: 11px; color: var(--text-muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.card .who { display: flex; align-items: center; gap: 5px; }
.card .avatar { width: 16px; height: 16px; border-radius: 50%; background: var(--ink-tint); color: var(--ink); font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.card .name { font-size: 10.5px; color: var(--text-muted); }
.card .msg-cta { font-size: 10px; font-weight: 700; color: var(--accent); }
.no-results, .loading-note { text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 13px; }

.fab { position: fixed; right: 24px; bottom: 24px; z-index: 10; display: flex; align-items: center; gap: 7px; background: var(--accent); color: var(--accent-fg); border: none; font: inherit; padding: 13px 18px; border-radius: 999px; box-shadow: 0 6px 16px oklch(53% 0.21 25 / 0.35); cursor: pointer; }
.fab:hover { background: var(--accent-strong); }
.fab span.lbl { font-size: 13.5px; font-weight: 700; }

/* ---------- post form ---------- */
.form-scroll { padding: 24px 26px 24px; display: flex; flex-direction: column; gap: 18px; }
.toggle-row { display: flex; background: var(--ink-tint); border-radius: 11px; padding: 4px; }
.toggle-btn { flex: 1; text-align: center; padding: 10px 0; border-radius: 8px; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; border: none; background: transparent; color: var(--text-muted); }
.toggle-btn[aria-pressed="true"].drop { background: var(--accent); color: var(--accent-fg); }
.toggle-btn[aria-pressed="true"].need { background: var(--ink); color: var(--ink-fg); }
.toggle-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field label { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 6px; display: block; }
.field label .opt { font-weight: 500; color: var(--text-muted); }
.field-input { width: 100%; font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px; padding: 11px 12px; outline: none; }
.field-input:focus { border-color: var(--accent); }
.field-input::placeholder { color: var(--text-faint); }
select.field-input { appearance: none; background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
textarea.field-input { resize: none; font-family: inherit; }
.submit-bar { padding: 16px 26px 20px; background: var(--surface); border-top: 1px solid var(--border); }
.btn-submit { width: 100%; font: inherit; border: none; background: var(--accent); color: var(--accent-fg); text-align: center; padding: 14px 0; border-radius: 11px; font-size: 14.5px; font-weight: 700; cursor: pointer; }
.btn-submit.need { background: var(--ink); color: var(--ink-fg); }
.btn-submit:disabled { opacity: .6; cursor: default; }
.submit-note, .form-error { text-align: center; font-size: 11px; color: var(--text-muted); margin-top: 9px; }
.form-error { color: var(--danger); min-height: 14px; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 20; transform: translate(-50%, 8px); background: var(--ink); color: var(--ink-fg); font-size: 12.5px; font-weight: 600; padding: 10px 16px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- DM ---------- */
.dm-head-info { display: flex; align-items: center; gap: 11px; }
.dm-avatar { width: 33px; height: 33px; border-radius: 50%; background: var(--ink-tint); color: var(--ink); font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dm-names { display: flex; flex-direction: column; line-height: 1.25; }
.dm-names .nm { font-weight: 700; font-size: 14.5px; }
.dm-names .ctx { font-size: 11px; color: var(--text-muted); }
.dm-banner { flex-shrink: 0; background: var(--accent-tint); padding: 12px 26px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); }
.dm-banner span { font-size: 12px; font-weight: 600; color: var(--accent-tint-fg); }
.dm-note { flex-shrink: 0; padding: 10px 26px; font-size: 11px; color: var(--text-muted); background: var(--surface); border-bottom: 1px solid var(--border); }
.dm-thread { padding: 20px 26px; display: flex; flex-direction: column; gap: 12px; }
.msg-row { display: flex; flex-direction: column; max-width: 100%; }
.msg-row.me { align-items: flex-end; }
.msg-row.them { align-items: flex-start; }
.msg-sender { font-size: 10px; font-weight: 700; letter-spacing: 0.02em; color: var(--text-faint); margin: 0 4px 3px; }
.bubble { max-width: 74%; padding: 10px 13px; border-radius: 15px; font-size: 13.5px; line-height: 1.4; }
.msg-row.them .bubble { background: var(--ink-tint); color: var(--text); border-bottom-left-radius: 4px; }
.msg-row.me .bubble { background: var(--ink); color: var(--ink-fg); border-bottom-right-radius: 4px; }
.msg-time { font-size: 9.5px; color: var(--text-faint); margin-top: 3px; }
.composer { flex-shrink: 0; display: flex; align-items: center; gap: 9px; padding: 14px 26px 20px; background: var(--surface); border-top: 1px solid var(--border); }
.composer input { flex: 1; font: inherit; font-size: 13.5px; color: var(--text); background: var(--ink-tint); border: none; border-radius: 999px; padding: 11px 16px; outline: none; }
.composer input::placeholder { color: var(--text-faint); }
.send-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); border: none; display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; }
.send-btn:disabled { opacity: .5; cursor: default; }

/* ---------- inbox ---------- */
.inbox-list { display: flex; flex-direction: column; padding: 6px 0 10px; }
.inbox-row { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; font: inherit; background: none; border: none; border-bottom: 1px solid var(--border); padding: 16px 26px; cursor: pointer; }
.inbox-row:hover { background: var(--surface-2); }
.inbox-row:last-child { border-bottom: none; }
.inbox-row .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink-tint); color: var(--ink); font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.inbox-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inbox-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.inbox-row-name { font-size: 13.5px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 6px; }
.inbox-row-name .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.inbox-row-time { font-size: 10.5px; color: var(--text-faint); flex-shrink: 0; }
.inbox-row-course { font-size: 11px; color: var(--text-muted); }
.inbox-row-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.caption { margin: 4px auto 0; font-size: 12.5px; color: var(--stage-muted); text-align: center; max-width: 420px; }
.caption b { color: var(--stage-fg); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .card, .fab, .toast { transition: none !important; }
}

/* ---------- desktop ---------- */
@media (min-width: 860px) {
  #screen-board { max-width: 1040px; }

  /* course threads flow into two columns instead of one long list */
  #screen-board .board-scroll {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 20px 24px;
    padding: 24px 26px 96px;
  }
  #screen-board .no-results, #screen-board .loading-note { grid-column: 1 / -1; }
}
