/* GIVouch — base styles. Brand: Montserrat, navy + gold. */
:root {
  --navy-950: #121d30;
  --navy-900: #1b2a42;
  --navy-800: #233552;
  --navy-700: #17325c;
  --navy-500: #2f4f80;
  --gold-500: #f2b632;
  --gold-700: #a87100;
  --gold-400: #f6c85a;
  --gold-100: #f6edd2;
  --white: #ffffff;

  /* Light theme (default) */
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-alt: #eef1f6;
  --border: #d9dfe8;
  --text: #1b2a42;
  --text-muted: #4a5a72;
  --accent: var(--gold-500);
  --accent-text: var(--navy-900);
  --link: #1d4f9a;
  --header-bg: var(--navy-900);
  --header-text: #ffffff;

  --radius: 12px;
  --max: 1100px;
  --shadow: 0 4px 18px rgba(11, 26, 51, 0.08);
}

:root[data-theme="dark"] {
  --bg: var(--navy-950);
  --surface: var(--navy-900);
  --surface-alt: var(--navy-800);
  --border: var(--navy-700);
  --text: #e8edf4;
  --text-muted: #a7b4c8;
  --link: var(--gold-400);
  --header-bg: var(--navy-950);
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
a { color: var(--link); }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { background: var(--header-bg); color: var(--header-text); }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 64px;
}
.logo { display: flex; align-items: center; gap: 8px; color: var(--header-text); text-decoration: none; font-weight: 800; font-size: 1.3rem; letter-spacing: 0.3px; }
.logo img { width: 26px; height: 30px; display: block; }
.logo span.gold { color: var(--gold-500); }
.chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: -8px 0 24px; }
.chip { text-decoration: none; border: 1px solid rgba(255,255,255,0.35); color: #dfe6f0; border-radius: 999px; padding: 5px 14px; font-size: 0.85rem; }
.tagline-sm { display:block; font-size: 0.55rem; letter-spacing: 2px; font-weight: 600; color: #b7c3d6; text-transform: uppercase; margin-top: -2px; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.btn-ghost {
  background: transparent; color: var(--header-text);
  border: 1px solid rgba(255,255,255,0.3); border-radius: 999px;
  padding: 6px 12px; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--gold-400); color: var(--gold-400); }

/* Buttons */
.btn {
  display: inline-block; border: none; border-radius: 999px; cursor: pointer;
  padding: 12px 22px; font: inherit; font-weight: 700; text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--gold-400); }
.btn-secondary { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.5); }
.btn-secondary:hover { border-color: var(--gold-400); color: var(--gold-400); }

/* Hero */
.hero {
  background: linear-gradient(155deg, var(--navy-950) 0%, var(--navy-800) 100%);
  color: var(--white); padding: 72px 0 80px; text-align: center;
}
.eyebrow { color: var(--gold-400); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: 0.8rem; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; margin: 0 0 16px; font-weight: 800; }
.hero p.lead { font-size: 1.1rem; color: #c8d3e3; max-width: 640px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-hint { margin: 20px 0 0; color: #c8d3e3; font-size: 0.95rem; }
.hero-hint a { color: var(--gold-400); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.hero-hint a:hover { color: var(--white); }

/* Search */
.search-box {
  display: flex; gap: 8px; max-width: 640px; margin: 0 auto 24px;
  background: var(--white); border-radius: 999px; padding: 6px;
}
.search-box input {
  flex: 1; min-width: 0; border: none; outline: none; font: inherit;
  padding: 10px 16px; border-radius: 999px; color: var(--navy-900);
}

/* Sections */
section.block { padding: 56px 0; }
section.block h2 { font-size: 1.7rem; margin: 0 0 8px; }
section.block p.sub { color: var(--text-muted); margin: 0 0 28px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin: 8px 0 6px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.card .icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--gold-100);
  color: var(--navy-900); display: grid; place-items: center; font-weight: 800;
}
.alt { background: var(--surface-alt); }
.notice {
  border-left: 4px solid var(--accent); background: var(--surface);
  padding: 16px 18px; border-radius: 8px; color: var(--text-muted); font-size: 0.95rem;
}

/* Policy pages */
.page { padding: 48px 0 64px; }
.page .container { max-width: 780px; }
.page h1 { margin-top: 0; }
.page table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 0.95rem; }
.page th, .page td { border: 1px solid var(--border); padding: 10px; text-align: left; vertical-align: top; }
.page th { background: var(--surface-alt); }
.draft-banner {
  background: var(--gold-100); color: var(--navy-900); border-radius: 8px;
  padding: 10px 14px; font-size: 0.9rem; margin-bottom: 24px;
}

/* Footer */
.site-footer { background: var(--navy-950); color: #b7c3d6; padding: 36px 0 24px; font-size: 0.9rem; }
.site-footer a { color: #dfe6f0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0 16px; padding: 0; list-style: none; }
.footer-links button { background: none; border: none; padding: 0; color: #dfe6f0; font: inherit; text-decoration: underline; cursor: pointer; }
.disclaimer { color: #8f9db3; font-size: 0.82rem; max-width: 780px; }

/* Cookie banner */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 720px; margin: 0 auto;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  padding: 18px; display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner p { margin: 0 0 12px; font-size: 0.92rem; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-actions .btn { padding: 9px 18px; font-size: 0.9rem; }
.btn-outline { background: transparent; color: var(--text); border: 2px solid var(--border); }

@media (max-width: 560px) {
  .logo-text { font-size: 1.1rem; }
  .hero { padding: 48px 0 56px; }
}

.chip:hover { border-color: var(--gold-400); color: var(--gold-400); }

/* Browse programs */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.browse { padding: 28px 0 56px; }
.browse-search { display: flex; gap: 8px; margin-bottom: 24px; }
.browse-search input, .filters select, #sort, #review-sort {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.browse-search input { flex: 1; min-width: 0; }
.browse-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.filters { padding: 18px; }
.filters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.link-btn { background: none; border: none; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }
.filters fieldset { border: none; padding: 0; margin: 0 0 16px; }
.filters legend { font-weight: 700; margin-bottom: 6px; }
.filters fieldset label { display: block; margin: 4px 0; cursor: pointer; }
.select-label { display: block; margin-bottom: 14px; }
.select-label span { display: block; font-weight: 700; margin-bottom: 6px; }
.filters select { width: 100%; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.program-card {
  display: flex; justify-content: space-between; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.program-card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.program-where { margin: 0 0 10px; color: var(--text-muted); font-size: 0.92rem; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { background: var(--surface-alt); border-radius: 6px; padding: 3px 8px; font-size: 0.78rem; font-weight: 600; }
.tag-gold { background: var(--gold-100); color: var(--navy-900); }
.tag-warn { background: #fde2e1; color: #8a1c17; }
.program-score { text-align: right; min-width: 110px; }
.score { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.score-sub { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }
.muted { color: var(--text-muted); }
.center { text-align: center; margin: 8px 0 16px; }
@media (max-width: 760px) {
  .browse-layout { grid-template-columns: 1fr; }
  .program-card { flex-direction: column; }
  .program-score { text-align: left; }
}

[hidden] { display: none !important; }

/* Program page */
.program-link { color: inherit; text-decoration: none; }
.program-link:hover { color: var(--link); text-decoration: underline; }
.back-link { display: inline-block; margin-bottom: 12px; color: var(--text-muted); text-decoration: none; font-size: 0.92rem; }
.back-link:hover { color: var(--link); }
.program-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.program-detail h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; }
.program-detail .tags { margin-bottom: 18px; }
.program-detail .notice { margin-bottom: 24px; }
.section-label { font-size: 0.85rem; letter-spacing: 1.5px; text-transform: uppercase; margin: 0; }
.program-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
.summary-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.summary-score { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.summary-sub { color: var(--text-muted); font-size: 0.9rem; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat-value { font-size: 1.3rem; font-weight: 800; }
.stat-label { color: var(--text-muted); font-size: 0.82rem; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.small { font-size: 0.85rem; margin: -4px 0 4px; }
.review-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; box-shadow: var(--shadow); }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.review-meta { color: var(--text-muted); font-size: 0.88rem; margin: 4px 0 8px; }
.review-verdict { font-weight: 700; margin: 0 0 8px; }
.review-facts { margin: 0 0 10px; padding-left: 18px; color: var(--text-muted); font-size: 0.92rem; }
.review-comment { margin: 0 0 10px; white-space: pre-line; }
.review-foot { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 0.85rem; }
@media (max-width: 860px) {
  .program-layout { grid-template-columns: 1fr; }
  .program-side { position: static; order: -1; }
}

/* Review form */
.rv-container { max-width: 760px; }
.rv-top { display: flex; justify-content: space-between; align-items: center; }
.rv-count { margin: 0 0 8px; font-size: 0.9rem; }
.progress { height: 8px; background: var(--surface-alt); border-radius: 999px; overflow: hidden; margin-bottom: 20px; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.3s ease; }
.rv-title { font-size: clamp(1.4rem, 4vw, 1.9rem); margin: 0 0 4px; line-height: 1.25; }
.question { margin: 16px 0; padding: 20px; }
.q-label { display: block; font-weight: 700; margin-bottom: 12px; }
.q-hint { color: var(--text-muted); font-size: 0.85rem; margin: 10px 0 0; }
.stars { display: flex; gap: 6px; }
.star { background: none; border: none; font-size: 2rem; line-height: 1; cursor: pointer; color: var(--text-muted); padding: 2px; }
.star.on { color: var(--accent); }
.star:focus-visible, .choice:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  font: inherit; font-size: 0.92rem; padding: 9px 14px; border-radius: 10px; cursor: pointer;
  background: var(--surface); color: var(--text); border: 2px solid var(--border);
}
.choice.on { border-color: var(--accent); background: var(--gold-100); color: var(--navy-900); font-weight: 700; }
.field-input {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
textarea.field-input { resize: vertical; }
.attest { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.attest input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.rv-nav { display: flex; justify-content: space-between; margin-top: 20px; }
.form-error { color: #b42318; font-weight: 600; margin: 12px 0 0; }
:root[data-theme="dark"] .form-error { color: #ff8a80; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.thanks { text-align: center; padding: 36px 24px; }
.thanks h1 { margin-top: 0; }

.ts-box { margin: 16px 0 0; min-height: 65px; }

/* Add a program */
.ap-card { padding: 22px; margin-top: 16px; }
.ap-field { margin-bottom: 20px; }
.ap-field:last-child { margin-bottom: 0; }
.ap-field select.field-input { appearance: auto; }
.ap-field p.q-label { margin: 0 0 12px; }

.code-input { max-width: 200px; font-size: 1.4rem; letter-spacing: 6px; text-align: center; }

/* Find schools */
.find-card .program-main { width: 100%; }
.find-card h3 { margin: 0 0 4px; }
.find-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.notice-warn { border-left-color: #c2410c; }
.find-results { margin-top: 24px; }
.find-results .section-label { margin: 16px 0 12px; }
.find-sources { margin-top: 16px; }

#official-results { margin-top: 28px; }
.official-head { margin: 0 0 4px; }
#official-results .find-card .tag { display: inline-block; margin-top: 4px; }

/* Program list under each school from official data (browse search). */
.official-programs { margin: 10px 0 4px; }
.official-programs summary { cursor: pointer; font-weight: 700; color: var(--link); }
.official-programs .level-head { margin: 12px 0 4px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.program-links { margin: 0; padding-left: 18px; columns: 2 260px; column-gap: 24px; }
.program-links li { margin: 2px 0; break-inside: avoid; }
.program-links .program-link, .review-facts .program-link { color: var(--link); text-decoration: underline; }

/* Result count boxes at the top of Browse. */
.result-stats { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.stat-box {
  display: flex; flex-direction: column; justify-content: center; min-width: 130px;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--navy-500);
  border-radius: var(--radius); padding: 10px 16px; box-shadow: var(--shadow);
}
.stat-box.stat-gold { border-left-color: var(--gold-500); }
.stat-num { font-size: 1.6rem; font-weight: 800; line-height: 1.1; color: var(--text); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.stat-wait { align-self: center; }
[data-theme="dark"] .stat-box { border-left-color: #7fa3dc; }
[data-theme="dark"] .stat-box.stat-gold { border-left-color: var(--gold-500); }

.official-pages { margin-top: 12px; align-items: center; }
#official-results[aria-busy="true"] { opacity: 0.55; transition: opacity .15s; }

/* Browse filter pane (same choices as Find). */
.filter-where { margin-bottom: 14px; }
.filter-label { display: block; font-weight: 700; margin-bottom: 6px; }
.filter-where .choices { gap: 8px; }
.filter-where .choice { padding: 8px 12px; font-size: 0.9rem; }

/* Flag and "For veterans, by a veteran" at the top of the footer. */
.footer-flag { text-align: center; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-flag img { display: block; margin: 0 auto 10px; width: 72px; height: auto; border-radius: 2px; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.footer-flag p { margin: 0; font-size: 1.05rem; font-weight: 600; color: #e8edf4; }

/* Ask about this program (AI summary of reviews) */
.ask-card { margin-bottom: 24px; }
.ask-row { display: flex; gap: 10px; margin-top: 10px; }
.ask-row input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: inherit; font: inherit; }
.ask-answer { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.ask-answer p { margin: 10px 0 0; }
.ask-cites a { font-weight: 600; }
.review-highlight { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 560px) { .ask-row { flex-direction: column; } }
