/* Text face: Switzer (Indian Type Foundry, free license), one variable file served from this site. Headings and the wordmark stay in Fraunces. */
@font-face { font-family: "Switzer"; src: url("../static/fonts/Switzer-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ---------- Color themes ----------
   Sunset (default): warm dark, golden-hour light. Daylight: warm cream for bright rooms. Sea: the cool dark blue look.
   theme.js sets html[data-theme]; every color below is a token, so components never pick a theme themselves. */
:root, :root[data-theme="sunset"] {
  color-scheme: dark;
  --bg: #15110d;
  --surface: #1e1914;
  --surface-2: #2a231b;
  --text: #f6efe4;
  --muted: #b9ab95;
  --border: #3a3027;
  --accent: #f2b544;
  --accent-ink: #1c1407;
  --accent-soft: #3b2c14;
  --gold: #f2c477;
  --gold-soft: #33281a;
  --sea: #8fb0ff;
  --cta: #8fb0ff;
  --cta-ink: #0b1330;
  --coral: #ff9a76;
  --ok: #6fd39a;
  --ok-soft: #17291d;
  --warn: #f5be5b;
  --warn-soft: #34270f;
  --bad: #ff8a7d;
  --bad-soft: #361b16;
  --shadow: 0 1px 0 rgba(255, 214, 150, 0.04);
  --shadow-pop: 0 2px 6px rgba(12, 7, 2, 0.35), 0 14px 34px rgba(12, 7, 2, 0.5);
  --bg-glow: rgba(255, 170, 70, 0.16);
  --bg-glow-2: rgba(255, 110, 80, 0.08);
  --topbar: rgba(24, 19, 14, 0.82);
  --wm-title: #f6efe4;
  --wm-sub: #f2c477;
  --tip-bg: #0e0b08;
  --tip-text: #f6efe4;
  --lose-bar: #54473a;
  --lose-dot: #6a5b4b;
  --logo-panel: #f6f1e7;
  --logo-panel-dark: #1b2430;
}
:root[data-theme="daylight"] {
  color-scheme: light;
  --bg: #fbf5ea;
  --surface: #ffffff;
  --surface-2: #f6ecdb;
  --text: #2b2117;
  --muted: #6e604e;
  --border: #eadcc4;
  --accent: #9e5607;
  --accent-ink: #ffffff;
  --accent-soft: #fcebcc;
  --gold: #9a5d0b;
  --gold-soft: #fbedd4;
  --sea: #2a5bc4;
  --cta: #2a5bc4;
  --cta-ink: #ffffff;
  --coral: #c2492a;
  --ok: #1b7a44;
  --ok-soft: #e1f3e8;
  --warn: #9a5b00;
  --warn-soft: #fcefd7;
  --bad: #b3372b;
  --bad-soft: #fbe5e2;
  --shadow: 0 1px 2px rgba(120, 72, 10, 0.06), 0 1px 3px rgba(120, 72, 10, 0.07);
  --shadow-pop: 0 12px 30px rgba(120, 72, 10, 0.16);
  --bg-glow: rgba(255, 196, 92, 0.30);
  --bg-glow-2: rgba(255, 140, 90, 0.12);
  --topbar: rgba(255, 250, 241, 0.85);
  --wm-title: #2b2117;
  --wm-sub: #a8650b;
  --tip-bg: #2b2117;
  --tip-text: #fbf5ea;
  --lose-bar: #dccdb4;
  --lose-dot: #c8b79c;
  --logo-panel: #ffffff;
}
:root[data-theme="sea"] {
  color-scheme: dark;
  --bg: #0f1217;
  --surface: #171b22;
  --surface-2: #1e232c;
  --text: #e7eaf0;
  --muted: #9aa3b2;
  --border: #2a303b;
  --accent: #7ea2ff;
  --accent-ink: #0f1217;
  --accent-soft: #1d2840;
  --gold: #e8c07d;
  --gold-soft: #2a2417;
  --sea: #7ea2ff;
  --cta: #7ea2ff;
  --cta-ink: #0f1217;
  --coral: #ff9a76;
  --ok: #5cc98a;
  --ok-soft: #15291e;
  --warn: #f0b552;
  --warn-soft: #2e2412;
  --bad: #ff8a7d;
  --bad-soft: #321a17;
  --shadow: none;
  --shadow-pop: 0 10px 30px rgba(0, 0, 0, 0.35);
  --bg-glow: rgba(126, 162, 255, 0.10);
  --bg-glow-2: rgba(232, 192, 125, 0.06);
  --topbar: rgba(23, 27, 34, 0.85);
  --wm-title: #e7eaf0;
  --wm-sub: #e8c07d;
  --tip-bg: #0b0d11;
  --tip-text: #e7eaf0;
  --lose-bar: #4a5161;
  --lose-dot: #5f6778;
  --logo-panel: #f6f3ec;
}
:root {
  --radius: 12px;
  --font: "Switzer", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Always show the scrollbar's track, so going between a short page and a long one doesn't nudge the header
   and the page sideways on systems whose scrollbars take up space (Windows, or macOS set to always show them).
   overflow-y: scroll rather than scrollbar-gutter: it works in every browser, older Safari included. */
html { -webkit-text-size-adjust: 100%; overflow-y: scroll; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--text); font: 15px/1.5 var(--font);
  background: radial-gradient(ellipse 90% 55% at 85% -10%, var(--bg-glow), transparent 65%),
              radial-gradient(ellipse 70% 45% at -5% 0%, var(--bg-glow-2), transparent 60%), var(--bg);
  background-attachment: fixed; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; }
h1 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--topbar); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.topnav { display: flex; gap: 4px; }
.topnav a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.topnav a:hover { background: var(--surface-2); text-decoration: none; }
.topnav a.active { color: var(--accent); background: var(--accent-soft); }
.count-pill { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 12px; text-align: center; }

.page { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; outline: none; }
.footer { max-width: 1200px; margin: 0 auto; padding: 0 16px 32px; color: var(--muted); font-size: 13px; }

/* ---------- Shared ---------- */
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); }
.btn.primary:hover { filter: brightness(1.05); background: var(--cta); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.star { border: 1px solid var(--border); background: var(--surface); border-radius: 9px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; font-size: 18px; color: var(--muted); flex: none; }
.star.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); }
.logo { width: 56px; height: 56px; border-radius: 14px; flex: none; display: grid; place-items: center; font-weight: 800; letter-spacing: 0.02em; background: var(--accent-soft); color: var(--accent); font-size: 18px; }
.logo.sm { width: 40px; height: 40px; border-radius: 10px; font-size: 13px; }
.logo.o-orthodox, .logo.o-mo-coed { background: #efe7fb; color: #6a3fb8; }
.logo.o-conservative { background: #e3f4ea; color: #1d7f47; }
.logo.o-reform { background: #fdeee0; color: #a65310; }
.logo.o-secular { background: #e6f2f7; color: #1f6f8b; }
:root:not([data-theme="daylight"]) .logo.o-orthodox, :root:not([data-theme="daylight"]) .logo.o-mo-coed { background: #2a2140; color: #c4a8ff; }
:root:not([data-theme="daylight"]) .logo.o-conservative { background: #15291e; color: #5cc98a; }
:root:not([data-theme="daylight"]) .logo.o-reform { background: #33230f; color: #f5ae6b; }
:root:not([data-theme="daylight"]) .logo.o-secular { background: #14262e; color: #6cc3e0; }
.cd { font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cd.soon { color: var(--warn); }
.cd.urgent { color: var(--bad); }
.cd.past { color: var(--muted); text-decoration: line-through; font-weight: 500; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.pill.priority { background: var(--accent-soft); color: var(--accent); }
.pill.regular { background: var(--surface-2); color: var(--muted); }
.pill.rolling { background: var(--warn-soft); color: var(--warn); }
.pill.other { background: var(--surface-2); color: var(--muted); }
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.callout.warn { background: var(--warn-soft); color: var(--warn); }
.callout.info { background: var(--accent-soft); color: var(--text); }
.callout.ok { background: var(--ok-soft); color: var(--ok); }
.callout.bad { background: var(--bad-soft); color: var(--bad); }
.callout strong { font-weight: 700; }
.empty { padding: 32px; text-align: center; color: var(--muted); }

/* ---------- Finder ---------- */
.hero-intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; }
.hero-intro h1 { font-size: 28px; letter-spacing: -0.01em; }
.hero-intro p { color: var(--muted); max-width: 640px; margin-top: 6px; }
.upcoming { padding: 14px 16px; margin-bottom: 20px; }
.upcoming h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 10px; }
.upcoming-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.upcoming-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--text); }
.upcoming-item:hover { text-decoration: none; outline: 1px solid var(--border); }
.upcoming-item .date { font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }

.finder { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
.filters { padding: 16px; position: sticky; top: 76px; max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); overflow: auto; }
.filters h2 { font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.fgroup { margin-top: 16px; }
.fgroup h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 3px 10px; font-size: 13px; cursor: pointer; color: var(--text); }
.fchip:hover { background: var(--surface-2); }
.fchip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; margin-top: 6px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.search { flex: 1 1 220px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); min-width: 0; }
.select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.results-count { color: var(--muted); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.prog { display: flex; flex-direction: column; gap: 12px; padding: 16px; color: var(--text); transition: border-color 0.12s, transform 0.12s; }
.prog:hover { text-decoration: none; border-color: var(--accent); }
.prog-top { display: flex; gap: 12px; align-items: flex-start; }
.prog-top > div { flex: 1; min-width: 0; }
.prog-top h3 { font-size: 16px; }
.prog-top p { font-size: 13px; color: var(--muted); }
.mini { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 0; padding-top: 12px; border-top: 1px solid var(--border); }
.mini div { min-width: 0; }
.mini dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.mini dd { margin: 0; font-size: 14px; font-weight: 600; }
.mini .wide { grid-column: 1 / -1; }
.progress-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: var(--ok); border-radius: 3px; }

/* ---------- Program detail (school page) ---------- */
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-weight: 500; margin-bottom: 14px; }
.school-head { padding: 20px; display: flex; gap: 18px; align-items: flex-start; }
.school-head .logo { width: 72px; height: 72px; border-radius: 16px; font-size: 22px; }
.school-head .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.school-head h1 { font-size: 26px; letter-spacing: -0.01em; }
.school-head .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; overflow: hidden; }
.stat { padding: 14px 18px; border-right: 1px solid var(--border); min-width: 0; }
.stat:last-child { border-right: 0; }
.stat .label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.stat .value { font-size: 18px; font-weight: 700; margin-top: 2px; }
.stat .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tabs { display: flex; gap: 4px; margin: 18px 0 14px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-color: var(--accent); }
.detail { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.sections { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sec { padding: 18px 20px; scroll-margin-top: 80px; }
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sec-num { width: 26px; height: 26px; border-radius: 7px; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.sec-head h2 { font-size: 17px; flex: 1; }
.badge { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.badge.verified { background: var(--ok-soft); color: var(--ok); }
.badge.partial { background: var(--warn-soft); color: var(--warn); }
.badge.missing { background: var(--surface-2); color: var(--muted); }
.badge.neutral { background: var(--accent-soft); color: var(--accent); }
.sec .note { color: var(--muted); font-size: 13.5px; margin-top: 8px; }
.sec + .sec { margin-top: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 14px; }
.fact .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.fact .v { font-weight: 600; }

.rows { display: flex; flex-direction: column; }
.row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.row:first-child { border-top: 0; padding-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; }
.row .sub { color: var(--muted); font-size: 13px; }
.row.date-row .when { width: 120px; flex: none; font-weight: 700; }
.status { padding: 5px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; flex: none; }
.status.s-progress { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.status.s-submitted, .status.s-approved, .status.s-accepted, .status.s-awarded { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.status.s-asked, .status.s-requested, .status.s-waiting, .status.s-applied { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.status.s-denied, .status.s-rejected { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.prompt { border-left: 3px solid var(--accent); padding: 2px 0 2px 12px; }
.prompt q { quotes: none; }
.limit { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.input, .textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-weight: 400; font-size: 14px; }
.textarea { min-height: 90px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.inline-form .input { flex: 1 1 200px; width: auto; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.col-box { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; }
.col-box h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 6px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kv > div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.kv .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.kv .v { font-weight: 700; }
.doc-check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--border); cursor: pointer; }
.doc-check:first-child { border-top: 0; }
.doc-check > input[type="checkbox"] { margin-top: 4px; width: 16px; height: 16px; flex: none; }
.doc-check .grow { flex: 1; min-width: 0; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl td .input { min-width: 120px; }
ul.plain { margin: 6px 0 0; padding-left: 18px; }
ul.plain li { margin: 4px 0; }

/* Sidebar */
.side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 76px; }
.side .card { padding: 16px; }
.side h3 { font-size: 14px; margin-bottom: 10px; }
.ring { display: flex; align-items: center; gap: 14px; }
.ring svg { flex: none; }
.ring .big { font-size: 22px; font-weight: 800; }
.toc { display: flex; flex-direction: column; }
.toc a { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; color: var(--text); font-size: 14px; }
.toc a:hover { color: var(--accent); text-decoration: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; margin-top: 7px; }
.dot.done { background: var(--ok); }
.dot.some { background: var(--warn); }
.dot.none { background: var(--border); }
.timeline { display: flex; flex-direction: column; gap: 10px; }
.tl-item { display: flex; gap: 10px; }
.tl-item .tl-date { width: 64px; flex: none; font-weight: 700; font-size: 13px; }
.tl-item .tl-what { font-size: 13.5px; }
.tl-item.past { opacity: 0.55; }
.sources { font-size: 12.5px; word-break: break-all; }
.sources a { display: block; margin-top: 4px; }

/* Account (header) */
.topnav { align-items: center; }
.account { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding-left: 10px; border-left: 1px solid var(--border); }
.account[hidden] { display: none; }
.account form { margin: 0; }
.user-name { font-size: 14px; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Login / sign-up */
.auth-body { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-wrap { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.auth-brand { font-size: 17px; }
.auth-card { width: 100%; padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { font-size: 22px; }
.auth-card .input { padding: 10px 12px; font-size: 15px; }
.auth-submit { justify-content: center; padding: 11px 14px; font-size: 15px; margin-top: 4px; }
.auth-switch { text-align: center; }

/* My list */
.list-table td:first-child { min-width: 220px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .detail { grid-template-columns: 1fr; }
  .side { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 820px) {
  .finder { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; }
}
@media (max-width: 600px) {
  .page { padding: 16px 16px 40px; }
  .hero-intro h1 { font-size: 23px; }
  .school-head { flex-wrap: wrap; padding: 16px; }
  .school-head .actions { width: 100%; justify-content: flex-start; }
  .school-head h1 { font-size: 22px; }
  .cols-2 { grid-template-columns: 1fr; }
  .row { flex-wrap: wrap; }
  .row.date-row .when { width: auto; }
  .grid { grid-template-columns: 1fr; }
  .sec { padding: 16px; }
  .topbar-inner { flex-wrap: wrap; }
  .user-name { display: none; }
  .account { margin-left: 2px; padding-left: 4px; }
}

/* Site-wide notice (e.g. saving problems) */
.page-banner { width: calc(100% - 32px); max-width: 1168px; margin: 12px auto 0; }
.page-banner[hidden] { display: none; }

/* ================= Discover: quiz ================= */
.btn.big { padding: 13px 26px; font-size: 16px; border-radius: 12px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.quiz { max-width: 680px; margin: 0 auto; }
.quiz h1 { font-size: 26px; letter-spacing: -0.01em; margin-top: 8px; }
.quiz > p.muted { margin-top: 6px; }
.quiz-intro { text-align: center; padding: 48px 0 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.quiz-intro h1 { font-size: 32px; }
.quiz-intro p { max-width: 460px; }
.end-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.quiz-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.quiz-dots { flex: 1; display: flex; gap: 6px; }
.quiz-dots span { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); }
.quiz-dots span.done { background: var(--accent); opacity: 0.55; }
.quiz-dots span.now { background: var(--accent); }
.qopts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.qopts.many { grid-template-columns: repeat(3, 1fr); }
.qopt { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px; border: 2px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .12s, background .12s, transform .08s; }
.qopt:hover { border-color: var(--accent); }
.qopt:active { transform: scale(0.98); }
.qopt.on { border-color: var(--accent); background: var(--accent-soft); }
.qe { font-size: 26px; line-height: 1; flex: none; }
.qt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.qt strong { font-size: 15px; }
.qt small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.qcheck { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 800; border: 2px solid var(--border); color: transparent; }
.qopt.on .qcheck { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.quiz-foot { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.live-count { flex: 1; text-align: center; color: var(--muted); font-size: 14px; }
.live-count strong { color: var(--text); font-size: 17px; }

/* ================= Discover: swipe deck ================= */
.swipe { max-width: 440px; margin: 0 auto; }
.swipe-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.swipe-head h1 { font-size: 22px; }
.swipe-stage { position: relative; height: 600px; }
.scard { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(16, 24, 40, 0.14);
  transform: translateY(calc(var(--i) * 10px)) scale(calc(1 - var(--i) * 0.04)); transition: transform .25s ease; user-select: none; -webkit-user-select: none; }
.scard.top { cursor: grab; touch-action: pan-y; z-index: 3; }
.scard.top:active { cursor: grabbing; }
.scard:not(.top) { pointer-events: none; }
.scard-hero { position: relative; height: 250px; flex: none; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; }
.g-pluralistic { background: linear-gradient(140deg, #2b59c3 0%, #2f8fc0 55%, #f0b04a 130%); }
.g-conservative { background: linear-gradient(140deg, #1d7f47 0%, #4fae63 60%, #e9c04f 130%); }
.g-reform { background: linear-gradient(140deg, #d04f2a 0%, #ee8a32 55%, #f6c453 110%); }
.g-mo-coed { background: linear-gradient(140deg, #6a3fb8 0%, #c0569f 65%, #f29a5c 125%); }
.g-orthodox { background: linear-gradient(140deg, #2c2f7a 0%, #6a4fc0 60%, #e0875c 130%); }
.g-secular { background: linear-gradient(140deg, #13708f 0%, #3aa9be 60%, #f2c46a 130%); }
.scard-mark { position: absolute; top: 34px; left: 0; right: 0; text-align: center; }
.scard-title { position: relative; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.scard-title h2 { font-size: 24px; line-height: 1.15; }
.scard-title p { font-size: 14px; opacity: 0.95; margin-top: 4px; }
.scard-tag { display: inline-block; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.22); padding: 2px 9px; border-radius: 999px; margin-bottom: 6px; text-shadow: none; }
.scard-match { position: absolute; top: 14px; right: 14px; background: rgba(255,255,255,.95); color: #1d7f47; font-weight: 800; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.scard-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.scard-stats { display: grid; grid-template-columns: 1fr; gap: 6px; font-size: 14px; }
.scard-stats div { display: flex; gap: 8px; align-items: baseline; }
.scard-stats strong { font-weight: 600; }
.scard-blurb { color: var(--muted); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.stamp { position: absolute; top: 26px; z-index: 2; font-size: 26px; font-weight: 900; letter-spacing: .06em; padding: 4px 12px; border: 4px solid; border-radius: 10px; background: rgba(255,255,255,.9); }
.stamp.like { left: 18px; color: #1d7f47; transform: rotate(-14deg); opacity: var(--like, 0); }
.stamp.nope { right: 18px; color: #c0392b; transform: rotate(14deg); opacity: var(--nope, 0); }
.swipe-actions { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 22px; }
.sbtn { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow), 0 4px 14px rgba(16,24,40,.1); font-size: 26px; font-weight: 800; cursor: pointer; display: grid; place-items: center; transition: transform .1s; }
.sbtn:hover:not([disabled]) { transform: scale(1.08); }
.sbtn:active:not([disabled]) { transform: scale(0.94); }
.sbtn[disabled] { opacity: .35; cursor: not-allowed; }
.sbtn.small { width: 46px; height: 46px; font-size: 19px; color: var(--muted); }
.sbtn.nope { color: #e0483a; }
.sbtn.like { color: #fff; background: linear-gradient(140deg, #1d9b5a, #3cc27a); border-color: transparent; }
.sbtn.info { font-family: Georgia, serif; font-style: italic; color: var(--accent); }
.swipe-hint { text-align: center; margin-top: 14px; }

@media (max-width: 600px) {
  .qopts, .qopts.many { grid-template-columns: 1fr; }
  .quiz h1 { font-size: 22px; }
  .quiz-intro h1 { font-size: 26px; }
  .swipe-stage { height: 560px; }
  .scard-hero { height: 220px; }
  .quiz-foot { flex-wrap: wrap; }
  .live-count { order: -1; flex-basis: 100%; }
}
.scard-links { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.scard-links .btn { flex: 1; justify-content: center; }
.fact .v a { word-break: break-all; }

/* ================= College gap year policies ================= */
.pbadge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.pbadge.ok { background: var(--ok-soft); color: var(--ok); }
.pbadge.warn { background: var(--warn-soft); color: var(--warn); }
.pbadge.bad { background: var(--bad-soft); color: var(--bad); }
.pbadge.muted { background: var(--surface-2); color: var(--muted); }
.college-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.college { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.college-head { display: flex; flex-direction: column; gap: 8px; }
.college-head h3 { font-size: 17px; }
.college-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 0; }
.college-facts .wide { grid-column: 1 / -1; }
.college-facts dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.college-facts dd { margin: 2px 0 0; font-size: 14px; }
.college-quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--border); color: var(--muted); font-size: 13px; font-style: italic; }
.topnav { flex-wrap: wrap; }
@media (max-width: 600px) { .college-grid { grid-template-columns: 1fr; } .college-facts { grid-template-columns: 1fr; } }
/* Don't let sideways swipes trigger the browser's back/forward gesture on the swipe screen */
html, body { overscroll-behavior-x: none; }
.swipe-stage { overscroll-behavior: contain; }

/* ================= Program type label (yeshiva/seminary etc. up front) ================= */
.type-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.95); color: #1b2230; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.type-badge.t-yeshiva, .type-badge.t-seminary { background: #fff4d6; color: #7a4b00; }
.type-badge.t-mechina { background: #e3f4ea; color: #1d6b3e; }
.type-badge.t-university { background: #e6efff; color: #2346a0; }
.school-head .type-badge { align-self: flex-start; box-shadow: none; border: 1px solid var(--border); }

/* ================= Photo header (photo or illustrated fallback) ================= */
.ph { position: relative; overflow: hidden; color: #fff; }
.ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; -webkit-user-drag: none; }
.ph.has-photo::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,.65) 100%); pointer-events: none; }
.ph > :not(img) { position: relative; z-index: 2; }
.ph-mark { display: flex; justify-content: center; align-items: center; font-size: 40px; font-weight: 800; letter-spacing: -.02em; color: rgba(255,255,255,.92); text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.ph.has-photo .ph-mark { display: none; }
.scard-hero.has-photo .scard-mark { display: none; }
.scard-hero > .stamp, .scard-hero > .scard-match { position: absolute; z-index: 3; }
.scard-mark { position: absolute !important; }
.scard-title .type-badge { margin-bottom: 6px; text-shadow: none; }

/* ================= Browse all ================= */
.browse-head { margin-bottom: 14px; }
.browse-head h1 { font-size: 26px; letter-spacing: -.01em; }
.browse-head p { margin-top: 4px; }
.upcoming-strip { display: flex; gap: 8px; align-items: center; overflow-x: auto; padding: 8px 2px 10px; margin-bottom: 8px; scrollbar-width: thin; }
.upcoming-strip .us-label { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.upcoming-strip a { white-space: nowrap; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--border); padding: 5px 11px; border-radius: 999px; }
.upcoming-strip a:hover { border-color: var(--accent); text-decoration: none; }
.type-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: thin; }
.ttab { white-space: nowrap; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 13px; font-size: 14px; font-weight: 600; cursor: pointer; }
.ttab span { color: var(--muted); font-weight: 500; margin-left: 2px; }
.ttab:hover { border-color: var(--accent); }
.ttab.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ttab.on span { color: var(--accent-ink); opacity: .8; }
.btn.on { border-color: var(--accent); color: var(--accent); }
.filters-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 20px; }
.filters-panel .fgroup { margin-top: 8px; }
.filters-foot { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.bcard { display: flex; flex-direction: column; overflow: hidden; cursor: pointer; transition: border-color .12s, transform .12s, box-shadow .12s; }
.bcard:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.bcard-photo { height: 170px; display: flex; align-items: center; justify-content: center; }
.bcard-photo .type-badge { position: absolute; top: 10px; left: 10px; z-index: 3; }
.heart { position: absolute; top: 8px; right: 8px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); color: #e0483a; font-size: 20px; cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.heart:hover { transform: scale(1.08); }
.heart.on { background: #e0483a; color: #fff; }
.bcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.bcard-body h3 { font-size: 17px; line-height: 1.25; }
.bcard-body h3 a { color: var(--text); }
.bcard-facts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; font-weight: 600; margin-top: 2px; }
.bcard-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; }
.bcard-actions .btn { flex: 1; justify-content: center; }

/* ================= Program page photo banner ================= */
.detail-banner { height: 240px; border-radius: var(--radius) var(--radius) 0 0; }
.school-head.with-banner { border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; }

@media (max-width: 600px) {
  .bcard-photo { height: 150px; }
  .detail-banner { height: 170px; }
  .browse-head h1 { font-size: 22px; }
}
/* fixes: corner heart, one-line location, wrapping actions */
.ph > .heart { position: absolute; }
.bcard-body > p.small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcard-actions { flex-wrap: wrap; }
.bcard-actions .btn { min-width: 0; white-space: nowrap; }
/* keep the type label clear of the save heart */
.bcard-photo .type-badge { max-width: calc(100% - 64px); }

/* ================= Fields you can explore ================= */
.fields-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.fields-box h3 { font-size: 15px; margin-bottom: 10px; }
.fields-box ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.fields-box li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.fields-box li.match { background: var(--ok-soft); }
.qopts.many .qt small:empty { display: none; }

/* ================= Weighted matching quiz ================= */
.qgroup { margin-top: 22px; }
.qgroup h3 { font-size: 15px; margin-bottom: 4px; }
.qgroup > .small { margin-bottom: 8px; }
.qchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.qchip { border: 2px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; cursor: pointer; }
.qchip:hover { border-color: var(--accent); }
.qchip.on { border-color: var(--accent); background: var(--accent-soft); }
.prefs { display: grid; gap: 12px; margin-top: 18px; }
.pref { border: 2px solid var(--border); border-radius: 14px; padding: 14px 16px; background: var(--surface); }
.pref.active { border-color: var(--accent); }
.pref-head { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 10px; }
.pref-icon { font-size: 20px; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sdot { padding: 9px 0; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-weight: 700; cursor: pointer; }
.sdot:hover { border-color: var(--accent); }
.sdot.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.scale-ends { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
.scale-ends span:last-child { text-align: right; }
.weights { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.weights .small { margin-right: 4px; }
.wchip { border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.wchip.on { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.quiz .qgroup .pref { margin-top: 4px; }

/* ================= Top 3 results ================= */
.results { max-width: 1100px; margin: 0 auto; }
.results-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.results-head h1 { font-size: 28px; }
.top3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.topcard { overflow: hidden; display: flex; flex-direction: column; }
.top-photo { height: 160px; }
.top-photo .type-badge { position: absolute; bottom: 10px; left: 10px; z-index: 3; }
.rank { position: absolute !important; top: 10px; left: 10px; background: rgba(0,0,0,.6); color: #fff; font-weight: 800; padding: 3px 10px; border-radius: 999px; font-size: 14px; }
.topcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.tc-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tc-title h2 { font-size: 18px; line-height: 1.25; }
.tc-title h2 a { color: var(--text); }
.match-pill { flex: none; background: var(--ok-soft); color: var(--ok); font-weight: 800; font-size: 13px; padding: 3px 10px; border-radius: 999px; }
.why { font-weight: 600; }
.weak { color: var(--warn); }
.breakdown { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.brow { display: grid; grid-template-columns: 1fr 70px auto; align-items: center; gap: 8px; font-size: 13px; }
.bbar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bbar span { display: block; height: 100%; border-radius: 3px; }
.bbar .good { background: var(--ok); }
.bbar .ok { background: var(--warn); }
.bbar .bad { background: var(--bad); }
.results-foot { text-align: center; margin-top: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* ================= How it rates (program page) ================= */
.ratings .rrow { display: grid; grid-template-columns: 190px auto 1fr; align-items: center; gap: 12px; padding: 4px 0; font-size: 14px; }
.rdots { display: inline-flex; gap: 4px; }
.rdot { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); }
.rdot.on { background: var(--accent); border-color: var(--accent); }
.rdot.want { outline: 2px solid var(--ok); outline-offset: 2px; }

@media (max-width: 900px) { .top3 { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .ratings .rrow { grid-template-columns: 1fr auto; }
  .ratings .rv { grid-column: 1 / -1; color: var(--muted); }
  .results-head { flex-direction: column; align-items: flex-start; }
}
.swipe-head-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

/* ================= Short quiz: one row per category ================= */
.prows { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.prow { display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--border); border-radius: 14px; background: var(--surface); }
.prow.active { border-color: var(--accent); }
.prow-label { font-weight: 700; font-size: 15px; }
.prow-opts { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 6px; }
.popt { padding: 8px 6px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.popt:hover { border-color: var(--accent); }
.popt.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.popt.dc { background: transparent; color: var(--muted); font-weight: 500; padding: 8px 10px; }
.popt.dc.on { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.qchip.any { font-weight: 500; color: var(--muted); }
.qchip.any.on { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.extras { margin-top: 18px; border: 1px dashed var(--border); border-radius: 14px; padding: 10px 14px; }
.extras summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.extras[open] summary { margin-bottom: 4px; }
@media (max-width: 600px) {
  .prow { grid-template-columns: 1fr; gap: 8px; }
  .prow-opts { grid-template-columns: repeat(3, 1fr); }
  .popt.dc { grid-column: 1 / -1; }
}

/* ================= Concise Top 3 cards ================= */
.topcard-body { gap: 6px; }
.why { font-weight: 600; font-size: 15px; }
.more { margin-top: 2px; }
.more summary { cursor: pointer; font-size: 13px; color: var(--accent); font-weight: 600; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: " ▾"; }
.more[open] summary::after { content: " ▴"; }
.blist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.blist li { display: flex; align-items: center; gap: 6px; }
.blist .bm { width: 16px; text-align: center; font-weight: 800; }
.blist .good .bm { color: var(--ok); }
.blist .ok .bm { color: var(--warn); }
.blist .bad .bm { color: var(--bad); }
.blist .bv { margin-left: auto; color: var(--muted); font-size: 12px; }
.topcard .bcard-actions { padding-top: 6px; }

/* ================= 1–5 scale rows ================= */
.prow { grid-template-columns: 160px 1fr auto; }
.prow-scale { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pend { font-size: 12.5px; color: var(--muted); width: 92px; flex: none; }
.pend:first-child { text-align: right; }
.pnums { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; flex: 1; min-width: 0; }
.pnum { height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 15px; cursor: pointer; }
.pnum:hover { border-color: var(--accent); }
.pnum.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (min-width: 701px) { .prow { grid-template-columns: 150px 1fr auto; } .pend { width: 78px; } .pnum { min-width: 40px; } }
.hillel-line { color: var(--accent); font-weight: 600; }

/* Line icons (replace emoji) */
.ic { display: inline-block; vertical-align: -0.14em; flex: none; }
.scard-stats div { align-items: center; }
.scard-stats .ic, .bcard-facts .ic { color: var(--muted); }
.sbtn, .heart { display: inline-grid; place-items: center; }
.sbtn .ic { width: 26px; height: 26px; }
.sbtn.small .ic { width: 20px; height: 20px; }
.sbtn.info { font-family: inherit; font-style: normal; }
.callout > span[aria-hidden] { line-height: 1.3; }

/* Browse: collapsible Filters / Upcoming deadlines bars */
.dbars { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 18px; overflow: hidden; }
.dbar-wrap + .dbar-wrap { border-top: 1px solid var(--border); }
.dbar { width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 16px; background: none; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.dbar:hover { background: var(--surface-2); }
.dbar > .ic:first-child { color: var(--muted); }
.dbar .dt { font-weight: 700; white-space: nowrap; }
.dbar .ds { flex: 1; min-width: 0; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dbar .ic:last-child { color: var(--muted); transition: transform .15s; }
.dbar[aria-expanded="true"] .ic:last-child { transform: rotate(180deg); }
.dpanel { padding: 0 16px 16px; }
.filters-panel .fgroup.wide { grid-column: 1 / -1; }
.dl-list { list-style: none; margin: 0; }
.dl-list a { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--border); color: var(--text); font-size: 14px; }
.dl-list li:first-child a { border-top: 0; }
.dl-list a:hover { text-decoration: none; color: var(--accent); }
.dl-date { font-weight: 700; }
@media (max-width: 560px) { .dbar .ds { display: none; } .dl-list a { grid-template-columns: 56px 1fr; } .dl-list .cd { grid-column: 2; } }
.dl-list { max-width: 720px; }
.fchip.on .muted { color: inherit; opacity: .75; }

/* Colleges: my list + search */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 10px; }
.sec-head h2 { font-size: 18px; }
.mycols { margin-bottom: 28px; }
.mycol-list { display: grid; gap: 12px; }
.mycol { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.mycol-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.mycol-head h3 { font-size: 17px; }
.mycol-head .chips { margin-top: 6px; }
.mycol-next { padding: 8px 12px; border-radius: 8px; background: var(--surface-2); }
.mycol-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.mycol-grid .field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.mycol-grid .field > span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mycol-grid .field.wide { grid-column: 1 / -1; }
.mycol-grid select, .mycol-grid .input { width: 100%; }
.mycol-policy summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--accent); }
.mycol-policy[open] summary { margin-bottom: 10px; }
.mycol-policy .college-facts { margin-bottom: 8px; }
.college-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.colsearch .search { width: 100%; }
.nf-list { display: grid; gap: 8px; margin-top: 12px; }
.nf-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
@media (max-width: 860px) { .mycol-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .mycol-grid { grid-template-columns: 1fr 1fr; gap: 8px 10px; } .nf-row { flex-direction: column; align-items: flex-start; } .mycol { padding: 14px; } }
.mycol-grid .textarea { min-height: 44px; height: 44px; resize: vertical; }
.mycol-grid select, .mycol-grid .input { height: 38px; box-sizing: border-box; }
.mycol { gap: 10px; }

/* Tuition slider */
.budget-slider { max-width: 420px; margin-top: 6px; }
.bs-val { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.range { width: 100%; accent-color: var(--accent); cursor: pointer; margin: 4px 0; }
.bs-ends { display: flex; justify-content: space-between; }
.filters-panel .budget-slider { max-width: none; }

/* Program page: "The year" */
.group-h { font-size: 20px; margin: 10px 0 0; }
.life-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 18px; }
.life-item { display: flex; gap: 12px; align-items: flex-start; }
.life-ic { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 17px; }
.life-item h4, .track h4, .intern h4, .contacts-h { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.life-item p, .track p, .intern p { font-size: 14px; line-height: 1.5; color: var(--text); }
.intern { padding: 14px 16px; border-radius: 10px; background: var(--surface-2); margin-bottom: 14px; }
.intern h4 { display: flex; align-items: center; gap: 6px; }
.track-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.track { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.placeholder { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); }
.placeholder > .ic { font-size: 20px; margin-top: 2px; }
.placeholder strong { color: var(--text); }
.contacts-h { margin: 16px 0 8px; }
.quotes { display: grid; gap: 12px; }
.quote { margin: 0; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); }
.quote > .ic { color: var(--accent); font-size: 18px; }
.quote blockquote { margin: 6px 0; font-size: 15px; line-height: 1.55; }
.quote figcaption { font-size: 13px; color: var(--muted); }
.contacts { display: grid; gap: 8px; }
.contact { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }

.aud-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--warn); background: var(--warn-soft); padding: 2px 8px; border-radius: 6px; margin: 2px 0 4px; }
.scard-tag.aud { background: rgba(255, 196, 92, .92); color: #3d2a00; }

/* Palm Sunset logo + wordmark */
.logo-mark { display: block; flex: none; height: 40px; width: 40px; }
.wordmark { display: flex; flex-direction: column; line-height: 1; }
.wm-title { font-family: "Fraunces", Georgia, serif; font-weight: 700; color: var(--wm-title); font-size: 20px; letter-spacing: -0.005em; }
.wm-sub { font-family: var(--font); font-weight: 600; color: var(--wm-sub); font-size: 7.5px; letter-spacing: 0.5em; text-transform: uppercase; margin-top: 4px; margin-right: -0.5em; }
.auth-brand { gap: 14px; }
.auth-brand .logo-mark { height: 64px; width: 64px; }
.wm-auth .wm-title { font-size: 30px; }
.wm-auth .wm-sub { font-size: 10.5px; margin-top: 6px; }

/* Daily life bullets */
.life-item > div { min-width: 0; }
.life-list { margin: 4px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.5; }
.life-list li { margin: 3px 0; }
.life-list li::marker { color: var(--muted); }
.life-list.sched { list-style: none; padding-left: 0; }
.life-list.sched li { display: grid; grid-template-columns: 52px 1fr; gap: 8px; margin: 2px 0; }
.life-list.sched .t { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.school-head .aud-tag { align-self: flex-start; width: fit-content; }

/* Swipe card: quick bullets */
.scard-points { margin: 2px 0 0; padding-left: 18px; font-size: 15px; line-height: 1.45; display: grid; gap: 4px; }
.scard-points li::marker { color: var(--accent); }
.scard-title p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* My list: roomier rows */
.list-table th { padding: 14px 20px; }
.list-table td { padding: 18px 20px; line-height: 1.45; }
.list-table th:first-child, .list-table td:first-child { padding-left: 22px; }
.list-table th:last-child, .list-table td:last-child { padding-right: 22px; }
.list-table td .small { margin-top: 3px; }
.list-table .progress-bar { margin-top: 6px; min-width: 110px; }
@media (max-width: 600px) { .list-table th, .list-table td { padding: 12px 12px; } }
.list-table td:nth-child(2), .list-table td:last-child { white-space: nowrap; }

/* ---------- Charts (time breakdown) ----------
   Categorical slots from the validated palette (dark steps, checked against #171b22). */
.viz, .cmp { --c-rel: #3987e5; --c-acad: #d95926; --c-intern: #199e70; --c-vol: #c98500; --c-other: #6b7383; }
.c-rel { background: var(--c-rel); } .c-acad { background: var(--c-acad); } .c-intern { background: var(--c-intern); }
.c-vol { background: var(--c-vol); } .c-other { background: var(--c-other); }
.thead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.hero { display: flex; align-items: baseline; gap: 8px; }
.hero-n { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.hero-u { color: var(--muted); font-size: 14px; }
.viz-h { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 16px 0 8px; }
.trows { display: grid; gap: 8px; }
.trow { display: grid; grid-template-columns: 170px 1fr 56px; align-items: center; gap: 12px; }
.tlabel { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.ttrack { position: relative; height: 14px; border-left: 1px solid var(--border); }
.ttrack.sm { display: block; height: 8px; margin-top: 4px; max-width: 160px; }
.tbar { display: block; height: 100%; border-radius: 0 4px 4px 0; min-width: 0; }
.tval { font-size: 14px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.taxis { display: grid; grid-template-columns: 170px 1fr 1fr 56px; gap: 12px; font-size: 11px; color: var(--muted); margin-top: 4px; }
.taxis span:nth-child(1) { grid-column: 2; } .taxis span:nth-child(2) { grid-column: 2 / 4; text-align: center; } .taxis span:nth-child(3) { grid-column: 3; text-align: right; }
.tstack { display: flex; gap: 2px; height: 26px; background: transparent; }
.tstack .seg { display: flex; align-items: center; justify-content: center; min-width: 3px; height: 100%; align-self: stretch; }
.tstack .seg:first-child { border-radius: 4px 0 0 4px; } .tstack .seg:last-child { border-radius: 0 4px 4px 0; }
.tstack .seg b { font-size: 12px; font-weight: 700; color: #0f1217; }
.tstack.tstack-sm { height: 10px; max-width: 180px; margin-top: 4px; }
.tlegend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--text); }
.tlegend li { display: flex; align-items: center; gap: 6px; }
.viz-note { margin: 12px 0; }
.viz-tip { position: fixed; z-index: 50; pointer-events: none; background: var(--tip-bg); color: var(--tip-text); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.35); max-width: 280px; }
@media (max-width: 560px) { .trow { grid-template-columns: 120px 1fr 50px; gap: 8px; } .taxis { grid-template-columns: 120px 1fr 1fr 50px; gap: 8px; } .tlabel { font-size: 13px; } }

/* ---------- Compare (head to head) ---------- */
.cmp-wrap { padding: 0; }
table.cmp { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
.cmp th, .cmp td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.cmp thead th { vertical-align: bottom; }
.cmp .rowh { width: 170px; color: var(--muted); font-weight: 600; font-size: 13px; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.cmp .rowh .key { margin-right: 6px; vertical-align: -1px; }
.cmp-col { width: calc((100% - 170px) / 3); }
.cmp-col > * { margin-bottom: 8px; }
.cmp-col .select { width: 100%; }
.cmp-ph { height: 92px; border-radius: 10px; background-size: cover; background-position: center; display: grid; place-items: center; font-weight: 800; font-size: 22px; color: rgba(255,255,255,.9); }
.cmp-ph.empty { border: 1px dashed var(--border); color: var(--muted); font-size: 16px; }
.cmp-name { display: block; font-size: 16px; font-weight: 700; color: var(--text); }
.cmp .grp th { background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text); position: static; }
.cmp td.lead { font-weight: 700; }
.cmp td.lead .cval, .cmp td.lead strong { color: var(--text); }
.cmp td.lead { box-shadow: inset 3px 0 0 var(--accent); }
.cmp .clip { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cmp .rdots { display: inline-flex; gap: 3px; vertical-align: middle; }
.select.sm { padding: 6px 8px; font-size: 13px; }
/* Quiz 1–5 rows: end labels sit under the 1 and the 5, so they never overlap the buttons or "Don't care" */
@media (min-width: 701px) {
  .prow-scale { display: grid; grid-template-columns: auto auto; grid-template-areas: "nums nums" "lo hi"; row-gap: 5px; column-gap: 12px; justify-content: start; }
  .pnums { grid-area: nums; grid-template-columns: repeat(5, 42px); }
  .pend { width: auto; font-size: 12px; line-height: 1.2; }
  .pend:first-child { grid-area: lo; text-align: left; }
  .pend:last-child { grid-area: hi; text-align: right; }
}

/* Compare v2: scoreboard, clear winners, quieter losers */
.cmp-headline { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.cmp-top { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.cmp-top .cmp-ph { height: 48px; width: 64px; border-radius: 8px; font-size: 14px; }
.cmp-id { display: flex; flex-direction: column; gap: 4px; min-width: 0; align-items: flex-start; }
.cmp-id .cmp-name { font-size: 15px; line-height: 1.25; }
.cmp-id .type-badge { box-shadow: none; border: 1px solid var(--border); font-size: 11px; padding: 1px 8px; }
.cmp-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; padding: 4px; border-radius: 6px; }
.cmp-x:hover { color: var(--text); background: var(--surface-2); }
.cmp-empty { height: 48px; border: 1px dashed var(--border); border-radius: 8px; display: grid; place-items: center; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.cmp-headrow th { padding-bottom: 12px; }
.cmp-board td { background: var(--surface-2); padding-top: 14px; padding-bottom: 14px; }
.cmp-board .rowh { background: var(--surface-2); color: var(--text); }
.score { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.score-n { font-size: 28px; font-weight: 800; line-height: 1; color: var(--text); }
.score-l { color: var(--muted); font-size: 13px; }
.best-at { font-size: 13px; margin-top: 6px; color: var(--text); }
.cmp-board td.champ { box-shadow: inset 0 3px 0 var(--accent); }
.cmp .grp-sub { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.cmp td.lead { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); font-weight: 700; }
.cmp td.lose { color: var(--muted); }
.cmp td.lose .tbar { background: var(--lose-bar); }
.cmp td.lose .rdot.on { background: var(--lose-dot); }
.win-tag { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; vertical-align: 2px; }
.cmp .cval { font-variant-numeric: tabular-nums; }
.cbar { display: block; height: 8px; margin-top: 5px; max-width: 180px; }
.cbar .tbar { border-radius: 4px; min-width: 2px; }
.cmp-more { margin-top: 12px; }
.cmp-more > summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: 8px 0; }
.cmp-more .cmp { min-width: 720px; }
.cmp-more .rowh { width: 170px; }
table.cmp { table-layout: fixed; } .cmp .rowh { width: 170px; }
/* Compare: roomier rows and columns so each program reads as its own column */
table.cmp { font-size: 15px; line-height: 1.55; min-width: 780px; }
.cmp th, .cmp td { padding: 16px 22px; }
.cmp .rowh, .cmp-more .rowh { width: 190px; padding-left: 20px; font-size: 13.5px; }
.cmp-col { width: calc((100% - 190px) / 3); }
.cmp td + td, .cmp th + th { border-left: 1px solid color-mix(in srgb, var(--border) 65%, transparent); }
.cmp-headrow th { padding-top: 20px; padding-bottom: 18px; }
.cmp-col > * { margin-bottom: 12px; }
.cmp-top { gap: 12px; margin-bottom: 12px; }
.cmp-board td { padding-top: 20px; padding-bottom: 20px; }
.best-at { margin-top: 10px; line-height: 1.5; }
.cmp .grp th { padding-top: 22px; padding-bottom: 10px; }
.cbar { margin-top: 9px; height: 9px; }
.cmp td .win-tag { margin-top: 6px; }
.cmp-more { margin-top: 24px; }
.cmp-more > summary { padding: 10px 0; }
.cmp-more .cmp { min-width: 780px; margin-top: 8px; }
@media (max-width: 700px) {
  table.cmp, .cmp-more .cmp { font-size: 14px; min-width: 700px; }
  .cmp th, .cmp td { padding: 12px 14px; }
  .cmp .rowh, .cmp-more .rowh { width: 140px; padding-left: 14px; }
  .cmp-col { width: calc((100% - 140px) / 3); }
  .cmp-top { grid-template-columns: 1fr auto; row-gap: 10px; }
  .cmp-top .cmp-ph { grid-column: 1 / -1; grid-row: 1; width: 100%; height: 72px; }
  .cmp-id .cmp-name { font-size: 14.5px; }
}

/* Selected "Any" / "Skip" / "Don't care" look selected, same blue as any other choice */
.qchip.any.on { background: var(--accent-soft); border-color: var(--accent); color: var(--text); font-weight: 600; }
.popt.dc.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* My colleges: collapsible cards */
.mycol { padding: 0; gap: 0; }
.mycol-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 6px; }
.mycol-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; padding: 6px 8px; border-radius: 10px; }
.mycol-toggle:hover { background: var(--surface-2); }
.mycol-chev { color: var(--muted); display: inline-grid; transform: rotate(-90deg); transition: transform .15s; }
.mycol.open .mycol-chev { transform: none; }
.mycol-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mycol-name { font-size: 17px; font-weight: 700; }
.mycol-sum { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mycol-sum.next { color: var(--text); white-space: normal; }
.mycol-body { padding: 0 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.mycol-body .hillel-line { margin: 0; }

/* Account menu */
.acct-menu { position: relative; }
.acct-menu > summary { list-style: none; cursor: pointer; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 14px; color: var(--text); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu > summary::-webkit-details-marker { display: none; }
.acct-menu[open] > summary { background: var(--surface-2); }
.acct-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px; box-shadow: var(--shadow-pop); display: grid; }
.acct-item { text-align: left; background: none; border: 0; color: var(--text); font: inherit; font-size: 14px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.acct-item:hover { background: var(--surface-2); }
.acct-item.danger { color: var(--bad); }
a.acct-item { color: var(--text); text-decoration: none; }
#banner .btn { margin-left: 8px; }
@media (max-width: 600px) {
  .acct-menu .user-name { display: none; }
  .acct-menu > summary::after { content: "Account"; }
}

/* Home */

/* ---------- Admin (#/admin) ---------- */
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.btn.danger { color: var(--bad); }
.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { margin: 0 0 4px; }
.admin-head p { margin: 0; max-width: 640px; }
.admin-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.admin-bar .input { flex: 1; max-width: 420px; }
.admin-list { list-style: none; padding: 0; margin: 12px 0 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-list li + li { border-top: 1px solid var(--border); }
.admin-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 14px; color: var(--text); flex-wrap: wrap; }
.admin-list a:hover { background: var(--surface-2); text-decoration: none; }
.admin-name { font-weight: 600; }
.admin-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.admin-ed-head h2 { margin: 0 0 4px; }
.admin-ed { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; margin-top: 14px; }
.admin-form { padding: 18px; display: grid; gap: 12px; }
.admin-form .field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.admin-form textarea.input { resize: vertical; font: inherit; font-weight: 400; }
.admin-group { margin: 10px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.admin-group:first-child { margin-top: 0; }
.admin-dl { display: grid; gap: 8px; }
.admin-dl-row { display: grid; grid-template-columns: minmax(0, 1.4fr) 150px 140px minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.admin-dl-row .input { font-weight: 400; min-width: 0; }
.admin-dl > .btn { justify-self: start; }
.admin-json summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.admin-json textarea.mono, .admin-errs pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.admin-json textarea { width: 100%; margin: 8px 0; }
.admin-side { display: grid; gap: 14px; position: sticky; top: 76px; }
.admin-side .card { padding: 16px; }
.admin-side h3 { margin: 0 0 8px; }
.admin-side .callout ul { margin: 6px 0 0; padding-left: 18px; }
.admin-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin-bottom: 12px; }
.admin-save { width: 100%; }
.admin-actions { display: grid; gap: 6px; margin-top: 10px; }
.admin-actions .btn { justify-content: center; }
.admin-hist { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.admin-hist li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; }
.admin-errs { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.admin-errs li { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.admin-errs pre { margin: 6px 0; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 900px) {
  .admin-ed { grid-template-columns: 1fr; }
  .admin-side { position: static; }
  .admin-dl-row { grid-template-columns: 1fr 1fr; }
  .admin-dl-row .admin-dl-note { grid-column: 1 / -1; }
}
.admin-side .callout, .admin .callout { display: block; margin: 10px 0; }
.auth-captcha { min-height: 65px; margin: 4px 0 12px; }
.legal { max-width: 720px; margin: 0 auto; padding: 32px 16px 60px; }
.legal .auth-brand { margin-bottom: 18px; }
.legal-card { padding: 28px; }
.legal-card h1 { margin: 0 0 4px; }
.legal-card h2 { font-size: 18px; margin: 26px 0 8px; }
.legal-card ul { padding-left: 20px; display: grid; gap: 8px; }
.legal-card p, .legal-card li { line-height: 1.6; }
.legal-back { margin-top: 26px; }
@media (max-width: 500px) { .legal-card { padding: 18px; } }
.auth-legal { text-align: center; margin-top: 14px; }
.legal { width: 100%; }

/* ---------- Community ---------- */
.detail.comm { grid-template-columns: minmax(0, 1fr) 320px; }
.detail.comm .sections, .detail.comm .side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.comm-profile .callout { margin: 0 0 12px; }
.comm-form .callout { margin: 0 0 10px; }
.comm-form .check { margin-top: 12px; }
.comm-note { margin: 8px 0 0; }
.comm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.person { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.people .person:first-child { border-top: 0; padding-top: 2px; }
.person.me { border-top: 0; padding: 0; align-items: center; }
.person-body { flex: 1; min-width: 0; }
.person-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.person-chips { margin-top: 6px; }
.person-chips .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.person-chips a.chip:hover { text-decoration: none; filter: brightness(1.1); }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.avatar.big { width: 48px; height: 48px; font-size: 17px; }
.people.compact { margin: 4px 0 10px; }
.people.compact .person { padding: 7px 0; gap: 10px; }
.people.compact .avatar { width: 28px; height: 28px; font-size: 11.5px; }
.comm-card .btn { margin-top: 2px; }
.comm-kind { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 8px 0 -2px; }
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.org-logo { flex: none; min-width: 42px; height: 42px; padding: 0 8px; border-radius: 11px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); font-weight: 800; font-size: 12px; letter-spacing: .02em; }
.logo.org-logo-lg { width: auto; min-width: 56px; padding: 0 10px; font-size: 15px; background: var(--gold-soft); color: var(--gold); }
.comm-rank { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.comm-rank a { display: flex; justify-content: space-between; gap: 10px; color: var(--text); font-size: 14px; }
.comm-rank a:hover .cr-name { color: var(--accent); }
.cr-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-n { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.cr-bar { display: block; height: 4px; margin-top: 4px; border-radius: 2px; background: var(--surface-2); }
.cr-bar span { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
.comm-mine { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
@media (max-width: 980px) { .detail.comm { grid-template-columns: minmax(0, 1fr); } }
.org-tile .chip.warn, .org-tile .chip.bad, .school-head .chip.warn, .school-head .chip.bad { margin-top: 6px; white-space: normal; }
.comm-rules { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; }
.comm-rules ul { margin: 6px 0 4px; padding-left: 18px; color: var(--muted); }
.group-form { margin-bottom: 12px; }
.comm-report { color: var(--muted); }

/* Organization tiles: just the name, in the logo's sunset gold and sea blue */
.org-tile { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 66px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: border-color .15s, background .15s, transform .15s; }
.org-tile:hover { text-decoration: none; border-color: var(--gold); background: linear-gradient(135deg, var(--gold-soft), var(--surface) 70%); transform: translateY(-1px); }
.org-tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.org-tile-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.org-name { font-weight: 650; font-size: 14.5px; line-height: 1.3; }
.org-tile.joined { border-color: color-mix(in srgb, var(--sea) 55%, var(--border)); }
.org-tile.joined .org-logo { background: color-mix(in srgb, var(--sea) 18%, var(--surface)); color: var(--sea); }
.org-joined { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--sea); color: var(--bg); font-size: 13px; }
.org-tile.student-group { border-style: dashed; }
.comm-kind { color: var(--gold); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Home: about us, in the logo's sunset gold and sea blue ---------- */
.home-video { max-width: 1100px; margin: 4px auto 18px; }
.promo-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 16px; background: #000; border: 1px solid var(--border); box-shadow: var(--shadow-pop); }
.video-credits { max-width: 1100px; margin: 0 auto; padding: 16px 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.video-credits h2 { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 0 0 8px; }
.video-credits p { margin: 0 0 6px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.video-credits p:last-child { margin-bottom: 0; }
.video-credits strong { color: var(--text, inherit); font-weight: 650; }
.video-credits a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 700px) { .home-video { margin: 0 0 14px; } .promo-video { border-radius: 10px; } .video-credits { padding: 14px; } }

/* Logo instead of a photo: centered on a warm light panel (logos are made for light backgrounds) */
.ph.has-logo { background: var(--logo-panel); }
/* White logos (their URL ends in #dark, see LOGOS in data.js) sit on a dark panel in every theme. */
.has-logo:has(img[src$="#dark"]), .has-logo-img:has(img[src$="#dark"]) { background: var(--logo-panel-dark); }
.ph.has-logo > img.ph-logo { left: 16%; top: 20%; width: 68%; height: 62%; object-fit: contain; }
.ph.has-logo .type-badge { box-shadow: 0 0 0 1px rgba(16,24,40,.12); }
.ph.has-logo .ph-mark, .scard-hero.has-logo .scard-mark { display: none; }
.cmp-ph.has-logo { display: grid; place-items: center; }
.logo.has-logo-img { background: var(--logo-panel); padding: 6px; }
.logo.has-logo-img img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- Theme picker ---------- */
.theme-menu { position: relative; }
.theme-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); color: var(--muted); font-size: 14px; font-weight: 500; }
.theme-menu > summary::-webkit-details-marker { display: none; }
.theme-menu > summary:hover, .theme-menu[open] > summary { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.theme-menu > summary .ic { font-size: 16px; }
.theme-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 180px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px; box-shadow: var(--shadow-pop); display: grid; gap: 2px; }
.theme-pop button { display: flex; align-items: center; gap: 10px; text-align: left; background: none; border: 0; color: var(--text); font-size: 14px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.theme-pop button:hover { background: var(--surface-2); }
.theme-pop button[aria-checked="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.theme-pop button[aria-checked="true"]::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sw { flex: none; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.sw-sunset { background: radial-gradient(circle at 50% 38%, #f6c453 0 26%, transparent 28%), linear-gradient(180deg, #f2a24a 0%, #d0502c 58%, #2a1d14 60%); }
.sw-daylight { background: radial-gradient(circle at 50% 50%, #f6b93b 0 30%, transparent 32%), linear-gradient(180deg, #fff7e6, #fbe3b4); }
.sw-sea { background: radial-gradient(circle at 70% 30%, #e8c07d 0 16%, transparent 18%), linear-gradient(180deg, #1d2840 0%, #2b59c3 60%, #7ea2ff 100%); }
.theme-corner { position: fixed; top: 12px; right: 12px; z-index: 40; }
.theme-corner .theme-menu > summary { background: var(--surface); }
@media (max-width: 600px) { .topbar .theme-label { display: none; } }

/* ---------- Top bar: tools on the right; on phones the links fold behind "Menu" ---------- */
.topnav { margin-left: auto; }
.topbar-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.topbar-tools .account { margin-left: 2px; }
.nav-toggle { display: none; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; }
.nav-toggle .ic { font-size: 18px; }
.topbar.nav-open .nav-toggle { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
:root { --bar-h: 65px; }
@media (max-width: 860px) {
  :root { --bar-h: 53px; }
  .topbar-inner { flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .brand { gap: 8px; }
  .brand .logo-mark { width: 34px; height: 34px; }
  .wm-header .wm-title { font-size: 17px; }
  .wm-header .wm-sub { font-size: 6.5px; margin-top: 3px; }
  .topbar-tools { margin-left: auto; }
  .topbar .theme-label { display: none; }
  .nav-toggle { display: inline-flex; }
  .topnav { display: none; order: 3; flex-basis: 100%; margin: 0; }
  .topbar.nav-open .topnav { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 2px 0 8px; }
  .topnav a { padding: 11px 12px; font-size: 15px; border-radius: 10px; background: var(--surface-2); color: var(--text); }
  .topnav a.active { background: var(--accent-soft); color: var(--accent); }
}

/* ---------- Swipe on phones: the card, its buttons and the header all fit on one screen ---------- */
@media (max-width: 700px) {
  .swipe-head { align-items: center; margin-bottom: 10px; }
  .swipe-head h1 { font-size: 20px; }
  .swipe-head-actions { display: flex; gap: 2px; }
  .swipe-head-actions .btn { padding: 4px 8px; }
  .swipe-stage { height: 560px; height: clamp(300px, calc(100svh - var(--bar-h) - 172px), 600px); }
  .scard-hero { height: 44%; min-height: 130px; padding: 14px; }
  .scard-title h2 { font-size: 20px; }
  .scard-title p { font-size: 13px; }
  .scard-match { top: 10px; right: 10px; }
  .scard-body { padding: 12px 14px; gap: 8px; }
  .scard-stats { font-size: 13.5px; gap: 4px; }
  .scard-points { font-size: 14px; gap: 2px; }
  .scard-points, .scard-blurb { flex: 1 1 auto; min-height: 0; overflow: hidden; }
  .scard-body .chips { flex-wrap: nowrap; overflow: hidden; flex: none; }
  .swipe-actions { margin-top: 14px; gap: 14px; }
  .sbtn { width: 56px; height: 56px; font-size: 23px; }
  .sbtn.small { width: 42px; height: 42px; font-size: 17px; }
  .swipe-hint { display: none; }
}
@media (max-width: 700px) and (max-height: 620px) {
  .scard-points { display: block; flex: none; }
  .scard-points li:nth-child(n+2) { display: none; }
  .scard-hero { height: 40%; }
  .scard-body .chips { display: none; }
}

/* ---------- Compare on phones: no sideways scrolling. Each row becomes a label with the three
   programs side by side under it, and a slim bar of program names stays pinned while you scroll. ---------- */
.cmp-pin { display: none; }
@media (max-width: 700px) {
  .cmp-headline .check { font-size: 13px; }
  .cmp-wrap { overflow: visible; }
  table.cmp, .cmp-more .cmp { display: block; min-width: 0; font-size: 14px; line-height: 1.45; table-layout: auto; }
  .cmp thead, .cmp tbody { display: block; }
  .cmp tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
  .cmp th, .cmp td { display: block; padding: 4px 10px 12px; border-bottom: 0; min-width: 0; overflow-wrap: anywhere; }
  .cmp td + td { border-left: 1px solid color-mix(in srgb, var(--border) 65%, transparent); }
  .cmp th + th { border-left: 0; }
  .cmp .rowh, .cmp-more .rowh { grid-column: 1 / -1; width: auto; position: static; background: transparent; padding: 10px 10px 4px; font-size: 12px; letter-spacing: .02em; }
  .cmp-col { width: auto; }
  .cmp-headrow .rowh { display: none; }
  .cmp-headrow th { padding: 10px 8px 12px; }
  .cmp-headrow th + th { border-left: 1px solid color-mix(in srgb, var(--border) 65%, transparent); }
  .cmp-top { grid-template-columns: 1fr auto; row-gap: 8px; column-gap: 4px; margin-bottom: 8px; }
  .cmp-top .cmp-ph { grid-column: 1 / -1; grid-row: 1; width: 100%; height: 64px; }
  .cmp-id { grid-column: 1; }
  .cmp-id .cmp-name { font-size: 13.5px; line-height: 1.25; }
  .cmp-id .type-badge { font-size: 10px; padding: 1px 6px; white-space: normal; }
  .cmp-x { padding: 2px; align-self: start; }
  .cmp-col .select { font-size: 12px; padding: 5px 4px; }
  .cmp-empty { height: 64px; font-size: 12px; text-align: center; }
  .cmp .grp th { grid-column: 1 / -1; padding: 14px 10px 8px; }
  .cmp .grp-sub { display: block; margin: 2px 0 0; }
  .cmp-board th.rowh { padding-top: 12px; }
  .cmp-board td { padding-top: 6px; padding-bottom: 14px; }
  .score-n { font-size: 24px; }
  .best-at { font-size: 12.5px; margin-top: 6px; }
  .cmp .win-tag { display: inline-block; margin: 4px 0 0; }
  .cmp td.lead { box-shadow: inset 0 3px 0 var(--accent); }
  .cbar { max-width: none; }
  .cmp-more .cmp { margin-top: 6px; }
  .cmp-pin { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); position: sticky; top: var(--bar-h); z-index: 9; margin: 0 -16px 0; padding: 8px 16px; background: var(--topbar); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); font-size: 12.5px; font-weight: 700; height: 35px; margin-bottom: -35px; pointer-events: none; visibility: hidden; opacity: 0; transition: opacity .15s; }
  .cmp-pin.show { visibility: visible; opacity: 1; }
  .cmp-pin span { padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cmp-pin span + span { border-left: 1px solid var(--border); }
}

/* ---------- Real cost calculator (program pages) ---------- */
.cc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.cc-inputs { display: grid; gap: 14px; min-width: 0; }
.cc-group { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 16px; margin: 0; display: grid; gap: 12px; min-width: 0; }
.cc-group legend { padding: 0 6px; margin-left: -6px; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--gold); }
.cc-field { display: grid; gap: 5px; font-size: 13.5px; font-weight: 600; }
.cc-field .small { font-weight: 400; line-height: 1.4; }
.cc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cc-money { position: relative; display: block; }
.cc-money > span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.cc-money .input { width: 100%; padding-left: 24px; font-variant-numeric: tabular-nums; }
.cc-cov { gap: 6px; }
.cc-out { position: sticky; top: calc(var(--bar-h) + 12px); }
.cc-card { padding: 18px; background: linear-gradient(160deg, var(--gold-soft), var(--surface) 70%); border-color: color-mix(in srgb, var(--gold) 35%, var(--border)); }
.cc-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cc-net { font-family: var(--serif); font-size: 40px; font-weight: 700; line-height: 1.1; color: var(--gold); margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.cc-bar { height: 8px; border-radius: 4px; background: var(--surface-2); margin: 10px 0 14px; overflow: hidden; }
.cc-bar > span { display: block; height: 100%; border-radius: 4px; background: var(--ok); }
.cc-lines { display: grid; gap: 6px; font-size: 14px; }
.cc-line { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.cc-line span:first-child { color: var(--muted); }
.cc-total { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; font-weight: 700; }
.cc-total span:first-child { color: var(--text); }
.cc-ways { margin-top: 18px; }
.cc-ways > summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: 6px 0; }
.cc-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.cc-list li { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; display: grid; gap: 3px; }
.cc-list .chip { font-size: 11px; padding: 0 7px; vertical-align: 1px; }
.cc-foot { margin-top: 14px; }
@media (max-width: 900px) {
  .cc-grid { grid-template-columns: 1fr; }
  .cc-out { position: static; order: -1; }
}
@media (max-width: 520px) { .cc-row { grid-template-columns: 1fr; } .cc-net { font-size: 34px; } }

/* ---------- Program page: key features first, then drawers ---------- */
.kf { padding: 20px 22px; margin-top: 14px; background: linear-gradient(165deg, var(--gold-soft), var(--surface) 55%); border-color: color-mix(in srgb, var(--gold) 30%, var(--border)); }
.kf-title { font-family: var(--serif); font-size: 22px; margin: 0 0 12px; }
.kf-aud { margin-bottom: 14px; }
.kf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; align-items: start; }
.kf-blurb { font-size: 15.5px; line-height: 1.6; margin: 0 0 12px; }
.kf-points { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.kf-points li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.45; font-weight: 600; }
.kf-points li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 20%, transparent); }
.kf-fields { display: grid; gap: 6px; }
.kf-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kf-tile { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); min-width: 0; }
.kf-tile.link:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.kf-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 16px; }
.kf-txt { display: grid; gap: 1px; min-width: 0; }
.kf-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kf-value { font-size: 15px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.kf-sub { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.kf-tile:first-child .kf-value { font-family: var(--serif); font-size: 22px; color: var(--gold); }
.acc-nav { align-items: center; }
.acc-nav .acc-all { margin-left: auto; flex: none; }
details.acc { padding: 0; }
details.acc > summary.sec-head { list-style: none; cursor: pointer; margin: 0; padding: 15px 18px; display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; border-radius: var(--radius); }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary.sec-head h2 { flex: 0 1 auto; font-size: 17px; }
details.acc > summary .acc-sub { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.acc > summary .badge { margin-left: auto; }
details.acc > summary:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
details.acc > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.acc-chev { margin-left: auto; flex: none; color: var(--muted); display: grid; place-items: center; transition: transform .15s; }
details.acc > summary .badge + .acc-chev { margin-left: 4px; }
details.acc[open] > summary .acc-chev { transform: rotate(180deg); }
details.acc[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
details.acc > .sec-body { padding: 16px 20px 20px; }
.sections > .group-h { margin-top: 14px; font-family: var(--serif); }
.sections > .group-h:first-child { margin-top: 0; }
.group-h, .kf { scroll-margin-top: calc(var(--bar-h) + 12px); }
@media (max-width: 900px) { .kf-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .kf { padding: 16px; }
  .kf-tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kf-tile { padding: 10px; gap: 8px; }
  .kf-ic { display: none; }
  details.acc > summary.sec-head { padding: 13px 14px; }
  details.acc > summary .acc-sub { display: none; }
  details.acc > .sec-body { padding: 14px; }
}

/* ---------- Guest mode ---------- */
.guest-tools { display: inline-flex; gap: 6px; align-items: center; }
.guest-tools[hidden] { display: none; }
@media (max-width: 860px) { .guest-tools .gt-signup { display: none; } }
.auth-guest { width: 100%; display: grid; gap: 8px; text-align: center; }
.auth-guest[hidden] { display: none; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-guest-btn { justify-content: center; padding: 11px 14px; font-size: 15px; }

/* ---------- Motion touches (public/js/motion.js), adapted from Watermelon UI (MIT) ---------- */
/* 1. Sliding nav pill: one highlight glides behind the active link (continuous-tabs). */
.topnav { position: relative; }
.nav-pill { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 8px; background: var(--accent-soft); pointer-events: none; opacity: 0;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), width .25s cubic-bezier(.2, .8, .2, 1), height .2s ease-out, opacity .2s ease-out; }
.nav-pill.no-anim { transition: none; }
.topnav a { position: relative; z-index: 1; transition: color .2s ease, background-color .2s ease; }
.topnav.has-pill a.active { background: transparent; }

/* 2. Heart pop + burst (save-toggle). */
svg.pop { animation: heart-pop .3s ease-out; }
@keyframes heart-pop { 0% { transform: scale(.4); } 55% { transform: scale(1.3); } 100% { transform: scale(1); } }
.heart { transition: transform .15s ease, background-color .2s ease, color .2s ease; }
.heart:active { transform: scale(.9); }
.heart-burst { position: fixed; z-index: 60; width: 0; height: 0; pointer-events: none; }
.heart-burst i { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: #e0483a;
  animation: heart-dot .3s cubic-bezier(.2, .7, .3, 1) forwards; }
.heart-burst i:nth-child(even) { background: var(--accent); width: 5px; height: 5px; }
@keyframes heart-dot {
  0% { transform: rotate(var(--a)) translateY(0) scale(1); opacity: 1; }
  100% { transform: rotate(var(--a)) translateY(-26px) scale(.2); opacity: 0; }
}

/* 3. Rolling Saved counter (stepper). */
.count-pill { clip-path: inset(0 round 10px); }
.roll { display: inline-block; }
.roll-up { animation: roll-up .25s cubic-bezier(.2, .8, .2, 1); }
.roll-down { animation: roll-down .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes roll-up { from { transform: translateY(90%); opacity: 0; filter: blur(2px); } to { transform: none; opacity: 1; filter: none; } }
@keyframes roll-down { from { transform: translateY(-90%); opacity: 0; filter: blur(2px); } to { transform: none; opacity: 1; filter: none; } }
.count-pill.bump { animation: pill-bump .3s ease-out; }
@keyframes pill-bump { 40% { transform: scale(1.25); } }

/* 4. Quick search palette (command-search). */
.qs-open { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; transition: border-color .2s ease, color .2s ease; }
.qs-open:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.qs-open .ic { font-size: 16px; }
.qs-open-kbd, .qs kbd { font: 600 11px/1 var(--font); padding: 4px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
@media (max-width: 1100px) { .qs-open-label { display: none; } }
@media (max-width: 860px) { .qs-open-kbd { display: none; } .qs-open { padding: 7px 9px; } }
.qs-lock { overflow: hidden; }
.qs { position: fixed; inset: 0; z-index: 70; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.qs-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .18s ease; }
.qs-panel { position: relative; width: 100%; max-width: 580px; max-height: 70vh; display: flex; flex-direction: column; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-pop); overflow: hidden;
  opacity: 0; transform: translateY(-8px) scale(.97); filter: blur(4px); transition: opacity .18s ease-out, transform .2s cubic-bezier(.2, .8, .2, 1), filter .18s ease-out; }
.qs.on .qs-back { opacity: 1; }
.qs.on .qs-panel { opacity: 1; transform: none; filter: none; }
.qs-field { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--muted); }
.qs-field .ic { font-size: 18px; flex: none; }
.qs-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; }
.qs-list { overflow-y: auto; padding: 6px; }
.qs-sec { padding: 10px 10px 4px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.qs-row { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 10px; cursor: pointer; animation: qs-in .2s ease-out both; animation-delay: calc(var(--i, 0) * 18ms); }
.qs-row[aria-selected="true"] { background: var(--accent-soft); }
.qs-row[aria-selected="true"] .qs-t { color: var(--accent); }
.qs-t { font-weight: 600; color: var(--text); }
.qs-s { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-empty { padding: 18px 12px; color: var(--muted); }
.qs-foot { display: flex; gap: 16px; padding: 9px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.qs-foot kbd { margin-right: 3px; }
@keyframes qs-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) { .qs { padding-top: 8px; } .qs-panel { max-height: 80vh; } .qs-foot { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .nav-pill, .qs-panel, .qs-back, .heart { transition: none; }
  svg.pop, .roll-up, .roll-down, .count-pill.bump, .qs-row, .heart-burst i { animation: none; }
  .qs-panel { filter: none; transform: none; }
}

/* ---------- The route: one line through every place a student fills things in, ending at a flag ---------- */
/* Quiz: the two step bars run to the finish flag (your top 3). */
.route-end { flex: none; display: grid; place-items: center; font-size: 16px; color: var(--muted); margin-left: -4px; }
/* Program page checklist: each section is a stop on the route. */
.toc.route a.rt { position: relative; justify-content: flex-start; align-items: center; gap: 10px; padding: 7px 0; }
.toc.route a.rt > span:nth-child(2) { flex: 1; min-width: 0; }
.rt-stop { position: relative; z-index: 1; flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--surface); border: 2px solid var(--border); color: var(--surface); }
.rt::before { content: ""; position: absolute; left: 8px; top: 50%; height: 100%; width: 2px; background: var(--border); }
.rt:last-child::before { display: none; }
.rt-info .rt-stop { width: 10px; height: 10px; margin: 0 4px; border-width: 2px; }
.rt-some .rt-stop { border-color: var(--warn); background: linear-gradient(90deg, var(--warn) 50%, var(--surface) 50%); }
.rt-done .rt-stop { border-color: var(--ok); background: var(--ok); }
.rt-done::before { background: var(--ok); }
.rt-end .rt-stop { border: 0; background: var(--surface); color: var(--muted); font-size: 17px; width: 18px; }
.rt-end.rt-done .rt-stop { color: var(--ok); }
.rt-state { flex: none; font-size: 12px; color: var(--muted); }
/* Header: where the facts come from. */
.src-line { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.src-line:hover { color: var(--accent); text-decoration: none; }
.src-line .ic { color: var(--ok); }
/* My list: the progress bar runs to a flag. */
.route-bar { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); font-size: 14px; }
.route-bar .progress-bar { flex: 1; margin-top: 0; }
.route-bar.done { color: var(--ok); }

/* ---------- More Watermelon pieces, each checked against Apple's guidance first ---------- */
/* Undo bar (time-undo-action): the change happens at once and this offers to take it back. The countdown
   pauses under the pointer or keyboard focus; with reduced motion there is no countdown and it stays until dismissed. */
.undo-toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 65; display: flex; align-items: center; gap: 6px;
  width: max-content; max-width: min(560px, calc(100vw - 24px)); padding: 8px 8px 8px 16px; border-radius: 14px; overflow: hidden;
  background: var(--tip-bg); color: var(--tip-text); border: 1px solid var(--border); box-shadow: var(--shadow-pop); font-size: 14px; animation: ut-in .25s cubic-bezier(.2, .8, .2, 1); }
.ut-text { flex: 1; min-width: 0; }
.ut-undo { flex: none; min-height: 40px; padding: 0 14px; border-radius: 9px; border: 0; background: var(--cta); color: var(--cta-ink); font: inherit; font-weight: 700; cursor: pointer; }
.ut-x { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: inherit; font-size: 16px; cursor: pointer; }
.ut-x:hover { background: color-mix(in srgb, var(--tip-text) 14%, transparent); }
.ut-timer { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--accent); transform-origin: left; animation: ut-count 10s linear forwards; }
.undo-toast:hover .ut-timer, .undo-toast:focus-within .ut-timer { animation-play-state: paused; }
@keyframes ut-count { to { transform: scaleX(0); } }
@keyframes ut-in { from { opacity: 0; transform: translate(-50%, 12px) scale(.96); } }

/* Copy link (copy-confirm): the label swaps to a check and "Link copied", then swaps back. */
.copy-btn { position: relative; display: inline-grid; }
.copy-btn > .cp-a, .copy-btn > .cp-b { grid-area: 1 / 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: opacity .18s ease-out, transform .2s cubic-bezier(.2, .8, .2, 1), filter .18s ease-out; }
.copy-btn > .cp-b { opacity: 0; transform: translateY(60%) scale(.9); filter: blur(2px); color: var(--ok); }
.copy-btn.copied > .cp-a { opacity: 0; transform: translateY(-60%) scale(.9); filter: blur(2px); }
.copy-btn.copied > .cp-b { opacity: 1; transform: none; filter: none; }
.cp-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.cmp-share { margin-top: 10px; }

/* Sections open and close smoothly (expand-details). Browsers without interpolate-size just snap, as before. */
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    details.acc { interpolate-size: allow-keywords; }
    details.acc::details-content { block-size: 0; overflow: clip; opacity: 0; transition: block-size .26s ease, opacity .2s ease, content-visibility .26s allow-discrete; }
    details.acc[open]::details-content { block-size: auto; opacity: 1; }
  }
}

/* Cost calculator: the total nudges up or down when it changes (stepper). */
.cc-net.net-up { animation: net-up .3s ease-out; }
.cc-net.net-down { animation: net-down .3s ease-out; }
@keyframes net-up { from { transform: translateY(28%); opacity: .3; } }
@keyframes net-down { from { transform: translateY(-28%); opacity: .3; } }

/* Phones: every button answers to at least a 44 by 44 tap, without changing how big it looks. */
@media (max-width: 860px) {
  .btn, .qs-open, .nav-toggle, .theme-menu > summary, .back { position: relative; }
  .btn::before, .qs-open::before, .nav-toggle::before, .theme-menu > summary::before, .back::before, .heart::before {
    content: ""; position: absolute; left: 50%; top: 50%; width: 100%; height: 100%; min-width: 44px; min-height: 44px; transform: translate(-50%, -50%); }
}

@media (prefers-reduced-motion: reduce) {
  .undo-toast, .cc-net.net-up, .cc-net.net-down { animation: none; }
  .ut-timer { animation: none; display: none; }
  .copy-btn > .cp-a, .copy-btn > .cp-b { transition: none; transform: none; filter: none; }
}

/* ---------- Responds as you point ---------- */
/* Pointer glow on cards (devices with a real pointer only). */
@media (hover: hover) {
  .bcard, .org-tile { position: relative; }
  .bcard::after, .org-tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s ease;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
  .bcard:hover::after, .org-tile:hover::after { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .bcard::after, .org-tile::after { display: none; }
}

/* ---------- Craft pass: type details, press feedback, plainer grouping ---------- */
/* Type: headlines break into even lines, paragraphs avoid a lone last word, figures line up, underlines clear descenders. */
h1, h2, h3, h4, .why, .kf-blurb, .empty { text-wrap: balance; }
p, li, dd, figcaption { text-wrap: pretty; }
a { text-underline-offset: .2em; }
.count-pill, .cd, .match-pill, .scard-match, .rank, .bcard-facts, .scard-stats, .list-table td, .dl-date, .bs-val, .bs-ends,
.live-count strong, .kf-value, .kf-sub, .pnum, .progress-ring, .side .card strong, .quiz-top .small { font-variant-numeric: tabular-nums; }
.bcard-body h3 a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* Press: every button and choice dips a little under the finger, then springs back. */
.btn, .qchip, .fchip, .pnum, .popt { transition: scale .15s ease-out, background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out; }
.btn:active:not([disabled]), .qchip:active, .fchip:active, .pnum:active, .popt:active { scale: .97; }
/* Changing theme repaints at once, so colors don't smear through each other on the way. */
.theme-switching, .theme-switching * { transition: none !important; }

/* Program page. The photo is tall enough to show faces; the header has no pill above the name. */
/* The program photo is shown whole: the box takes the photo's shape (app.js sets --ar once it loads) up to a
   maximum height; a taller photo sits in the middle with a blurred copy of itself filling the sides. */
.detail-banner { width: 100%; height: auto; aspect-ratio: var(--ar, 16 / 9); min-height: 200px; max-height: min(500px, 68svh); background: var(--surface-2); }
.detail-banner.has-photo::after { display: none; }
.detail-banner > img[data-fallback] { object-fit: contain; z-index: 1; }
.detail-banner > img.ph-fill { object-fit: cover; z-index: 0; filter: blur(26px) brightness(.8) saturate(1.1); transform: scale(1.2); pointer-events: none; }
.detail-banner:not(.has-photo) > img.ph-fill { display: none; }
@media (max-width: 600px) { .detail-banner { height: auto; min-height: 180px; max-height: min(440px, 62svh); } }
.school-head .chips .type-badge { align-self: center; font-size: 12.5px; padding: 2px 10px; }
/* Key features: facts set as a plain list, grouped by spacing. The cost, which students decide on, is the big one. */
.kf-tiles { gap: 18px 28px; align-content: start; }
.kf-tile { padding: 0; border: 0; border-radius: 0; background: none; }
.kf-tile.link:hover .kf-value { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.kf-txt { gap: 2px; }
.kf-label { font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.kf-value { font-size: 16px; font-weight: 650; }
.kf-sub { font-size: 13px; }
.kf-tile[data-jump="sec-cost"] { grid-column: 1 / -1; padding-bottom: 16px; border-bottom: 1px solid color-mix(in srgb, var(--gold) 22%, var(--border)); }
.kf-tile[data-jump="sec-cost"] .kf-value { font-family: var(--serif); font-size: clamp(30px, 1.2vw + 22px, 40px); line-height: 1.1; color: var(--gold); margin: 2px 0; }
.kf-points li::before { left: 6px; top: .55em; width: 7px; height: 7px; box-shadow: none; }
@media (max-width: 700px) { .kf-tile { padding: 0; } .kf-tiles { gap: 14px 16px; } }

/* Compare: the winning cell is tinted and bold; no colored edge on top of that. */
.cmp td.lead { box-shadow: none; }

/* Home: the credits are a footnote under the video, not a second panel. */
.video-credits { padding: 0 4px; background: none; border: 0; border-radius: 0; }
.video-credits h2 { font-size: 13px; letter-spacing: 0; text-transform: none; margin-bottom: 6px; }
.video-credits p { font-size: 12.5px; max-width: 110ch; }

@media (prefers-reduced-motion: reduce) {
  .btn, .qchip, .fchip, .pnum, .popt { transition: none; }
  .btn:active:not([disabled]), .qchip:active, .fchip:active, .pnum:active, .popt:active { scale: none; }
}

/* College cards: the answer first (deferral, credit, ask-by date); the college's full policy opens on a click. */
.college { gap: 10px; }
.college-grid { align-items: start; }
.college-by { margin: 0; }
.college-more > summary { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; color: var(--accent); border-radius: 6px; }
.college-more > summary::-webkit-details-marker { display: none; }
.college-more > summary .ic { transition: rotate .15s ease-out; }
.college-more[open] > summary .ic { rotate: 180deg; }
.college-more[open] > summary { margin-bottom: 10px; }
.college-more > .hillel-line { margin: 0 0 10px; color: var(--muted); font-weight: 500; }
.college-more .college-facts { margin-bottom: 10px; }
.college-facts dt { font-size: 13px; text-transform: none; letter-spacing: 0; }
.mycol-body .hillel-line { color: var(--muted); font-weight: 500; }
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    details.college-more, details.mycol-policy { interpolate-size: allow-keywords; }
    details.college-more::details-content, details.mycol-policy::details-content { block-size: 0; overflow: clip; opacity: 0; transition: block-size .22s ease-out, opacity .18s ease-out, content-visibility .22s allow-discrete; }
    details.college-more[open]::details-content, details.mycol-policy[open]::details-content { block-size: auto; opacity: 1; }
  }
}
@media (prefers-reduced-motion: reduce) { .college-more > summary .ic { transition: none; } }

/* ---------- Discover sub-tabs (Swipe · Top 3 · Saved): a segmented control with a sliding pill ---------- */
.subtabs { position: relative; display: flex; width: max-content; max-width: 100%; margin: 0 auto 18px; padding: 4px; gap: 2px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.subtabs a { position: relative; z-index: 1; flex: 1 1 0; min-width: 92px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 18px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; transition: color .2s ease, background-color .2s ease; }
.subtabs a:hover { color: var(--text); text-decoration: none; }
.subtabs a.on { color: var(--accent-ink); background: var(--accent); }
.subtabs.has-pill a.on { background: transparent; }
.sub-pill { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 999px; background: var(--accent); pointer-events: none;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), width .28s cubic-bezier(.2, .8, .2, 1); }
.sub-pill.no-anim { transition: none; }
.sub-count { min-width: 20px; padding: 0 6px; border-radius: 10px; font-size: 12px; line-height: 18px; text-align: center; background: var(--accent-soft); color: var(--accent); }
.subtabs a.on .sub-count { background: color-mix(in srgb, var(--accent-ink) 22%, transparent); color: var(--accent-ink); }
.quiz-intro { padding-top: 24px; }
@media (max-width: 700px) {
  .subtabs { width: 100%; margin-bottom: 10px; }
  .subtabs a { min-width: 0; min-height: 36px; padding: 0 10px; }
  /* On the swipe screen the tab already says where you are, so the heading steps aside to keep the card on screen. */
  .subtabs + .swipe-head h1, .subtabs ~ * .swipe-head h1 { display: none; }
  .swipe-stage { height: clamp(300px, calc(100svh - var(--bar-h) - 184px), 600px); }
}
@media (prefers-reduced-motion: reduce) { .sub-pill { transition: none; } }

/* Home: one way forward under the video. */
.home-cta { max-width: 1100px; margin: 0 auto 26px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.home-cta .btn.big { padding: 15px 34px; font-size: 17px; }

/* ---------- Quiz, redesigned (Watermelon: quick-option-picker, discrete-tabs, scrub-slider, carousel, step-indicator) ----------
   Motion follows the craft pass: 300ms or less, no overshoot, and nothing moves with reduced motion. */
.quiz { --q-ease: cubic-bezier(.2, .8, .2, 1); padding-bottom: 8px; }
.quiz h1 { font-size: 30px; }

/* Step indicator: two labelled tracks; the current one fills as you answer. */
.quiz-top { gap: 14px; }
.qsteps { display: flex; gap: 10px; flex: 1; }
.qsteps > span { flex: 1; display: flex; flex-direction: column; gap: 6px; height: auto; background: none; border-radius: 0; }
.qsteps > span.done, .qsteps > span.now { background: none; opacity: 1; }
.qs-bar { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.qs-fill { display: block; height: 100%; width: 100%; border-radius: 3px; background: var(--accent); transform-origin: left; transform: scaleX(var(--f, 0)); transition: transform .3s var(--q-ease); }
.qsteps em { font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.qsteps > .now em { color: var(--text); }
.qsteps > .done .qs-fill { opacity: .55; }

/* Question blocks: a card each, with a quiet tick once answered. */
.quiz .qgroup { margin-top: 14px; padding: 16px 18px 18px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); transition: border-color .2s ease; }
.quiz .qgroup h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.quiz .qgroup.answered h3::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.quiz .extras .qgroup { border: 0; padding: 10px 0 0; background: none; }

/* Multiple-choice chips: picking one fills it and slides a check in. */
.quiz .qchips { gap: 8px; margin-top: 12px; }
.quiz .qchip { display: inline-flex; align-items: center; gap: 0; min-height: 44px; padding: 0 18px; font-weight: 600;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, gap .25s var(--q-ease), padding .25s var(--q-ease); }
.qc-check { display: inline-grid; place-items: center; width: 0; height: 18px; overflow: hidden; border-radius: 50%; font-size: 12px;
  background: var(--accent); color: var(--accent-ink); opacity: 0; transition: width .25s var(--q-ease), opacity .2s ease; }
.quiz .qchip.on { gap: 8px; padding-left: 12px; }
.quiz .qchip.on .qc-check { width: 18px; opacity: 1; }
.quiz .qchip.any .qc-check { background: var(--muted); }
.quiz .qchip.just-on .qc-check svg { animation: qc-in .25s var(--q-ease); }
@keyframes qc-in { from { transform: scale(.4); opacity: 0; filter: blur(2px); } }

/* Single choice: a segmented control; one highlight slides to the pick. */
.qseg { position: relative; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; padding: 4px; border-radius: 16px; background: var(--surface-2); width: fit-content; max-width: 100%; }
.qseg .qchip { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border: 2px solid transparent; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 600; transition: color .2s ease, border-color .2s ease, background-color .2s ease; }
.qseg .qchip:hover { color: var(--text); border-color: transparent; }
.qseg .qchip.on { color: var(--text); background: var(--surface); border-color: var(--accent); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.qseg .qchip.any.on { background: var(--surface); border-color: var(--accent); }
.qseg.has-pill .qchip.on { background: transparent; box-shadow: none; }
.seg-pill { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 12px; background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 1px 2px rgba(0,0,0,.12);
  pointer-events: none; transition: transform .28s var(--q-ease), width .28s var(--q-ease), height .28s var(--q-ease); }
.seg-pill.no-anim { transition: none; }
.qseg.has-pill .qchip.on { border-color: transparent; }
.lvl { flex: none; fill: currentColor; }
.lvl rect.off { opacity: .28; }
.qseg .qchip.on .lvl { fill: var(--accent); }

/* Budget ruler: one tick per $1,000; ticks fill up to the thumb. The real range input sits on top. */
.ruler { max-width: none; margin-top: 10px; }
.ruler .bs-val { font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: 1.1; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.ruler-track { position: relative; height: 64px; border-radius: 14px; background: var(--surface-2); padding: 0 16px; }
.ruler-ticks { position: absolute; inset: 0 16px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.tick { position: relative; width: 2px; height: 16px; border-radius: 1px; background: color-mix(in srgb, var(--muted) 45%, transparent); }
.tick.major { height: 30px; background: color-mix(in srgb, var(--muted) 75%, transparent); }
.tick::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--accent); opacity: clamp(0, calc((var(--p) * var(--span) - var(--i) + .5) * 100), 1); transition: opacity .12s linear; }
.ruler-thumb { position: absolute; top: 8px; bottom: 8px; left: calc(16px + (100% - 32px) * var(--p)); width: 4px; margin-left: -2px; border-radius: 2px; background: var(--text); pointer-events: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 14%, transparent); }
.ruler-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.ruler-track:has(.ruler-input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.ruler + .bs-ends, .ruler .bs-ends { display: flex; justify-content: space-between; padding: 6px 12px 0; }

/* What matters: a scroller of cards; each card is a level meter you tap. */
.pcar-wrap { margin-top: 16px; }
.pcar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.pcar-count { color: var(--muted); font-size: 14px; }
.pcar-count strong { color: var(--text); font-size: 17px; font-variant-numeric: tabular-nums; }
.pcar-nav { display: flex; gap: 6px; }
.pcar-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 18px; cursor: pointer; transition: border-color .2s ease; }
.pcar-btn:hover { border-color: var(--accent); }
.prows.pcar { display: grid; grid-auto-flow: column; grid-auto-columns: min(300px, 82%); gap: 12px; margin: 0 -4px; padding: 4px 4px 10px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-padding-inline: 4px; overscroll-behavior-x: contain; scrollbar-width: none; flex-direction: row; }
.prows.pcar::-webkit-scrollbar { display: none; }
.pcar .prow { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 18px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--border);
  grid-template-columns: none; transition: border-color .2s ease; }
.pcar .prow.active { border-color: var(--accent); }
.prow-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pcar .prow-label { font-size: 17px; }
.pcar .popt.dc { padding: 6px 12px; min-height: 34px; border-radius: 999px; font-size: 13px; }
.pcar .pnums { display: flex; align-items: flex-end; gap: 8px; height: 112px; flex: none; }
.pcar .pnum { flex: 1; height: calc(36px + var(--n) * 15px); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease; }
.pcar .pnum:hover { border-color: var(--accent); color: var(--text); }
.pcar .pnum.lit { background: color-mix(in srgb, var(--accent) 30%, var(--surface-2)); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); color: var(--text); }
.pcar .pnum.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pcar .pnum.fill-in { animation: meter-fill .18s ease-out both; animation-delay: calc(var(--d, 0) * 30ms); }
@keyframes meter-fill { from { background-color: var(--surface-2); border-color: var(--border); } }
.prow-ends { display: flex; justify-content: space-between; gap: 10px; margin-top: -6px; }
.pcar .pend { width: auto; font-size: 13px; }
.pcar .pend:first-child { text-align: left; }
.pcar .pend:last-child { text-align: right; }
.pcar-pips { display: flex; justify-content: center; gap: 2px; margin-top: 4px; }
.pip { width: 24px; height: 24px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; padding: 0; }
.pip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background-color .2s ease, width .25s var(--q-ease); }
.pip.done::before { background: var(--accent); }
.pip.here::before { width: 20px; border-radius: 4px; }

/* Floating bar: count + Next, on frosted glass over the questions, with progress along its top edge. */
.quiz .quiz-foot { position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 5; margin-top: 22px; padding: 10px 10px 10px 18px; border-radius: 18px; overflow: hidden;
  background: color-mix(in srgb, var(--surface) 78%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px);
  border: 1px solid var(--border); box-shadow: var(--shadow-pop); }
.quiz .quiz-foot::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--f, 0)); transition: transform .3s var(--q-ease); }
.quiz .live-count { text-align: left; }
.quiz .live-count strong { font-family: var(--serif); font-size: 22px; margin-right: 2px; display: inline-block; }
.qnext { min-height: 46px; padding: 0 22px; border-radius: 14px; font-size: 15px; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .quiz .quiz-foot { background: var(--surface); } }
@media (prefers-reduced-transparency: reduce) { .quiz .quiz-foot { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; } }

@media (max-width: 600px) {
  .quiz h1 { font-size: 24px; }
  .quiz .qgroup { padding: 14px; border-radius: 16px; }
  .qseg { width: 100%; }
  .qseg .qchip { flex: 1 1 auto; padding: 0 10px; }
  .prows.pcar { grid-auto-columns: 86%; }
  .qsteps em { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .qs-fill, .qc-check, .quiz .qchip, .seg-pill, .tick::after, .pip::before, .quiz .quiz-foot::before { transition: none; }
  .quiz .qchip.just-on .qc-check svg, .pcar .pnum.fill-in { animation: none; }
}
.pcar .prow { align-items: stretch; text-align: left; }
/* Override the old phone rules: the floating bar stays one row; the end labels stay under the meter. */
.quiz .quiz-foot { flex-wrap: nowrap; }
.quiz .live-count { order: 0; flex: 1 1 auto; flex-basis: auto; min-width: 0; }
.pcar .pend { order: 0; flex: 0 1 auto; }
.quiz .qgroup h3 { display: block; }
.quiz .qgroup.answered h3::after { display: inline-block; vertical-align: middle; margin-left: 8px; }
@media (max-width: 600px) {
  .quiz .quiz-foot { padding: 8px 8px 8px 14px; }
  .quiz .live-count { font-size: 13px; line-height: 1.25; }
  .quiz .live-count strong { font-size: 19px; }
  .qnext { min-height: 44px; padding: 0 16px; }
}
.pcar .pnums { order: 0; flex-basis: auto; }

/* A redraw lands instantly; motion.js turns this on for one frame while it places highlights. */
#app.settling *, #app.settling *::before, #app.settling *::after { transition: none !important; }

/* ---------- Top bar, modeled on thenextgeninnovators.org (public/js/topbar.js) ----------
   A taller glass bar that sits a little lower, links grouped in one pill in the middle, a highlight that
   rests on the current page and glows under the pointer, and Home's sub-pages swapping in with Back. */
:root { --bar-h: 88px; }
.topbar { padding-top: 10px; background: color-mix(in srgb, var(--bg) 62%, transparent); border-bottom: 0; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; pointer-events: none;
  background: linear-gradient(to right, transparent 0%, color-mix(in srgb, var(--text) 16%, transparent) 50%, transparent 100%); }
/* Logo | a gap of up to 40px | the pill | all the spare room | the tools. The pill sits left of center, so a
   long name in the account button eats into the room on its right, not into the links; when space is tight
   the 40px gap gives way first. */
.topbar-inner { max-width: 1320px; padding: 12px 24px 14px; display: grid; grid-template-columns: max-content minmax(0, 40px) max-content minmax(0, 1fr) max-content; column-gap: 0; align-items: center; }
.topbar-inner .brand { grid-column: 1; justify-self: start; }
.topbar-inner > .topnav { grid-column: 3; justify-self: start; margin-left: 16px; flex-wrap: nowrap; }
.topbar-tools { grid-column: 5; justify-self: end; margin-left: 24px; }
.topbar .acct-menu > summary { max-width: 160px; }
.topbar.tb-enter { animation: tb-in .3s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes tb-in { from { transform: translateY(-24px); opacity: 0; } }

.topnav { margin: 0; justify-self: center; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent); background: color-mix(in srgb, var(--surface) 45%, transparent); }
.topnav > a, .nav-sub > a, .nav-back { position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px;
  color: var(--muted); font: 500 14.5px/1.2 var(--font); white-space: nowrap; background: none; border: 0; cursor: pointer; text-decoration: none;
  transition: none; }
.topnav > a:hover, .nav-sub > a:hover, .nav-back:hover { color: var(--text); background: none; text-decoration: none; }
.topnav > a.active, .nav-sub > a[aria-current="page"] { color: var(--accent); }
.topnav [data-hover], .topnav [data-hover]:hover { color: var(--cta-ink); }
.topnav > a:focus-visible, .nav-sub > a:focus-visible, .nav-back:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* Home has sub-pages: a small chevron says so. */
.topnav > a[data-group]::after { content: ""; width: 6px; height: 6px; margin-left: 2px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .7; transition: transform .2s ease; }
.nav-back .ic { font-size: 16px; margin-left: -4px; }
/* On wide screens Home is a plain link (its sub-pages are tabs on the page), so no chevron. */
@media (min-width: 861px) { .topnav > a[data-group]::after { display: none; } }

/* The highlight: soft at rest on the current page, the sea blue with a glow under the pointer.
   It jumps, never slides: picking a tab just turns that tab yellow, with nothing moving between tabs. */
.nav-pill { border-radius: 999px; background: var(--accent-soft); box-shadow: none; transition: none; }
.nav-pill.glow { background: color-mix(in srgb, var(--cta) 85%, transparent); box-shadow: 0 0 18px 4px color-mix(in srgb, var(--cta) 32%, transparent); }
.topnav.has-pill > a.active { background: transparent; }

/* Home's sub-pages swap in for the main links. */
.nav-sub { display: none; align-items: center; gap: 2px; }
.topnav.in-group > a { display: none; }
.topnav.in-group .nav-sub.open { display: flex; animation: nav-swap .22s cubic-bezier(.2, .8, .2, 1) both; }
.topnav.from-group > a { animation: nav-swap .22s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes nav-swap { from { opacity: 0; transform: translateY(-8px); } }

/* Signed in, the tools on the right get wider: drop their words before the pill runs out of room. */
@media (min-width: 861px) and (max-width: 1380px) { .topbar .theme-label, .topbar .qs-open-label { display: none; } }
/* Between phone and wide desktop: tighter links so everything fits on one row. */
@media (min-width: 861px) and (max-width: 1180px) {
  .topbar-inner { padding-left: 16px; padding-right: 16px; gap: 10px; }
  .topnav > a, .nav-sub > a, .nav-back { padding: 9px 12px; font-size: 14px; }
  .topbar .wm-header .wm-title { font-size: 18px; }
  .topbar .theme-label, .topbar .qs-open-label { display: none; }
  .topbar .qs-open-kbd { display: none; }
  .topbar .qs-open { padding: 7px 9px; }
  .topbar .acct-menu > summary { max-width: 130px; }
}
/* Just above phone width the links need the room: the logo stays, its words go (the link keeps its label). */
@media (min-width: 861px) and (max-width: 1000px) {
  .topbar .wm-header { display: none; }
  .topnav > a, .nav-sub > a, .nav-back { padding: 9px 10px; }
}
/* Narrow laptops: the name gives way to "Account", like on phones. */
@media (min-width: 861px) and (max-width: 1060px) {
  .topbar .acct-menu .user-name { display: none; }
  .topbar .acct-menu > summary::after { content: "Account"; }
}

/* Phones: one slim row; Menu opens the bar full screen, and Home expands in place. */
@media (max-width: 860px) {
  :root { --bar-h: 58px; }
  .topbar { padding-top: 4px; }
  .topbar-inner { display: flex; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .topnav { display: none; order: 3; flex-basis: 100%; border: 0; border-radius: 0; background: none; padding: 0; overflow: visible; }
  .topbar-inner > .topnav, .topbar-tools { margin-left: 0; }
  .topbar.nav-open { height: 100vh; height: 100dvh; overflow-y: auto; background: var(--bg); }
  .topbar.nav-open .topnav { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 14px 4px 24px; animation: nav-swap .22s cubic-bezier(.2, .8, .2, 1) both; }
  .topbar.nav-open .topnav > a { padding: 15px 16px; font-size: 18px; font-weight: 600; border-radius: 16px; color: var(--text); background: none; justify-content: flex-start; }
  .topbar.nav-open .topnav > a:hover { background: var(--surface-2); }
  .topbar.nav-open .topnav > a.active { background: var(--accent-soft); color: var(--accent); }
  .topbar.nav-open .topnav > a[data-group]::after { margin-left: auto; width: 8px; height: 8px; }
  .topbar.nav-open .topnav > a[data-group][aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
  .topbar.nav-open .nav-sub.open { display: flex; flex-direction: column; align-items: stretch; gap: 2px; margin: 0 0 6px 14px; padding-left: 10px; border-left: 2px solid var(--border); animation: nav-swap .2s cubic-bezier(.2, .8, .2, 1) both; }
  .topbar.nav-open .nav-sub .nav-back { display: none; }
  .topbar.nav-open .nav-sub > a { padding: 12px 14px; font-size: 16px; border-radius: 12px; color: var(--text); }
  .topbar.nav-open .nav-sub > a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
  .nav-pill { display: none; }
  html.menu-lock, html.menu-lock body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .topbar.tb-enter, .topnav.in-group .nav-sub.open, .topnav.from-group > a, .topbar.nav-open .topnav, .topbar.nav-open .nav-sub.open { animation: none; }
  .nav-pill, .topnav > a, .nav-sub > a, .nav-back { transition: none; }
}
@media (prefers-reduced-transparency: reduce) { .topbar { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-reduced-transparency: reduce) and (min-width: 861px) { .topnav { background: var(--surface); } }

/* ---------- Login page v2: scenery + a choice sheet (public/login.html, js/scene.js) ----------
   Phones: the photo fills the top, the sheet rises over its lower edge with rounded corners.
   Wide screens: the photo is a tall rounded panel on the left, the sheet sits on the right. */
.auth-body.auth-v2 { display: block; place-items: normal; padding: 0; background: var(--bg); }
.auth-split { width: 100%; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.scene { position: relative; overflow: hidden; isolation: isolate; height: 54vh; height: 54svh; min-height: 340px; color: #fff; background: #1d2a30; }
.scene-stack, .scene-slide { position: absolute; inset: 0; margin: 0; }
.scene-slide { opacity: 0; transition: opacity 1.2s ease; }
.scene-slide.on { opacity: 1; }
.scene-slide img { width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: 60% 40%; }
/* The slow drift: ambient, so it runs longer than UI motion. Same animation on the way out, so no jump. */
.scene-slide.on img, .scene-slide.out img { animation: scene-drift calc(var(--scene-hold, 6500ms) + 1.4s) linear both; }
@keyframes scene-drift { from { transform: scale(1.12) translate3d(1.5%, 1%, 0); } to { transform: scale(1.02) translate3d(0, 0, 0); } }
/* Shade so white type reads on any photo: darker at the top (brand) and bottom (headline). */
.scene::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(8, 12, 16, .5) 0%, rgba(8, 12, 16, 0) 26%, rgba(8, 12, 16, 0) 42%, rgba(8, 12, 16, .62) 100%); }
.scene-brand, .scene-copy { position: absolute; z-index: 2; left: 20px; right: 20px; }
.scene-brand { top: 16px; display: inline-flex; align-items: center; gap: 10px; right: auto; text-decoration: none; }
.scene-brand:hover { text-decoration: none; }
.scene-brand .scene-mark { display: block; flex: none; width: 38px; height: 38px; } /* always the light-on-dark mark: it sits on the photo */
.scene-brand .wm-title { color: #fff; font-size: 18px; }
.scene-brand .wm-sub { color: #f2c477; font-size: 6.5px; }
.scene-copy { bottom: 40px; display: grid; gap: 12px; }
.scene-title { margin: 0; font: 700 clamp(34px, 9vw, 64px)/1.02 "Fraunces", Georgia, serif; letter-spacing: -0.02em; text-wrap: balance; text-shadow: 0 2px 24px rgba(0, 0, 0, .25); }
.scene-place { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
.scene-place .ic { font-size: 15px; }
.scene-credit { margin-left: auto; font-size: 11.5px; font-weight: 500; color: rgba(255, 255, 255, .72); text-decoration: none; }
.scene-credit:hover { color: #fff; text-decoration: underline; }
/* Progress dots: the current one fills over the time its scene is shown. */
.scene-dots { display: flex; gap: 6px; }
.scene-dot { position: relative; flex: 1; max-width: 56px; height: 18px; padding: 0; border: 0; background: none; cursor: pointer; }
.scene-dot span { position: absolute; left: 0; right: 0; top: 7px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .32); overflow: hidden; }
.scene-dot span::after { content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.scene-dot.on span::after { animation: scene-fill var(--scene-hold, 6500ms) linear both; }
@keyframes scene-fill { to { transform: scaleX(1); } }
.scene-dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }

.auth-sheet { position: relative; z-index: 3; flex: 1; margin-top: -26px; border-radius: 26px 26px 0 0; background: var(--bg); box-shadow: 0 -10px 30px rgba(0, 0, 0, .18); }
.sheet-inner { width: 100%; max-width: 420px; margin: 0 auto; padding: 26px 20px 28px; display: flex; flex-direction: column; gap: 14px; }
.sheet-inner h1 { margin: 0; font: 700 26px/1.15 "Fraunces", Georgia, serif; letter-spacing: -0.01em; }
.sheet-inner #subtitle { margin: -6px 0 2px; }
.auth-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; margin: -6px 0 -4px -6px; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 600 14px var(--font); cursor: pointer; }
.auth-back:hover { color: var(--text); background: var(--surface-2); }
.auth-back[hidden] { display: none; }
.auth-choices, .auth-providers, .auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-choices[hidden], .auth-providers[hidden], .auth-form[hidden] { display: none; }
.auth-choices .auth-guest { display: flex; flex-direction: column; gap: 10px; }
.auth-choice { position: relative; justify-content: center; gap: 10px; min-height: 50px; padding: 12px 16px; border-radius: 14px; font-size: 15.5px; }
.auth-choice .ic, .auth-choice svg { font-size: 18px; flex: none; }
.auth-choice.primary { box-shadow: 0 6px 18px color-mix(in srgb, var(--cta) 28%, transparent); }
.auth-provider.p-apple { background: var(--text); color: var(--bg); border-color: var(--text); }
.auth-provider.p-apple:hover { background: var(--text); filter: brightness(1.12); }
.auth-v2 .auth-switch { margin: 2px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.auth-v2 .auth-switch a { font-weight: 600; }
/* Inputs: roomy, and they lift onto the surface with a soft ring when focused. */
.auth-form .field { gap: 6px; }
.auth-form .input { min-height: 48px; padding: 12px 14px; font-size: 16px; border-radius: 12px; background: transparent; transition: background-color .15s ease-out, border-color .15s ease-out, box-shadow .15s ease-out; }
.auth-form .input:hover { border-color: color-mix(in srgb, var(--text) 22%, var(--border)); }
.auth-form .input:focus { outline: none; background: var(--surface); border-color: var(--cta); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cta) 22%, transparent); }
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 48px; }
.pw-eye { position: absolute; right: 4px; top: 50%; translate: 0 -50%; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.pw-eye:hover { color: var(--text); background: var(--surface-2); }
.pw-eye[aria-pressed="true"] { color: var(--cta); }
.pw-eye .ic { font-size: 18px; }
.auth-v2 .auth-submit { min-height: 50px; border-radius: 14px; font-size: 15.5px; margin-top: 4px; }
.auth-v2 .auth-legal { margin: 6px 0 0; text-align: center; }
/* Each screen's pieces come in one after another (riseIn in auth.js). */
.rise { animation: auth-rise .26s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes auth-rise { from { opacity: 0; transform: translateY(8px); } }
/* The theme button floats over the photo on phones: glassy so it reads there. */
.auth-v2 .theme-corner .theme-menu > summary { background: rgba(10, 14, 18, .35); color: #fff; border-color: rgba(255, 255, 255, .28); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* Phones: once a form is open, the photo steps back so the fields sit higher. */
@media (max-width: 899px) {
  .scene { transition: height .3s cubic-bezier(.2, .8, .2, 1), min-height .3s cubic-bezier(.2, .8, .2, 1); }
  .auth-v2:not([data-mode="start"]) .scene { height: 30vh; height: 30svh; min-height: 210px; }
  .auth-v2:not([data-mode="start"]) .scene-title { font-size: 30px; }
}
@media (min-width: 900px) {
  .auth-split { flex-direction: row; align-items: stretch; padding: 14px; gap: 14px; }
  .scene { flex: 1.15; height: auto; min-height: 0; border-radius: 28px; position: sticky; top: 14px; max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); }
  .scene-brand { top: 24px; left: 28px; }
  .scene-copy { left: 32px; right: 32px; bottom: 32px; }
  .auth-sheet { flex: 1; margin: 0; border-radius: 0; box-shadow: none; display: flex; align-items: center; background: transparent; }
  .sheet-inner { padding: 40px 32px; }
  .sheet-inner h1 { font-size: 32px; }
  .auth-v2 .theme-corner { top: 26px; right: 26px; }
  .auth-v2 .theme-corner .theme-menu > summary { background: var(--surface); color: var(--text); border-color: var(--border); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .scene-slide, .scene-slide.on img, .scene-slide.out img, .scene-dot.on span::after, .rise { animation: none; transition: none; }
  .scene-dot.on span::after { transform: scaleX(1); }
}

/* ---------- Home › Contact (contact.js): the site's email and a suggestion form ---------- */
.contact-page { max-width: 960px; margin: 0 auto; }
.ct-head { margin: 8px 0 20px; }
.ct-head h1 { margin: 0 0 4px; }
.ct-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 16px; align-items: start; }
.ct-card { padding: 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.ct-card h2 { margin: 0 0 6px; font-size: 18px; }
.ct-addr { margin: 10px 0 2px; font-size: 17px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.ct-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ct-form { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.ct-kinds.qseg { margin-top: 8px; }
.ct-kinds .qchip { min-height: 38px; padding: 0 12px; font-size: 14px; }
.ct-form .input { min-height: 44px; padding: 10px 12px; border-radius: 12px; font-size: 15px; transition: border-color .2s ease, box-shadow .2s ease; }
.ct-form textarea.input { resize: vertical; min-height: 120px; line-height: 1.45; font-family: inherit; }
.ct-form .input:focus { outline: none; border-color: var(--cta); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cta) 22%, transparent); }
.ct-form .btn.primary { align-self: flex-start; min-height: 44px; padding: 0 20px; }
.ct-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ct-note { margin: 0; color: var(--muted); }
.ct-note.bad { color: var(--bad); }
.ct-done { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; padding: 14px; border-radius: 14px; background: var(--ok-soft); outline: none; }
.ct-done > div { flex: 1 1 180px; }
.ct-done p { margin: 2px 0 0; }
.ct-done-ic { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ok); color: var(--surface); font-size: 18px; animation: ct-pop .25s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes ct-pop { from { transform: scale(.6); opacity: 0; } }
@media (max-width: 760px) {
  .ct-grid { grid-template-columns: 1fr; }
  .ct-card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .ct-done-ic { animation: none; } }
.admin-idea { margin: 6px 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ct-opt { font-weight: 400; }
@media (max-width: 520px) {
  .ct-kinds.qseg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
}
