*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy: #1a2b45; --navy-deep: #111e30; --coral: #e8624a;
  --coral-ink: #bd3b25;   /* darker coral for text/links on light bg (WCAG AA) */
  --coral-btn: #c4452e;   /* darker coral for button bg so white text passes AA */
  --white: #ffffff; --off-white: #f5f3ef; --text-muted: #8a97aa;
  --font-display: Georgia, 'Times New Roman', Times, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body { font-family: var(--font-body); color: var(--navy); background: var(--white); line-height: 1.7; }
.skip-link { position: absolute; left: -9999px; top: auto; }
.skip-link:focus { left: 16px; top: 12px; z-index: 1000; background: #111e30; color: #fff; padding: 10px 16px; border-radius: 4px; }
.topbar {
  background: var(--navy-deep); padding: 20px 5vw;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar a.home { color: var(--white); text-decoration: none; font-weight: 600; letter-spacing: 0.3px; font-size: 15px; }
.topbar a.back { color: var(--coral); text-decoration: none; font-size: 13px; font-weight: 600; letter-spacing: 0.5px; }
.topbar a.back:hover { text-decoration: underline; }
main { max-width: 820px; margin: 0 auto; padding: 64px 5vw 80px; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 4vw, 2.8rem); color: var(--navy); margin-bottom: 8px; }
.updated { color: var(--text-muted); font-size: 13px; letter-spacing: 0.5px; margin-bottom: 8px; }
.rule { width: 48px; height: 3px; background: var(--coral); margin: 24px 0 36px; }
h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; color: var(--navy); margin: 36px 0 12px; }
p { font-size: 15px; color: #3f4a5c; margin-bottom: 14px; font-weight: 300; }
ul { margin: 0 0 14px 22px; }
li { font-size: 15px; color: #3f4a5c; margin-bottom: 8px; font-weight: 300; }
a { color: var(--coral-ink); }
strong { font-weight: 600; color: var(--navy); }
.callout { background: var(--off-white); border-left: 3px solid var(--coral); padding: 16px 20px; margin: 20px 0; font-size: 14px; }
footer { background: #0c1420; color: rgba(255,255,255,0.62); padding: 28px 5vw; font-size: 12px; text-align: center; }
footer a { color: rgba(255,255,255,0.78); text-decoration: underline; }
footer a:hover { color: rgba(255,255,255,0.95); }

@media (max-width: 600px) {
  main { padding: 44px 6vw 64px; }
  .topbar { padding: 16px 6vw; }
  h2 { font-size: 1.15rem; }
}

/* Error pages */
.error-page { text-align: center; padding-top: 72px; padding-bottom: 96px; }
.error-code { font-family: var(--font-display); font-size: clamp(4rem, 14vw, 7rem); font-weight: 600; color: var(--coral); line-height: 1; margin-bottom: 4px; }
.error-page h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 16px; }
.error-page p { max-width: 460px; margin: 0 auto 12px; font-size: 16px; }
.error-actions { margin-top: 32px; }
.btn { display: inline-block; background: var(--coral-btn); color: #ffffff; text-decoration: none; padding: 14px 32px; font-weight: 600; letter-spacing: 0.5px; }
.btn:hover { background: var(--coral); }

.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 200;
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 999px; cursor: pointer;
  background: var(--coral-btn); color: #fff; border: none;
  box-shadow: 0 6px 24px rgba(0,0,0,0.28);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s, transform .25s, visibility .25s, background .2s;
}
.to-top svg { width: 20px; height: 20px; }
.to-top:hover { background: var(--coral); }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
