/* ═══════════════════════════════════════════════════════════════
   ACADEMIST — Design system
   Shared shell, components and utilities for every page.
   Brand identity: the periodic table. Element tiles carry meaning
   here — a category, a person's initials, a subject — they are
   never decoration.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Element palette */
  --ac: #1E3A8A;  --ac-soft: #EEF2FF;
  --ca: #14B8A6;  --ca-soft: #E6FFFA;
  --dy: #7C3AED;  --dy-soft: #F3EEFF;
  --er: #4F46E5;  --er-soft: #EEF0FF;
  --mg: #22C55E;  --mg-soft: #ECFDF3;
  --io: #F97316;  --io-soft: #FFF3EA;
  --su: #FACC15;  --su-soft: #FEFCE8;
  --ti: #111827;

  /* Surfaces */
  --bg:        #F6F8FB;
  --surface:   #FFFFFF;
  --surface-2: #F1F5F9;
  --ink:       #0F172A;
  --ink-2:     #475569;
  --muted:     #64748B;
  --line:      #E2E8F0;
  --line-2:    #CBD5E1;
  --danger:    #DC2626;
  --danger-soft:#FEF2F2;

  /* Type */
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'JetBrains Mono', Menlo, Consolas, monospace;

  /* Scale */
  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 24px;
  --sh-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
  --sh:    0 4px 12px rgba(15,23,42,.06), 0 2px 4px rgba(15,23,42,.04);
  --sh-lg: 0 18px 44px rgba(15,23,42,.12), 0 4px 12px rgba(15,23,42,.06);
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

body.acad {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.acad.has-nav { padding-top: var(--nav-h); }

a { color: var(--ac); }
img { max-width: 100%; }

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

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

/* ── Element tile ─────────────────────────────────────────────── */
.el {
  display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 10px;
  background: var(--ac); color: #fff;
  font-weight: 800; line-height: 1;
  flex-shrink: 0; position: relative; overflow: hidden;
}
.el .el-n {
  position: absolute; top: 4px; left: 5px;
  font-size: 8px; font-weight: 300; opacity: .75;
}
.el .el-s { font-size: 17px; letter-spacing: -.02em; }
.el.el-lg { width: 68px; height: 68px; border-radius: 14px; }
.el.el-lg .el-s { font-size: 25px; }
.el.el-lg .el-n { font-size: 10px; top: 6px; left: 7px; }
.el.el-sm { width: 34px; height: 34px; border-radius: 8px; }
.el.el-sm .el-s { font-size: 13px; }
.el.el-sm .el-n { display: none; }

/* ══════════════ NAVBAR ══════════════ */
.acad-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 900;
  height: var(--nav-h);
  background: rgba(17,24,39,.98);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(250,204,21,.22);
  display: flex; align-items: center; gap: 20px;
  padding: 0 clamp(16px, 4vw, 44px);
}
.acad-nav .brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.acad-nav .brand .el { width: 34px; height: 34px; border-radius: 8px; background: var(--ac); }
.acad-nav .brand .el .el-s { font-size: 14px; }
.acad-nav .brand-text {
  color: #fff; font-weight: 800; font-size: 1.02rem; letter-spacing: .06em;
}
.acad-nav .brand-text i { color: var(--su); font-style: normal; }

.nav-main { display: flex; align-items: center; gap: 4px; margin-left: 12px; flex: 1; }
.nav-main a, .nav-drop > button {
  display: flex; align-items: center; gap: 5px;
  color: rgba(255,255,255,.74); text-decoration: none;
  font-size: .8rem; font-weight: 600; letter-spacing: .01em;
  padding: 9px 13px; border-radius: 9px;
  background: none; border: 0; cursor: pointer; font-family: var(--font);
  transition: color .16s, background .16s;
  white-space: nowrap;
}
.nav-main a:hover, .nav-drop > button:hover { color: #fff; background: rgba(255,255,255,.09); }
.nav-main a.current { color: #fff; background: rgba(250,204,21,.14); }

.nav-drop { position: relative; }
.nav-drop > button::after { content: '▾'; font-size: .65rem; opacity: .7; }
.nav-drop-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 214px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh-lg); padding: 7px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s, transform .16s, visibility .16s;
}
.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu { opacity: 1; visibility: visible; transform: none; }
.nav-drop-menu a {
  display: block; color: var(--ink); padding: 9px 11px;
  border-radius: var(--r-sm); font-size: .8rem; font-weight: 600;
}
.nav-drop-menu a:hover { background: var(--surface-2); color: var(--ac); }
.nav-drop-menu a small {
  display: block; color: var(--muted); font-weight: 500;
  font-size: .69rem; margin-top: 1px;
}

.nav-right { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }

.nav-user {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14);
  color: #fff; padding: 5px 12px 5px 5px; border-radius: 100px;
  font-size: .77rem; font-weight: 700; cursor: pointer;
  font-family: var(--font);
}
.nav-user:hover { background: rgba(255,255,255,.16); }
.nav-user .el { width: 28px; height: 28px; border-radius: 7px; }
.nav-user .el .el-s { font-size: 11px; }

.nav-burger {
  display: none; width: 42px; height: 42px;
  background: rgba(255,255,255,.1); border: 0; border-radius: 10px;
  color: #fff; font-size: 1.15rem; cursor: pointer;
}

/* Mobile drawer */
.nav-drawer {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 899;
  background: #111827; padding: 18px clamp(16px,5vw,28px) 40px;
  overflow-y: auto; display: none;
}
.nav-drawer.open { display: block; animation: drawerIn .22s ease; }
@keyframes drawerIn { from { opacity: 0; transform: translateY(-10px); } }
.nav-drawer h4 {
  color: rgba(255,255,255,.4); font-size: .66rem; letter-spacing: .16em;
  text-transform: uppercase; margin: 20px 0 8px; font-weight: 700;
}
.nav-drawer a {
  display: block; color: #fff; text-decoration: none;
  padding: 12px 13px; border-radius: 10px;
  font-size: .87rem; font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav-drawer a:hover { background: rgba(255,255,255,.08); }

/* ══════════════ BUTTONS ══════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: .82rem; font-weight: 700;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s, box-shadow .16s, background .16s, opacity .16s;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-loading { opacity: .6; cursor: not-allowed; }

.btn-primary { background: var(--ac); color: #fff; box-shadow: var(--sh-sm); }
.btn-primary:hover:not(:disabled) { background: #16307a; box-shadow: var(--sh); }
.btn-accent  { background: var(--mg); color: #fff; }
.btn-accent:hover:not(:disabled) { background: #1BA850; }
.btn-live    { background: var(--dy); color: #fff; }
.btn-live:hover:not(:disabled) { background: #6D28D9; }
.btn-warn    { background: var(--io); color: #fff; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-ghost   { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ac); color: var(--ac); }
.btn-quiet   { background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--surface-2); }
.btn-sm { padding: 8px 14px; font-size: .74rem; border-radius: 8px; }
.btn-lg { padding: 15px 30px; font-size: .9rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-on-dark { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.2); }
.btn-on-dark:hover { background: rgba(255,255,255,.2); }

.btn.is-loading::before {
  content: ''; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════ LAYOUT ══════════════ */
.wrap { max-width: 1220px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.section { padding: clamp(48px, 7vw, 84px) 0; }
.section-tight { padding: clamp(28px, 4vw, 46px) 0; }

.page-head {
  background: linear-gradient(150deg, #111827 0%, #1E3A8A 100%);
  color: #fff; padding: clamp(40px,6vw,64px) 0 clamp(44px,7vw,72px);
  position: relative; overflow: hidden;
}
.page-head::after {
  content: ''; position: absolute; inset: auto -60px -120px auto;
  width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(250,204,21,.16), transparent 65%);
}
.page-head .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  color: #fff; padding: 6px 14px; border-radius: 100px;
  font-size: .69rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 18px;
}
.page-head h1 {
  font-size: clamp(1.75rem, 4.4vw, 2.9rem); font-weight: 900;
  line-height: 1.08; margin: 0 0 12px; letter-spacing: -.02em;
}
.page-head h1 em { font-style: normal; color: var(--su); }
.page-head p {
  color: rgba(255,255,255,.8); max-width: 60ch;
  font-size: clamp(.9rem, 1.6vw, 1rem); margin: 0;
}

.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }
.g-4 { grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); }

.section-title {
  font-size: clamp(1.35rem, 2.8vw, 1.95rem); font-weight: 900;
  letter-spacing: -.02em; margin: 0 0 8px; line-height: 1.15;
}
.section-sub { color: var(--muted); font-size: .92rem; margin: 0 0 28px; max-width: 62ch; }

.eyebrow-dark {
  display: inline-block; font-size: .68rem; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ac);
  margin-bottom: 10px;
}

/* ══════════════ CARDS ══════════════ */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh-sm);
}
.card-hover { transition: transform .18s, box-shadow .18s, border-color .18s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); border-color: var(--line-2); }

.stat-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px 20px;
  border-left: 4px solid var(--ac);
}
.stat-card .stat-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.stat-card .stat-value {
  font-size: 1.65rem; font-weight: 900; letter-spacing: -.02em;
  margin-top: 4px; line-height: 1.1;
}
.stat-card .stat-note { font-size: .74rem; color: var(--muted); margin-top: 2px; }

/* ── Badges & chips ───────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 6px;
  font-size: .66rem; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--surface-2); color: var(--ink-2);
}
.badge-free   { background: var(--mg-soft);  color: #15803D; }
.badge-owned  { background: var(--ac-soft);  color: var(--ac); }
.badge-live   { background: #FEE2E2; color: #B91C1C; }
.badge-warn   { background: var(--io-soft);  color: #C2410C; }
.badge-draft  { background: var(--surface-2);color: var(--muted); }
.badge-live .dot {
  width: 6px; height: 6px; border-radius: 50%; background: #DC2626;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.chip {
  display: inline-block; padding: 4px 10px; border-radius: 100px;
  background: var(--surface-2); color: var(--ink-2);
  font-size: .68rem; font-weight: 700; border: 1px solid transparent;
}
.chip-btn { cursor: pointer; font-family: var(--font); }
.chip-btn:hover { border-color: var(--line-2); }
.chip-btn.on { background: var(--ac); color: #fff; }

.mono { font-family: var(--mono); font-size: .84em; letter-spacing: -.01em; }
.code-pill {
  font-family: var(--mono); font-size: .82rem; font-weight: 600;
  background: var(--surface-2); border: 1px dashed var(--line-2);
  padding: 5px 11px; border-radius: 7px; display: inline-block;
  letter-spacing: .04em;
}

/* ══════════════ FORMS ══════════════ */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: .74rem; font-weight: 700;
  letter-spacing: .03em; margin-bottom: 6px; color: var(--ink-2);
}
.field .hint { font-size: .72rem; color: var(--muted); margin-top: 5px; }
.field .err  { font-size: .74rem; color: var(--danger); margin-top: 5px; font-weight: 600; }

.input, .select, .textarea {
  width: 100%; font-family: var(--font); font-size: .87rem;
  padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--line-2); background: var(--surface);
  color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--ac);
  box-shadow: 0 0 0 3px rgba(30,58,138,.12);
}
.input::placeholder, .textarea::placeholder { color: #94A3B8; }
.textarea { resize: vertical; min-height: 108px; line-height: 1.55; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%2364748B' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 38px;
}
.field-row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .82rem; cursor: pointer; margin-bottom: 10px;
}
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--ac); flex-shrink: 0; }

.file-drop {
  border: 2px dashed var(--line-2); border-radius: var(--r);
  padding: 28px 20px; text-align: center; cursor: pointer;
  background: var(--surface-2); transition: border-color .15s, background .15s;
}
.file-drop:hover, .file-drop.drag { border-color: var(--ac); background: var(--ac-soft); }
.file-drop strong { display: block; font-size: .86rem; margin-bottom: 3px; }
.file-drop span { font-size: .75rem; color: var(--muted); }

/* ══════════════ TABLES ══════════════ */
.table-wrap {
  overflow-x: auto; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
table.tbl { width: 100%; border-collapse: collapse; font-size: .82rem; min-width: 560px; }
table.tbl th {
  text-align: left; padding: 12px 16px;
  background: var(--surface-2); color: var(--muted);
  font-size: .67rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--surface-2); }

/* ══════════════ MODALS ══════════════ */
.modal-back {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15,23,42,.55); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.modal-back.open { display: flex; animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  background: var(--surface); border-radius: var(--r-xl);
  width: 100%; max-width: 460px; box-shadow: var(--sh-lg);
  max-height: 92vh; overflow-y: auto; animation: modalIn .24s cubic-bezier(.2,.8,.3,1);
}
.modal-wide { max-width: 720px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-head {
  padding: 24px 26px 0; display: flex; align-items: flex-start;
  justify-content: space-between; gap: 16px;
}
.modal-head h3 { margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.modal-head p { margin: 6px 0 0; font-size: .82rem; color: var(--muted); }
.modal-body { padding: 20px 26px 26px; }
.modal-x {
  background: var(--surface-2); border: 0; width: 32px; height: 32px;
  border-radius: 8px; cursor: pointer; color: var(--muted);
  font-size: 1.1rem; line-height: 1; flex-shrink: 0;
}
.modal-x:hover { background: var(--line); color: var(--ink); }

/* ══════════════ FEEDBACK ══════════════ */
#toaster {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 2000; display: flex; flex-direction: column; gap: 8px;
  align-items: center; pointer-events: none; width: min(94vw, 440px);
}
.toast {
  background: var(--ti); color: #fff; padding: 12px 20px;
  border-radius: 11px; font-size: .81rem; font-weight: 600;
  box-shadow: var(--sh-lg); display: flex; align-items: center; gap: 9px;
  animation: toastIn .24s cubic-bezier(.2,.8,.3,1);
  border-left: 3px solid var(--su); max-width: 100%;
}
.toast.ok  { border-left-color: var(--mg); }
.toast.bad { border-left-color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } }
.toast.out { opacity: 0; transform: translateY(10px); transition: .25s; }

.note {
  padding: 13px 16px; border-radius: var(--r-sm);
  font-size: .81rem; line-height: 1.5; margin-bottom: 16px;
  border-left: 3px solid var(--ac); background: var(--ac-soft); color: #1E3A8A;
}
.note-ok   { border-left-color: var(--mg); background: var(--mg-soft); color: #14532D; }
.note-bad  { border-left-color: var(--danger); background: var(--danger-soft); color: #991B1B; }
.note-warn { border-left-color: var(--io); background: var(--io-soft); color: #9A3412; }

.empty { text-align: center; padding: 56px 24px; color: var(--muted); }
.empty .el { margin: 0 auto 18px; opacity: .3; }
.empty h3 { font-size: 1.05rem; font-weight: 800; color: var(--ink); margin: 0 0 6px; }
.empty p { font-size: .86rem; margin: 0 auto 20px; max-width: 42ch; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, #E8EDF3 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--ac);
  animation: spin .75s linear infinite; margin: 40px auto;
}

/* ══════════════ FOOTER ══════════════ */
.acad-foot {
  background: var(--ti); color: rgba(255,255,255,.62);
  padding: clamp(44px,6vw,64px) 0 26px; margin-top: auto;
  font-size: .82rem;
}
.foot-grid {
  display: grid; gap: 34px;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  padding-bottom: 34px; border-bottom: 1px solid rgba(255,255,255,.1);
}
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; gap: 26px; } }
.foot-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.foot-brand span { color: #fff; font-weight: 800; letter-spacing: .06em; font-size: 1.02rem; }
.foot-brand span i { color: var(--su); font-style: normal; }
.acad-foot h5 {
  color: #fff; font-size: .69rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; margin: 0 0 14px;
}
.acad-foot a { color: rgba(255,255,255,.62); text-decoration: none; display: block; padding: 5px 0; }
.acad-foot a:hover { color: var(--su); }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap; padding-top: 22px; font-size: .75rem;
}
.foot-social { display: flex; gap: 8px; }
.foot-social a {
  width: 34px; height: 34px; border-radius: 9px;
  background: rgba(255,255,255,.08); display: flex;
  align-items: center; justify-content: center; padding: 0;
}
.foot-social a:hover { background: var(--ac); color: #fff; }

/* ══════════════ UTILITIES ══════════════ */
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.tc { text-align: center; } .tr { text-align: right; }
.muted { color: var(--muted); }
.small { font-size: .78rem; }
.tiny  { font-size: .7rem; }
.bold  { font-weight: 700; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-3 {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.divider { height: 1px; background: var(--line); margin: 24px 0; border: 0; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s, transform .5s; }
.reveal.in { opacity: 1; transform: none; }

/* ── Responsive nav ───────────────────────────────────────────── */
@media (max-width: 1000px) {
  .nav-main { display: none; }
  .nav-burger { display: block; }
  .nav-right .btn { display: none; }
  .nav-right .nav-user { display: flex; }
}
@media (max-width: 480px) {
  .acad-nav .brand-text { display: none; }
  .nav-user span.uname { display: none; }
  .nav-user { padding: 5px; }
}
