/* OSPI site tokens + header (utility bar + main nav) — match homepage */

/* Metric-matched fallbacks reduce CLS when web fonts load */
@font-face {
  font-family: "Source Sans 3 Fallback";
  src: local("Arial");
  size-adjust: 100%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Source Serif 4 Fallback";
  src: local("Georgia");
  size-adjust: 108%;
  ascent-override: 88%;
  descent-override: 25%;
  line-gap-override: 0%;
}

:root {
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --bg-muted: #eef1f6;
  --navy: #0f2744;
  --navy-mid: #1a3a5c;
  --accent: #1e5f8a;
  --accent-hover: #164a6d;
  --bronze: #9a6b2f;
  --bronze-light: #f7f0e6;
  --text: #1c2433;
  --text-muted: #5a6578;
  --border: #d4dae3;
  --border-strong: #b8c2d0;
  --radius: 4px;
  --font: "Source Sans 3", "Source Sans 3 Fallback", system-ui, sans-serif;
  --serif: "Source Serif 4", "Source Serif 4 Fallback", Georgia, serif;
  --max: 1120px;
  --text-base: 1.0625rem;
  --text-sm: 0.9375rem;
  --text-xs: 0.8125rem;
  --label-weight: 600;
  --heading-weight: 700;
  --body-weight: 400;
}

/* Sticky footer: pinned to viewport bottom when content is short */
html {
  height: 100%;
}

body {
  min-height: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > header.site-header,
header.site-header {
  flex-shrink: 0;
}

.site-footer,
body > footer {
  flex-shrink: 0;
  margin-top: auto;
}

.utility-bar {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.88);
  font-size: var(--text-xs);
  font-weight: var(--label-weight);
}

.utility-inner {
  max-width: min(100%, calc(var(--max) + (100vw - var(--max)) * 0.35));
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
}

.utility-inner span { opacity: 0.9; }

.utility-links {
  display: flex;
  gap: 1.25rem;
}

.utility-links a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.utility-links a:hover { color: #fff; text-decoration: underline; }

body > header.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 0 rgba(15, 39, 68, 0.04);
}

.header-inner {
  max-width: min(100%, calc(var(--max) + (100vw - var(--max)) * 0.35));
  margin: 0 auto;
  padding: 1.15rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--navy);
}

.logo-mark {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.logo-text strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--navy);
}

.logo-text span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.15rem;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-header nav a {
  color: var(--text);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--label-weight);
}

/* Shared buttons (homepage, verify, exam pages) */
.btn,
a.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 0.7rem 1.5rem;
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.2;
  border-radius: var(--radius);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  letter-spacing: 0.02em;
  appearance: none;
  -webkit-appearance: none;
}

.btn-primary,
a.btn-primary,
button.btn-primary {
  background-color: var(--accent);
  color: #fff;
  box-shadow: none;
}

.btn-primary:hover,
a.btn-primary:hover,
button.btn-primary:hover {
  background-color: var(--accent-hover);
  color: #fff;
}

.btn-outline,
a.btn-outline,
button.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--border-strong);
}

.btn-outline:hover,
a.btn-outline:hover,
button.btn-outline:hover {
  border-color: var(--navy);
  background: var(--bg-alt);
  color: var(--navy);
}

.site-header nav a.btn { font-weight: 700; }

.site-header nav a:not(.btn):hover { color: var(--accent); }

/* Page stylesheets must not alter the site header */
.utility-bar a,
.utility-bar a:hover {
  color: rgba(255, 255, 255, 0.88);
}

.utility-bar a:hover { color: #fff; }

.site-header .logo:hover {
  color: var(--navy);
  text-decoration: none;
}

.site-header .logo-text strong {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--navy);
}

.site-header nav a:not(.btn) {
  color: var(--text);
}

.site-header nav a.btn-primary,
.site-header nav a.btn-primary:hover {
  color: #fff;
}

@media (max-width: 700px) {
  .site-header nav a:not(.btn) { display: none; }
}
