:root {
  --ink: #0f0f12;
  --ink-2: #3a3a42;
  --muted: #5c5c66;
  --bg: #ffffff;
  --bg-alt: #f6f5f2;
  --line: #e3e1dc;
  --red: #d7141f;
  --red-dark: #a50f18;
  --red-soft: #fdecec;
  --green: #137a4b;
  --green-soft: #e6f4ec;
  --blue: #1d4ed8;
  --blue-soft: #e8eefc;
  --amber-soft: #fdf3dc;
  --violet-soft: #f0eafb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15,15,18,.06), 0 8px 24px rgba(15,15,18,.06);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--red-dark); text-underline-offset: 3px; }
a:hover { color: var(--red); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.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; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.center { text-align: center; }
.accent { color: var(--red); }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; color: #fff; }

/* Notice + header */
.notice-bar { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 8px 16px; font-size: .85rem; font-weight: 600; color: var(--green); background: var(--green-soft); text-align: center; }
.notice-bar svg { flex: none; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-weight: 900; letter-spacing: .12em; font-size: 1.05rem; }
.brand-sub { font-size: .78rem; font-weight: 600; color: var(--red); letter-spacing: .04em; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: .93rem; text-decoration: none; }
.nav a:hover { background: var(--bg-alt); color: var(--ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border: 2px solid transparent; border-radius: 10px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--red-soft); color: var(--ink); }
.btn-card { min-height: 40px; padding: 8px 14px; font-size: .9rem; background: var(--ink); color: #fff; }
.btn-card:hover { background: var(--red); color: #fff; }
.btn-card::after { content: "↗"; font-weight: 400; }

/* Eyebrows */
.eyebrow { margin: 0 0 .6em; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.eyebrow-light { color: #ffb3b7; }
.eyebrow-red { color: var(--red); }

/* Hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(36px, 5vw, 64px); background: radial-gradient(1000px 400px at 85% 0%, var(--red-soft), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; }
.directory-note { max-width: 60ch; margin: 0 0 18px; padding: 12px 14px; font-size: .93rem; color: var(--ink-2); background: var(--bg-alt); border-left: 4px solid var(--ink); border-radius: 8px; }
.trust-list { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; font-size: .92rem; font-weight: 600; color: var(--ink-2); }
.trust-list li { display: inline-flex; align-items: center; gap: 8px; }
.check { width: 18px; height: 18px; border-radius: 50%; background: var(--green); position: relative; flex: none; }
.check::after { content: ""; position: absolute; left: 6px; top: 3px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.hero-panel { padding: 28px; background: var(--ink); color: #fff; border-radius: 20px; box-shadow: var(--shadow); border-top: 6px solid var(--red); }
.hero-panel h2 { font-size: 1.25rem; margin-bottom: 14px; }
.hero-panel ol { margin: 0; padding-left: 1.3em; display: grid; gap: 12px; }
.hero-panel li::marker { color: #ff6b73; font-weight: 800; }

/* FAFSA strip */
.fafsa { background: var(--ink); color: #fff; }
.fafsa-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 36px 0; }
.fafsa h2 { margin-bottom: .3em; }
.fafsa p { margin: 0; color: #d6d6dc; max-width: 70ch; }
.fafsa .btn { flex: none; }

/* Sections */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; margin-bottom: 28px; }
.section-head p { margin: 0; }

/* Filters */
.filters { display: grid; gap: 14px; padding: 20px; margin-bottom: 18px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); }
.search-label { font-weight: 700; font-size: .9rem; }
.search-box { display: flex; align-items: center; gap: 10px; padding: 0 14px; background: #fff; border: 2px solid var(--line); border-radius: 10px; color: var(--muted); }
.search-box:focus-within { border-color: var(--ink); }
.search-box input { flex: 1; min-width: 0; min-height: 46px; border: 0; outline: 0; font: inherit; color: var(--ink); background: transparent; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip-label { font-weight: 700; font-size: .9rem; margin-right: 4px; }
.chip { min-height: 38px; padding: 6px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: .9rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.result-count { font-weight: 600; color: var(--muted); margin-bottom: 16px; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(15,15,18,.06), 0 14px 32px rgba(15,15,18,.1); }
.card[hidden] { display: none; }
.card-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 12px; }
.tag { padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.tag-federal { background: var(--blue-soft); color: var(--blue); }
.tag-national { background: var(--red-soft); color: var(--red-dark); }
.tag-community { background: var(--violet-soft); color: #5b2bb5; }
.tag-stem { background: var(--amber-soft); color: #8a5300; }
.tag-search { background: var(--green-soft); color: var(--green); }
.source { font-size: .8rem; color: var(--muted); text-align: right; }
.award { display: grid; gap: 2px; margin: 4px 0 14px; padding: 12px 14px; background: var(--bg-alt); border-left: 4px solid var(--red); border-radius: 8px; }
.award-tool { border-left-color: var(--green); }
.award-label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.award-amount { font-size: 1.35rem; font-weight: 800; }
.award-note { font-size: .85rem; color: var(--ink-2); }
.award-src { font-weight: 600; white-space: nowrap; }
.desc { color: var(--ink-2); }
.audience { font-size: .9rem; color: var(--ink-2); }
.grades { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.grades li { padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: .76rem; font-weight: 700; color: var(--muted); }
.card-foot { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.dest { display: flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--green); word-break: break-all; }
.cycle { margin: 10px 0 0; font-size: .8rem; color: var(--muted); }
.empty { padding: 40px 20px; text-align: center; border: 2px dashed var(--line); border-radius: var(--radius); }

/* Timeline */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; }
.timeline > li { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); border-top: 4px solid var(--ink); }
.timeline > li:last-child { border-top-color: var(--red); }
.tl-grade { display: inline-block; margin-bottom: 10px; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .78rem; font-weight: 800; }
.timeline ul { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; color: var(--ink-2); font-size: .94rem; }

/* Safety */
.safety-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(24px, 5vw, 56px); align-items: start; }
.safety-links { display: flex; flex-direction: column; gap: 8px; font-weight: 700; }
.red-flags { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.red-flags article { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.red-flags h3 { margin-bottom: .25em; }
.red-flags p { margin: 0; font-size: .92rem; color: var(--ink-2); }
.flag { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 900; }

/* Local */
.local-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.local-grid > div { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.local-grid p { margin: 0; color: var(--ink-2); font-size: .94rem; }

/* Prose pages */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; display: grid; gap: 8px; }
.prose code { background: var(--bg-alt); padding: 1px 6px; border-radius: 4px; }

/* Footer */
.site-footer { background: var(--ink); color: #d6d6dc; padding-top: 48px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #ffb3b7; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-bottom: 32px; }
.brand-footer, .brand-footer:hover { color: #fff; margin-bottom: 12px; }
.brand-footer .brand-mark { background: #fff; border-radius: 8px; padding: 3px; }
.site-footer .muted { color: #b5b5be; font-size: .92rem; }
.site-footer .supporter { margin-top: 14px; padding-top: 12px; border-top: 1px solid #2a2a31; font-size: .9rem; color: #b5b5be; }
.site-footer .supporter a { font-weight: 700; }
.footer-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: #fff; margin-bottom: 12px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .93rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 0 28px; border-top: 1px solid #2a2a31; font-size: .85rem; color: #9a9aa4; }
.footer-bottom p { margin: 0; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .section-head, .safety-grid { grid-template-columns: 1fr; }
  .timeline, .local-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 0; }
  .site-header { position: static; }
  .nav { margin-left: -12px; }
  .nav a { padding: 6px 12px; }
  .fafsa-inner { flex-direction: column; align-items: flex-start; }
  .timeline, .local-grid, .red-flags, .footer-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
  .card:hover { transform: none; }
}
@media print {
  .notice-bar, .site-header, .filters, .hero-actions, .site-footer { display: none; }
  .card { break-inside: avoid; box-shadow: none; }
  a[href^="https"]::after { content: " (" attr(href) ")"; font-size: .75rem; }
}

/* Official TRINETRA wordmark (cut from the logo; red three-bar E) */
.brand-wordmark { display: block; height: 22px; width: auto; }
.brand-text .brand-sub { margin-top: 5px; }
