/* Mai Heaven site design language (2026-11), shared by every public page except
   the homepage, which carries the same tokens inline.

   Loaded AFTER each page's own <style>, so it restyles the existing markup
   without touching content: brand faces, cream/plum identity hero with the
   dogwood stripe, navy operational chrome, paper panels instead of outlined
   boxes, pill buttons, one radius. Selectors are prefixed with `body` so they
   win over the page's equal-weight rules.

   Light only on purpose: these pages carry hundreds of inline colours written
   for a light ground, and a dark mode over them would break WCAG contrast.

   Every text/background pair here is in tools/check_contrast.py's list. */
:root{
  --mh-ground:#f6eee3; --mh-paper:#fdfbf6; --mh-field:#ece4d4; --mh-ink:#1c2e4a; --mh-soft:#47587a;
  --mh-plum:#b4566e; --mh-plum-ink:#a24c62; --mh-petal:#f0c0b6; --mh-link:#176860; --mh-btn:#1f7d76; --mh-navy:#1c2e4a;
  --mh-r:14px;
  color-scheme:light;
}
html{scroll-padding-top:84px}
body{background:var(--mh-ground);color:var(--mh-ink);font-family:"Atkinson Hyperlegible",system-ui,-apple-system,"Segoe UI",sans-serif;font-size:18px;line-height:1.6}
body h1,body h2,body h3{font-family:Fraunces,Georgia,serif;font-weight:600;letter-spacing:-.02em;color:var(--mh-ink)}
body h2{font-size:clamp(26px,3vw,38px);line-height:1.12}
body h3{font-size:clamp(20px,2vw,24px);line-height:1.2}
body a{color:var(--mh-link);text-underline-offset:3px}
/* links inside running text are underlined so they never rely on colour alone (1.4.1) */
body :is(main,section,footer) :is(p,li,td,dd,div,span,.note,.box,.answer,.callout,.src) > a:not(.btn):not(.go):not(.card):not([style*="display:block"]){text-decoration:underline}
/* unclassed form buttons share the pill (navy-on-teal was 4.2:1) */
body main button:not([class]){background:var(--mh-btn);color:#fff;border:0;border-radius:999px;min-height:48px;padding:12px 24px;font-weight:700}
body main button:not([class]):hover{background:#176860;color:#fff}
/* small print inside the navy call-to-action panels */
body .cta .fine a{color:#e59bb0}
body :focus-visible{outline:3px solid var(--mh-plum);outline-offset:3px}

/* ---------- header: solid navy bar, wordmark, plain links ---------- */
body header.nav{background:var(--mh-navy);backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;border:0}
body header.nav .navwrap{max-width:none;min-height:60px;padding:10px 24px}
body header.nav .brand{font-family:Fraunces,Georgia,serif;font-weight:600;font-size:22px;color:#f6eee3;text-decoration:none}
body header.nav .brand span{color:#e59bb0}
body header.nav nav a{color:#f6eee3;font-size:16px}
body header.nav nav a:hover{color:#7fd6cd;text-decoration:underline}

/* ---------- hero: the identity layer, with the dogwood stripe ---------- */
body .hero{position:relative;background:var(--mh-ground);color:var(--mh-ink);border:0;box-shadow:none;padding:76px 24px 48px;text-align:left}
body .hero::before{content:"";position:absolute;left:0;right:0;top:0;height:14px;
  background:repeating-linear-gradient(90deg,var(--mh-plum) 0 28px,var(--mh-petal) 28px 56px)}
body .hero h1{color:var(--mh-ink);font-size:clamp(36px,5vw,64px);line-height:1.03;letter-spacing:-.035em;text-wrap:balance;margin:0 0 18px}
body .hero p{color:var(--mh-ink);font-size:19px}
body .hero a:not(.btn):not(.printbtn):not(.go){color:var(--mh-link)}
body .hero .eyebrow,body .hero .kick{font-size:17px;font-weight:700;letter-spacing:0;text-transform:none;color:var(--mh-plum-ink);margin:0 0 12px}
body .kick,body .eyebrow{color:var(--mh-plum-ink)}

/* ---------- panels: paper on cream, no outlines, one radius ---------- */
body .card,body .answer,body .note,body .box,body .callout,body .cta,body .also,body .panel{border:0;box-shadow:none;border-radius:var(--mh-r)}
body .card{background:var(--mh-paper);padding:24px}
body .card p{color:var(--mh-soft)}
body .answer{background:var(--mh-paper);padding:22px 26px;font-size:19px;box-shadow:inset 6px 0 0 var(--mh-plum)}
body .note,body .box,body .callout{background:var(--mh-field);color:var(--mh-ink)}
body .note b,body .box b{color:var(--mh-ink)}

body .src,body .fine{color:var(--mh-soft)}

/* ---------- buttons: one pill shape ---------- */
body .btn,body .cta .go{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:12px 24px;border:0;border-radius:999px;
  background:var(--mh-btn);color:#fff;font-weight:700;text-decoration:none;transition:transform .18s ease,background-color .18s ease}
body .btn:hover,body .cta .go:hover{background:#176860;color:#fff;transform:translateY(-2px);text-decoration:none}
body .btn.sec,body .btn.ghost,body .btn.alt{background:var(--mh-navy);color:#f6eee3;border:0}
body .btn.sec:hover,body .btn.ghost:hover,body .btn.alt:hover{background:#2a3f62;color:#f6eee3}

/* ---------- footer: navy close, wordmark returns large ---------- */
body footer{--gold:#e59bb0;background:var(--mh-navy);color:#c9d3e9;border:0}
body footer a{color:#7fd6cd}
body footer .mh-help{color:#f6eee3}
body footer .mh-help a{color:#7fd6cd;font-weight:700}

/* ---------- motion: arrival only, never hides content without support ---------- */
@media (prefers-reduced-motion: no-preference){
  @keyframes mh-up{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}
  body .hero h1,body .hero p,body .hero .eyebrow,body .hero .kick{animation:mh-up .7s cubic-bezier(.2,.7,.2,1) backwards}
  body .hero h1{animation-delay:.08s}
  body .hero p{animation-delay:.16s}
  body .card{transition:transform .2s ease,background-color .2s ease}
  body a.card:hover{transform:translateY(-3px);background:#fff}
}

@media (max-width:600px){
  body{font-size:17px}
  body .hero{padding:56px 16px 36px}
  body header.nav .navwrap{padding:8px 16px}
  body header.nav nav a{font-size:15px}
}
@media print{
  body .hero::before{display:none}
  body header.nav,body footer{background:#fff;color:#000}
}

/* the cookie notice links (consent.js) must not rely on colour alone */
body #mh-consent a{text-decoration:underline}

/* submit buttons and .go actions share the pill everywhere (navy on teal was 4.2:1) */
body main [type=submit],body main .go{background:var(--mh-btn);color:#fff;border:0;border-radius:999px;font-weight:700}
body main [type=submit]:hover,body main .go:hover{background:#176860;color:#fff}
/* the wordmark accent always sits on navy: petal tint, 6.3:1 */
body .brand span{color:#e59bb0}
/* old plum accents written for navy now sit on cream: use the darker plum */
body main{--gold:#a24c62}
/* figures on the slate stat panels */
body .stat b{color:#f6eee3}
/* print buttons share the pill */
body .printbtn{background:var(--mh-btn);color:#fff;border-radius:999px}
body .printbtn:hover{background:#176860;color:#fff}
/* small print inside call-to-action panels takes the panel's own text colour */
body .cta .fine{color:inherit}
