/* site.css: shared tokens, navigation, footer and common components. */
:root {
  --primary: #003b73;
  --primary-dark: #002244;
  --accent: #00c0f3;      /* decorative on dark backgrounds only */
  --link: #0369a1;        /* accessible accent for text on white */
  --bg: #f4f7f6;
  --surface: #ffffff;
  --border: #d0dbe5;
  --text: #2d3748;
  --muted: #4a5568;
  --dark: #1a2634;
  --ok: #2e7d32;
  --warn: #9a4d00;
  --bad: #b71c1c;
  --radius: 12px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; margin: 0; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: white; color: var(--primary); padding: 8px 14px; z-index: 2000; }
.skip-link:focus { left: 8px; top: 8px; }

/* NAVIGATION */
.site-nav { background: var(--primary); padding: 10px 5%; display: flex; justify-content: space-between; align-items: center; color: white; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.15); }
.site-nav a { color: white; text-decoration: none; font-weight: 600; }
.logo-container { display: flex; align-items: center; gap: 10px; }
.logo-container img { height: 36px; width: auto; border-radius: 8px; background: white; padding: 2px 4px; }
.logo-container span { font-size: 1.15rem; font-weight: 700; }
.nav-links { display: flex; gap: 6px; align-items: center; font-size: 0.9rem; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a { padding: 6px 10px; border-radius: 6px; transition: background 0.2s; }
.nav-links a:hover { background: rgba(255,255,255,0.15); }
.nav-links a[aria-current="page"] { background: rgba(255,255,255,0.2); }
.nav-links a.nav-highlight { color: var(--accent); }
/* menu groups (Learn, Tools, Reference): a button that opens a small list */
.nav-group { position: relative; }
.nav-drop { background: none; border: 0; color: white; font: inherit; font-weight: 600; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.nav-drop::after { content: " ▾"; font-size: 0.8em; }
.nav-drop:hover, .nav-drop[aria-expanded="true"] { background: rgba(255,255,255,0.15); }
.nav-group.current > .nav-drop { background: rgba(255,255,255,0.2); }
.nav-menu { display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 210px; flex-direction: column; gap: 2px; padding: 6px; background: var(--primary); border-radius: 8px; box-shadow: 0 10px 24px rgba(0,0,0,0.25); z-index: 1001; }
.nav-menu.right { left: auto; right: 0; }
.nav-menu a { white-space: nowrap; }
.nav-drop[aria-expanded="true"] + .nav-menu { display: flex; }
/* tighter menu on laptop widths so the links stay on one row */
@media (min-width: 769px) and (max-width: 1439px) {
  .site-nav { padding: 10px 2%; }
  .nav-links { gap: 2px; font-size: 0.84rem; }
  .nav-links a { padding: 6px 7px; }
}
.mobile-menu-btn { display: none; background: none; border: none; color: white; font-size: 1.7rem; cursor: pointer; width: 48px; height: 48px; border-radius: 8px; }

/* FOOTER */
.site-footer { padding: 40px 8%; background: var(--dark); color: #c3cdd6; text-align: center; font-size: 0.9rem; margin-top: 56px; }
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer hr { border: 0; border-top: 1px solid #37474f; margin: 20px auto; max-width: 900px; }
.site-footer .disclaimer { font-size: 0.82rem; max-width: 820px; margin: 0 auto; }
.page-date { font-size: 0.78rem; opacity: 0.8; margin: 14px 0 0; }
.page-date a { color: inherit; text-decoration: underline; display: inline-block; padding: 4px 0; }

/* PAGE LAYOUT */
.page { max-width: 1080px; margin: 0 auto; padding: 32px 4% 0; }
.page-header { text-align: center; margin-bottom: 24px; }
.page-header h1 { color: var(--primary); margin: 0 0 6px; font-size: 2rem; line-height: 1.25; }
.page-header p { color: var(--muted); margin: 0 auto; max-width: 720px; }
.card { background: var(--surface); padding: 24px; border-radius: var(--radius); box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.card h2 { color: var(--primary); margin: 0 0 14px; font-size: 1.25rem; border-bottom: 2px solid #edf2f7; padding-bottom: 8px; }
.intro { background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--primary); border-radius: 8px; padding: 18px 22px; margin-bottom: 24px; }
.intro p { margin: 6px 0; }

/* FORMS */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; margin-bottom: 4px; color: var(--primary); }
.field input { width: 100%; padding: 11px 12px; border: 1px solid #a0aec0; border-radius: 6px; font-size: 1rem; }
.field .hint { font-size: 0.85rem; color: var(--muted); }
.form-section { font-size: 0.9rem; color: var(--muted); margin: 18px 0 8px; padding-top: 14px; border-top: 1px dashed #cbd5e0; }
.btn-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.btn { flex: 1; min-height: 48px; background: var(--primary); color: white; border: none; padding: 12px 18px; font-size: 1.05rem; font-weight: 700; border-radius: 8px; cursor: pointer; }
.btn:hover { background: #002d5a; }
.btn-secondary { flex: 0 0 auto; background: #e2e8f0; color: var(--text); }
.btn-secondary:hover { background: #cbd5e0; }
.error { color: var(--bad); font-weight: 700; margin-top: 12px; padding: 10px; background: #ffebee; border-radius: 6px; }

/* STATUS LABELS (source provenance) */
.st { display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.3px; text-transform: uppercase; border-radius: 10px; padding: 1px 8px; vertical-align: middle; }
.st-ver { background: #e6f4ea; color: #1b5e20; }
.st-sup { background: #fff4e5; color: #8a4500; }
.st-sim { background: #edf2f7; color: #2d3748; }

/* RESULT BADGES */
.badge { display: inline-block; padding: 5px 12px; border-radius: 15px; font-weight: 700; font-size: 0.92rem; }
.badge-ok { background: #e8f5e9; color: #1b5e20; }
.badge-bad { background: #ffebee; color: var(--bad); }
.badge-warn { background: #fff4e5; color: var(--warn); }

/* REFERENCES */
.refs { margin-top: 24px; font-size: 0.9rem; }
.refs ol { padding-left: 20px; margin: 0; }
.refs li { margin-bottom: 8px; }

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .nav-links { display: none; flex-direction: column; align-items: stretch; position: absolute; top: 100%; left: 0; right: 0; background: var(--primary); padding: 8px 5% 16px; border-top: 1px solid rgba(255,255,255,0.1); box-shadow: 0 10px 20px rgba(0,0,0,0.2); gap: 2px; }
  .nav-links.show { display: flex; }
  .nav-links a { padding: 12px 10px; font-size: 1rem; }
  .nav-drop { width: 100%; text-align: left; padding: 12px 10px; font-size: 1rem; }
  .nav-menu, .nav-menu.right { position: static; min-width: 0; box-shadow: none; padding: 0 0 4px 16px; }
  .page { padding: 20px 4% 0; }
  .page-header h1 { font-size: 1.5rem; }
  .card { padding: 18px 16px; }
}

@media print {
  .site-nav, .skip-link, .btn-row { display: none !important; }
  body { background: white; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
