@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap');
html, body {
  overflow-x: hidden;
  font-family: 'Montserrat', sans-serif !important;
  margin: 0;
  padding: 0;
}

/* Fonts */
body {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  padding: 0;
  background: #fff;
  color: #111;
  line-height: 1.6;
  overflow-x: hidden;
}

:root{
  --bg:#0f172a;
  --bg-2:#0b1226ee;
  --text:#e5e7eb;
  --accent:#a78bfa;
  --ring: 0 0 0 3px rgba(167,139,250,.35);
}

/* Header shell */
.site-header{
  position:sticky; top:0; z-index:50;
  background:var(--bg); color:var(--text);
  border-bottom:1px solid rgba(255,255,255,.06);
  backdrop-filter:saturate(140%) blur(6px);
}

/* Grid container */
.nav{
  max-width:1200px; margin:0 auto; padding:14px 20px;
  display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:12px;
}

/* Brand (added) */
.brand{display:inline-flex; align-items:center; gap:10px; text-decoration:none; color:var(--text);}
.logo{height:30px; width:auto; display:block;}
.brand-text{font-size:1.05rem; font-weight:600; letter-spacing:.2px;}

/* Menu */
.menu{
  display:flex; gap:22px; list-style:none; margin:0; padding:0; justify-self:end;
}
.menu a{
  color:var(--text); text-decoration:none; font-weight:500; font-size:15px;
  padding:8px 2px; position:relative; border-radius:8px;
}
.menu a::after{
  content:""; position:absolute; left:0; right:0; bottom:-6px; height:2px;
  background:var(--accent); opacity:0; transform:translateY(4px); transition:.25s ease;
}
.menu a:hover::after{opacity:1; transform:translateY(0);}
.menu a[aria-current="page"]{color:var(--accent);}            /* current page state */

/* Focus visibility (a11y) */
.brand:focus-visible, .menu a:focus-visible, .hamburger:focus-visible{
  outline:none; box-shadow:var(--ring); border-radius:10px;
}

/* Hamburger */
.nav-toggle{display:none;}
.hamburger{
  display:none; width:36px; height:28px;
  flex-direction:column; justify-content:space-between; cursor:pointer;
}
.hamburger span{
  display:block; height:2px; width:100%; background:var(--text); border-radius:2px;
}

/* Mobile */
@media (max-width:880px){
  .nav{grid-template-columns:auto auto;}
  .menu{
    position:fixed; top:60px; left:12px; right:12px;
    background:var(--bg-2);
    border:1px solid rgba(255,255,255,.08);
    border-radius:14px; padding:12px;
    flex-direction:column; gap:6px;
    transform:scale(.98); opacity:0; pointer-events:none;
    transition:opacity .2s ease, transform .2s ease;
  }
  .menu a{display:block; padding:12px 14px; border-radius:10px;}
  .menu a:hover{background:rgba(255,255,255,.06);}
  .hamburger{display:flex; align-items:center; justify-self:end;}
  .nav-toggle:checked ~ .menu{opacity:1; transform:scale(1); pointer-events:auto;}
  .nav-toggle:checked + .hamburger span:nth-child(1){transform:translateY(7px) rotate(45deg);}
  .nav-toggle:checked + .hamburger span:nth-child(2){opacity:0;}
  .nav-toggle:checked + .hamburger span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce){
  .menu, .menu a::after, .hamburger span{transition:none !important;}
}
/* hero start from here */

.hero {
  background: var(--bg);
  color: var(--text);
  padding: 40px 20px; /* Reduced from 60px+ */
  text-align: center;
}

.hero .container {
  max-width: 800px; /* Slightly narrower for better readability */
  margin: auto;
}

.hero h1 {
  font-size: 1.75rem; /* Reduced size for classic look */
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px; /* Tighter spacing */
}

.hero-desc {
  font-size: 1rem;
  color: var(--muted, #9ca3af);
  max-width: 650px;
  margin: 0 auto 18px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 10px 18px; /* Slightly smaller button */
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 6px;
  text-decoration: none;
}

.btn-primary:hover {
  opacity: 0.9;
}

@media (max-width: 640px) {
  .hero {
    padding: 30px 16px;
  }
  .hero h1 {
    font-size: 1.4rem;
  }
  .hero-desc {
    font-size: 0.95rem;
  }
}

/* =========================
   Age Calculator — Polished Layout Fix
   ========================= */

/* Make sure all form controls size inside their container */
.age-tool *, .age-tool *::before, .age-tool *::after { box-sizing: border-box; }

/* Outer wrap */
.age-tool .tool-wrap { max-width: 1200px; padding: 0 20px; }

/* Card */
.age-form{
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 14px 44px rgba(2,8,23,.07);
  overflow: hidden;                  /* keep children inside rounded corners */
}
@media (prefers-color-scheme: dark){
  .age-form{ background: var(--bg-2); border-color: rgba(255,255,255,.08); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
}

/* Headings */
.age-tool h2{ font-size: 1.6rem; margin: 6px 0 18px; }
.age-tool h3{ font-size: 1.2rem; margin: 26px 0 14px; }

/* Fieldsets — light, clean, no double lines */
.age-form fieldset{
  margin: 0 0 16px;
  padding: 14px 14px 6px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
}
@media (prefers-color-scheme: dark){
  .age-form fieldset{ border-color: rgba(255,255,255,.08); }
}
.age-form legend{
  padding: 0 6px;
  font-weight: 700;
  font-size: .95rem;
}

/* Labels & grid */
.row{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr; /* equal columns prevent overflow */
  gap: 14px;
  margin-top: 10px;
}
.row > label{ display: flex; flex-direction: column; min-width: 0; } /* no overflow */
.lbl{ font-size: .95rem; margin: 0 0 6px; color: color-mix(in oklab, currentColor 85%, transparent); }

/* Inputs/selects — bigger, consistent, no overflow */
input[type="number"], select{
  width: 100%;
  height: 52px;
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in oklab, #000 15%, transparent);
  background: #fff;
  color: #0b1220;
  outline-offset: 2px;
}
@media (prefers-color-scheme: dark){
  input[type="number"], select{
    background: #0f172a; color: #e5e7eb;
    border-color: color-mix(in oklab, #fff 18%, transparent);
  }
}

/* Helper row */
.assist{ margin-top: 8px; }
.chk{ display: inline-flex; align-items: center; gap: 8px; user-select: none; }

/* Actions */
.actions{ display:flex; flex-wrap:wrap; gap:12px; margin-top: 14px; }
.btn-primary{
  background: var(--accent); color:#fff; border:0;
  padding: 12px 18px; border-radius: 12px; font-weight: 700; font-size: 1rem; cursor: pointer;
}
.btn-primary:hover{ opacity: .92; }
.btn-ghost{
  background: transparent; color: inherit;
  border: 1px solid color-mix(in oklab, currentColor 25%, transparent);
  padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: .98rem; cursor: pointer;
}

/* Error text */
.error{ color:#e11d48; margin: 6px 0 0; min-height: 1.2em; }

/* Results grid */
.cards{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.card{
  background:#fff; border:1px solid rgba(0,0,0,.08);
  border-radius: 14px; padding: 16px 16px 18px;
}
.card h4{ margin: 0 0 10px; font-size: 1rem; }
.card p{ margin: 0; font-weight: 700; font-size: 1.05rem; }
@media (prefers-color-scheme: dark){
  .card{ background: var(--bg-2); border-color: rgba(255,255,255,.08); }
}

/* Responsive breakpoints */
@media (max-width: 1000px){
  .cards{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px){
  .age-form{ padding: 18px; }
  .row{ grid-template-columns: 1fr 1fr; }  /* Month | Day on first row, Year on second */
  .cards{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px){
  .row{ grid-template-columns: 1fr; }      /* stack all three fields */
  .cards{ grid-template-columns: 1fr; }
  .actions{ flex-direction: column; }
  .btn-primary, .btn-ghost{ width:100%; }
}

/* ===== Proper centering for the age tool ===== */

/* Stack hero title, form, and results vertically and center them */
.age-tool .tool-wrap{
  max-width: 1240px;
  margin: 18px auto 60px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;   /* important */
  align-items: center;      /* center each child */
}

/* Keep the H2 aligned with the form width */
.age-tool h2{
  width: 100%;
  max-width: 900px;         /* same as form */
  margin: 0 auto 18px;
}

/* Center the form and control its width */
.age-form{
  width: 100%;
  max-width: 900px;         /* adjust 800–1000px to taste */
}

/* Center the results area and let it be a bit wider than the form */
.results{
  width: 100%;
  max-width: 1100px;
  margin-top: 16px;
}

/* The grid itself stays the same; this ensures it doesn't hug the left edge */
.results .cards{ margin-left: auto; margin-right: auto; }

/* Responsive – keep it simple on small screens */
@media (max-width: 720px){
  .age-tool h2{ max-width: 100%; }
  .age-form{ max-width: 100%; }
  .results{ max-width: 100%; }
}

/* ===========================
   Article Page (no FAQ)
   =========================== */
.article-page{
  background:#fff;
  color:#0b1220;
  padding:32px 16px 64px;
}
@media (prefers-color-scheme: dark){
  .article-page{ background:var(--bg); color:var(--text); }
}

/* Content width */
.article-page .content{
  max-width:860px;
  margin:0 auto;
}

/* Smooth in-page anchors (works with sticky header) */
.article-page .section,
.article-page h1,
.article-page h2{ scroll-margin-top:88px; }

/* Breadcrumbs */
.article-page .breadcrumbs{
  max-width:860px;
  margin:0 auto 10px;
  font-size:.9rem;
  color:color-mix(in oklab,currentColor 60%, transparent);
}
.article-page .breadcrumbs ol{
  list-style:none; margin:0 0 10px; padding:0;
  display:flex; gap:8px; flex-wrap:wrap;
}
.article-page .breadcrumbs li+li::before{
  content:"›"; margin:0 6px; opacity:.6;
}
.article-page .breadcrumbs a{ text-decoration:none; }
.article-page .breadcrumbs a:hover{ text-decoration:underline; }

/* Compact hero header */
.article-page .hero-compact{ margin:0 auto 18px; }
.article-page h1{
  font-size:clamp(1.6rem,2.2vw + 1rem,2.2rem);
  line-height:1.25;
  margin:0 0 8px;
  font-weight:800;
  letter-spacing:.1px;
}
.article-page .dek{
  font-size:1.05rem;
  color:color-mix(in oklab,currentColor 70%, transparent);
  margin:0 0 10px;
}
.article-page .meta{
  display:flex; gap:10px; align-items:center;
  font-size:.9rem;
  color:color-mix(in oklab,currentColor 60%, transparent);
  margin-bottom:14px;
}

/* CTA button */
.article-page .cta{
  display:inline-block;
  background:var(--accent);
  color:#fff;
  text-decoration:none;
  padding:10px 16px;
  border-radius:10px;
  font-weight:700;
}
.article-page .cta:hover{ opacity:.92; }

/* Table of contents */
.article-page .toc{
  background:color-mix(in oklab,#000 3%, transparent);
  border:1px solid rgba(0,0,0,.06);
  border-radius:12px;
  padding:12px 14px;
  margin:14px 0 18px;
}
@media (prefers-color-scheme: dark){
  .article-page .toc{
    background:color-mix(in oklab,#fff 4%, transparent);
    border-color:rgba(255,255,255,.1);
  }
}
.article-page .toc strong{ display:block; margin-bottom:8px; }
.article-page .toc ul{ margin:0; padding-left:18px; }
.article-page .toc a{ text-decoration:none; }
.article-page .toc a:hover{ text-decoration:underline; }

/* Info note */
.article-page .note{
  background:#f8fafc;
  border:1px solid rgba(0,0,0,.06);
  border-radius:12px;
  padding:12px 14px;
  margin:14px 0 18px;
}
@media (prefers-color-scheme: dark){
  .article-page .note{
    background:var(--bg-2);
    border-color:rgba(255,255,255,.1);
  }
}

/* Sections & headings */
.article-page .section{ margin:24px 0; }
.article-page h2{
  font-size:1.35rem;
  margin:0 0 8px;
  font-weight:800;
}
.article-page p{ margin:10px 0; }

/* Lists */
.article-page .checklist{ padding-left:22px; }
.article-page .checklist li{ margin:6px 0; }
.article-page .howto{ padding-left:22px; }
.article-page .howto li{ margin:6px 0; }

/* Two-column block (text + pros/cons) */
.article-page .columns{
  display:grid;
  grid-template-columns:1.6fr .9fr;
  gap:16px;
}
@media (max-width:820px){
  .article-page .columns{ grid-template-columns:1fr; }
}

/* Pros & Cons card */
.article-page .pros-cons{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  padding:12px 14px;
}
@media (prefers-color-scheme: dark){
  .article-page .pros-cons{
    background:var(--bg-2);
    border-color:rgba(255,255,255,.1);
  }
}
.article-page .pros-cons h3{ margin:0 0 8px; font-size:1rem; }
.article-page .pros-cons .pros,
.article-page .pros-cons .cons{ margin:0; padding-left:18px; }
.article-page .pros-cons .pros li::marker{ color:#16a34a; }
.article-page .pros-cons .cons li::marker{ color:#ef4444; }

/* Footer CTA */
.article-page .article-foot{
  margin-top:18px;
  display:flex; gap:10px; align-items:center;
}

/* Optional: images inside article */
.article-page img{
  display:block; max-width:100%; height:auto; border-radius:12px;
  box-shadow:0 10px 30px rgba(2,8,23,.07);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  html:focus-within{ scroll-behavior:auto; }
}


/* ===========================
   FAQ Page (opened by default)
   =========================== */
.faq-page{
  background:#fff;
  color:#0b1220;
  padding:32px 16px 64px;
}
@media (prefers-color-scheme: dark){
  .faq-page{ background:var(--bg); color:var(--text); }
}

.faq-page .breadcrumbs{
  max-width:860px; margin:0 auto 10px;
  font-size:.9rem; color:color-mix(in oklab,currentColor 60%, transparent);
}
.faq-page .breadcrumbs ol{
  list-style:none; margin:0 0 10px; padding:0;
  display:flex; gap:8px; flex-wrap:wrap;
}
.faq-page .breadcrumbs li+li::before{ content:"›"; margin:0 6px; opacity:.6; }
.faq-page .breadcrumbs a{ text-decoration:none; }
.faq-page .breadcrumbs a:hover{ text-decoration:underline; }

.faq-hero{
  max-width:860px; margin:0 auto 14px;
}
.faq-hero h1{
  font-size:clamp(1.6rem,2.2vw + 1rem,2.2rem);
  line-height:1.25; margin:0 0 8px; font-weight:800; letter-spacing:.1px;
}
.faq-hero .dek{
  font-size:1.05rem; margin:0 0 10px;
  color:color-mix(in oklab,currentColor 70%, transparent);
}

/* Note box */
.faq-page .note{
  max-width:860px; margin:14px auto 18px;
  background:#f8fafc; border:1px solid rgba(0,0,0,.06);
  border-radius:12px; padding:12px 14px;
}
@media (prefers-color-scheme: dark){
  .faq-page .note{ background:var(--bg-2); border-color:rgba(255,255,255,.1); }
}

/* FAQ list */
.faq-list{
  max-width:860px; margin:0 auto;
  display:grid; gap:12px;
}

/* Individual item */
.faq-item{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  overflow:hidden; /* keeps children inside rounded corners */
}
@media (prefers-color-scheme: dark){
  .faq-item{ background:var(--bg-2); border-color:rgba(255,255,255,.1); }
}

/* Summary row (click target) */
.faq-item > summary{
  list-style:none; cursor:pointer;
  display:flex; align-items:center; gap:10px;
  padding:14px 16px;
  font-weight:700; position:relative;
}
.faq-item > summary::-webkit-details-marker{ display:none; }

/* Chevron icon using CSS only */
.faq-item > summary::after{
  content:"";
  width:10px; height:10px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform: rotate(45deg);
  margin-left:auto; opacity:.75;
  transition: transform .2s ease;
}
.faq-item[open] > summary::after{
  transform: rotate(-135deg);  /* arrow points up when open */
}

/* Answer body */
.faq-item .answer{
  padding: 0 16px 14px 16px;
  color: color-mix(in oklab, currentColor 92%, transparent);
}
.faq-item .answer p{ margin:10px 0; }
.faq-item .answer .cta{
  display:inline-block; background:var(--accent); color:#fff;
  text-decoration:none; padding:10px 14px; border-radius:10px; font-weight:700;
}
.faq-item .answer .cta:hover{ opacity:.92; }

/* Focus styles for keyboard users */
.faq-item > summary:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(167,139,250,.35);
  border-radius: 8px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  .faq-item > summary::after{ transition:none; }
}

/* Anchor offset for sticky headers (if someone links to #faq-2 etc.) */
.faq-item{ scroll-margin-top: 88px; }

/* ===========================
   Footer
   =========================== */
.site-footer{
  background: #0b1220;              /* fallback for light theme users */
  color: #e5e7eb;
  border-top: 1px solid rgba(255,255,255,.08);
}
@media (prefers-color-scheme: dark){
  .site-footer{ background: var(--bg); color: var(--text); }
}

.site-footer .footer-wrap{
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 16px;
  align-items: center;
}

/* Brand */
.footer-brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  letter-spacing: .2px;
}
.footer-brand img{ display:block; border-radius: 6px; }

/* Nav */
.footer-nav{ justify-self: end; }
.footer-menu{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex; gap: 14px; flex-wrap: wrap;
}
.footer-menu a{
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 8px;
}
.footer-menu a:hover{ background: color-mix(in oklab, currentColor 10%, transparent); }

/* Small print */
.legal{
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: .9rem;
  color: color-mix(in oklab, currentColor 70%, transparent);
}

/* Mobile layout */
@media (max-width: 720px){
  .site-footer .footer-wrap{
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-nav{ justify-self: center; }
  .footer-brand{ justify-content: center; }
}

.legal {
  grid-column: 1 / -1; /* span full width of grid */
  margin: 8px 0 0;
  font-size: .9rem;
  color: color-mix(in oklab, currentColor 70%, transparent);
  text-align: center; /* center the text */
}

/* Back to Top Button */
#backToTopBtn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;                 /* make sure it's above everything */
  background: var(--accent);
  color: #fff;
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  opacity: 0;                    /* hidden by default */
  visibility: hidden;
  transform: scale(0.9);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
#backToTopBtn:hover,
#backToTopBtn:focus { transform: scale(1); }

#backToTopBtn.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

@media (max-width: 480px) {
  #backToTopBtn { bottom: 18px; right: 18px; width: 42px; height: 42px; font-size: 20px; }
}


/* ========= Static Pages (About / Contact / Terms / Privacy) ========= */

.page{ padding: 24px 16px 64px; background:#fff; color:#0b1220; }
@media (prefers-color-scheme: dark){ .page{ background:var(--bg); color:var(--text); }}

/* Content width helpers */
.content-narrow{ max-width: 860px; margin: 0 auto; }
.lead{ font-size: 1.05rem; color: color-mix(in oklab, currentColor 80%, transparent); }

/* Breadcrumbs */
.breadcrumbs{ max-width: 860px; margin: 0 auto 12px; font-size: .9rem; color: color-mix(in oklab, currentColor 60%, transparent); }
.breadcrumbs ol{ list-style:none; margin:0; padding:0; display:flex; gap:8px; flex-wrap:wrap; }
.breadcrumbs li+li::before{ content:"›"; margin: 0 6px; opacity:.6; }
.breadcrumbs a{ text-decoration:none; }
.breadcrumbs a:hover{ text-decoration:underline; }

/* Sections & Headings */
.static-section h2{ font-size: 1.6rem; margin: 2px 0 10px; font-weight: 800; letter-spacing: .1px; }
.static-section h3{ font-size: 1.15rem; margin: 16px 0 8px; font-weight: 800; }
.static-section p{ margin: 10px 0; }
.static-section .checklist{ padding-left: 22px; }
.static-section .checklist li{ margin: 6px 0; }

/* Muted text */
.muted{ color: color-mix(in oklab, currentColor 65%, transparent); font-size: .92rem; }

/* Contact page */
.contact-grid{
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px;
}
@media (max-width: 760px){ .contact-grid{ grid-template-columns: 1fr; } }
.contact-card{
  background:#fff; border:1px solid rgba(0,0,0,.08); border-radius:12px; padding:12px 14px;
  box-shadow: 0 10px 30px rgba(2,8,23,.05);
}
@media (prefers-color-scheme: dark){
  .contact-card{ background:var(--bg-2); border-color: rgba(255,255,255,.1); }
}

/* Contact form */
.contact-form{ margin-top: 10px; }
.contact-form .hp{ position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }
.contact-form .form-row{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px){ .contact-form .form-row{ grid-template-columns: 1fr; } }
.contact-form label{ display:flex; flex-direction:column; gap:6px; margin: 8px 0; font-weight: 600; }
.contact-form input, .contact-form textarea{
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border:1px solid color-mix(in oklab, currentColor 20%, transparent);
  background:#fff; color:#0b1220; font-weight: 500; outline-offset: 2px;
}
@media (prefers-color-scheme: dark){
  .contact-form input, .contact-form textarea{
    background:#0f172a; color:#e5e7eb; border-color: color-mix(in oklab, #fff 18%, transparent);
  }
}
.contact-form textarea{ resize: vertical; min-height: 140px; }
.btn-primary{
  background: var(--accent); color:#fff; border:0; padding: 12px 18px;
  border-radius: 12px; font-weight: 700; cursor: pointer;
}
.btn-primary:hover{ opacity: .92; }

/* Legal lists (Terms/Privacy) */
.legal-list{ padding-left: 22px; }
.legal-list li{ margin: 6px 0; }

/* Anchor offset for sticky header (if linking to headings) */
.static-section h2, .static-section h3{ scroll-margin-top: 88px; }

/* Links */
.page a{ color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.page a:hover{ text-decoration-thickness: 2px; }

/* Cards generic (optional reuse) */
.card{ background:#fff; border:1px solid rgba(0,0,0,.06); border-radius:12px; padding:12px 14px; }
@media (prefers-color-scheme: dark){ .card{ background:var(--bg-2); border-color: rgba(255,255,255,.1); } }



/* ===========================
   404 Page
   =========================== */

.error-404 {
  display: grid;
  place-items: center;
  padding: 40px 16px 64px;
  background: #fff;
  color: #0b1220;
}
@media (prefers-color-scheme: dark){
  .error-404 { background: var(--bg); color: var(--text); }
}

.error-404 .error-container{
  width: 100%;
  max-width: 760px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 14px 44px rgba(2,8,23,.07);
  text-align: center;
}
@media (prefers-color-scheme: dark){
  .error-404 .error-container{
    background: var(--bg-2);
    border-color: rgba(255,255,255,.1);
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
  }
}

.error-404 h1{
  font-size: clamp(1.6rem, 1.6rem + 0.6vw, 2.1rem);
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: .2px;
}

.error-404 .e-dek{
  margin: 0 0 14px;
  font-size: 1.05rem;
  color: color-mix(in oklab, currentColor 70%, transparent);
}

.error-actions{
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 14px;
  flex-wrap: wrap;
}
.error-actions .btn-primary{
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  display: inline-block;
}
.error-actions .btn-primary:hover{ opacity: .92; }

.error-actions .btn-ghost{
  display: inline-block;
  text-decoration: none;
  color: inherit;
  padding: 12px 18px;
  border: 1px solid color-mix(in oklab, currentColor 25%, transparent);
  border-radius: 12px;
  font-weight: 600;
}

.error-links ul{
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.error-links a{
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  color: inherit;
}
.error-links a:hover{
  background: color-mix(in oklab, currentColor 10%, transparent);
}

/* Back-to-top uses the same button styles you already added */
#backToTopBtn {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--accent); color: #fff; border: 0;
  width: 46px; height: 46px; border-radius: 50%;
  font-size: 22px; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.25);
  opacity: 0; visibility: hidden; transform: scale(.9);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
#backToTopBtn.show { opacity: 1; visibility: visible; transform: scale(1); }
#backToTopBtn:hover { transform: scale(1); }
