/* =========================================================
   NUMNora.mn — styles
   ---------------------------------------------------------
   1. Theme tokens (dark · light · green)
   2. Base
   3. Layout helpers
   4. Site header & settings
   5. Buttons, badges, chips, inputs
   6. Cards & grids
   7. Home page
   8. Study page
   9. Majors page
   10. Community page
   11. Site footer, toast, modal
   12. Responsive
   ========================================================= */

/* ---------- 1. Theme tokens ---------- */
:root,
:root[data-theme="dark"] {
  --primary: #964b00;
  --primary-strong: #b35c05;
  --primary-text: #e8a560;
  --on-primary: #ffffff;
  --accent: #5dadec;
  --accent-strong: #3c95da;
  --on-accent: #222831;
  --success: #3ddc84;

  --bg: #222831;
  --bg-soft: #1c2129;
  --surface: #2a313b;
  --surface-2: #333b47;
  --border: #3b4452;
  --text: #eeeeee;
  --muted: #a3acb8;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

/* Light — "warm paper": soft ivory instead of flat grey, ink-dark text,
   the brand brown and sky blue as the only strong colours. */
:root[data-theme="light"] {
  --primary: #964b00;
  --primary-strong: #7a3d00;
  --primary-text: #8a4500;
  --accent: #5dadec;
  --accent-strong: #2a7fc9;
  --success: #1f8f5f;

  --bg: #f6f3ee;
  --bg-soft: #efeae2;
  --surface: #ffffff;
  --surface-2: #f8f5f0;
  --border: #e4ddd2;
  --text: #222831;
  --muted: #6a655c;

  --shadow: 0 1px 2px rgba(34, 40, 49, 0.04), 0 12px 32px rgba(74, 52, 28, 0.08);
  color-scheme: light;
}

/* Green — "leaf": the colours of one leaf, from the dark vein to the
   young bright tip. Shapes are leaf-like too (see "Leaf shapes" below). */
:root[data-theme="green"] {
  --primary: #3a7d44;        /* mature leaf */
  --primary-strong: #2a5e33; /* vein / shade */
  --primary-text: #2f6c39;
  --accent: #b5e27b;         /* young leaf */
  --accent-strong: #5f9d2f;
  --on-accent: #1a2b17;
  --success: #3a7d44;

  --bg: #f3f8ec;             /* light through a leaf */
  --bg-soft: #e6f0d9;
  --surface: #fdfff9;
  --surface-2: #f0f6e6;
  --border: #d2e2c0;
  --text: #1a2b17;
  --muted: #586a4f;

  --shadow: 0 1px 2px rgba(26, 43, 23, 0.05), 0 12px 32px rgba(58, 125, 68, 0.11);
  color-scheme: light;
}

/* Leaf shapes: one pointed corner and one round, like a leaf blade */
:root[data-theme="green"] { --radius: 26px 8px 26px 8px; --radius-sm: 16px 6px 16px 6px; }
:root[data-theme="green"] .btn,
:root[data-theme="green"] .chip,
:root[data-theme="green"] .nav-link,
:root[data-theme="green"] .hero-tag,
:root[data-theme="green"] .badge { border-radius: 999px 10px 999px 10px; }
:root[data-theme="green"] .live-card,
:root[data-theme="green"] .cta-banner,
:root[data-theme="green"] .modal-box { border-radius: 36px 10px 36px 10px; }
:root[data-theme="green"] .icon-bubble { border-radius: 60% 12% 60% 12%; }
/* A faint leaf with a midrib behind page titles */
:root[data-theme="green"] .page-intro,
:root[data-theme="green"] .hero { position: relative; }
:root[data-theme="green"] .page-intro::after {
  content: "";
  position: absolute;
  right: 4%;
  top: 14px;
  width: 150px;
  height: 150px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, transparent 49.2%, var(--primary) 49.2% 50.8%, transparent 50.8%), var(--accent);
  opacity: 0.22;
  transform: rotate(8deg);
  pointer-events: none;
}


:root {
  --primary-tint: color-mix(in srgb, var(--primary) 16%, transparent);
  --accent-tint: color-mix(in srgb, var(--accent) 18%, transparent);
  --success-tint: color-mix(in srgb, var(--success) 16%, transparent);
  --gradient: linear-gradient(120deg, var(--primary), var(--accent));
  --gradient-text: linear-gradient(120deg, var(--primary-text), var(--accent));

  --radius: 18px;
  --radius-sm: 12px;
  /* --font-ui: logo, menu, buttons (always Inter).
     --font: everyday text; --font-choice is set by the font picker in settings. */
  --font-ui: "Inter", "Segoe UI", system-ui, -apple-system, "Microsoft YaHei", "PingFang SC",
    "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --font: var(--font-choice, "Inter"), "Segoe UI", system-ui, -apple-system, "Microsoft YaHei", "PingFang SC",
    "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

/* ---------- 2. Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  transition: background 0.25s, color 0.25s;
}

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.01em; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
:root[data-theme="dark"] a { color: var(--accent); }

.is-hidden { display: none !important; }

/* ---------- 3. Layout helpers ---------- */
.container { width: min(1140px, 100% - 32px); margin-inline: auto; }

.section { padding: 64px 0; }
.section--soft { background: var(--bg-soft); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 28px;
}
.section-head h2 { margin: 0; font-size: 1.7rem; }
.section-head a { font-weight: 700; white-space: nowrap; }

/* Top banner on inner pages */
.page-intro {
  padding: 56px 0 36px;
  background:
    radial-gradient(600px 200px at 10% 0%, var(--primary-tint), transparent 70%),
    radial-gradient(500px 200px at 90% 0%, var(--accent-tint), transparent 70%);
}
.page-intro h1 { margin: 0 0 6px; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-intro p { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* ---------- 4. Site header & settings ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex-shrink: 0; }
.brand-domain { color: var(--accent-strong); }
:root[data-theme="dark"] .brand-domain { color: var(--accent); }

.nav-menu {
  display: flex;
  gap: 4px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}
.nav-link {
  display: block;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted) !important;
  font-weight: 600;
}
.nav-link:hover { color: var(--text) !important; background: var(--surface); text-decoration: none; }
.nav-link.is-active { background: var(--primary); color: var(--on-primary) !important; }

.nav-tools { position: relative; display: flex; gap: 8px; }

.icon-btn {
  height: 40px;
  min-width: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: 700 0.85rem var(--font);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); }
.menu-btn { display: none; }

.settings-panel {
  position: absolute;
  top: 50px;
  right: 0;
  width: 280px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.settings-panel h4 {
  margin: 0 0 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.settings-panel h4 + .segmented { margin-bottom: 16px; }
.settings-panel .segmented:last-child { margin-bottom: 0; }

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.segmented button {
  padding: 9px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font: 600 0.85rem var(--font);
  cursor: pointer;
}
.segmented button:hover { border-color: var(--accent); }
.segmented button.is-active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

/* ---------- 5. Buttons, badges, chips, inputs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 700 0.95rem var(--font);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--primary); color: var(--on-primary) !important; }
.btn--primary:hover { background: var(--primary-strong); box-shadow: 0 6px 18px var(--primary-tint); }
.btn--accent { background: var(--accent); color: var(--on-accent) !important; }
.btn--accent:hover { background: var(--accent-strong); }
.btn--ghost { background: transparent; color: var(--text) !important; border-color: var(--border); }
.btn--ghost:hover { border-color: var(--accent); }
.btn--small { padding: 8px 14px; font-size: 0.85rem; }
.btn--block { width: 100%; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
}
.badge--primary { background: var(--primary-tint); color: var(--primary-text); }
.badge--accent { background: var(--accent-tint); color: var(--accent-strong); }
.badge--success { background: var(--success-tint); color: var(--success); }
:root[data-theme="dark"] .badge--accent { color: var(--accent); }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: 600 0.85rem var(--font);
  cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.input {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font: 400 0.95rem var(--font);
  outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
textarea.input { min-height: 90px; resize: vertical; }

.field-label { display: block; margin: 0 0 6px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.field-label + .input { margin-bottom: 12px; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters .input { flex: 1; min-width: 180px; }

.inline-form { display: flex; gap: 8px; }

/* ---------- 6. Cards & grids ---------- */
.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { margin: 0 0 6px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.card--link {
  display: block;
  color: inherit !important;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.card--link:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); text-decoration: none; }

/* Colourful icon bubble, cycles through palette */
.icon-bubble {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 14px;
  background: var(--primary-tint);
}
.icon-bubble--accent { background: var(--accent-tint); }
.icon-bubble--success { background: var(--success-tint); }

.avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--surface);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}
.avatar--large { width: 46px; height: 46px; font-size: 0.95rem; }
.avatar-stack { display: flex; }
.avatar-stack .avatar + .avatar { margin-left: -9px; }

.live-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--success-tint); }
  70% { box-shadow: 0 0 0 9px transparent; }
}

.empty-state { padding: 48px 16px; text-align: center; color: var(--muted); }

/* ---------- 7. Home page ---------- */
.hero { position: relative; overflow: hidden; padding: 88px 0 72px; }
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  pointer-events: none;
}
.hero::before { width: 460px; height: 460px; top: -140px; right: -80px; background: var(--accent); opacity: 0.28; }
.hero::after { width: 420px; height: 420px; bottom: -200px; left: -120px; background: var(--primary); opacity: 0.32; }

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-tag {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
}
:root[data-theme="dark"] .hero-tag { color: var(--accent); }
.hero-title { margin: 0 0 18px; font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; letter-spacing: -0.03em; }
.hero-title .gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-text { max-width: 480px; margin: 0 0 30px; color: var(--muted); font-size: 1.12rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats { display: flex; gap: 36px; margin: 40px 0 0; padding: 0; list-style: none; }
.hero-stats strong { display: block; font-size: 1.8rem; }
.hero-stats span { color: var(--muted); font-size: 0.88rem; }

.live-card {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.live-card-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.live-card-time {
  margin: 18px 0 4px;
  font-size: 3.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.live-card-label { margin: 0 0 18px; color: var(--muted); font-size: 0.9rem; }
.live-card .avatar-stack { justify-content: center; margin-bottom: 20px; }

.school-tile { text-align: center; }
.latest-title { margin-top: 10px; }
.school-tile .icon-bubble { margin-inline: auto; }

.cta-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 44px;
  border-radius: 28px;
  background: var(--gradient);
  color: #fff;
}
.cta-banner h2 { margin: 0; font-size: 1.9rem; }
.cta-banner .btn { background: #fff; color: #222831 !important; }

/* ---------- 8. Study page ---------- */
.study-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: start; }
.study-side { display: flex; flex-direction: column; gap: 18px; }
.room-layout { margin-top: 18px; }

.room-card { display: flex; flex-direction: column; gap: 14px; }
.room-card-top,
.room-card-bottom { display: flex; justify-content: space-between; align-items: center; }
.room-emoji { font-size: 2rem; }
.room-online { font-size: 0.85rem; color: var(--muted); }

.timer-panel { text-align: center; padding: 34px 24px; }
.timer-modes {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 24px;
  padding: 5px;
  border-radius: 999px;
  background: var(--surface-2);
}
.timer-modes button {
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 700 0.85rem var(--font);
  cursor: pointer;
}
.timer-modes button.is-active { background: var(--primary); color: var(--on-primary); }

.timer-ring { position: relative; width: 250px; height: 250px; margin: 0 auto 24px; }
.timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring-track { stroke: var(--surface-2); }
.timer-ring-progress { stroke: var(--accent); transition: stroke-dashoffset 0.4s linear; }
.timer-display {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 3.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.timer-actions { display: flex; justify-content: center; gap: 10px; }
.timer-count { margin: 16px 0 0; color: var(--muted); font-size: 0.9rem; }

.panel-title { display: flex; justify-content: space-between; align-items: center; margin: 0 0 14px; font-size: 1.05rem; }

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.person {
  padding: 14px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  text-align: center;
}
.person .avatar { margin: 0 auto 8px; }
.person-name { font-size: 0.85rem; font-weight: 700; }
.person-status { font-size: 0.74rem; color: var(--muted); }
.person--me { border-color: var(--primary); }

.task-list { margin: 12px 0 0; padding: 0; list-style: none; }
.task-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.task-list li.is-done span { color: var(--muted); text-decoration: line-through; }
.task-list .task-delete { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; }
.task-list .task-empty { background: none; color: var(--muted); font-size: 0.9rem; }

.chat-log { display: flex; flex-direction: column; gap: 10px; height: 240px; margin-bottom: 12px; overflow-y: auto; }
.chat-line { font-size: 0.9rem; }
.chat-line b { color: var(--accent-strong); }
.chat-line--me b { color: var(--primary-text); }
:root[data-theme="dark"] .chat-line b { color: var(--accent); }
:root[data-theme="dark"] .chat-line--me b { color: var(--primary-text); }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 14px 8px; border-radius: var(--radius-sm); background: var(--surface-2); text-align: center; }
.stat strong { display: block; font-size: 1.35rem; }
.stat span { font-size: 0.76rem; color: var(--muted); }

.leaderboard { margin: 0; padding: 0; list-style: none; }
.leaderboard li { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-bottom: 1px solid var(--border); }
.leaderboard li:last-child { border-bottom: 0; }
.leaderboard-rank { width: 22px; font-weight: 800; color: var(--muted); }
.leaderboard-rank.is-top { color: var(--primary-text); }
.leaderboard-hours { margin-left: auto; font-weight: 700; color: var(--accent-strong); }
:root[data-theme="dark"] .leaderboard-hours { color: var(--accent); }
.leaderboard li.is-me { border-radius: var(--radius-sm); background: var(--primary-tint); }

/* ---------- 9. Majors page ---------- */
.notice {
  margin-bottom: 22px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-tint);
  color: var(--muted);
  font-size: 0.88rem;
}
.result-count { margin: 18px 0 14px; color: var(--muted); font-size: 0.9rem; }

.major-card { display: flex; flex-direction: column; gap: 10px; border-top: 4px solid var(--primary); }
.major-card:nth-child(3n + 2) { border-top-color: var(--accent); }
.major-card:nth-child(3n + 3) { border-top-color: var(--success); }
.major-school { font-size: 0.8rem; color: var(--muted); }
.major-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }

.fact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; }
.fact { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.fact span { display: block; font-size: 0.74rem; color: var(--muted); }
.fact strong { font-size: 0.95rem; }

/* ---------- 10. Community page ---------- */
.community-layout { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 86px; }
.sidebar h3 { font-size: 1rem; margin-bottom: 12px; }

.composer { margin-bottom: 22px; }
.composer-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.composer-head .chip-row { margin-left: auto; }
.composer .input { margin-bottom: 10px; }
.composer-foot { display: flex; gap: 10px; flex-wrap: wrap; }
.composer-foot .input { flex: 1; min-width: 160px; margin: 0; }

.post { margin-bottom: 16px; }
.post-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.post-author { font-weight: 700; }
.post-meta { font-size: 0.8rem; color: var(--muted); }
.post-header .badge:last-child { margin-left: auto; }
.post h3 { font-size: 1.15rem; }
.post-body { margin: 0 0 12px; white-space: pre-wrap; opacity: 0.92; }
.post-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.post-actions { display: flex; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.post-actions button {
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: 600 0.88rem var(--font);
  cursor: pointer;
}
.post-actions button:hover { background: var(--surface-2); color: var(--text); }
.post-actions button.is-liked { color: #ff5c7a; }
.post-actions .post-delete { margin-left: auto; }

.replies { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.reply { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 0.9rem; }
.reply-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 0.8rem; }
.reply-head .avatar { width: 24px; height: 24px; font-size: 0.6rem; }

.feed-tools { margin-top: 12px; }
.reset-button { margin-top: 14px; }

.tip-list {display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.9rem; }

/* ---------- 10b. Account page & profile bits ---------- */
.account-page { max-width: 560px; }
.account-page h1 { margin: 0 0 6px; font-size: 1.7rem; }

.form-stack { display: flex; flex-direction: column; margin-top: 20px; }
.form-stack .btn { margin-top: 4px; }
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.code-input { font-size: 1.5rem; font-weight: 700; letter-spacing: 0.5em; text-align: center; }

.auth-links { display: flex; justify-content: space-between; margin-top: 14px; }
.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-strong);
  font: 600 0.88rem var(--font);
  cursor: pointer;
}
:root[data-theme="dark"] .link-btn { color: var(--accent); }

.photo-picker { display: flex; align-items: center; gap: 18px; margin: 22px 0; }
.photo-picker label { cursor: pointer; }

.other-subjects { margin-top: 10px; }
.sign-out { margin-top: 10px; }

.card-note { margin: 4px 0 14px; color: var(--muted); font-size: 0.9rem; }

.profile-mini { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }

.account-link { display: block; }
.account-link .avatar { width: 40px; height: 40px; border: 2px solid var(--primary); }

img.avatar { object-fit: cover; background: var(--surface-2); }
.avatar--xl { width: 96px; height: 96px; font-size: 1.8rem; }

.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* ---------- 10c. Sign-in tabs & password ---------- */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
}
.tabs button {
  padding: 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 700 0.9rem var(--font);
  cursor: pointer;
}
.tabs button.is-active { background: var(--primary); color: var(--on-primary); }

.password-field { position: relative; margin-bottom: 12px; }
.password-field .input { padding-right: 70px; }
.password-toggle {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font: 600 0.8rem var(--font);
  cursor: pointer;
}

.password-rules { display: flex; gap: 12px; flex-wrap: wrap; margin: -4px 0 14px; padding: 0; list-style: none; font-size: 0.8rem; color: var(--muted); }
.password-rules li::before { content: "○ "; }
.password-rules li.is-ok { color: var(--success); }
.password-rules li.is-ok::before { content: "● "; }

.field-hint { margin: 6px 0 0; color: var(--muted); font-size: 0.8rem; }
.form-divider { margin: 22px 0 16px; border: 0; border-top: 1px solid var(--border); }

details.change-password summary { cursor: pointer; font-weight: 700; margin-bottom: 12px; }
details.change-password .input { margin-bottom: 12px; }

.segmented--3 { grid-template-columns: repeat(3, 1fr); }
.segmented--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- 10d. My programs (majors page) ---------- */
.my-programs { margin-bottom: 26px; }
.level-filter { margin-bottom: 14px; }

/* School tiles: one emoji per school */
.school-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.school-tile-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: 600 0.82rem var(--font-ui);
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.3, 0.7, 0.4, 1.5), border-color 0.15s;
}
.school-tile-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.school-tile-btn.is-active { border-color: var(--primary); background: var(--primary-tint); }
.school-emoji { font-size: 1.9rem; line-height: 1.1; }
.school-tile-count { color: var(--muted); font-size: 0.75rem; font-weight: 600; }

.school-group { margin-bottom: 34px; }
.school-group h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 1.25rem; }
.school-group h2 .school-emoji { font-size: 1.6rem; }
.school-group h2 small { padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 0.8rem; }
.major-card h3 { font-size: 1rem; }
.fact--wide { grid-column: 1 / -1; }
.exam-line { font-size: 0.86rem !important; }
.my-programs h2 { margin: 0 0 12px; font-size: 1.2rem; }
.my-program-label { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.level-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.plan-list { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 0.92rem; }
.plan-list li { margin-bottom: 6px; }

/* ---------- 10e. Skeleton loading (shape of the page, no spinners) ---------- */
#site-header:empty { display: block; height: 66px; border-bottom: 1px solid var(--border); }

.skeleton {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 55%, var(--border)) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
.skeleton-card { margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.skeleton-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; list-style: none; }
.skeleton-stack { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.skeleton-circle { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.skeleton-circle.small { width: 32px; height: 32px; }
.skeleton-line { height: 12px; }
.skeleton-line.tall { height: 18px; }
.skeleton-button { height: 34px; border-radius: 999px; margin-top: 12px; }
.w-25 { width: 25%; } .w-40 { width: 40%; } .w-60 { width: 60%; } .w-70 { width: 70%; } .w-90 { width: 90%; }

/* ---------- 10f. Micro-interactions ---------- */
/* YouTube-style: a little bigger under the mouse, a little smaller when pressed (mouse only) */
@media (hover: hover) and (pointer: fine) {
  .btn,
  .chip,
  .icon-btn,
  .tabs button,
  .segmented button,
  .timer-modes button,
  .post-actions button {
    transition: transform 0.15s cubic-bezier(0.3, 0.7, 0.4, 1.5), background 0.15s, border-color 0.15s, box-shadow 0.15s;
  }
  .btn:hover,
  .chip:hover,
  .icon-btn:hover,
  .tabs button:hover,
  .segmented button:hover,
  .timer-modes button:hover,
  .post-actions button:hover { transform: scale(1.05); }
  .btn:active,
  .chip:active,
  .icon-btn:active,
  .post-actions button:active { transform: scale(0.94); }
}

/* Subtle arrow on the buttons we want people to press */
.btn--go::after {
  content: "→";
  display: inline-block;
  margin-left: 2px;
  animation: nudge 2.6s ease-in-out infinite;
}
.btn--go:hover::after { animation: none; transform: translateX(4px); transition: transform 0.2s; }
@keyframes nudge {
  0%, 70%, 100% { transform: translateX(0); }
  80% { transform: translateX(4px); }
  90% { transform: translateX(0); }
}

/* Heart "pop" after liking */
.post-actions button.is-popping { animation: pop 0.45s cubic-bezier(0.3, 0.7, 0.4, 1.5); }
@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* Highlight a section Nora jumped to */
.is-flashing { animation: flash 1.4s ease-out; }
@keyframes flash {
  0% { box-shadow: 0 0 0 0 var(--accent); }
  30% { box-shadow: 0 0 0 6px var(--accent-tint); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---------- 10g. Nora, the guide ---------- */
.nora { position: fixed; right: 20px; bottom: 20px; z-index: 91; --nora-px: calc(62px * var(--nora-scale, 1.5)); }
.nora-button {
  width: var(--nora-px);   /* size is chosen in Settings (js/companions.js sets --nora-scale) */
  height: var(--nora-px);
  touch-action: manipulation; /* no double-tap wait on phones */
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  transform: rotate(-10deg); /* leans 10° toward the upper left */
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.25));
  transition: transform 0.2s cubic-bezier(0.3, 0.7, 0.4, 1.5);
}
.nora-button svg { width: 100%; height: 100%; }
@media (hover: hover) and (pointer: fine) {
  .nora-button:hover { transform: rotate(-10deg) scale(1.08); }
}
.nora-button:active { transform: rotate(-10deg) scale(0.94); }

.nora-bubble,
.nora-panel {
  position: absolute;
  right: 0;
  bottom: calc(var(--nora-px) + 12px);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.nora-bubble {
  width: max-content;
  max-width: 240px;
  padding: 10px 14px;
  border-radius: 16px 16px 4px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  animation: rise 0.3s ease-out;
}
.nora-panel {
  width: 270px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 16px;
  border-radius: 20px;
  animation: rise 0.2s ease-out;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.nora-panel h4 { margin: 14px 0 6px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.nora-panel ul { margin: 0; padding: 0; list-style: none; }
.nora-panel a,
.nora-panel button {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text) !important;
  font: 600 0.88rem var(--font);
  text-align: left;
  cursor: pointer;
}
.nora-panel a:hover,
.nora-panel button:hover { background: var(--surface-2); text-decoration: none; }
.nora-panel a.is-current { background: var(--primary-tint); }
.nora-hello { margin: 0; font-weight: 700; }
.nora-tip { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--accent-tint); font-size: 0.85rem; }

/* ---------- 10h. Mouse buddy ---------- */
.mouse-buddy {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  pointer-events: none;
  line-height: 1;
  user-select: none;
  will-change: transform;
  transform: translate3d(-100px, -100px, 0); /* off-screen until the mouse moves */
  transition: opacity 0.2s;
}
.mouse-buddy.is-away,
.is-playing .mouse-buddy { opacity: 0; } /* hidden while a game is running */

/* ---------- 10i. Games ---------- */
.game-card { display: flex; flex-direction: column; gap: 8px; }
.game-card .btn { align-self: flex-start; margin-top: auto; }
.game-art { width: 64px; height: 64px; font-size: 2rem; border-radius: 20px; }
.game-best { font-size: 0.85rem !important; }

.game-stage { min-height: 420px; }

.quiz-intro,
.quiz-result { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 10px; text-align: center; }
.quiz-intro h2,
.quiz-result h2 { margin: 0; }
.quiz-intro p { max-width: 420px; color: var(--muted); }
.tier-badge { margin: 0; font-size: 1.4rem; font-weight: 800; }
.new-best { margin: 0; color: var(--success); font-weight: 800; }

.quiz { display: grid; gap: 20px; }
.quiz--climb { grid-template-columns: 130px 1fr; }

.quiz-hud { display: flex; gap: 18px; align-items: end; flex-wrap: wrap; }
.quiz-hud span { display: block; font-size: 0.75rem; color: var(--muted); }
.quiz-hud strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.hud-rank { margin-left: auto; font-weight: 700; }
.slip-note { min-height: 1.2em; margin: 4px 0 0; color: var(--accent-strong); font-size: 0.82rem; font-weight: 600; }
:root[data-theme="dark"] .slip-note { color: var(--accent); }

.time-bar { height: 6px; margin: 10px 0; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.time-bar span { display: block; height: 100%; background: var(--gradient); transition: width 0.1s linear; }

.quiz-progress { margin: 0; color: var(--muted); font-size: 0.82rem; }
.quiz-question { margin: 6px 0 16px; font-size: 1.2rem; line-height: 1.4; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font: 600 0.92rem var(--font);
  text-align: left;
  cursor: pointer;
}
.quiz-option:hover:not(:disabled) { border-color: var(--accent); }
.quiz-option:disabled { cursor: default; opacity: 0.75; }
.quiz-option.is-correct { border-color: var(--success); background: var(--success-tint); opacity: 1; }
.quiz-option.is-wrong { border-color: #ff5c7a; background: rgba(255, 92, 122, 0.12); opacity: 1; }
.quiz-key {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.75rem;
}
@media (hover: hover) and (pointer: fine) {
  .quiz-option { transition: transform 0.15s cubic-bezier(0.3, 0.7, 0.4, 1.5); }
  .quiz-option:hover:not(:disabled) { transform: scale(1.03); }
}

.quiz-feedback { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); animation: rise 0.25s ease-out; }
.quiz-feedback.is-good { background: var(--success-tint); }
.quiz-feedback.is-bad { background: rgba(255, 92, 122, 0.12); }
.quiz-feedback p { margin: 6px 0 12px; }

/* Logic Peak mountain */
.mountain-wrap { position: relative; overflow: hidden; border-radius: var(--radius-sm); background: linear-gradient(180deg, var(--accent-tint), transparent); }
.mountain { display: block; width: 100%; height: 100%; min-height: 300px; }
#climber { transition: transform 0.15s linear; }
.snowflake {
  position: absolute;
  top: -10px;
  color: #fff;
  font-size: 0.8rem;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
  animation: snow 4s linear infinite;
}
.snowflake:nth-child(1) { left: 20%; }
.snowflake:nth-child(2) { left: 55%; animation-delay: 1.3s; }
.snowflake:nth-child(3) { left: 80%; animation-delay: 2.6s; }
@keyframes snow {
  to { transform: translate(-12px, 320px); }
}

.rank-ladder { margin: 14px 0 0; padding: 0; list-style: none; font-size: 0.86rem; }
.rank-ladder li { display: flex; justify-content: space-between; padding: 6px 4px; color: var(--muted); border-bottom: 1px dashed var(--border); }
.rank-ladder li.is-reached { color: var(--text); font-weight: 700; }
.rank-ladder li.is-reached span:first-child::after { content: " ✓"; color: var(--success); }

/* Flappy Nora */
.flappy-wrap { display: flex; justify-content: center; }
.flappy-canvas {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 360 / 540;
  border-radius: var(--radius);
  touch-action: manipulation;
  cursor: pointer;
}
.stats-row--4 { grid-template-columns: repeat(4, 1fr); }
.stats-row--4 .stat strong { font-size: 1.05rem; }
.skins-title { margin-top: 18px; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--gradient); }
.skin-row { margin-top: 10px; }
.skin-chip { display: inline-flex; align-items: center; gap: 6px; }
.skin-chip:disabled { opacity: 0.55; cursor: not-allowed; }
.skin-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid; }

/* ---------- 10l. Round timer, sources, community windows ---------- */
.quiz-progress { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.quiz-clock { font-size: 1rem; font-variant-numeric: tabular-nums; color: var(--text); }
.quiz-clock.is-low { color: #ff5c7a; animation: pulse-text 1s infinite; }
@keyframes pulse-text { 50% { opacity: 0.55; } }
.round-time { margin: 6px 0; font-weight: 700; }
.quiz-timeout { color: #ff5c7a; }
.quiz-sources { width: 100%; max-width: 460px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); text-align: left; }
.quiz-sources h4 { margin: 0 0 4px; }
.quiz-sources ul { margin: 0; padding-left: 20px; font-size: 0.9rem; }
.quiz-sources li { margin-bottom: 4px; }

.community-tabs { max-width: 420px; margin-bottom: 24px; }
.resource-card { display: flex; flex-direction: column; gap: 6px; }
.resource-url { margin-top: auto; color: var(--accent-strong); font-size: 0.8rem; font-weight: 600; word-break: break-all; }
:root[data-theme="dark"] .resource-url { color: var(--accent); }

/* ---------- 10k. Shop & NoraCoin ---------- */
.noracoin { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex-shrink: 0; }
.coin-amount { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.shop-art { background: color-mix(in srgb, #f8c21c 22%, transparent); }
.shop-art .noracoin { width: 38px; height: 38px; }
.shop-link { margin-top: 14px; }

#shopView h2 { margin: 30px 0 14px; font-size: 1.3rem; }
.wallet-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 18px;
  background: linear-gradient(120deg, color-mix(in srgb, #f8c21c 18%, var(--surface)), var(--surface)); }
.wallet-balance { margin: 0; font-size: 2.2rem; font-weight: 800; }
.wallet-balance small { font-size: 0.9rem; color: var(--muted); font-weight: 600; }

/* Tier colours (like rarity colours in games) */
.tier--simple { --tier: #8a94a3; }
.tier--decent { --tier: #3aa76d; }
.tier--majestic { --tier: #5dadec; }
.tier--legendary { --tier: #a56cf0; }
.tier--irreplaceable { --tier: #f8c21c; }
.tier--free { --tier: var(--border); }
.tier-chip { border-color: var(--tier); }
.tier-chip.is-active { background: var(--tier); border-color: var(--tier); color: #222831; }

.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; }
.skin-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; text-align: center; border-top: 4px solid var(--tier); }
.skin-card canvas { width: 96px; height: 96px; }
.skin-card h3 { margin: 0; font-size: 0.92rem; }
.skin-card.is-equipped { box-shadow: 0 0 0 2px var(--tier); }
.tier--irreplaceable.skin-card { background: linear-gradient(160deg, color-mix(in srgb, #f8c21c 12%, var(--surface)), var(--surface)); }

.pack-card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.pack-card .btn { margin-top: auto; }
.pack-picker { justify-content: center; margin-bottom: 8px; }
.pack-picker a.chip { color: var(--muted) !important; }

.package-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.package {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font: 600 0.95rem var(--font-ui);
  text-align: left;
  cursor: pointer;
}
.package.is-active { border-color: var(--accent); background: var(--accent-tint); }
.package.is-disabled { opacity: 0.55; cursor: not-allowed; }
div.package { cursor: default; }
.package-price { font-weight: 800; }

.pay-waiting { text-align: center; }
.pay-qr { width: 220px; height: 220px; border-radius: 12px; background: #fff; padding: 8px; }
.pay-apps { justify-content: center; margin-bottom: 14px; }

/* ---------- 10j. University switch + fixed UI font ---------- */
.icon-btn { white-space: nowrap; }

.label-short { display: none; }

/* Menu buttons: a soft ▾ and a small dropdown of shortcuts */
.nav-item { position: relative; }
.nav-link { display: inline-flex; align-items: center; gap: 5px; }
.nav-arrow { font-size: 0.7em; opacity: 0.55; transition: transform 0.2s, opacity 0.2s; }
.nav-item:hover .nav-arrow,
.nav-item:focus-within .nav-arrow { opacity: 1; transform: translateY(2px); }
.nav-sub {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  min-width: 190px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.nav-item:hover .nav-sub,
.nav-item:focus-within .nav-sub { opacity: 1; visibility: visible; transform: none; }
.nav-sub a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text) !important;
  font: 600 0.88rem var(--font-ui);
  white-space: nowrap;
}
.nav-sub a:hover { background: var(--surface-2); text-decoration: none; }

/* The logo, menu and buttons never change with the font picker */
.brand,
.btn,
.nav-link,
.icon-btn,
.chip,
.tabs button,
.segmented button,
.timer-modes button,
.settings-panel,
.settings-panel .input { font-family: var(--font-ui); }

/* ---------- 11. Site footer, toast, modal ---------- */
.site-footer { margin-top: 48px; padding: 28px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.88rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  box-shadow: var(--shadow);
  transform: translateX(-50%) translateY(90px);
  transition: transform 0.25s;
}
.toast.is-visible { transform: translateX(-50%) translateY(0); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
}
.modal-box {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.modal-box h2 { margin: 4px 0 8px; }
.modal-box ul { padding-left: 20px; color: var(--muted); }
.modal-close { position: absolute; top: 16px; right: 16px; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

/* ---------- 12. Responsive ---------- */
@media (max-width: 960px) {
  .hero-layout,
  .study-layout,
  .community-layout { grid-template-columns: 1fr; }
  .grid--3,
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .sidebar { position: static; }
}

@media (max-width: 1080px) {
  .nav-link { padding: 8px 10px; font-size: 0.9rem; }
  .brand-domain { display: none; }
  .site-nav { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn--go::after,
  .skeleton,
  .live-dot { animation: none; }
}

@media (max-width: 760px) {
  .nora { right: 14px; bottom: 14px; --nora-px: calc(54px * var(--nora-scale, 1.5)); }
  .menu-btn { display: block; }
  .nav-tools { margin-left: auto; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 12px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .nav-menu.is-open { display: flex; }
  .section { padding: 44px 0; }
  .hero { padding: 52px 0 48px; }
  .hero-stats { gap: 22px; }
  .grid--3,
  .grid--4 { grid-template-columns: 1fr; }
  .grid--4.school-grid { grid-template-columns: repeat(2, 1fr); }
  .fact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .quiz--climb { grid-template-columns: 70px 1fr; }
  .quiz-options { grid-template-columns: 1fr; }
  .stats-row--4 { grid-template-columns: repeat(2, 1fr); }
  .stat strong { font-size: 1.1rem; }
  .nav-sub { display: none; } /* phone menu: the arrow stays, shortcuts are on the pages themselves */
  .nav-link { display: flex; justify-content: space-between; }
  .brand-name { display: none; }
  .site-nav { gap: 8px; }
    .label-long { display: none; }
  .label-short { display: inline; }
  .sign-in-btn { padding: 8px 10px; }
  .cta-banner { padding: 28px; }
  .timer-modes button { padding: 8px 10px; }
  .composer-head { flex-wrap: wrap; }
  .composer-head .chip-row { margin-left: 0; }
}
