:root {
  --midnight: #070914;
  --midnight-2: #11152d;
  --violet: #7557d9;
  --violet-light: #9679f0;
  --gold: #d8b96e;
  --gold-light: #f0dda2;
  --ivory: #f8f5ff;
  --lavender: #c9c3dd;
  --paper: #fbf9ff;
  --paper-2: #f1ecfb;
  --ink: #1c1829;
  --muted: #655e73;
  --line: #ded7e9;
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
::selection { background: var(--gold); color: var(--midnight); }
.container { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 1000; left: 1rem; top: -5rem; border-radius: 10px; background: #fff; color: var(--midnight); padding: .7rem 1rem; font-weight: 800; }
.skip-link:focus { top: 1rem; }
.disclosure { background: #ede3c9; color: #332b1f; padding: .5rem 1rem; text-align: center; font-size: .78rem; line-height: 1.5; }
.site-header { position: sticky; z-index: 80; top: 0; border-bottom: 1px solid rgba(255,255,255,.09); background: rgba(7,9,20,.94); backdrop-filter: blur(15px); }
.nav-shell { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .72rem; color: var(--ivory); text-decoration: none; }
.brand img { width: 42px; height: 42px; }
.brand-copy { display: grid; line-height: 1.08; }
.brand-copy b { font-family: Georgia, "Times New Roman", serif; font-size: 1rem; }
.brand-copy small { margin-top: .25rem; color: var(--lavender); font-size: .64rem; letter-spacing: .09em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 1.1rem; list-style: none; padding: 0; margin: 0; }
.nav-links a { color: #ded8eb; font-size: .83rem; font-weight: 750; text-decoration: none; }
.nav-links a:hover { color: var(--gold-light); }
.nav-cta { border: 1px solid rgba(216,185,110,.35); border-radius: 999px; padding: .65rem .9rem; }
.menu-toggle { display: none; min-width: 44px; min-height: 44px; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; background: transparent; cursor: pointer; }
.page-hero {
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 80% 25%, rgba(117,87,217,.27), transparent 26rem),
    radial-gradient(circle at 8% 86%, rgba(216,185,110,.08), transparent 22rem),
    linear-gradient(145deg, var(--midnight), #141034);
  color: var(--ivory);
  padding: clamp(4rem, 8vw, 7rem) 0;
}
.page-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35; background-image: radial-gradient(circle at 15% 20%, white 0 1px, transparent 1.5px), radial-gradient(circle at 79% 70%, #d8b96e 0 1px, transparent 1.5px); background-size: 210px 210px, 270px 270px; }
.hero-inner { position: relative; z-index: 1; max-width: 820px; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 .9rem; color: var(--gold-light); font-size: .74rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
h1, h2, h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw, 4.7rem); letter-spacing: -.04em; }
h2 { margin-top: 2.5rem; font-size: clamp(1.65rem, 3.5vw, 2.45rem); letter-spacing: -.025em; }
h3 { margin-top: 1.6rem; font-size: 1.25rem; }
.page-hero p { max-width: 720px; margin: 1.15rem 0 0; color: #d7d0e6; font-size: 1.05rem; }
.date-pill { display: inline-flex; margin-top: 1.4rem; border: 1px solid rgba(216,185,110,.32); border-radius: 999px; padding: .38rem .72rem; color: var(--gold-light); font-size: .72rem; font-weight: 800; }
.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 3.5rem; align-items: start; padding: clamp(3.5rem, 7vw, 6rem) 0; }
.article { min-width: 0; }
.article > p, .article li { color: var(--muted); }
.article > p { margin: 1rem 0 0; }
.article ul, .article ol { padding-left: 1.25rem; }
.article li + li { margin-top: .45rem; }
.article a { color: #5135af; font-weight: 700; text-underline-offset: 3px; }
.article a:hover { color: #2e1d74; }
.lead { color: #443c53 !important; font-size: 1.08rem; font-weight: 520; }
.notice { margin-top: 1.5rem; border-left: 4px solid var(--violet); border-radius: 0 14px 14px 0; background: var(--paper-2); padding: 1rem 1.1rem; color: #463e55; }
.warning { border-left-color: #a36c2e; background: #fff6e8; }
.toc { position: sticky; top: 98px; border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: 1.15rem; box-shadow: 0 18px 45px rgba(25,18,47,.08); }
.toc b { display: block; margin-bottom: .7rem; font-family: Georgia, serif; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li + li { margin-top: .4rem; }
.toc a { color: #5d556a; font-size: .8rem; font-weight: 700; text-decoration: none; }
.toc a:hover { color: #5135af; }
.support-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; margin-top: 1.5rem; }
.support-card { border: 1px solid var(--line); border-radius: 20px; background: #fff; padding: 1.35rem; box-shadow: 0 14px 35px rgba(26,19,46,.07); }
.support-card h2, .support-card h3 { margin-top: 0; }
.support-card p { color: var(--muted); }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; margin-top: .7rem; border: 0; border-radius: 13px; background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #1a1524 !important; padding: .8rem 1rem; font-weight: 850 !important; line-height: 1.3; text-align: center; text-decoration: none; box-shadow: 0 12px 28px rgba(216,185,110,.22); transition: transform .25s ease, box-shadow .25s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 17px 36px rgba(216,185,110,.3); }
.button-dark { background: #1a1730; color: var(--ivory) !important; box-shadow: none; }
.error-main { min-height: 68vh; display: grid; place-items: center; padding: 4rem 0; background: radial-gradient(circle at 50% 28%, rgba(117,87,217,.3), transparent 24rem), var(--midnight); color: var(--ivory); text-align: center; }
.error-code { color: var(--gold-light); font-family: Georgia, serif; font-size: clamp(5rem, 18vw, 10rem); font-weight: 700; line-height: .8; }
.error-main h1 { margin-top: 1.5rem; font-size: clamp(2rem, 5vw, 3.7rem); }
.error-main p { max-width: 650px; margin: 1rem auto 0; color: var(--lavender); }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.4rem; }
.site-footer { background: #05060d; color: #aaa3b8; padding: 3rem 0; font-size: .8rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 2rem; }
.footer-grid p { max-width: 500px; }
.footer-title { margin-bottom: .7rem; color: var(--ivory); font-weight: 850; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li + li { margin-top: .4rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom { margin-top: 2rem; border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.2rem; color: #847d91; }

@media (max-width: 820px) {
  .menu-toggle { display: inline-grid; place-items: center; }
  .nav-links { position: absolute; top: calc(100% + 1px); left: 1rem; right: 1rem; display: none; flex-direction: column; align-items: stretch; gap: 0; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: var(--midnight-2); padding: .5rem; box-shadow: 0 24px 55px rgba(0,0,0,.42); }
  .nav-links[data-open="true"] { display: flex; }
  .no-js .nav-links { position: static; display: flex; flex-direction: row; flex-wrap: wrap; border: 0; background: transparent; box-shadow: none; }
  .nav-links a { display: block; border-radius: 10px; padding: .72rem .8rem; }
  .page-layout { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .container { width: min(calc(100% - 1.25rem), var(--max)); }
  .disclosure { font-size: .7rem; }
  .nav-shell { min-height: 64px; }
  .brand-copy small { display: none; }
  .page-hero { padding: 3.8rem 0; }
  .support-grid, .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .button { width: 100%; }
  .error-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .button:hover { transform: none; }
}
