/* AgeRule site styles. System fonts only: no third-party requests. */
:root {
  --bg: #ffffff;
  --surface: #f4f6fa;
  --surface-2: #e9edf5;
  --text: #14171f;
  --muted: #4a5163;
  --border: #c9d0dd;
  --accent: #0b5cad;
  --accent-hover: #084887;
  --on-accent: #ffffff;
  --warn-bg: #fff4d6;
  --warn-text: #5a4200;
  --focus: #0b5cad;
  --radius: 12px;
  --max: 68rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1218;
    --surface: #171b23;
    --surface-2: #20252f;
    --text: #e8eaf0;
    --muted: #b3b9c6;
    --border: #3a4252;
    --accent: #7cb4ff;
    --accent-hover: #a5cbff;
    --on-accent: #0f1218;
    --warn-bg: #3a2f0f;
    --warn-text: #ffe29a;
    --focus: #a5cbff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1218;
  --surface: #171b23;
  --surface-2: #20252f;
  --text: #e8eaf0;
  --muted: #b3b9c6;
  --border: #3a4252;
  --accent: #7cb4ff;
  --accent-hover: #a5cbff;
  --on-accent: #0f1218;
  --warn-bg: #3a2f0f;
  --warn-text: #ffe29a;
  --focus: #a5cbff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: .15em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 40rem) { .wrap { padding: 0 1.5rem; } }

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: .6rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 4rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; min-height: 44px; }
.brand svg { width: 28px; height: 28px; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; padding: 0; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .6rem; color: var(--text); text-decoration: none; border-radius: 8px; }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .3em; }
@media (max-width: 47.99rem) { .site-nav .nav-optional { display: none; } }

.theme-toggle {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 44px; min-width: 44px; padding: 0 .75rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; font-size: .95rem; cursor: pointer;
}
.theme-toggle:hover { background: var(--surface-2); }
.theme-toggle svg { width: 18px; height: 18px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .7rem 1.25rem; border-radius: 10px;
  font-weight: 650; text-decoration: none; border: 2px solid var(--accent);
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { background: transparent; color: var(--accent); }
.btn-secondary:hover { background: var(--surface-2); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* Sections */
main section { padding: 3.5rem 0; }
main section + section { border-top: 1px solid var(--border); }
.hero { padding-top: 3rem; }
.eyebrow { display: inline-block; font-weight: 650; color: var(--warn-text); background: var(--warn-bg); padding: .25rem .7rem; border-radius: 999px; font-size: .95rem; margin-bottom: 1rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 42rem; }
.small { font-size: .95rem; color: var(--muted); }

.grid { display: grid; gap: 1rem; }
@media (min-width: 48rem) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-2 { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.card h3 { margin-bottom: .4rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 48rem) { .timeline { grid-template-columns: repeat(3, 1fr); } }
.timeline li { background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--accent); border-radius: var(--radius); padding: 1rem 1.25rem; }
.timeline .date { display: block; font-weight: 700; font-size: 1.1rem; }
.status { display: inline-block; font-size: .85rem; font-weight: 650; padding: .1rem .5rem; border-radius: 6px; background: var(--surface-2); margin-top: .35rem; }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 3.25rem; margin-bottom: 1.5rem; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700;
  background: var(--accent); color: var(--on-accent);
}

.price { font-size: 2rem; font-weight: 750; margin: .25rem 0 .5rem; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.card.featured { border: 2px solid var(--accent); }
.ticks { padding-left: 1.2rem; margin: 0 0 1rem; }
.ticks li { margin-bottom: .35rem; }

/* FAQ */
.faq details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: .75rem; }
.faq summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 650; min-height: 44px; list-style-position: outside; margin-left: 1.25rem; padding-left: .25rem; }
.faq details > div { padding: 0 1.25rem 1rem; }

.callout { background: var(--warn-bg); color: var(--warn-text); border-radius: var(--radius); padding: 1rem 1.25rem; }
.callout a { color: inherit; }

/* Prose pages */
.prose { max-width: 46rem; padding: 2.5rem 0 3.5rem; }
.prose h2 { margin-top: 2rem; font-size: 1.4rem; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1rem; font-size: .975rem; }
.prose th, .prose td { text-align: left; vertical-align: top; border: 1px solid var(--border); padding: .5rem .65rem; }
.prose th { background: var(--surface); }
.table-scroll { overflow-x: auto; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 2rem 0; font-size: .95rem; color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer p { margin: 0 0 .5rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .theme-toggle, .skip-link { display: none; }
}
.mt { margin-top: 1.5rem; }
