/*
  Breakpoint schedule (mobile-first; min-width, in rem so it follows user font size)
    base      phone        < 30rem  (<480px)   single column, 16px type, plain text nav below the tan rule, wraps
    xs   <  24rem  small phone (<384px)         tighter gutters
    sm   >=  30rem  large phone / small landscape  (480px)
    md   >=  48rem  tablet                          (768px)  roomier header, nav gaps
    lg   >=  64rem  desktop                         (1024px) full header row, larger type
    xl   >=  90rem  wide desktop                    (1440px) slightly wider page, 18px type
  Custom properties can't be used inside @media conditions, so the values
  are repeated below; keep this table in sync.
*/
:root {
  --navy: #1a2370;
  --navy-deep: #10164d;
  --gold: #c9954a;
  --gold-soft: #f6efe3;
  --text: #1d2130;
  --muted: #5b6072;
  --line: #e3e5ec;
  --bg: #ffffff;
  --measure: 100%;
  --gutter: 1rem;
  --page-max: 52rem;
  --section-gap: 1.75rem;
  --body-size: 1rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: var(--body-size);
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); min-height: 100vh; overflow-wrap: break-word; display: flex; flex-direction: column; }
main { flex: 1; }
img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }

a { color: var(--navy); text-underline-offset: 0.15em; }
a:hover { color: var(--gold); }

/* Header — logo + name, then the tan rule, then a plain text nav below it.
   The rule is drawn full-bleed by .brand::after so the nav can sit under it
   without any markup change. Bold marks the current page; no underlines or pills. */
.site-header { background: #fff; overflow-x: clip; }
.header-inner { display: flex; flex-direction: column; align-items: stretch; }
.brand { position: relative; display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0 0.75rem; text-decoration: none; color: var(--navy); }
.brand::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; height: 4px; background: var(--gold); }
.brand strong { display: block; font-size: 0.95rem; line-height: 1.25; max-width: 18rem; }
.brand img { flex: none; width: 48px; height: auto; }

nav { padding: 0.3rem 0 0.4rem; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0 1.1rem; }
nav li { flex: none; }
nav a { display: block; padding: 0.4rem 0; text-decoration: none; font-weight: 500; font-size: 0.9375rem; line-height: 1.3; color: var(--navy); }
nav a:hover { color: var(--gold); }
nav a[aria-current="page"] { font-weight: 800; color: var(--navy-deep); }

/* Content */
main.wrap { padding-top: 1.5rem; padding-bottom: 2rem; }
main > * { max-width: var(--measure); }
h1 { font-size: clamp(1.5rem, 1.1rem + 2vw, 2.4rem); line-height: 1.2; color: var(--navy-deep); margin: 0 0 1.25rem; }
h2 { font-size: 1.2rem; color: var(--navy); margin: var(--section-gap) 0 0.5rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--line); }
p { margin: 0 0 1rem; }

.callout { background: var(--gold-soft); border-left: 4px solid var(--gold); padding: 0.85rem 1rem; border-radius: 0 6px 6px 0; margin-top: 2rem; }

.refs { padding-left: 1.1rem; font-size: 0.95rem; }
.refs li, .cards li { overflow-wrap: anywhere; }
.refs li { margin-bottom: 0.75rem; }
cite { font-style: italic; }

.cards { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
.cards li { border: 1px solid var(--line); border-radius: 8px; padding: 0.9rem 1rem; }
.cards h2 { margin: 0 0 0.35rem; border: 0; padding: 0; font-size: 1.05rem; }
.cards p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* Footer */
.site-footer { background: var(--navy-deep); color: #d6d9e8; font-size: 0.88rem; padding: 1.25rem 0; }
.site-footer p { margin: 0.2rem 0; }
.site-footer a { color: #fff; }

/* xs — small phones (< 24rem / 384px): tighter gutters */
@media (max-width: 23.999rem) {
  :root { --gutter: 0.75rem; }
}

/* sm — large phones / small landscape (>= 30rem) */
@media (min-width: 30rem) {
  :root { --gutter: 1.25rem; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
}

/* md — tablet (>= 48rem): roomier header and nav */
@media (min-width: 48rem) {
  :root { --gutter: 1.75rem; --section-gap: 2rem; }
  .brand img { width: 56px; }
  .brand strong { font-size: 1.05rem; }
  .brand { padding: 1rem 0 1rem; }
  nav ul { gap: 0 1.5rem; }
  nav a { font-size: 1rem; }
  main.wrap { padding-top: 2.25rem; padding-bottom: 3rem; }
}

/* lg — desktop (>= 64rem) */
@media (min-width: 64rem) {
  :root { --gutter: 2rem; --section-gap: 2.25rem; --body-size: 1.0625rem; }
  .brand img { width: 64px; }
  main.wrap { padding-top: 3rem; padding-bottom: 4rem; }
}

/* xl — wide desktop (>= 90rem) */
@media (min-width: 90rem) {
  :root { --page-max: 56rem; --body-size: 1.125rem; }
}

@media (prefers-reduced-motion: no-preference) {
  nav a { transition: background-color 0.12s; }
}
