/* GradLoanLimits. System fonts only, no external requests. Colours mirror the BRAND block in scripts/gen-brand-assets.mjs. */
:root {
  --navy: #0b1f3a;
  --navy-2: #13294b;
  --ink: #16213a;
  --muted: #566176;
  --line: #dde3ec;
  --bg: #f5f7fb;
  --card: #ffffff;
  --teal: #0f766e;
  --teal-dark: #0b5a54;
  --teal-bg: #e6f5f3;
  --amber: #a15c07;
  --amber-bg: #fdf3d7;
  --red: #b42318;
  --red-bg: #fdecea;
  --blue-bg: #e9f0fb;
  --radius: 10px;
  --max: 1080px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 17px; }
a { color: var(--teal-dark); }
a:hover { color: var(--navy); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.25; color: var(--navy); }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.25rem); margin: 0.4rem 0 0.8rem; }
h2 { font-size: 1.35rem; margin: 2.2rem 0 0.7rem; }
h3 { font-size: 1.08rem; margin: 1.4rem 0 0.4rem; }
p { margin: 0 0 1rem; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.header { background: var(--navy); color: #fff; }
.nav-wrap { display: flex; align-items: center; gap: 0.6rem 1.2rem; flex-wrap: wrap; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: 0.01em; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand span span { color: #5eead4; }
.nav-links { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; margin: 0 0 0 auto; padding: 0; }
.nav-links a { color: #dbe6f5; text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a[aria-current] { color: #fff; text-decoration: underline; }
.lang-switch { color: #fff; font-size: 0.9rem; border: 1px solid #47608a; border-radius: 999px; padding: 0.15rem 0.7rem; text-decoration: none; white-space: nowrap; }
.lang-switch:hover { background: var(--navy-2); color: #fff; }

/* notice strip */
.notice-strip { background: var(--amber-bg); border-bottom: 1px solid #f1dfa6; font-size: 0.92rem; }
.notice-strip .container { padding-top: 0.5rem; padding-bottom: 0.5rem; }

main { padding: 1.4rem 0 3rem; }
.breadcrumbs { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.4rem; }
.breadcrumbs a { color: var(--muted); }
.lede { font-size: 1.12rem; color: #2b3852; max-width: 760px; }

/* hero and search */
.hero { background: linear-gradient(160deg, var(--navy) 0%, #14325c 100%); color: #fff; padding: 2.4rem 0 2.6rem; margin-top: -1.4rem; }
.hero h1 { color: #fff; max-width: 820px; }
.hero .lede { color: #d5e1f3; }
.search { position: relative; max-width: 640px; margin-top: 1.2rem; }
.search label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.search input { width: 100%; font: inherit; padding: 0.8rem 0.9rem; border-radius: var(--radius); border: 2px solid transparent; }
.search input:focus { outline: none; border-color: #5eead4; }
.search-results { list-style: none; margin: 0.3rem 0 0; padding: 0; background: #fff; color: var(--ink); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(11, 31, 58, 0.25); position: absolute; left: 0; right: 0; z-index: 5; max-height: 22rem; overflow: auto; }
.search-results:empty { display: none; }
.search-results a { display: block; padding: 0.55rem 0.9rem; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.search-results a:hover, .search-results a:focus { background: var(--teal-bg); }
.search-results small { color: var(--muted); margin-left: 0.4rem; }
.search-results .none { padding: 0.6rem 0.9rem; color: var(--muted); }
.search-fallback { margin-top: 0.6rem; font-size: 0.92rem; }
.hero .search-fallback a { color: #a7f3e8; }

/* cards and stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.8rem; margin: 1.2rem 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem; }
.stat-val { font-size: 1.55rem; font-weight: 700; color: var(--navy); line-height: 1.2; }
.stat-label { font-size: 0.86rem; color: var(--muted); margin-top: 0.2rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0.9rem; margin: 1rem 0; padding: 0; list-style: none; }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; text-decoration: none; color: var(--ink); }
a.card:hover { border-color: var(--teal); box-shadow: 0 2px 10px rgba(11, 31, 58, 0.08); }
.card-title { font-weight: 700; color: var(--navy); display: block; }
.card-sub { color: var(--muted); font-size: 0.9rem; display: block; margin-top: 0.25rem; }

/* status boxes and badges */
.box { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--teal); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.2rem 0; }
.box h2, .box h3 { margin-top: 0; }
.box p:last-child, .box ul:last-child { margin-bottom: 0; }
.box.professional { border-left-color: var(--teal); background: var(--teal-bg); }
.box.interim, .box.conditional, .box.mixed, .box.unknown { border-left-color: #d59a1b; background: var(--amber-bg); }
.box.graduate { border-left-color: #4b6aa5; background: var(--blue-bg); }
.box.plain { border-left-color: var(--line); }
.badge { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 0.12rem 0.55rem; border-radius: 999px; white-space: nowrap; }
.badge.professional { background: var(--teal-bg); color: var(--teal-dark); }
.badge.interim, .badge.conditional, .badge.mixed, .badge.unknown { background: var(--amber-bg); color: var(--amber); }
.badge.graduate { background: var(--blue-bg); color: #2c4a80; }
.over { color: var(--red); font-weight: 600; }
.under { color: var(--teal-dark); font-weight: 600; }

/* tables */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; font-variant-numeric: tabular-nums; }
th, td { padding: 0.55rem 0.7rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { background: #eef2f8; color: var(--navy); font-size: 0.84rem; vertical-align: bottom; }
td.num, th.num { text-align: right; white-space: nowrap; }
th button { all: unset; cursor: pointer; font-weight: 700; }
th button:hover { text-decoration: underline; }
th button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
th[aria-sort="ascending"] button::after { content: " \25B2"; font-size: 0.7em; }
th[aria-sort="descending"] button::after { content: " \25BC"; font-size: 0.7em; }
.table-tools { margin: 1rem 0 0.4rem; }
.table-tools input { font: inherit; padding: 0.5rem 0.7rem; border: 1px solid #b9c4d6; border-radius: 8px; width: min(100%, 360px); }
caption { text-align: left; padding: 0.6rem 0.7rem; color: var(--muted); font-size: 0.88rem; caption-side: bottom; }

/* article */
.article-body { max-width: 760px; }
.article-body ul, .article-body ol { padding-left: 1.3rem; }
.article-body li { margin-bottom: 0.4rem; }
.article-meta { color: var(--muted); font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin-bottom: 1.2rem; }
.sources { font-size: 0.92rem; }
.source-line { font-size: 0.86rem; color: var(--muted); margin-top: 1.6rem; border-top: 1px solid var(--line); padding-top: 0.8rem; }
.link-list { list-style: none; padding: 0; margin: 0.6rem 0; columns: 2 280px; }
.link-list li { margin-bottom: 0.35rem; break-inside: avoid; }
.state-grid { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.4rem 1rem; }

/* calculator */
.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.9rem 1.2rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.calc label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.25rem; }
.calc input, .calc select { width: 100%; font: inherit; padding: 0.5rem 0.6rem; border: 1px solid #b9c4d6; border-radius: 8px; background: #fff; }
.calc .hint { font-size: 0.82rem; color: var(--muted); margin: 0.2rem 0 0; }
.calc-out { margin-top: 1rem; }
.btn { display: inline-block; background: var(--teal); color: #fff; padding: 0.6rem 1.1rem; border-radius: 8px; text-decoration: none; font-weight: 600; border: 0; font: inherit; cursor: pointer; }
.btn:hover { background: var(--teal-dark); color: #fff; }

/* ads: reserved only when ads are switched on in the build */
.ad-slot { margin: 1.6rem 0; min-height: 90px; }

/* footer */
.footer { background: var(--navy); color: #c9d6ea; padding: 2rem 0 1.4rem; font-size: 0.92rem; }
.footer a { color: #e7eefb; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.4rem; }
.footer h2 { color: #fff; font-size: 0.95rem; margin: 0 0 0.5rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 0.3rem; }
.disclaimer { border: 1px solid #2c446b; border-radius: var(--radius); padding: 0.8rem 1rem; margin: 1.4rem 0 1rem; color: #dbe6f5; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; justify-content: space-between; color: #9fb1cc; font-size: 0.85rem; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-links { margin-left: 0; width: 100%; order: 3; }
  th, td { padding: 0.45rem 0.5rem; }
}
@media print {
  .header, .footer, .search, .notice-strip, .ad-slot, .table-tools { display: none; }
  body { background: #fff; }
}
