/* ============================================================
   UniMarks — production styles. Mobile-first, light/dark themes.
   ============================================================ */


:root {
  --bg: #0b1020;
  --bg-2: #0f1630;
  --card: #161d38;
  --card-2: #1d2647;
  --ink: #e8ecf8;
  --muted: #9aa6c7;
  --border: #2a3358;
  --accent: #6366f1;
  --accent-2: #22d3ee;
  --accent-grad: linear-gradient(135deg, #6366f1, #22d3ee);
  --good: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.25);
  --maxw: 940px;
}

/* Light theme */
[data-theme="light"] {
  --bg: #f4f6fc;
  --bg-2: #eef1fb;
  --card: #ffffff;
  --card-2: #f5f7ff;
  --ink: #16203a;
  --muted: #5b678a;
  --border: #e1e6f5;
  --shadow: 0 10px 30px rgba(30, 41, 99, 0.10);
  --shadow-sm: 0 4px 14px rgba(30, 41, 99, 0.08);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(34, 211, 238, 0.14), transparent 55%),
    var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff;
  padding: 10px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------------------------------------------------- header */
.site-header { position: relative; overflow: hidden; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo { flex: none; filter: drop-shadow(0 4px 12px rgba(34, 211, 238, 0.4)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-weight: 800; font-size: clamp(1.7rem, 5vw, 2.3rem); letter-spacing: -0.02em; }
.brand-accent {
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub { font-size: clamp(0.78rem, 2vw, 0.95rem); color: var(--muted); }
.site-header { padding-top: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }


.theme-toggle {
  border: 1px solid var(--border); background: var(--card); color: var(--ink);
  width: 42px; height: 42px; border-radius: 12px; cursor: pointer; font-size: 1.1rem;
  display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: transform .1s ease;
}
.theme-toggle:active { transform: scale(0.94); }

/* Hero is a self-contained rounded panel. Two soft radial glows fade smoothly
   into the card colour (no hard band / mask edges), with even padding all round
   so the text never touches the sides. */
.hero {
  position: relative;
  margin-bottom: 18px;
  padding: 30px 28px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(135% 130% at 0% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 58%),
    radial-gradient(120% 120% at 100% 100%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 55%),
    var(--card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
@media (max-width: 560px) { .hero { padding: 24px 18px 26px; } }

.hero h1 {
  margin: 0 0 8px; font-size: clamp(1.5rem, 5vw, 2.4rem); letter-spacing: -0.02em; line-height: 1.1;
}
.hero .tagline,
.hero .lead { margin: 0; color: var(--muted); font-size: clamp(0.92rem, 2.6vw, 1.08rem); }
.hero .lead strong { color: var(--ink); }



/* ---------------------------------------------------- cards */
main { padding: 22px 0 40px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.step-num {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 0.9rem; color: #fff;
  background: var(--accent-grad); box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}
.card h2 { margin: 0; font-size: 1.15rem; }

.disclaimer {
  background: color-mix(in srgb, var(--warn) 14%, var(--card));
  border: 1px solid color-mix(in srgb, var(--warn) 50%, var(--border));
  border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 18px; font-size: 0.9rem;
}
.disclaimer code { background: color-mix(in srgb, var(--danger) 22%, transparent); padding: 1px 6px; border-radius: 6px; }

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }

/* ---------------------------------------------------- form fields */
.field { display: flex; flex-direction: column; gap: 6px; }
/* Labels are laid out as a centred flex row and given a consistent min-height
   so a label containing a 22px "?" help button lines up with a plain-text
   label beside it — keeping paired fields (e.g. University / Degree) aligned. */
label {
  font-size: 0.8rem; color: var(--muted); font-weight: 600;
  display: flex; align-items: center; gap: 4px; min-height: 24px;
}


select, input[type="text"], input[type="number"], textarea {
  width: 100%; padding: 12px 12px; font-size: 16px; /* 16px prevents iOS zoom */
  background: var(--card-2); color: var(--ink);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
  font-family: inherit;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
select:focus, input:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}
input:disabled, textarea:disabled { opacity: 0.45; }
/* Degree dropdown is disabled until a university is chosen in Step 1. */
select:disabled { opacity: 0.5; cursor: not-allowed; color: var(--muted); }

input.invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 28%, transparent) !important; }

.comp-weight-note { margin-top: 8px; color: var(--muted); font-size: 0.78rem; }
.comp-weight-note.bad { color: #fca5a5; font-weight: 600; }


.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------- smart search combobox */
.combo { position: relative; }
.uni-count { color: var(--accent-2); font-weight: 700; }
.combo-input { position: relative; display: flex; align-items: center; }
.combo-input input { padding-right: 72px; }
.combo-caret {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: none; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 1rem; border-radius: 8px; transition: transform .2s ease, color .15s ease;
}
.combo-caret:hover { color: var(--accent-2); }
.combo.open .combo-caret { transform: translateY(-50%) rotate(180deg); }
/* Clear (✕) button, appears once a university is selected */
.combo-clear {
  position: absolute; right: 38px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border: none; border-radius: 50%;
  background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--ink);
  cursor: pointer; font-size: 0.72rem; font-weight: 800; line-height: 1;
  display: grid; place-items: center; transition: background .15s ease, color .15s ease;
}
.combo-clear[hidden] { display: none; }
.combo-clear:hover { background: var(--danger); color: #fff; }

.combo-hint {
  padding: 8px 12px 4px; font-size: 0.72rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700;
}
.combo-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  margin: 0; padding: 6px; list-style: none;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); max-height: 320px; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.combo-list[hidden] { display: none; }
.combo-option {
  padding: 11px 12px; border-radius: 8px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.combo-option small { color: var(--muted); font-size: 0.75rem; }
.combo-option:hover, .combo-option.active { background: color-mix(in srgb, var(--accent) 18%, var(--card)); }
.combo-option .hl { color: var(--accent-2); font-weight: 700; }
.combo-empty { padding: 12px; color: var(--muted); font-size: 0.9rem; }

.provenance-details { margin-top: 14px; }
.provenance-details summary { cursor: pointer; color: var(--accent-2); font-size: 0.85rem; font-weight: 600; }
.provenance { margin-top: 10px; font-size: 0.82rem; color: var(--muted); }
.provenance .row { margin: 3px 0; }
.provenance strong { color: var(--ink); }
.provenance a { color: var(--accent-2); word-break: break-all; }

/* ---------------------------------------------------- year & module blocks */
.year-block {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-top: 14px; background: var(--card-2);
}
.year-block.zero { opacity: 0.85; border-style: dashed; }
/* Title on the left, then the weight + credit pills grouped together on the
   right (margin-right:auto on the title does the pushing), so the pills read as
   one unit instead of one floating in the middle and one stuck to the edge. */
.year-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.year-head h3 { margin: 0 auto 0 0; font-size: 1rem; }
.weight-pill {
  font-size: 0.72rem; font-weight: 700; color: #fff;
  background: var(--accent-grad); padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.year-note { font-size: 0.82rem; color: var(--muted); margin: 8px 0 0; }

.module-block { margin-top: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); }
.module-row { display: grid; grid-template-columns: 2.4fr 1fr 1fr auto; gap: 10px; align-items: end; }
.module-row .field { gap: 4px; }
@media (max-width: 560px) {
  .module-row { grid-template-columns: 1fr 1fr; }
  .module-row .field.name { grid-column: 1 / -1; }
  .module-row .remove-cell { grid-column: 1 / -1; }
}

.components {
  margin: 10px 0 2px; padding: 10px 12px;
  border-left: 3px solid var(--accent); border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.component-row { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; align-items: end; margin-top: 8px; }
@media (max-width: 560px) { .component-row { grid-template-columns: 1fr 1fr; } }

.add-module { margin-top: 12px; }

/* ---------------------------------------------------- buttons */
.btn {
  cursor: pointer; border: 1px solid var(--border); background: var(--card-2); color: var(--ink);
  padding: 11px 16px; border-radius: var(--radius-sm); font-size: 0.92rem; font-weight: 600;
  transition: transform .06s ease, background .15s ease, box-shadow .15s ease;
  min-height: 44px; /* touch target */
}
.btn:hover { background: color-mix(in srgb, var(--accent) 12%, var(--card-2)); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent-grad); border: none; color: #fff; box-shadow: 0 6px 18px rgba(99,102,241,0.4); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.link { background: none; border: none; color: var(--accent-2); padding: 6px 4px; min-height: auto; }
.btn.tiny { padding: 7px 10px; font-size: 0.8rem; min-height: auto; }
.icon-btn {
  border: 1px solid var(--border); background: var(--card-2); color: var(--danger);
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer; font-size: 1rem;
}

.toolbar { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.save-hint { font-size: 0.78rem; color: var(--muted); margin-left: auto; }

/* Step 3 actions. The target field has a label above its row, so the Calculate
   button is padded down by the same amount and given a matching height — that
   makes all three controls (button / select / "What do I need?") share one
   top and bottom edge instead of floating out of line. */
.actions { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: flex-start; margin-bottom: 18px; }
.calc-cell { padding-top: 26px; }
.calc-cell .btn.primary { height: 46px; white-space: nowrap; }
.actions > .btn.primary { margin-top: 0; }
.target-field { flex: 1; min-width: 260px; margin: 0; }
.target-row { display: flex; gap: 8px; }
.target-row select { flex: 1; min-width: 0; height: 46px; }
.target-row .btn { height: 46px; white-space: nowrap; }
.target-hint { margin: 8px 0 0; }

/* ---------------------------------------------------- result image lightbox */

.img-modal-card { max-width: 640px; }
.img-preview-wrap {
  margin-top: 14px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); background: #0b1020;
}
.img-preview { display: block; width: 100%; height: auto; }
.img-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.img-actions .btn { flex: 1; min-width: 150px; }
.img-modal-card .img-actions .btn.primary { margin-top: 0; width: auto; }
.img-share {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
}
@media (max-width: 560px) { .calc-cell { padding-top: 0; width: 100%; } .calc-cell .btn.primary { width: 100%; } }

/* Hint shown while the target tools are locked; hidden once prerequisites are met. */
.target-hint[hidden] { display: none; }


/* ---------------------------------------------------- results */
.results:empty { display: none; }
.results { margin-top: 6px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 560px) { .result-grid { grid-template-columns: 1fr; } }

.stat {
  position: relative; overflow: hidden;
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.stat .label { color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.stat .big { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin: 4px 0 6px; }

.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 0.9rem; }
.badge.b-first, .badge.b-distinction { background: color-mix(in srgb, var(--good) 24%, transparent); color: #6ee7a8; }
.badge.b-21, .badge.b-merit { background: color-mix(in srgb, #3b82f6 26%, transparent); color: #93c5fd; }
.badge.b-22 { background: color-mix(in srgb, var(--warn) 24%, transparent); color: #fcd34d; }
.badge.b-third, .badge.b-pass { background: color-mix(in srgb, var(--muted) 26%, transparent); color: var(--ink); }
.badge.b-fail { background: color-mix(in srgb, var(--danger) 26%, transparent); color: #fca5a5; }

/* Progress bar to next class */
.progress-wrap { margin-top: 8px; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.76rem; color: var(--muted); margin-bottom: 4px; }
.progress { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent-grad); border-radius: 999px; transition: width .5s ease; }

.info-line {
  background: var(--card-2); border-left: 4px solid var(--accent);
  padding: 12px 14px; border-radius: 10px; margin-top: 10px; font-size: 0.9rem;
}
.info-line.good { border-left-color: var(--good); background: color-mix(in srgb, var(--good) 10%, var(--card-2)); }
.info-line.bad { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--card-2)); }
.info-line.warn { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--card-2)); }

.peryear-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 0.88rem; }
.peryear-table th, .peryear-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border); }
.peryear-table th { color: var(--muted); font-weight: 600; }

/* ---------------------------------------------------- footer + toast */
.site-footer { border-top: 1px solid var(--border); padding: 22px 0 40px; margin-top: 10px; }
.site-footer p { margin: 4px 0; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px;
  font-weight: 600; font-size: 0.9rem; box-shadow: var(--shadow); opacity: 0;
  transition: opacity .25s ease, transform .25s ease; z-index: 600; pointer-events: none;

  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Fade-in for results */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.result-grid, .info-line, .peryear-table { animation: fadeUp .35s ease both; }

/* ---------------------------------------------------- help (?) */
.help {
  flex: none; width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--border); background: var(--card-2); color: var(--muted);
  font-size: 0.75rem; font-weight: 800; line-height: 1; display: inline-grid; place-items: center;
  padding: 0; margin-left: 2px; vertical-align: middle;
}
.help:hover { color: var(--accent-2); border-color: var(--accent-2); }
label .help { transform: translateY(-1px); }

.help-pop {
  position: absolute; z-index: 300; max-width: 280px;
  background: var(--ink); color: var(--bg); padding: 10px 12px; border-radius: 10px;
  font-size: 0.82rem; line-height: 1.45; box-shadow: var(--shadow); font-weight: 500;
}
.help-pop[hidden] { display: none; }

/* ---------------------------------------------------- ads */
.ad-slot {
  position: relative; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border); border-radius: var(--radius);
  background: color-mix(in srgb, var(--muted) 6%, var(--card));
  color: var(--muted); overflow: hidden; margin-bottom: 18px;
}
.ad-slot .ad-label {
  position: absolute; top: 6px; left: 10px; font-size: 0.62rem; letter-spacing: 0.08em;
  text-transform: uppercase; opacity: 0.6;
}
.ad-leaderboard { min-height: 90px; margin-top: 14px; }
.ad-inline { min-height: 100px; }
@media (max-width: 560px) { .ad-leaderboard { min-height: 60px; } }

/* ---------------------------------------------------- shareable result graphic */
.share-card { margin-top: 16px; }
.share-card[hidden] { display: none; }
.share-card canvas {
  width: 100%; max-width: 520px; height: auto; display: block;
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}

/* ---------------------------------------------------- social share bar */
/* Sits below the results, so a rule + extra top margin separates the two. */
.share-bar {
  display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border);
}

.share-label { font-size: 0.82rem; color: var(--muted); font-weight: 600; margin-right: 4px; }
/* Consistent pill shape: fixed height, centred icon + label, equal padding */
.share-btn {
  text-decoration: none; color: #fff; font-size: 0.82rem; font-weight: 700;
  height: 40px; padding: 0 14px; border-radius: 999px; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1;
  transition: transform .06s ease, filter .15s ease;
}
.share-btn .si {
  width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.95rem; font-weight: 800;
}
.share-btn .sl { display: inline-block; }
.share-btn:hover { filter: brightness(1.1); }
.share-btn:active { transform: translateY(1px); }
.share-btn.tw { background: #000; }
.share-btn.wa { background: #25d366; color: #05321c; }
.share-btn.msg { background: #0084ff; }
.share-btn.tg { background: #229ed9; }

.share-btn.fb { background: #1877f2; }
.share-btn.li { background: #0a66c2; }
.share-btn.rd { background: #ff4500; }
.share-btn.cp { background: var(--card-2); color: var(--ink); border: 1px solid var(--border); }
.share-btn[hidden] { display: none; }

/* Primary share actions row (mirrors the lightbox's .img-actions):
   Share… / Save image / Copy link, sitting above the platform links. */
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.share-actions .btn { flex: 1; min-width: 150px; }
.share-actions .btn[hidden] { display: none; }


/* On very small screens, collapse to icon-only circles that stay perfectly consistent */
@media (max-width: 560px) {
  .share-bar { gap: 10px; }
  .share-label { width: 100%; margin-bottom: 2px; }
  .share-btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
  .share-btn .sl { display: none; }
  .share-btn .si { font-size: 1.05rem; }
}


/* ---------------------------------------------------- support / buy me a coffee */
.support-card {
  border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--border));
  background: color-mix(in srgb, var(--warn) 10%, var(--card));
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; text-align: center;
}
.support-card p { margin: 0; font-size: 0.92rem; }
.bmc {
  font-weight: 800; color: #6b4b00; background: #ffdd00; padding: 3px 10px; border-radius: 8px;
  text-decoration: none; white-space: nowrap;
}
.bmc:hover { filter: brightness(1.05); }

/* ---------------------------------------------------- footer */
.footer-grid {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.footer-links { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.footer-links .btn.link { text-align: left; }
.footer-links a.btn.link, .bmc-footer { text-decoration: none; }

.copyright { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
@media (max-width: 560px) { .footer-grid { flex-direction: column; } }

/* ---------------------------------------------------- modals */
.modal {
  position: fixed; inset: 0; z-index: 400; display: grid; place-items: center;
  background: rgba(4, 8, 20, 0.7); padding: 16px; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.modal[hidden] { display: none; }
.modal-card {
  position: relative; width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); animation: fadeUp .25s ease both;
}
.modal-card h3 { margin: 0 0 6px; }
.modal-card .field { margin-top: 12px; }
.modal-card .btn.primary { margin-top: 16px; width: 100%; }
.modal-close {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card-2); color: var(--ink); cursor: pointer;
}

/* ---------- data provenance / verification ---------- */
.verify-badge {
  display: inline-block; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.2px;
  padding: 5px 11px; border-radius: 999px; margin-bottom: 8px; border: 1px solid transparent;
}
.verify-badge.ok {
  color: var(--good); background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.4);
}
.verify-badge.warn {
  color: var(--warn); background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.45);
}
.prov-quotes { margin: 8px 0; }
.prov-quotes summary {
  cursor: pointer; color: var(--accent-2); font-size: 0.85rem; -webkit-user-select: none; user-select: none;

}
.prov-quotes blockquote {
  margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--accent);
  background: var(--card-2); border-radius: 0 8px 8px 0; color: var(--muted);
  font-size: 0.83rem; font-style: italic;
}
.prov-note { margin-top: 8px; color: var(--muted); font-size: 0.82rem; line-height: 1.4; }

/* ---------------------------------------------------- live credit pill (per year) */
.credit-pill {
  font-size: 0.72rem; font-weight: 700; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card);
  color: var(--muted);
}
.credit-pill.exact { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, var(--border)); background: color-mix(in srgb, var(--good) 12%, var(--card)); }
.credit-pill.under { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); background: color-mix(in srgb, var(--warn) 12%, var(--card)); }
.credit-pill.over  { color: #fca5a5; border-color: color-mix(in srgb, var(--danger) 55%, var(--border)); background: color-mix(in srgb, var(--danger) 14%, var(--card)); }

/* ---------------------------------------------------- validation panel */
.validation-panel {
  margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--card-2); font-size: 0.88rem;
  animation: fadeUp .3s ease both;
}
.validation-panel[hidden] { display: none; }
.validation-panel.ok { border-left: 4px solid var(--good); background: color-mix(in srgb, var(--good) 8%, var(--card-2)); }
.validation-panel.has-warn { border-left: 4px solid var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--card-2)); }
.validation-panel.has-error { border-left: 4px solid var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--card-2)); }
.validation-panel .v-line { color: var(--good); font-weight: 600; }
.validation-panel .v-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.validation-panel .v-error { color: #fca5a5; font-weight: 600; }
.validation-panel .v-warn { color: #fcd34d; }

/* ---------------------------------------------------- trust + FAQ (SEO content) */
.trust-list { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.trust-list li { font-size: 0.92rem; }
.trust-list strong { color: var(--ink); }

.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card-2); margin-top: 10px; padding: 4px 14px;
}
.faq-item summary {
  cursor: pointer; font-weight: 700; padding: 10px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "＋"; color: var(--accent-2); font-weight: 800; }
.faq-item[open] summary::after { content: "－"; }
/* Body wrapper gives the answer a clean top border once the item is open. */
.faq-item .faq-body { padding: 2px 0 10px; border-top: 1px solid var(--border); }
.faq-item .faq-body p { margin: 10px 0 0; color: var(--muted); font-size: 0.9rem; }
.faq-item .faq-body p:first-child { margin-top: 8px; }
.faq-cta { margin-top: 12px; }

/* ---------------------------------------------------- "waiting for university" placeholder (Step 2) */
.waiting-state {
  margin-top: 14px; padding: 30px 20px; text-align: center;
  border: 1px dashed var(--border); border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 5%, var(--card-2));
}
.waiting-state[hidden] { display: none; }
.waiting-state .waiting-icon { font-size: 2.2rem; display: block; margin-bottom: 6px; }
.waiting-state p { margin: 4px 0; }
.waiting-state p strong { color: var(--ink); }





