/* Studiety.
   Palette taken from the Studiety wordmark: jade #13926c with a warm gold accent.
   Flat neutral surfaces, small radii, Barlow Condensed headings + Inter body. */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=Barlow:wght@400;500;600&family=Inter:wght@400;500;600&display=swap');

:root {
  /* Brand jade, sampled from the Studiety wordmark (#13926c) */
  --brand: #13926c;
  --brand-600: #0d7857;
  --brand-tint: #e7f4ef;
  --accent: #e0913a;         /* warm gold — bookmarks, likes, highlights */
  --bg: #f3f5f4;
  --surface: #ffffff;
  --surface-2: #e9edeb;
  --text: #1b211f;
  --muted: #667370;
  --line: color-mix(in srgb, #1b211f 14%, transparent);
  --pos: #17a06f;
  --neg: #d0533f;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 7px;
  --shadow-sm: 0 1px 2px color-mix(in srgb, #2b2b2d 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2b2b2d 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2b2b2d 22%, transparent);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Barlow Condensed", "Barlow", var(--font-body);
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #3fbe93; --brand-600: #5ccfa7; --brand-tint: #102a22;
    --accent: #e9a94f;
    --bg: #101614; --surface: #18211d; --surface-2: #1f2a25; --text: #e6efeb;
    --muted: #94a29d; --line: rgba(230,240,236,0.16);
    --pos: #4ecf9a; --neg: #ff8a72;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 3px 10px rgba(0,0,0,.35);
    --shadow-lg: 0 12px 32px rgba(0,0,0,.45);
  }
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-body); color: var(--text); background: var(--bg);
  line-height: 1.55; font-size: 15px; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .brand, .code, .course-header .code { font-family: var(--font-head); }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface);
  border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: 11px 22px;
  display: flex; align-items: center; gap: 18px; }
.brand:hover { text-decoration: none; }
.search { flex: 1; max-width: 420px; }
.search input { width: 100%; padding: 9px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-md); background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.search input:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.mainnav { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.mainnav a { color: var(--muted); font-weight: 600; font-size: 14px; }
.mainnav a:hover { color: var(--text); text-decoration: none; }
.mainnav a.active { color: var(--text); }
.userchip { color: var(--muted); font-size: 14px; font-weight: 600; }
.inline { display: inline; }
.linklike { background: none; border: none; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 14px; padding: 0; }
.linklike:hover { color: var(--text); text-decoration: underline; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 9px 16px; border-radius: var(--radius-md); font: inherit; font-weight: 600; font-size: 14px; }
.btn:hover { border-color: var(--brand); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.flash { background: var(--brand); color: #fff; text-align: center; padding: 8px; font-size: 14px; }

/* Layout with sidebar */
.layout { display: grid; grid-template-columns: 250px 1fr; gap: 30px; padding: 28px 0; }
@media (max-width: 820px) { .layout { grid-template-columns: 1fr; } }

.filters { position: sticky; top: 76px; align-self: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px; box-shadow: var(--shadow-sm); }
.filters h2 { font-family: var(--font-head); font-size: 15px; letter-spacing: .02em;
  margin: 0 0 4px; text-transform: uppercase; }
.filters .sublabel { font-size: 12px; color: var(--muted); margin: 0 0 14px; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 11px; font-weight: 700; color: var(--muted);
  margin-bottom: 5px; text-transform: uppercase; letter-spacing: .05em; }
.field input, .field select { width: 100%; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: var(--radius-md); background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.filters .btn { width: 100%; justify-content: center; margin-top: 2px; }
.filters .clear { display: block; text-align: center; margin-top: 9px; font-size: 13px; color: var(--muted); }

/* Result header + sort */
.result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 6px; flex-wrap: wrap; }
.result-head h1 { font-size: 30px; margin: 0; text-transform: uppercase; letter-spacing: .01em; }
.result-count { color: var(--muted); font-size: 14px; }
.toolbar { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; }
.toolbar .sort { display: flex; gap: 4px; }
.toolbar .sort a { font-size: 13px; font-weight: 600; color: var(--muted); padding: 5px 11px;
  border: 1px solid var(--line); border-radius: 999px; }
.toolbar .sort a.on { color: #fff; background: var(--brand); border-color: var(--brand); }
.toolbar .sort a:hover { text-decoration: none; border-color: var(--brand); }
.pin-note { font-size: 12px; color: var(--muted); margin: 0 0 12px; }

/* Course table */
.course-table { width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.course-table thead th { text-align: left; font-family: var(--font-body); font-size: 11px;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.course-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.course-table tbody tr:last-child td { border-bottom: none; }
.course-table tbody tr:hover { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.col-bm { width: 34px; padding-right: 0 !important; }
.course-table .code { font-family: var(--font-head); font-weight: 700; font-size: 17px;
  color: var(--brand); white-space: nowrap; letter-spacing: .01em; }
.course-table .cname { font-weight: 600; color: var(--text); }
.course-table .cname:hover { text-decoration: none; color: var(--brand-600); }
.course-table .cdept { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.course-table .profs { color: var(--muted); font-size: 13px; max-width: 220px; }
.course-table .num { color: var(--muted); font-size: 13px; white-space: nowrap; }
.reviews-badge { font-weight: 700; color: var(--text); }
.reviews-badge.zero { color: var(--muted); font-weight: 500; }

/* Bookmark star */
.bookmark { background: none; border: none; cursor: pointer; font-size: 17px; line-height: 1;
  color: var(--muted); padding: 2px; }
.bookmark.on { color: var(--accent); }
.bookmark:hover { color: var(--accent); }

/* Pagination */
.pager { display: flex; gap: 8px; justify-content: center; margin: 24px 0 8px; }
.pager a, .pager span { padding: 7px 13px; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface); font-size: 14px; }
.pager .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager .disabled { color: var(--muted); opacity: .5; }

/* Course page header */
.course-header { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); margin: 26px 0 0; }
.course-header .code { color: var(--brand); font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.course-header h1 { margin: 2px 0 6px; font-size: 32px; line-height: 1.1; text-transform: uppercase; }
.course-header .sub { color: var(--muted); font-size: 14px; }
.course-header .header-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.teacher-tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12.5px; background: var(--brand-tint); color: var(--brand-600);
  padding: 4px 10px; border-radius: var(--radius-md); font-weight: 600; }
.tag:hover { text-decoration: none; filter: brightness(.97); }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 24px 0 0; overflow-x: auto; }
.tabs a { padding: 12px 18px; font-family: var(--font-head); font-weight: 600; color: var(--muted);
  font-size: 16px; border-bottom: 2px solid transparent; white-space: nowrap; text-transform: uppercase; letter-spacing: .02em; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .count { font-weight: 700; opacity: .65; font-size: 14px; }
.tab-body { padding: 24px 0; }

/* Cards + sections */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.card h3 { margin: 0 0 12px; font-size: 18px; text-transform: uppercase; letter-spacing: .02em; }
.section-label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
  margin: 0 0 8px; font-weight: 700; }
.prose { white-space: pre-wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; border: 1px solid var(--line); background: var(--bg);
  padding: 5px 11px; border-radius: var(--radius-md); font-size: 13px; font-weight: 600; }
.chip .n { color: var(--brand); font-family: var(--font-head); }

/* Flag checklist */
.flag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.flag { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--radius-md);
  background: var(--bg); border: 1px solid var(--line); font-size: 14px; }
.flag .mark { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0; }
.flag.yes .mark { background: color-mix(in srgb, var(--pos) 18%, transparent); color: var(--pos); }
.flag.yes { border-color: color-mix(in srgb, var(--pos) 35%, transparent); }

/* Reviews */
.review { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  padding: 16px 18px; margin-bottom: 12px; display: flex; gap: 14px; box-shadow: var(--shadow-sm); }
.votebox { display: flex; flex-direction: column; align-items: center; gap: 2px; flex-shrink: 0; width: 42px; }
.votebox form { margin: 0; }
.vote { background: none; border: 1px solid var(--line); border-radius: var(--radius-md); width: 34px; height: 30px;
  cursor: pointer; font-size: 14px; color: var(--muted); display: grid; place-items: center; }
.vote:hover { border-color: var(--brand); color: var(--text); }
.vote.up.on { background: color-mix(in srgb, var(--pos) 16%, transparent); color: var(--pos); border-color: var(--pos); }
.vote.down.on { background: color-mix(in srgb, var(--neg) 14%, transparent); color: var(--neg); border-color: var(--neg); }
.votebox .score { font-weight: 800; font-size: 15px; font-family: var(--font-head); }
.review-body { flex: 1; min-width: 0; }
.review-body .prose { margin: 0 0 10px; }
.review-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.review-meta .who { font-weight: 600; color: var(--text); }
.review-meta .anon { font-style: italic; }

.filterbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filterbar .lbl { font-size: 13px; color: var(--muted); font-weight: 700; }

/* Files table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
table.files { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 14px; }
table.files th, table.files td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
table.files th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  background: var(--surface-2); }
table.files tr:last-child td { border-bottom: none; }
.kind-badge { font-weight: 700; color: var(--brand-600); }
.unavailable { color: var(--muted); font-size: 12.5px; }

/* Tutor cards */
.tutor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tutor { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 16px; box-shadow: var(--shadow-sm); }
.tutor h4 { margin: 0 0 4px; font-size: 18px; text-transform: uppercase; }
.tutor .loc { color: var(--muted); font-size: 13px; }
.tiles { display: flex; gap: 8px; margin: 12px 0; }
.tile { flex: 1; text-align: center; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 8px 4px; }
.tile .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tile .v { font-weight: 800; font-size: 16px; font-family: var(--font-head); }
.verified { color: var(--pos); font-size: 11px; font-weight: 700; }
.tutor .bio { font-size: 13px; color: var(--muted); margin: 8px 0; }

.empty { text-align: center; color: var(--muted); padding: 46px 20px; }
.empty .big { font-family: var(--font-head); font-size: 20px; text-transform: uppercase;
  color: var(--text); margin-bottom: 4px; }

/* Login */
.auth { max-width: 400px; margin: 60px auto; }
.auth .card h1 { font-size: 26px; margin: 0 0 6px; text-transform: uppercase; }
.auth .card p.sub { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.auth .field input { width: 100%; }
.auth .btn { width: 100%; justify-content: center; margin-top: 6px; }
.auth .err { background: color-mix(in srgb, var(--neg) 12%, transparent); color: var(--neg);
  border: 1px solid color-mix(in srgb, var(--neg) 32%, transparent);
  padding: 9px 12px; border-radius: var(--radius-md); font-size: 14px; margin-bottom: 14px; }

.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 26px 0; margin-top: 44px; }
.badge-signin { color: var(--muted); font-size: 13px; }

/* ---------------- Admin panel ---------------- */
body.admin { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 200px 1fr; gap: 0; max-width: 1240px; margin: 0 auto; }
@media (max-width: 760px){ .admin-shell { grid-template-columns: 1fr; } }
.admin-side { border-right: 1px solid var(--line); padding: 20px 12px; display: flex; flex-direction: column; gap: 2px; min-height: calc(100vh - 56px); }
.admin-side a { padding: 9px 12px; border-radius: var(--radius-md); color: var(--muted); font-weight: 600; font-size: 14px; }
.admin-side a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.admin-side a.on { background: var(--brand); color: #fff; }
.admin-main { padding: 26px 26px 60px; min-width: 0; }
.admin-h1 { font-family: var(--font-head); font-size: 26px; text-transform: uppercase; margin: 0; }
.admin-sub { color: var(--muted); margin: 4px 0 20px; }
.admin-count { color: var(--muted); font-size: 15px; font-family: var(--font-body); font-weight: 600; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-search { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.admin-search input[type=search], .admin-search select { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; min-width: 200px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
.stat-n { font-family: var(--font-head); font-size: 30px; font-weight: 700; color: var(--brand); }
.stat-k { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.admin-quick { display: flex; gap: 10px; flex-wrap: wrap; }

.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; font-size: 14px; box-shadow: var(--shadow-sm); }
.admin-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 11px 13px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.admin-table td { padding: 10px 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.admin-table .mono { font-family: var(--font-head); font-weight: 700; white-space: nowrap; }
.admin-table .muted { color: var(--muted); font-size: 13px; }
.admin-table tr.is-hidden { opacity: .55; }
.rev-text { max-width: 460px; }
.row-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.ok { color: var(--pos); font-weight: 700; }
.no { color: var(--neg); font-weight: 700; }
.btn-danger { border-color: color-mix(in srgb, var(--neg) 45%, transparent); color: var(--neg); }
.btn-danger:hover { background: var(--neg); color: #fff; border-color: var(--neg); }

.admin-form { max-width: 720px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.admin-form .field { margin-bottom: 15px; }
.admin-form label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.admin-form input, .admin-form textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.admin-form textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width:560px){ .grid2 { grid-template-columns: 1fr; } }
.flag-check { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 6px; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text); }
.chk input { width: auto; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; }
.inline-form { display: flex; gap: 6px; }
.inline-form input { padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); color: var(--text); font: inherit; font-size: 13px; min-width: 150px; }
.merge-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 16px; margin-bottom: 16px; }
.merge-box summary { cursor: pointer; font-weight: 600; }
.merge-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.merge-form input { padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); color: var(--text); font: inherit; }

/* ---------------- Authoring (composers, account) ---------------- */
.composer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 0 16px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.composer summary { cursor: pointer; font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; padding: 14px 0; color: var(--brand); font-size: 15px; }
.composer[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.composer form { padding-bottom: 16px; }
.composer textarea, .composer input[type=text], .composer input[type=email], .composer input[type=number], .composer select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--bg); color: var(--text); font: inherit; font-size: 14px; margin-bottom: 10px; }
.composer textarea { resize: vertical; }
.composer-row { display: flex; gap: 10px; flex-wrap: wrap; }
.composer-row > * { flex: 1; min-width: 150px; }
.composer-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.composer-actions .muted { flex: 1; font-size: 12px; color: var(--muted); min-width: 200px; }
.prof-pick { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 10px; }
.prof-pick .lbl { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.signin-prompt { color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 18px; }
.own-actions { display: inline-flex; align-items: center; gap: 8px; }
.own-actions form { margin: 0; }
.own-actions .linklike, .mine-meta .linklike { color: var(--neg); }
.my-listing { background: var(--brand-tint); color: var(--brand-600); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); border-radius: var(--radius-lg); padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
.my-listing a { font-weight: 600; }
.auth-alt { margin-top: 16px; font-size: 14px; color: var(--muted); text-align: center; }

.mine-row { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mine-row:last-child { border-bottom: none; }
.mine-row .muted { flex: 1; min-width: 140px; }
.mine-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.mine-meta form { margin: 0; }

/* ---------------- Social feed ---------------- */
.feed-wrap { max-width: 680px; margin: 0 auto; }
.post-composer { padding-top: 14px; }
.post-composer textarea { margin-bottom: 8px; }
.post-composer select { width: auto; min-width: 140px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); color: var(--text); font: inherit; font-size: 13px; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 17px; flex-shrink: 0; }
.avatar-lg { width: 56px; height: 56px; font-size: 24px; }
.post-who { flex: 1; min-width: 0; font-weight: 600; }
.post-meta { font-size: 12px; color: var(--muted); font-weight: 400; }
.post-del { margin-left: auto; }
.post-body { margin: 0 0 10px; }
.post-actions { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.likebtn { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; font: inherit; font-size: 13px; color: var(--muted); }
.likebtn:hover { border-color: var(--accent); color: var(--accent); }
.likebtn.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); border-color: var(--accent); font-weight: 700; }
.commentlink { font-size: 13px; color: var(--muted); }
.comment { padding: 6px 0 6px 10px; border-left: 2px solid var(--line); margin-bottom: 4px; font-size: 14px; display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.comment form { margin: 0; }
.comment-form { display: flex; gap: 8px; margin-top: 8px; }
.comment-form input { flex: 1; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.topic-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-600); }
.t-question { background: #fff3e0; color: #b26a00; } .t-housing { background: #e8f5e9; color: #2e7d32; }
.t-market { background: #fce4ec; color: #ad1457; } .t-jobs { background: #ede7f6; color: #5e35b1; }
.t-events { background: #e0f7fa; color: #00838f; } .t-study { background: #e3f2fd; color: #1565c0; }
@media (prefers-color-scheme: dark) {
  .t-question { background: #3a2b12; color: #ffb74d; } .t-housing { background: #16301a; color: #81c784; }
  .t-market { background: #33141f; color: #f48fb1; } .t-jobs { background: #241a38; color: #b39ddb; }
  .t-events { background: #0f2d31; color: #4dd0e1; } .t-study { background: #12283c; color: #64b5f6; }
}
.chip-on { border-color: var(--brand) !important; color: var(--brand) !important; font-weight: 700; }
.ulink { font-weight: 600; color: var(--text); }
.ulink:hover { color: var(--brand-600); }

/* ---------------- Gamification ---------------- */
.pts-chip { background: var(--brand-tint); color: var(--brand-600) !important; font-weight: 700; padding: 4px 11px; border-radius: 999px; font-size: 13px; }
.pts-chip:hover { text-decoration: none; filter: brightness(.97); }
.lvl-chip { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); color: var(--muted); padding: 2px 8px; border-radius: 999px; }
.level-block { margin-top: 12px; }
.level-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; margin-bottom: 6px; }
.level-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.level-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 999px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.badge { display: inline-flex; align-items: center; gap: 5px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: default; }
.profile-hero-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.board { list-style: none; margin: 0; padding: 0; }
.board li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.board li:last-child { border-bottom: none; }
.rank { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 14px; flex-shrink: 0; }
.rank.r1 { background: #ffd54f; color: #6d4c00; } .rank.r2 { background: #cfd8dc; color: #37474f; } .rank.r3 { background: #ffab91; color: #7a3010; }
.board-pts { margin-left: auto; font-weight: 700; font-size: 14px; }
.earn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 8px; font-size: 14px; }
.earn-grid span { display: flex; justify-content: space-between; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 8px 12px; }

/* ---------------- Mobile pass ---------------- */
.tabbar { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: 64px; }
  .topbar-inner { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .brand { font-size: 21px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .mainnav { gap: 10px; }
  .mainnav a:not(.pts-chip):not(.btn), .mainnav form, .mainnav .userchip { display: none; }
  .mainnav a.btn { display: inline-flex; }
  .mainnav .pts-chip { display: inline-block; }

  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 11px; font-weight: 600; color: var(--muted); }
  .tabbar a span { font-size: 20px; line-height: 1; }
  .tabbar a.active { color: var(--brand); }
  .tabbar a:hover { text-decoration: none; }

  .container { padding: 0 14px; }
  .layout { padding: 16px 0; gap: 16px; }
  .filters { position: static; }
  .result-head h1 { font-size: 24px; }
  .course-table thead th:nth-child(4), .course-table td:nth-child(4) { display: none; }
  .course-table td, .course-table thead th { padding: 10px 10px; }
  .course-header { padding: 16px; }
  .course-header h1 { font-size: 24px; }
  .tab-body { padding: 16px 0; }
  .admin-main { padding: 16px 14px 70px; overflow-x: auto; }
  .admin-table { min-width: 640px; }
  .admin-side { flex-direction: row; overflow-x: auto; min-height: 0; border-right: none; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .feed-wrap { max-width: none; }
  .tiles { flex-wrap: wrap; }
}

/* ---------------- Admin v2 ---------------- */
.attention-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.attention { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--text); border-radius: var(--radius-lg); padding: 10px 16px; font-size: 14px; }
.attention:hover { text-decoration: none; border-color: var(--accent); }
.attention strong { font-family: var(--font-head); font-size: 18px; color: var(--neg); }
.chart { display: flex; gap: 4px; align-items: flex-end; height: 120px; padding: 6px 0 0; }
.chart-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.chart-day .bars { flex: 1; display: flex; align-items: flex-end; gap: 2px; width: 100%; justify-content: center; }
.bar { width: 26%; max-width: 10px; min-height: 2px; border-radius: 2px 2px 0 0; }
.b-signup { background: var(--brand); } .b-post { background: var(--accent); } .b-review { background: var(--pos); }
.chart-lbl { font-size: 10px; color: var(--muted); }
.chart-legend { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.chart-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }
.setting-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.setting-row:last-child { border-bottom: none; }
.setting-inline { align-items: center; }
.setting-row .muted { font-size: 12.5px; font-weight: 400; }
.admin-form h3 { text-transform: uppercase; font-size: 15px; letter-spacing: .03em; margin-bottom: 6px; }

/* ---------------- Scheduler ---------------- */
.sched-page { padding: 24px 0 40px; }
.term-pick select { padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; }
.step-n { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 15px; flex-shrink: 0; }

.sched-search { display: flex; gap: 8px; margin-bottom: 12px; }
.sched-search input { flex: 1; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); color: var(--text); font: inherit; font-size: 15px; }
.course-hits { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; max-height: 340px; overflow-y: auto; }
.hit { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); flex-wrap: wrap; }
.hit-main { flex: 1; min-width: 180px; font-size: 14px; }
.hit .muted { font-size: 12.5px; }
.cart { margin-top: 8px; }
.cart-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cart-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: #fff; border-radius: 999px; padding: 6px 8px 6px 14px; font-weight: 700; font-size: 14px; }
.cart-chip form { margin: 0; display: inline; }
.cart-chip .x { background: rgba(255,255,255,.25); border: none; color: #fff; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; font-size: 11px; line-height: 1; }
.cart-chip .x:hover { background: rgba(255,255,255,.45); }

.prefs { display: flex; flex-direction: column; gap: 14px; }
.pref-row { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.pref-row > label { min-width: 110px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: 8px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: inline-block; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; font-weight: 600; cursor: pointer; background: var(--bg); }
.seg-opt input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.seg-opt span:hover { border-color: var(--brand); }
.time-inputs { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 14px; flex: 1; }
.time-inputs select { padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); color: var(--text); font: inherit; }
.btn-generate { align-self: flex-start; font-size: 15px; padding: 12px 22px; }

.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.opt-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-sm); }
.opt-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.opt-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.opt-tags .tag { font-size: 11px; padding: 2px 8px; }
.opt-stats { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.opt-stats .free { color: var(--pos); font-weight: 700; }
.opt-list { margin: 10px 0; font-size: 13px; }
.opt-list summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.opt-sec { padding: 4px 0; border-bottom: 1px solid var(--line); }
.opt-sec:last-child { border-bottom: none; }
.opt-sec .muted { display: block; font-size: 12px; }
.warn-line { background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: var(--radius-md); padding: 9px 14px; font-size: 14px; margin-bottom: 12px; }

.sched-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.sched-tab { padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--radius-md) var(--radius-md) 0 0; background: var(--surface); font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.sched-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.sched-tab:hover { text-decoration: none; border-color: var(--brand); }
.sched-tab.add { font-family: inherit; }
.sched-sum { font-weight: 700; font-size: 14px; }

/* Grid */
.grid-wrap { overflow-x: auto; }
.grid { display: flex; gap: 0; min-width: 480px; }
.grid-mini .grid { min-width: 240px; }
.grid-hours { padding-top: 24px; flex-shrink: 0; width: 44px; }
.grid-mini .grid-hours { width: 32px; padding-top: 18px; }
.hour { position: relative; font-size: 10px; color: var(--muted); text-align: right; padding-right: 6px; }
.hour span { position: relative; top: -6px; }
.grid-mini .hour span { font-size: 8px; }
.grid-col { flex: 1; min-width: 62px; border-left: 1px solid var(--line); }
.grid-mini .grid-col { min-width: 34px; }
.grid-dayname { height: 24px; display: grid; place-items: center; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.grid-mini .grid-dayname { height: 18px; font-size: 9px; }
.grid-slots { position: relative; background: var(--bg); }
.grid-line { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.block { position: absolute; left: 2px; right: 2px; border-radius: 3px; color: #fff; padding: 2px 4px;
  overflow: hidden; font-size: 11px; line-height: 1.25; box-shadow: var(--shadow-sm); }
.grid-mini .block { padding: 1px 2px; font-size: 8px; border-radius: 2px; }
.b-code { display: block; font-weight: 700; white-space: nowrap; }
.b-meta { display: block; opacity: .85; font-size: 10px; }

@media (max-width: 760px) {
    .pref-row > label { min-width: 0; flex-basis: 100%; padding-top: 0; }
  .seg-opt span { padding: 8px 12px; font-size: 13px; }
  .grid { min-width: 520px; }
  .btn-generate { width: 100%; justify-content: center; }
    .opt-grid { grid-template-columns: 1fr; }
}

/* Teacher prefer/avoid picker */
.teach-wrap { flex: 1; min-width: 0; }
.teach-hint { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.teach-course { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); margin-bottom: 6px; }
.teach-course summary { cursor: pointer; padding: 9px 12px; font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.teach-course summary .muted { font-size: 12px; }
.teach-sum { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--brand); }
.teach-row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.teach-name { flex: 1; min-width: 140px; font-size: 13.5px; font-weight: 600; }
.teach-name .muted { font-weight: 400; font-size: 12px; }
.teach-seg { display: flex; gap: 4px; }
.teach-seg .seg-opt span { padding: 5px 10px; font-size: 12.5px; }
.teach-seg .t-prefer input:checked + span { background: var(--pos); border-color: var(--pos); }
.teach-seg .t-avoid  input:checked + span { background: var(--neg); border-color: var(--neg); }
.opt-instr { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
@media (max-width: 760px) {
  .teach-row { gap: 6px; }
  .teach-name { flex-basis: 100%; }
}

/* ---------------- Scheduler layout v2 ---------------- */
.sched-page { padding: 14px 0 40px; }

/* Sticky toolbar */
.sched-bar-sticky { position: sticky; top: 56px; z-index: 15; display: flex; align-items: center;
  gap: 10px; flex-wrap: wrap; background: var(--bg); padding: 10px 0 12px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line); }
.sched-bar-sticky .term-pick select { padding: 7px 10px; font-size: 14px; }
.sched-sum { margin-left: auto; font-weight: 700; font-size: 13px; color: var(--muted); white-space: nowrap; }
.sched-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0; }
.sched-tab { padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.sched-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.sched-tab:hover { text-decoration: none; border-color: var(--brand); }
.sched-tab.add { font-family: inherit; padding: 6px 11px; }

.empty-sched { text-align: center; padding: 34px 20px; }
.empty-sched .big { font-family: var(--font-head); font-size: 22px; text-transform: uppercase; margin-bottom: 6px; }
.empty-sched .muted { max-width: 420px; margin: 0 auto 16px; }

.sched-actions { margin-top: 12px; }
.sched-more > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--muted); padding: 6px 0; }
.sched-more > summary:hover { color: var(--text); }
.sched-manage { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.sched-manage form { margin: 0; }

/* Builder */
.builder { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); margin-top: 16px; }
.builder-head { cursor: pointer; padding: 15px 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.builder-head::marker { color: var(--brand); }
.builder-title { font-family: var(--font-head); font-size: 18px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .02em; color: var(--brand); }
.builder-hint { font-size: 12.5px; color: var(--muted); margin-left: auto; }
.builder[open] .builder-head { border-bottom: 1px solid var(--line); }
.builder-body { padding: 4px 18px 18px; }
.bstep { padding: 16px 0; border-bottom: 1px solid var(--line); }
.bstep:last-child { border-bottom: none; padding-bottom: 4px; }
.bstep-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.bstep-head h3 { margin: 0; font-size: 16px; text-transform: uppercase; letter-spacing: .02em; }
.bstep-head .btn { margin-left: auto; }

/* Compact preference grid */
.pref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px 20px; }
.pref-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pref-row > label { min-width: 62px; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); padding-top: 0; }
.seg-opt span { padding: 6px 11px; font-size: 13px; }
.time-inputs { gap: 10px; font-size: 13px; }
.btn-generate { margin-top: 14px; }

.teach-panel { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); margin-top: 14px; }
.teach-panel > summary { cursor: pointer; padding: 10px 13px; font-weight: 600; font-size: 14px; }
.teach-panel .teach-wrap { padding: 0 13px 12px; }
.teach-course { background: var(--surface); }
.teach-seg .seg-opt span { padding: 4px 10px; min-width: 34px; text-align: center; }

@media (max-width: 760px) {
  .sched-bar-sticky { top: 52px; padding: 8px 0 10px; }
  .sched-sum { margin-left: 0; flex-basis: 100%; }
  .builder-body { padding: 4px 13px 14px; }
  .builder-hint { flex-basis: 100%; margin-left: 0; }
  .pref-grid { grid-template-columns: 1fr; gap: 10px; }
  .pref-row > label { flex-basis: 100%; min-width: 0; }
  .bstep { padding: 13px 0; }
}
.sched-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.sched-quick form { margin: 0; }
.adv-panel { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); margin-top: 14px; }
.adv-panel > summary { cursor: pointer; padding: 10px 13px; font-weight: 600; font-size: 14px; }
.adv-grid { padding: 4px 13px 14px; }
.adv-grid .pref-row { align-items: center; }
.pref-note { flex-basis: 100%; font-size: 11.5px; color: var(--muted); margin-top: -4px; }
.walk-warn { color: var(--neg); font-weight: 700; }
.auth .notice { background: color-mix(in srgb, var(--pos) 12%, transparent); color: var(--pos);
  border: 1px solid color-mix(in srgb, var(--pos) 32%, transparent);
  padding: 9px 12px; border-radius: var(--radius-md); font-size: 14px; margin-bottom: 14px; }

/* ---------------- Brand logo ---------------- */
.brand { display: inline-flex; align-items: center; gap: 8px; line-height: 0; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-sub { font-family: var(--font-head); font-size: 14px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; line-height: 1; }
@media (prefers-color-scheme: dark) {
  /* lift the jade wordmark so it reads on a dark bar */
  .brand-logo { filter: brightness(1.55) saturate(.9); }
}
:root[data-theme="dark"] .brand-logo { filter: brightness(1.55) saturate(.9); }
:root[data-theme="light"] .brand-logo { filter: none; }
@media (max-width: 760px) { .brand-logo { height: 26px; } }
/* .mainnav a would otherwise override the button's own text colour */
.mainnav a.btn-primary { color: #fff; }
.mainnav a.btn-primary:hover { color: #fff; }
.mainnav a.btn { color: var(--text); }

/* ---------------- Ratings & contribution ---------------- */
/* Star picker: rendered 5→1 so CSS sibling selectors light up left-to-right */
.rate-overall { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.rate-lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.starpick { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.starpick input { position: absolute; opacity: 0; width: 0; }
.starpick label { font-size: 30px; line-height: 1; color: var(--line); cursor: pointer; transition: color .1s; }
.starpick label:hover, .starpick label:hover ~ label,
.starpick input:checked ~ label { color: var(--accent); }
.starpick input:focus-visible + label { outline: 2px solid var(--brand); }

.scale-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 8px 18px; margin-bottom: 12px; }
.scale { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scale-name { font-size: 12.5px; font-weight: 700; color: var(--muted); min-width: 66px; }
.scale-opts { display: inline-flex; align-items: center; gap: 4px; }
.scale-end { font-size: 10.5px; color: var(--muted); }
.dot input { position: absolute; opacity: 0; width: 0; }
.dot span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg); font-size: 12px; color: var(--muted); cursor: pointer; }
.dot input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.dot span:hover { border-color: var(--brand); }

/* Aggregate summary on the course header */
.rating-summary { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid var(--line); }
.rs-overall { display: flex; align-items: baseline; gap: 8px; }
.rs-stars { color: var(--accent); font-size: 19px; letter-spacing: 1px; }
.rs-num { font-family: var(--font-head); font-size: 26px; font-weight: 700; }
.rs-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 4px 20px; flex: 1; min-width: 220px; }
.rs-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.rs-bl { color: var(--muted); min-width: 62px; }
.rs-track { flex: 1; height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.rs-fill { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.rs-bv { font-weight: 700; min-width: 22px; text-align: right; }

.review-rating { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 7px; }
.rchip { font-size: 11.5px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 9px; color: var(--muted); }
.rchip strong { color: var(--text); }

.first-review { border: 1px dashed var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.first-review .btn { margin: 4px; }
.first-review form { display: inline; }

/* Contribute hub */
.coverage .cov-line { font-size: 15px; margin-bottom: 10px; }
.src-tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; background: var(--brand-tint);
  color: var(--brand-600); padding: 1px 7px; border-radius: 999px; margin-left: 6px; font-weight: 700; }
.demand { color: var(--accent); font-weight: 700; margin-left: 5px; }

/* Site-wide nudge */
.nudge { background: var(--brand-tint); border-bottom: 1px solid color-mix(in srgb, var(--brand) 28%, transparent);
  font-size: 14px; }
.nudge-inner { max-width: 1120px; margin: 0 auto; padding: 9px 22px; display: flex; align-items: center;
  gap: 12px; flex-wrap: wrap; }
.nudge-inner .grow { flex: 1; }
.nudge a.btn { padding: 5px 12px; font-size: 13px; }
.nudge form { margin: 0; }
@media (max-width: 760px) { .nudge-inner { padding: 8px 14px; font-size: 13px; } }
.prefs-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px;
  padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.verify-bar { background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); font-size: 14px; }
.verify-bar .muted { font-size: 13px; }

/* Become-a-tutor entry point on the marketplace */
.become-bar, .become-panel { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin: 14px 0 18px; }
.become-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; font-size: 14px; }
.become-bar .grow, .become-panel .grow { flex: 1; min-width: 200px; }
.become-panel > summary { cursor: pointer; padding: 14px 18px; display: flex; align-items: center;
  gap: 12px; flex-wrap: wrap; font-size: 14px; list-style: none; }
.become-panel > summary::-webkit-details-marker { display: none; }
.become-cta { background: var(--brand); color: #fff; border-radius: var(--radius-md);
  padding: 6px 16px; font-weight: 700; font-size: 13px; }
.become-panel[open] > summary { border-bottom: 1px solid var(--line); }
.become-panel[open] .become-cta { display: none; }
.become-body { padding: 14px 18px 18px; }
.my-listings { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; font-size: 13px; }
