/* ==========================================================================
   rafenauen.com - site stylesheet
   One modern, responsive stylesheet for the whole site.
   Colours and fonts are set once in :root - change them there.
   ========================================================================== */

:root {
  /* Colour system - calm, grounded, "night sky" constellation theme */
  --night: #231b36;        /* deep constellation night (hero bands) */
  --night-2: #3b2f57;      /* lighter night for gradients */
  --plum: #5a4e6d;         /* muted constellation purple */
  --teal: #2c6e68;         /* primary action colour */
  --teal-dark: #1f524d;
  --sage: #e7efea;         /* soft grounding sage */
  --sage-2: #d5e3db;
  --cream: #faf8f4;        /* warm safe neutral (page background) */
  --paper: #ffffff;
  --rose: #8a4652;         /* warm accent */
  --gold: #e9c979;         /* starlight */
  --ink: #2a2531;          /* body text */
  --muted: #615a69;        /* secondary text */
  --line: #e4ded6;         /* borders */

  --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(35,27,54,.06), 0 8px 24px rgba(35,27,54,.08);
  --shadow-lg: 0 2px 4px rgba(35,27,54,.06), 0 18px 48px rgba(35,27,54,.14);
  --container: 1140px;
  --gutter: clamp(1.1rem, 4vw, 2rem);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 1.0625rem/1.7 var(--font-body);
  color: var(--ink);
  background: var(--cream);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 .6em;
  color: var(--night);
}
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
a { color: var(--teal); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
address { font-style: normal; }
hr { border: 0; height: 1px; background: var(--line); margin: 2.5rem 0; }
::selection { background: var(--gold); color: var(--night); }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.narrow { width: min(100% - 2 * var(--gutter), 760px); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--night); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm); }
.skip-link:focus { top: 1rem; color: #fff; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--rose); margin-bottom: .9rem; }
.lead { font-size: clamp(1.1rem, 1.8vw, 1.3rem); line-height: 1.6; color: var(--muted); font-weight: 300; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 500 1rem/1 var(--font-body);
  padding: .95em 1.6em; border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: none; }
.btn-sm { padding: .7em 1.25em; font-size: .95rem; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 6px 18px rgba(44,110,104,.28); }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-outline { border-color: currentColor; color: var(--teal); background: transparent; }
.btn-outline:hover { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-light { background: #fff; color: var(--night); }
.btn-light:hover { background: var(--gold); color: var(--night); }
.btn-ghost-light { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* ---------- Header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,248,244,.86);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(228,222,214,.8);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--night); }
.brand:hover { color: var(--night); }
.brand-mark { width: 34px; height: 34px; color: var(--plum); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: -.01em; }
.brand-tag { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: .2rem; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .15rem; }
.site-nav a:not(.btn) {
  display: block; padding: .5rem .7rem; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 400; font-size: .96rem;
}
.site-nav a:not(.btn):hover { background: var(--sage); color: var(--night); }
.site-nav a[aria-current="page"]:not(.btn) { color: var(--night); font-weight: 600; background: var(--sage); }
.site-nav .ext { font-size: .75em; margin-left: .2em; opacity: .6; }
.nav-cta { margin-left: .5rem; }

.nav-toggle { display: none; background: none; border: 0; padding: .6rem; cursor: pointer; border-radius: var(--radius-sm); color: var(--night); }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 24px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .25s, opacity .25s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--cream); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: .75rem var(--gutter) 1.25rem; gap: .1rem; }
  .site-nav a:not(.btn) { padding: .85rem 1rem; border-radius: var(--radius-sm); font-size: 1.05rem; }
  .nav-cta { margin: .75rem 0 0; }
  .nav-cta .btn { width: 100%; padding: 1em; }
}
@media (max-width: 420px), (min-width: 1101px) and (max-width: 1280px) { .brand-tag { display: none; } }

/* ---------- Night sky (shared by hero bands) ---------- */
.sky {
  position: relative; isolation: isolate; overflow: hidden;
  color: #efeaf7;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(233,201,121,.16), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(44,110,104,.35), transparent 60%),
    linear-gradient(160deg, var(--night) 0%, var(--night-2) 100%);
}
.sky::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, rgba(255,255,255,.85), transparent 60%),
    radial-gradient(1.2px 1.2px at 28% 68%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1.8px 1.8px at 44% 14%, rgba(233,201,121,.9), transparent 60%),
    radial-gradient(1.2px 1.2px at 58% 48%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 72% 82%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1.2px 1.2px at 86% 30%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(2px 2px at 93% 62%, rgba(233,201,121,.8), transparent 60%),
    radial-gradient(1px 1px at 6% 88%, rgba(255,255,255,.6), transparent 60%);
  background-size: 520px 360px;
  animation: twinkle 9s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }
.sky h1, .sky h2, .sky h3 { color: #fff; }
.sky .lead { color: rgba(239,234,247,.82); }
.sky .eyebrow { color: var(--gold); }
.sky a:not(.btn) { color: var(--gold); }

/* ---------- Home hero ---------- */
.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3.5rem, 8vw, 6rem); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); margin-bottom: .35em; }
.hero h1 em { font-style: italic; font-weight: 400; color: var(--gold); }
.hero-portrait {
  position: relative; aspect-ratio: 4 / 5; border-radius: 200px 200px var(--radius) var(--radius);
  overflow: hidden; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 30px 60px rgba(0,0,0,.35);
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 2rem; font-size: .95rem; color: rgba(239,234,247,.75); padding: 0; list-style: none; }
.hero-meta li::before { content: "\2726"; color: var(--gold); margin-right: .5rem; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { max-width: 300px; order: -1; }
}

/* ---------- Inner page hero ---------- */
.page-hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.page-hero .lead { max-width: 46rem; margin-bottom: 0; }
.page-hero h1 { max-width: 20ch; }
.page-hero.has-video { min-height: clamp(360px, 52vh, 560px); display: flex; align-items: flex-end; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.page-hero.has-video::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(35,27,54,.25) 0%, rgba(35,27,54,.85) 85%);
}
.page-hero.has-video::before { display: none; }
.breadcrumb { font-size: .9rem; margin-bottom: 1.2rem; color: rgba(239,234,247,.7); }
.breadcrumb a { color: rgba(239,234,247,.9) !important; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-tight { padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.section-sage { background: var(--sage); }
.section-head { max-width: 44rem; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; }

.prose { max-width: 44rem; }
.prose > * + h2 { margin-top: 2.2em; }
.prose > * + h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--rose); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split-wide { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 860px) { .split, .split-wide { grid-template-columns: 1fr; } }

/* Pull quote */
.pullquote {
  position: relative; margin: 0; padding: 2.2rem 2.2rem 2rem; border-radius: var(--radius);
  background: var(--paper); box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
}
.pullquote p { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.55; color: var(--night); }
.pullquote p:last-child { margin-bottom: 0; }
.pullquote .big { font-size: clamp(1.35rem, 2.4vw, 1.6rem); font-weight: 600; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.6rem 1.5rem; box-shadow: 0 1px 2px rgba(35,27,54,.04);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card h3 { margin-bottom: .45em; }
.card p { color: var(--muted); font-size: 1rem; margin-bottom: 1rem; }
.card p:last-child { margin-bottom: 0; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-link a.stretched { text-decoration: none; color: inherit; }
.card-link a.stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-link .more { margin-top: auto; color: var(--teal); font-weight: 500; font-size: .95rem; }
.card-link:hover .more { color: var(--teal-dark); }
.card-icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--sage); color: var(--plum); margin-bottom: 1.1rem; font-size: 1.35rem;
}
.card-icon svg { width: 24px; height: 24px; }

/* Ways of working */
.ways { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.ways li { background: rgba(255,255,255,.65); border: 1px solid rgba(255,255,255,.9); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.ways strong { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--night); margin-bottom: .25rem; font-weight: 600; }
.ways span { color: var(--muted); font-size: .98rem; }

/* Books */
.book { display: flex; flex-direction: column; }
.book .tag { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--rose); margin-bottom: .6rem; }
.book .btn { align-self: flex-start; margin-top: auto; }
.book-award { display: flex; gap: 1.2rem; align-items: center; }
.book-award img { width: 88px; flex: none; }

/* ---------- Call to action panel ---------- */
.cta { padding: 0 0 clamp(3.5rem, 8vw, 6rem); }
.cta-inner {
  width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem;
  padding: clamp(2rem, 5vw, 3.25rem); border-radius: calc(var(--radius) + 6px);
  color: #efeaf7;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(233,201,121,.22), transparent 60%),
    linear-gradient(135deg, var(--teal-dark), var(--plum));
  box-shadow: var(--shadow-lg);
}
.cta h2 { color: #fff; margin-bottom: .3em; }
.cta p { margin: 0; max-width: 36rem; color: rgba(239,234,247,.85); }
.cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Tables (events) ---------- */
.events-list { display: grid; gap: 1rem; }
.event {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem;
}
.event-date {
  width: 76px; text-align: center; border-radius: 14px; padding: .55rem .3rem;
  background: var(--sage); color: var(--night); line-height: 1.1;
}
.event-date .d { display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; }
.event-date .m { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.event h3 { margin: 0 0 .2em; font-size: 1.2rem; }
.event h3 a { color: var(--night); text-decoration: none; }
.event h3 a:hover { color: var(--teal); text-decoration: underline; }
.event p { margin: 0; color: var(--muted); font-size: .97rem; }
.event .btn { padding: .6em 1.1em; font-size: .9rem; }
@media (max-width: 620px) { .event { grid-template-columns: auto 1fr; } .event .btn { grid-column: 1 / -1; justify-self: start; } }
.empty-state { text-align: center; padding: 2.5rem 1.5rem; border: 1.5px dashed var(--sage-2); border-radius: var(--radius); color: var(--muted); }

/* ---------- Podcasts ---------- */
.episodes { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.episode { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem .8rem; }
.episode-num { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--rose); margin: 0 0 .5rem .2rem; }
.episode iframe { display: block; width: 100%; height: 128px; border: 0; border-radius: 10px; background: var(--sage); }
.episodes-more { margin-top: 1.5rem; }
.episodes-more summary { list-style: none; }
.episodes-more summary::-webkit-details-marker { display: none; }
.episodes-more[open] summary { display: none; }
.episodes-more .episodes { margin-top: 0; }

/* ---------- Testimonials ---------- */
.quotes { columns: 3 320px; column-gap: 1.25rem; }
.quote {
  break-inside: avoid; margin: 0 0 1.25rem; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem 1.6rem 1.3rem; position: relative;
}
.quote::before {
  content: "\201C"; position: absolute; top: .2rem; right: 1.1rem; font-family: var(--font-display);
  font-size: 4.5rem; line-height: 1; color: var(--sage-2);
}
.quote blockquote { margin: 0; }
.quote blockquote > p { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.5; color: var(--night); margin-bottom: .8rem; position: relative; }
.quote details { color: var(--muted); font-size: .98rem; }
.quote details p { margin: .6rem 0 0; }
.quote summary { cursor: pointer; color: var(--teal); font-weight: 500; font-size: .93rem; list-style: none; display: inline-flex; align-items: center; gap: .35em; }
.quote summary::-webkit-details-marker { display: none; }
.quote summary::after { content: "+"; font-size: 1.1em; }
.quote details[open] summary::after { content: "\2212"; }
.quote details[open] summary .open-label { display: none; }
.quote details:not([open]) summary .close-label { display: none; }
.quote figcaption { margin-top: 1rem; font-size: .9rem; font-weight: 600; color: var(--plum); }
.quote figcaption::before { content: "\2014\00a0"; }
.review-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.3rem 1.6rem; border-radius: var(--radius); background: var(--sage); margin-bottom: 2rem; }
.review-banner p { margin: 0; }

/* ---------- Forms ---------- */
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 500; font-size: .95rem; margin-bottom: .4rem; color: var(--night); }
.field .hint { display: block; font-size: .85rem; color: var(--muted); margin-top: .35rem; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: .8rem 1rem; border-radius: 12px; border: 1.5px solid var(--line); background: var(--cream);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(44,110,104,.15); }
.field input[readonly] { color: var(--muted); background: var(--sage); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.form-note { font-size: .9rem; color: var(--muted); margin: 0; }
.alert { padding: 1rem 1.2rem; border-radius: 12px; margin-bottom: 1.5rem; font-size: .98rem; }
.alert-warn { background: #fbf1e3; border: 1px solid #efd6ad; color: #6b4a14; }
.alert-ok { background: #e6f2ef; border: 1px solid #bcdcd5; color: #1f524d; }
.human-check { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; }
.human-check .field { flex: 1 1 200px; }
.human-check .sum { font-family: var(--font-display); font-size: 1.6rem; color: var(--night); }
.steps { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1.5rem; font-size: .85rem; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: .45rem; }
.steps li + li::before { content: ""; width: 24px; height: 1px; background: var(--line); margin-right: .1rem; }
.steps .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sage); font-weight: 600; font-size: .8rem; }
.steps .is-current { color: var(--night); font-weight: 500; }
.steps .is-current .n { background: var(--teal); color: #fff; }

/* ---------- ACE questionnaire ---------- */
.ace-list { list-style: none; counter-reset: ace; padding: 0; margin: 0; display: grid; gap: .75rem; }
.ace-list li { counter-increment: ace; }
.ace-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: start; cursor: pointer;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.2rem;
  transition: border-color .2s, background-color .2s;
}
.ace-item::before { content: counter(ace); font-family: var(--font-display); font-weight: 600; color: var(--plum); font-size: 1.2rem; min-width: 1.4em; }
.ace-item input { width: 22px; height: 22px; accent-color: var(--teal); margin-top: .15rem; }
.ace-item:has(input:checked) { border-color: var(--teal); background: #f1f7f5; }
.ace-item .q { font-size: 1rem; }
.ace-score { position: sticky; bottom: 1rem; margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem 1.3rem; border-radius: var(--radius); background: var(--night); color: #fff; box-shadow: var(--shadow-lg); }
.ace-score output { font-family: var(--font-display); font-size: 2rem; color: var(--gold); margin-left: .4rem; }

/* ---------- Five realms ---------- */
.realms { list-style: none; padding: 0; margin: 0; counter-reset: realm; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.realms > li { counter-increment: realm; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.realms h3::before { content: counter(realm) ". "; color: var(--rose); }
.realms dl { margin: 0; }
.realms dt { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--plum); margin-top: .8rem; }
.realms dd { margin: .2rem 0 0; color: var(--muted); font-size: .98rem; }

/* ---------- Misc ---------- */
.figure-row { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0; }
.figure-row img { width: 150px; border-radius: var(--radius-sm); background: var(--paper); border: 1px solid var(--line); padding: .5rem; }
.note { font-size: .9rem; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; text-decoration: none; }
.pay-card { max-width: 380px; text-align: center; }
.pay-card .price { font-family: var(--font-display); font-size: 2.4rem; color: var(--night); margin: .2rem 0 1rem; }
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 4rem 0; }
.error-code { font-family: var(--font-display); font-size: clamp(4.5rem, 14vw, 8rem); line-height: 1; color: var(--gold); margin-bottom: .2em; }
.signature { width: 120px; margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: rgba(239,234,247,.75); font-size: .95rem; padding-top: clamp(3rem, 6vw, 4.5rem); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-name { font-family: var(--font-display); font-size: 1.5rem; color: #fff; margin-bottom: .5rem; }
.footer-brand p { max-width: 26rem; }
.footer-heading { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .9rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.site-footer a { color: rgba(239,234,247,.85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; padding: 2rem 0 0; }
.badges:empty { display: none; }
.badges img { max-height: 64px; width: auto; display: inline-block; background: #fff; border-radius: 8px; padding: 4px; }
.badges table, .badges tr, .badges td { display: contents; }
.footer-base { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2rem; padding: 1.3rem 0 1.6rem; font-size: .85rem; }
.footer-base p { margin: 0; }

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .hero-video { display: none; }
}
@media print {
  .site-header, .site-footer, .cta, .btn, .btn-row, .nav-toggle, .no-print, .hero-video { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .sky { background: none !important; color: #000; }
  .sky::before, .page-hero.has-video::after { display: none; }
  .sky h1, .sky .lead { color: #000; }
  .page-hero { padding: 0 0 1rem; min-height: 0; }
  .ace-item { border-color: #999; break-inside: avoid; }
  .ace-score { position: static; background: none; color: #000; box-shadow: none; border: 1px solid #999; }
  .ace-score output { color: #000; }
  a { color: #000; }
}
