/* ==========================================================================
   You, Awake — shared design system
   Dark, cinematic, quiet. Brand lime + seven-ray spectrum as accents.
   ========================================================================== */

:root {
  --text-shadow-rgb: 0 0 0;   /* text shadows (the editor's Shadow setting): dark behind light text; light schemes swap it */
  /* Night water palette */
  --ink: #07070f;
  --night: #0c0b1a;
  --deep: #141129;
  --plum: #2a1533;
  --veil: rgb(var(--fg-rgb) / 0.06);
  --line: rgba(236, 230, 242, 0.12);
  --line-strong: rgba(236, 230, 242, 0.22);

  /* Text */
  --mist: #f1ecf6;
  --soft: #cfc6dc;
  --muted: #9a90ad;

  /* Accents */
  --lime: #a6d65a;          /* You, Awake brand green, lifted for dark bg */
  --lime-deep: #7fb23a;
  --aqua: #8fe3e6;
  --rose: #f0a9bf;
  --gold: #f4cf86;

  /* The seven rays */
  --r1: #ef5a5f;
  --r2: #f59a4a;
  --r3: #f6d35b;
  --r4: #9fd35a;
  --r5: #4fb6e8;
  --r6: #7d6ae0;
  --r7: #e693d6;
  --spectrum: linear-gradient(90deg, var(--r1), var(--r2), var(--r3), var(--r4), var(--r5), var(--r6), var(--r7));

  /* Dawn (light) sections */
  --dawn: #f7f1ec;
  --dawn-ink: #2a1a2e;
  --dawn-soft: #5d4a60;
  --dawn-line: rgba(42, 26, 46, 0.14);
  --dawn-muted: #776582;
  --dawn-card: rgb(var(--fg-rgb) / 0.6);
  --dawn-g1: #b8456f;       /* accent-italic gradient inside dawn bands */
  --dawn-g2: #c98a2c;
  --dawn-g3: #3c8f99;
  --dawn-accent: #7fb23a;
  --dawn-glow-a: 240 169 191;
  --dawn-glow-b: 244 207 134;

  /* Scheme plumbing (overridden per color scheme in schemes.css) */
  color-scheme: dark;
  --fg-rgb: 255 255 255;    /* translucent overlays: rgb(var(--fg-rgb) / a) */
  --bg-rgb: 7 7 15;         /* scrims and frosted bars */
  --accent-rgb: 166 214 90; /* = --lime */
  --on-accent: #10140a;     /* text on accent buttons */
  --glow-a: 125 106 224;    /* soft background glows */
  --glow-b: 143 227 230;
  --glow-c: 240 169 191;
  --panel: rgba(12, 11, 26, 0.94);
  --shadow: rgba(0, 0, 0, 0.8);
  --hero-tint: #0f0d22;
  --page-bg: var(--ink);
  --water-pond: #04040b;    /* hero water (as seen): the surface around the stream */
  --water-sky: #3c2c55;     /* sky reflected in the water */
  --water-deep: #07172f;    /* stream body, deep -> clear */
  --water-clear: #34729c;
  --water-vig: 0.5;         /* edge darkening (1 = none) */

  /* Type */
  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --brand: "Comfortaa", var(--sans);

  /* Rhythm */
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1200px;
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 76px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--soft);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, canvas, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: rgb(var(--accent-rgb) / 0.35); color: var(--mist); }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--mist);
  color: var(--ink);
  border-radius: 999px;
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

.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;
}

/* ---------- Type ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--mist);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
}

.display {
  font-size: calc(clamp(3rem, 9vw, 7.5rem) * var(--text-scale, 1));
  line-height: 0.95;
  letter-spacing: -0.025em;
}

.h1 { font-size: calc(clamp(2.6rem, 6.4vw, 5.4rem) * var(--text-scale, 1)); }
.h2 { font-size: calc(clamp(2.1rem, 4.6vw, 3.8rem) * var(--text-scale, 1)); }
.h3 { font-size: calc(clamp(1.5rem, 2.6vw, 2.1rem) * var(--text-scale, 1)); line-height: 1.15; }

em, .italic { font-style: italic; }
.serif { font-family: var(--serif); }

.accent-italic {
  font-style: italic;
  background: linear-gradient(100deg, var(--rose), var(--gold) 45%, var(--aqua));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.08em;
  text-shadow: none;                       /* see-through letters: a heading's shadow would show through them */
  filter: var(--accent-shadow, none);      /* ... so they get it as drop-shadow() (cms/lib/sections.php, text_shadow_accent) */
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--spectrum);
}
.eyebrow.center { justify-content: center; }
.eyebrow.no-rule::before { display: none; }

.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.65;
  color: var(--soft);
  max-width: 38em;
}

.statement {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.2vw, 3.4rem);
  line-height: 1.18;
  color: var(--mist);
  letter-spacing: -0.01em;
}

.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container.narrow { max-width: 860px; }
.container.wide { max-width: 1400px; }

.section {
  position: relative;
  padding: clamp(88px, 13vw, 168px) 0;
}
.section.tight { padding: clamp(64px, 9vw, 112px) 0; }

.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .lede { margin-top: 22px; }
.section-head.center .lede { margin-left: auto; margin-right: auto; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  border: 0;
  margin: 0;
}

.spectrum-rule {
  height: 2px;
  width: 100%;
  background: var(--spectrum);
  opacity: 0.85;
}

/* Dawn (light) sections */
.section.dawn {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgb(var(--dawn-glow-a) / 0.25), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgb(var(--dawn-glow-b) / 0.22), transparent 60%),
    var(--dawn);
  color: var(--dawn-soft);
}
.section.dawn h1,
.section.dawn h2,
.section.dawn h3,
.section.dawn h4,
.section.dawn .statement { color: var(--dawn-ink); }
.section.dawn .eyebrow { color: var(--dawn-soft); }
.section.dawn .lede { color: var(--dawn-soft); }
.section.dawn .muted { color: var(--dawn-muted); }
.section.dawn .card {
  background: var(--dawn-card);
  border-color: var(--dawn-line);
}
.section.dawn .accent-italic {
  background: linear-gradient(100deg, var(--dawn-g1), var(--dawn-g2) 55%, var(--dawn-g3));
  -webkit-background-clip: text;
  background-clip: text;
}

/* Soft glows behind dark sections */
.glow-field { position: relative; isolation: isolate; }
.glow-field::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(700px 420px at 15% 20%, rgb(var(--glow-a) / 0.13), transparent 70%),
    radial-gradient(600px 420px at 90% 80%, rgb(var(--glow-b) / 0.09), transparent 70%);
  pointer-events: none;
}

/* ---------- Buttons ---------- */

.btn {
  --b-bg: var(--mist);
  --b-fg: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--b-bg);
  color: var(--b-fg);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.5s var(--ease), background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.5s var(--ease);
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -12px rgb(var(--accent-rgb) / 0.45);
}
.btn .arrow { transition: transform 0.4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn.ghost {
  --b-bg: rgb(var(--fg-rgb) / 0.04);
  --b-fg: var(--mist);
  border-color: var(--line-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn.ghost:hover { border-color: rgb(var(--fg-rgb) / 0.45); box-shadow: none; }

.btn.lime { --b-bg: var(--lime); --b-fg: var(--on-accent); }

.section.dawn .btn { --b-bg: var(--dawn-ink); --b-fg: var(--dawn); }
.section.dawn .btn.ghost {
  --b-bg: transparent;
  --b-fg: var(--dawn-ink);
  border-color: var(--dawn-line);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--mist);
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  transition: border-color 0.3s, gap 0.4s var(--ease);
}
.text-link:hover { border-color: var(--lime); gap: 14px; }
.section.dawn .text-link { color: var(--dawn-ink); border-color: var(--dawn-line); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
}
/* The frosted bar lives on a pseudo-element: a backdrop-filter on the header itself
   would become the containing block for the fixed mobile menu (iOS/Chrome), trapping
   the menu inside the 76px bar once the page is scrolled. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, opacity 0.4s;
  pointer-events: none;
}
.site-header.is-scrolled::before {
  background: rgb(var(--bg-rgb) / 0.62);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}
.menu-open .site-header::before { opacity: 0; }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1400px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--mist);
  font-family: var(--brand);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand svg, .brand .brand-mark { width: 64px; height: auto; flex: none; }
.site-footer .brand .brand-mark { width: 88px; }
@media (max-width: 560px) { .brand .brand-mark { width: 52px; } }
.brand .comma { color: var(--lime); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  position: relative;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--soft);
  border-radius: 999px;
  transition: color 0.3s, background 0.3s;
}
.nav a:hover { color: var(--mist); background: var(--veil); }
.nav a[aria-current="page"] { color: var(--mist); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--lime);
}
.nav .btn { min-height: 42px; padding: 0 20px; margin-left: 10px; font-size: 0.86rem; color: var(--ink); }
.nav .btn:hover { color: var(--ink); background: var(--mist); }

/* *starred* words in menu labels: the home heading's slowly drifting colors */
.accent-italic.shift {
  background-image: linear-gradient(100deg,
    #f0a9bf 0%, #f4cf86 17%, #b9dd83 33%, #8fe3e6 50%, #b5a6f0 67%, #e693d6 83%, #f0a9bf 100%);
  background-size: 300% 100%;
  background-position: 0% 50%;
  animation: ya-shift 9s ease-in-out infinite alternate;
}
[data-tone="light"] .accent-italic.shift {   /* deeper colors so they read on a light page */
  background-image: linear-gradient(100deg,
    #c2457a 0%, #b8761a 17%, #4f8f2a 33%, #1f8a96 50%, #6a4fc4 67%, #b0408f 83%, #c2457a 100%);
}
@keyframes ya-shift {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .accent-italic.shift { animation: none; background-position: 15% 50%; }
}

/* ---------- Drop-downs in the main menu (an item with sub-links) ---------- */
.nav-group { position: relative; display: flex; align-items: center; }
.nav-group > a { padding-right: 6px; }
.nav-sub-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--soft);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.3s, background 0.3s;
}
.nav-group > a + .nav-sub-btn { padding: 10px 8px 10px 2px; margin-left: -4px; }
.nav-group-name { padding: 10px 12px 10px 14px; }
.nav-sub-btn svg { width: 10px; height: 10px; flex: none; transition: transform 0.4s var(--ease); }
.nav-sub-btn:hover, .nav-group.open .nav-sub-btn { color: var(--mist); }
.nav-group-name:hover, .nav-group.open .nav-group-name { background: var(--veil); }
.nav-group.open .nav-sub-btn svg { transform: rotate(180deg); }
.nav-group.is-current > a, .nav-group.is-current .nav-group-name { color: var(--mist); }
.nav-sub {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  padding: 8px;
  display: grid;
  gap: 2px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  box-shadow: 0 24px 60px -20px var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  z-index: 5;
}
.nav-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }   /* hover bridge */
.nav .nav-sub a { display: block; padding: 10px 14px; border-radius: 12px; white-space: nowrap; }
.nav .nav-sub a[aria-current="page"]::after { left: auto; right: 10px; bottom: 50%; margin: 0 0 -2px; }
.nav-group.open .nav-sub,
.nav-group:focus-within .nav-sub { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 1001px) {
  .nav-group:hover .nav-sub { opacity: 1; visibility: visible; transform: none; }
  .nav-group:hover .nav-sub-btn svg { transform: rotate(180deg); }
}

/* ---------- Visuals switch (in the main menu) ---------- */
.nav-visuals { position: relative; }
.nav-visuals-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 10px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--soft);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s, background 0.3s;
}
.nav-visuals-btn:hover,
.nav-visuals.open .nav-visuals-btn { color: var(--mist); background: var(--veil); }
.nav-visuals-btn .mode {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgb(var(--accent-rgb) / 0.45);
  color: var(--lime);
}
.nav-visuals-btn svg { width: 10px; height: 10px; transition: transform 0.4s var(--ease); }
.nav-visuals.open .nav-visuals-btn svg { transform: rotate(180deg); }

.visuals-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 270px;
  padding: 8px;
  display: grid;
  gap: 4px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  box-shadow: 0 24px 60px -20px var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  z-index: 5;
}
.visuals-menu::before { /* hover bridge between the button and the panel */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}
.nav-visuals.open .visuals-menu,
.nav-visuals:focus-within .visuals-menu { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 1001px) {
  .nav-visuals:hover .visuals-menu { opacity: 1; visibility: visible; transform: none; }
}
.visuals-menu .title {
  margin: 4px 10px 6px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.visuals-menu button {
  position: relative;
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 11px 40px 11px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--soft);
  transition: background 0.25s;
}
.visuals-menu button:hover { background: rgb(var(--fg-rgb) / 0.05); }
.visuals-menu button b { font-weight: 600; font-size: 0.92rem; color: var(--mist); }
.visuals-menu button span { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }
.visuals-menu button[aria-pressed="true"] { background: rgb(var(--accent-rgb) / 0.1); }
.visuals-menu button[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 10px;
  height: 5px;
  margin-top: -4px;
  border-left: 2px solid var(--lime);
  border-bottom: 2px solid var(--lime);
  transform: rotate(-45deg);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgb(var(--fg-rgb) / 0.04);
  position: relative;
}
.menu-toggle span {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 1.5px;
  background: var(--mist);
  transition: transform 0.4s var(--ease), opacity 0.3s;
}
.menu-toggle span:nth-child(1) { top: 18px; }
.menu-toggle span:nth-child(2) { top: 26px; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* keep every top-bar label on one line; tighten spacing before the hamburger takes over */
.brand span, .nav a, .nav-visuals-btn { white-space: nowrap; }
@media (max-width: 1180px) and (min-width: 1001px) {
  .nav { gap: 2px; }
  .nav a { padding: 10px 10px; }
  .nav-visuals-btn { padding: 10px 8px 10px 10px; }
  .nav .btn { margin-left: 6px; padding: 0 16px; }
}

@media (max-width: 1000px) {
  .menu-toggle { display: inline-block; z-index: 2; }
  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background:
      radial-gradient(600px 400px at 80% 10%, rgb(var(--glow-a) / 0.25), transparent 70%),
      radial-gradient(500px 400px at 10% 90%, rgb(var(--accent-rgb) / 0.12), transparent 70%),
      var(--ink);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
  }
  .nav a {
    font-family: var(--serif);
    font-size: 2.2rem;
    color: var(--mist);
    padding: 8px 20px;
  }
  .nav a[aria-current="page"]::after { bottom: 50%; left: auto; right: -2px; }
  .nav .btn {
    font-family: var(--sans);
    font-size: 1rem;
    margin: 24px 0 0;
    min-height: 54px;
  }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .nav { justify-content: safe center; overflow-y: auto; padding: 90px 0 40px; }
  .nav-group { flex-direction: column; }
  .nav-group > a { padding-right: 20px; }
  .nav-sub-btn { display: none; }
  .nav-sub-btn.nav-group-name {
    display: block;
    pointer-events: none;
    padding: 8px 20px;
    font-family: var(--serif);
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--mist);
  }
  .nav-group-name svg { display: none; }
  .nav-sub {
    position: static;
    min-width: 0;
    padding: 0 0 6px;
    border: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    justify-items: center;
  }
  .nav-sub::before { display: none; }
  .nav .nav-sub a { font-family: var(--sans); font-size: 1.05rem; color: var(--soft); padding: 6px 16px; }

  /* in the phone menu: an always-visible Full | Lite switch */
  .nav-visuals {
    order: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
  }
  .nav-visuals-btn {
    pointer-events: none;
    padding: 0;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .nav-visuals-btn .mode,
  .nav-visuals-btn svg,
  .visuals-menu .title,
  .visuals-menu button span,
  .visuals-menu::before { display: none; }
  .visuals-menu {
    position: static;
    width: auto;
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgb(var(--fg-rgb) / 0.04);
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .visuals-menu button { padding: 10px 26px; border-radius: 999px; text-align: center; }
  .visuals-menu button b { font-size: 1rem; color: var(--soft); }
  .visuals-menu button[aria-pressed="true"] { background: var(--mist); }
  .visuals-menu button[aria-pressed="true"] b { color: var(--ink); }
  .visuals-menu button[aria-pressed="true"]::after { display: none; }
  .nav .btn { order: 9; }
  .menu-open { overflow: hidden; }
}

/* ---------- Cards ---------- */

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgb(var(--fg-rgb) / 0.045), rgb(var(--fg-rgb) / 0.015));
  padding: clamp(24px, 3vw, 36px);
  transition: border-color 0.4s, transform 0.6s var(--ease), background 0.4s;
}
.card:hover { border-color: var(--line-strong); }
.card h3 { margin-bottom: 12px; }
.card p { margin: 0; }

.card.lift:hover { transform: translateY(-6px); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }

/* ---------- Page hero (subpage template) ---------- */

.page-hero {
  position: relative;
  min-height: min(88vh, 860px);
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-h) + 80px) 0 clamp(64px, 9vw, 120px);
  overflow: hidden;
  isolation: isolate;
}
.page-hero .ambient,
.page-hero .ambient-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}
.ambient-fallback {
  background:
    radial-gradient(60% 70% at 78% 30%, rgb(var(--glow-a) / 0.35), transparent 70%),
    radial-gradient(50% 60% at 20% 80%, rgb(var(--glow-b) / 0.18), transparent 70%),
    radial-gradient(40% 50% at 60% 90%, rgb(var(--glow-c) / 0.18), transparent 70%),
    linear-gradient(180deg, var(--night), var(--ink));
  background-size: 140% 140%;
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 60%; }
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  z-index: -1;
  background: linear-gradient(180deg, transparent, var(--page-bg));
  pointer-events: none;
}
.page-hero .crumbs {
  display: flex;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 28px;
}
.page-hero .crumbs a:hover { color: var(--mist); }
.page-hero h1 { max-width: 13em; }
.page-hero .lede { margin-top: 28px; }

/* When ambient WebGL has drawn (moving, or still in Lite), hide the CSS fallback */
.ambient-live + .ambient-fallback { opacity: 0; transition: opacity 1.2s; }

/* ---------- Quotes ---------- */

.quote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1.3;
  color: var(--mist);
  margin: 0;
  font-style: italic;
}
.quote-by {
  margin-top: 22px;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-style: normal;
}

/* ---------- Testimonials (sections.php "Testimonials"; the home page's Voices) ---------- */
.voices { position: relative; text-align: center; }
.voices-track { display: grid; }
.voice {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  pointer-events: none;
}
.voice.on { opacity: 1; transform: none; pointer-events: auto; }
.voice .quote { max-width: 26em; margin: 0 auto; }
.voices-dots { display: flex; justify-content: center; gap: 10px; margin-top: 40px; }
.voices-dots button {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  position: relative;
}
.voices-dots button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background 0.3s, transform 0.3s;
}
.voices-dots button[aria-current="true"]::after { background: var(--lime); transform: scale(1.4); }

.voices .h2 { margin-bottom: 34px; }
.voices .quote-by a, .t-card figcaption a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgb(var(--fg-rgb) / 0.3); }
.t-cards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-top: 8px; }
.t-card {
  margin: 0; padding: 28px 28px 24px; border-radius: var(--radius); border: 1px solid var(--line);
  background: rgb(var(--fg-rgb) / 0.04); display: flex; flex-direction: column; gap: 20px;
}
.t-card[hidden] { display: none; }
.t-card blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.32rem; line-height: 1.45; color: var(--mist); flex: 1; }
.t-card figcaption { display: flex; align-items: center; gap: 12px; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.t-photo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; }
.section-head.center { text-align: center; }
.dawn .t-card { background: var(--dawn-card); border-color: var(--dawn-line); }
.dawn .t-card blockquote { color: var(--dawn-ink); }
.dawn .t-card figcaption { color: var(--dawn-muted); }

/* ---------- Media / image slots ---------- */

.art {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--deep);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 5;
}
.art img { width: 100%; height: 100%; object-fit: cover; }
.art .art-label {
  position: absolute;
  left: 18px;
  bottom: 16px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(var(--fg-rgb) / 0.6);
}

/* Lite YouTube facade */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(80% 90% at 70% 30%, rgb(var(--glow-a) / 0.45), transparent 70%),
    radial-gradient(60% 70% at 20% 80%, rgb(var(--glow-c) / 0.3), transparent 70%),
    var(--deep);
}
.video.portrait { aspect-ratio: 9 / 14; max-width: 420px; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: 0.75; transition: opacity 0.4s, transform 1.2s var(--ease); }
.video:hover img { opacity: 0.9; transform: scale(1.03); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
}
.video .play {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgb(var(--fg-rgb) / 0.12);
  border: 1px solid rgb(var(--fg-rgb) / 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.5s var(--ease), background 0.3s;
}
.video button:hover .play { transform: scale(1.08); background: rgb(var(--fg-rgb) / 0.22); }
.video .video-caption {
  position: absolute;
  left: 20px;
  bottom: 18px;
  right: 20px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(var(--fg-rgb) / 0.8);
  pointer-events: none;
}

/* ---------- Forms ---------- */

.signup {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 560px;
}
.signup input {
  flex: 1 1 180px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgb(var(--fg-rgb) / 0.04);
  color: var(--mist);
  font: inherit;
  font-size: 0.95rem;
}
.signup input::placeholder { color: var(--muted); }
.signup input:focus { outline: none; border-color: var(--lime); }
.signup .note { flex-basis: 100%; font-size: 0.82rem; color: var(--muted); margin: 4px 0 0 6px; }
.signup .note a { color: var(--mist); border-bottom: 1px solid var(--line-strong); }
/* live forms: hidden bot trap, and the error line */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-error { flex-basis: 100%; margin: 0; padding: 10px 14px; border-radius: 12px; background: rgb(var(--fg-rgb) / 0.06); color: var(--rose); font-size: 0.92rem; }
.signup button[disabled], .ya-form button[disabled] { opacity: .6; cursor: progress; }
.signup.sent input,
.signup.sent button { display: none; }

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  padding: clamp(48px, 8vw, 104px) clamp(24px, 6vw, 88px);
  border: 1px solid var(--line);
  background:
    radial-gradient(80% 120% at 100% 0%, rgb(var(--glow-a) / 0.35), transparent 60%),
    radial-gradient(70% 120% at 0% 100%, rgb(var(--accent-rgb) / 0.16), transparent 60%),
    linear-gradient(180deg, var(--deep), var(--night));
  isolation: isolate;
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -1 4 2'%3E%3Cpath d='M0 0 C .6 .75 1.6 .75 1.6 0 C 1.6 -.75 .6 -.75 0 0 C -.6 .75 -1.6 .75 -1.6 0 C -1.6 -.75 -.6 -.75 0 0Z' fill='none' stroke='white' stroke-opacity='.06' stroke-width='.02'/%3E%3C/svg%3E") center / 120% auto no-repeat;
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  padding: clamp(72px, 10vw, 120px) 0 40px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(900px 400px at 50% 0%, rgb(var(--glow-a) / 0.12), transparent 70%),
    var(--ink);
  font-size: 0.92rem;
}
.site-footer .spectrum-rule { position: absolute; top: -1px; left: 0; height: 1px; opacity: 0.6; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}
.footer-grid h4 {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--soft); transition: color 0.3s; }
.footer-grid a:hover { color: var(--mist); }
.footer-tagline {
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1.25;
  color: var(--mist);
  margin: 22px 0 26px;
  max-width: 14em;
}
.footer-bottom {
  margin-top: 72px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.82rem;
}
.motion-toggle {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgb(var(--fg-rgb) / 0.03);
}
.motion-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.motion-toggle button[aria-pressed="true"] { background: var(--mist); color: var(--ink); }
.motion-toggle .label { align-self: center; padding: 0 10px 0 8px; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal,
.fx-lite .reveal { opacity: 1; transform: none; transition: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ambient-fallback { animation: none; }
}

/* ---------- Infinity glyph (inline svg helper) ---------- */
.inf-glyph { width: 56px; height: auto; }
.inf-glyph path { fill: none; stroke: url(#ya-spectrum); stroke-width: 2.2; stroke-linecap: round; }

/* "The URL … does not exist" (site.js): shown on the home page after a missing address */
.nf-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgb(0 0 0 / 0.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.22s var(--ease); cursor: pointer; }
.nf-modal.nf-in { opacity: 1; }
.nf-modal.nf-out { opacity: 0; }
.nf-box { position: relative; width: min(520px, 100%); padding: 30px 30px 26px; border-radius: var(--radius); background: var(--night); color: var(--mist); border: 1px solid var(--line-strong); box-shadow: 0 30px 80px rgb(0 0 0 / 0.45); transform: translateY(10px) scale(0.98); transition: transform 0.3s var(--ease); }
.nf-in .nf-box { transform: none; }
.nf-eyebrow { margin: 0 0 8px; font: 700 0.74rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--lime); }
.nf-text { margin: 0; font-family: var(--serif); font-size: clamp(1.35rem, 3.6vw, 1.7rem); line-height: 1.3; }
.nf-text code { display: block; margin: 10px 0; padding: 8px 12px; border-radius: 10px; background: rgb(var(--fg-rgb) / 0.07); font: 500 0.92rem/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--soft); overflow-wrap: anywhere; }
.nf-hint { margin: 12px 0 0; color: var(--muted); font-size: 0.92rem; }
.nf-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--soft); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.nf-x:hover, .nf-x:focus-visible { color: var(--mist); border-color: var(--line-strong); background: rgb(var(--fg-rgb) / 0.06); }
@media (prefers-reduced-motion: reduce) { .nf-modal, .nf-box { transition: none; } }

/* ---------- Cookie notice (fx.js shows it until acknowledged) ---------- */
.ya-notice {
  position: fixed; z-index: 900;
  left: max(20px, env(safe-area-inset-left)); bottom: max(20px, env(safe-area-inset-bottom));
  width: min(430px, calc(100vw - 40px));
  padding: 22px 24px 20px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgb(var(--accent-rgb) / 0.10), transparent 55%), rgb(var(--bg-rgb) / 0.86);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 70px -28px rgb(0 0 0 / 0.55), inset 0 1px 0 rgb(255 255 255 / 0.06);
  color: var(--soft);
  opacity: 0; transform: translateY(18px) scale(0.98);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.ya-notice.show { opacity: 1; transform: none; }
.ya-notice[hidden] { display: none; }
.ya-notice-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ya-notice-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgb(var(--accent-rgb) / 0.16); color: var(--lime); }
.ya-notice-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.ya-notice-ic circle { fill: currentColor; stroke: none; }
.ya-notice-title { font-family: var(--serif); font-size: 1.32rem; line-height: 1.2; color: var(--mist); }
.ya-notice p { margin: 0 0 16px; font-size: 0.92rem; line-height: 1.6; }
.ya-notice-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ya-notice .btn { padding: 11px 22px; font-size: 0.92rem; }
.ya-notice .text-link { font-size: 0.88rem; }
@media (max-width: 560px) {
  .ya-notice { left: 12px; right: 12px; width: auto; bottom: max(12px, env(safe-area-inset-bottom)); padding: 18px 18px 16px; }
  .ya-notice-title { font-size: 1.18rem; }
  .ya-notice p { font-size: 0.88rem; margin-bottom: 14px; }
  .ya-notice .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .ya-notice { transition: opacity 0.2s linear; transform: none; } }
@media print { .ya-notice { display: none !important; } }

/* two equal choices (personal suggestions offered) */
.ya-notice.choice .ya-notice-actions { gap: 10px 12px; }
.ya-notice.choice .ya-notice-actions .text-link { margin-left: 6px; }
.ya-notice .btn[aria-pressed="true"]::after { content: " \2713"; }
@media (max-width: 560px) { .ya-notice.choice .btn { flex: 1 1 100%; padding: 10px 18px; } .ya-notice.choice .ya-notice-actions { gap: 8px; } .ya-notice.choice .ya-notice-actions .text-link { margin: 4px 0 0; } }

/* footer: privacy policy and "Cookie choices" */
.legal-links { display: inline-flex; flex-wrap: wrap; gap: 6px 18px; }
.legal-links a, .linkish { color: var(--muted); }
.legal-links a:hover, .linkish:hover { color: var(--mist); }
.linkish { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgb(var(--fg-rgb) / 0.25); }

/* ---------- Welcome-back suggestion (personal.js, only with consent) ---------- */
.ya-suggest {
  position: fixed; z-index: 890;
  right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  width: min(380px, calc(100vw - 40px));
  padding: 22px 24px 16px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgb(var(--accent-rgb) / 0.12), transparent 60%), rgb(var(--bg-rgb) / 0.88);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 70px -28px rgb(0 0 0 / 0.55), inset 0 1px 0 rgb(255 255 255 / 0.06);
  color: var(--soft);
  opacity: 0; transform: translateY(18px) scale(0.98);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.ya-suggest.show { opacity: 1; transform: none; }
.ya-suggest-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 1.35rem; line-height: 1; cursor: pointer; }
.ya-suggest-x:hover, .ya-suggest-x:focus-visible { color: var(--mist); background: rgb(var(--fg-rgb) / 0.07); }
.ya-suggest-eyebrow { margin: 0 0 6px; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--lime); }
.ya-suggest-title { margin: 0 32px 8px 0; font-family: var(--serif); font-size: 1.4rem; line-height: 1.2; color: var(--mist); font-weight: 400; }
.ya-suggest p { margin: 0 0 16px; font-size: 0.92rem; line-height: 1.6; }
.ya-suggest-clock { color: var(--mist); font-variant-numeric: tabular-nums; }
.ya-suggest-actions { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; }
.ya-suggest .btn { padding: 11px 22px; font-size: 0.92rem; }
.ya-suggest .text-link { font-size: 0.88rem; }
.ya-suggest .ya-suggest-foot { margin: 14px 0 0; font-size: 0.78rem; }
@media (max-width: 560px) {
  .ya-suggest { left: 12px; right: 12px; width: auto; bottom: max(12px, env(safe-area-inset-bottom)); padding: 18px 18px 14px; }
  .ya-suggest .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .ya-suggest { transition: opacity 0.2s linear; transform: none; } }
@media print { .ya-suggest { display: none !important; } }

/* ---------- Recommendations (course pages, thank-you page, learning area) ---------- */
.reco { margin-top: 28px; }
.reco-title { margin-bottom: 14px; }
.reco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.reco-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; }
.reco-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-bottom: 6px; }
.reco-card .eyebrow { font-size: 0.66rem; margin: 0; }
.reco-card .h3 { margin: 0; font-size: 1.25rem; }
.reco-card p.small { margin: 0; color: var(--soft); }
.reco-foot { margin: auto 0 0; padding-top: 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 0.92rem; }

/* a test copy of the site (preview, this computer): a small ribbon so it's never mistaken for the live site */
.env-ribbon { position: fixed; z-index: 9999; left: 12px; bottom: 12px; padding: 5px 12px; border-radius: 999px; background: #c2457a; color: #fff; font: 600 12px/1.4 system-ui, sans-serif; letter-spacing: .04em; pointer-events: none; box-shadow: 0 6px 18px -6px rgb(0 0 0 / .4); }

/* ---------- Site search: the menu's search button, its live suggestions, and search/ ---------- */
.nav-search { position: relative; }
.nav-search-btn svg { width: 18px; height: 18px; flex: none; }
@media (min-width: 1001px) {   /* wide screens: an icon button beside Visuals and Colors */
  .nav .nav-search-btn { display: inline-flex; align-items: center; padding: 10px 12px; border-radius: 999px; color: var(--soft); text-decoration: none; transition: color 0.3s, background 0.3s; }
  .nav .nav-search-btn:hover, .nav .nav-search-btn[aria-expanded="true"] { color: var(--mist); background: var(--veil); }
  .nav-search-btn .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 1000px) {   /* the phone menu: a menu item like the others ("Search"), the icon beside it */
  .nav .nav-search-btn { display: inline-flex; align-items: center; gap: 12px; }
  .nav .nav-search-btn svg { width: 0.7em; height: 0.7em; opacity: 0.6; }
}
.search-pop {
  position: absolute; top: calc(100% + 10px); right: 0; width: min(440px, 92vw); padding: 12px;
  border-radius: 18px; border: 1px solid var(--line-strong); background: var(--panel);
  box-shadow: 0 24px 60px -20px var(--shadow); z-index: 6;
  white-space: normal; text-align: left;   /* it sits inside the menu, which keeps its links on one line */
}
.search-pop[hidden] { display: none; }
.search-pop input {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: rgb(var(--bg-rgb) / 0.6); color: rgb(var(--fg-rgb)); font: inherit;
}
.search-pop input:focus { outline: 2px solid rgb(var(--accent-rgb) / 0.6); outline-offset: 1px; }
.search-pop ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; max-height: min(60vh, 460px); overflow-y: auto; overflow-x: hidden; }
.search-pop li a > span { min-width: 0; overflow-wrap: anywhere; }
.nav .search-pop a { white-space: normal; }
.search-pop li a { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; color: rgb(var(--fg-rgb)); text-decoration: none; }
.search-pop li a:hover, .search-pop li[aria-selected="true"] a { background: var(--veil); }
.search-pop img, .search-pop .search-pic { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.search-pop .search-title { display: block; font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.search-pop .search-label { display: block; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.search-pop .search-all { display: block; margin-top: 8px; padding: 8px; text-align: center; font-size: 0.9rem; }
.search-pop .search-note { margin: 10px 4px 2px; font-size: 0.9rem; color: var(--muted); }
.search-pic { display: grid; place-items: center; background: var(--veil); color: var(--muted); font-size: 1.2rem; }
.page-hero.search-hero { min-height: min(46vh, 420px); }
.search-hero .search-form { display: flex; gap: 10px; margin-top: 18px; max-width: 640px; flex-wrap: wrap; }
.search-hero .search-form input {
  flex: 1 1 260px; padding: 14px 18px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgb(var(--bg-rgb) / 0.7); color: rgb(var(--fg-rgb)); font: inherit; font-size: 1.05rem;
}
.search-hero .search-form input:focus { outline: 2px solid rgb(var(--accent-rgb) / 0.6); outline-offset: 2px; }
.search-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.search-kinds a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--soft); text-decoration: none; font-size: 0.9rem; }
.search-kinds a span { color: var(--muted); margin-left: 2px; }
.search-kinds a[aria-current="page"] { background: var(--veil); color: rgb(var(--fg-rgb)); border-color: rgb(var(--accent-rgb) / 0.5); }
.search-count { color: var(--muted); margin-bottom: 10px; }
.search-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; max-width: 860px; }
.search-hit a {
  display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: start; padding: 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: rgb(var(--bg-rgb) / 0.35); color: rgb(var(--fg-rgb)); text-decoration: none; transition: border-color 0.3s, background 0.3s;
}
.search-hit a:hover, .search-hit a:focus-visible { border-color: rgb(var(--accent-rgb) / 0.5); background: var(--veil); }
.search-hit img, .search-hit .search-pic { width: 96px; height: 72px; border-radius: 14px; object-fit: cover; }
.search-hit .search-label { display: block; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.search-hit .search-title { display: block; font-size: 1.15rem; font-weight: 600; margin: 2px 0 4px; }
.search-hit .search-snippet { display: block; color: var(--soft); font-size: 0.95rem; line-height: 1.55; }
.search-hit mark, .search-pop mark { background: rgb(var(--accent-rgb) / 0.22); color: inherit; border-radius: 3px; padding: 0 1px; }
@media (max-width: 560px) {
  .search-hit a { grid-template-columns: 64px 1fr; gap: 12px; }
  .search-hit img, .search-hit .search-pic { width: 64px; height: 64px; }
}

/* ---------- Site chat (chat.js; only on the page while the chat is on) ---------- */
.ya-chat { position: fixed; z-index: 880; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); font-family: var(--sans); }
.ya-chat-btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 20px 13px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgb(var(--accent-rgb) / 0.5); background: rgb(var(--bg-rgb) / 0.82); color: rgb(var(--fg-rgb));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -18px rgb(0 0 0 / 0.6); font: 600 0.95rem/1 var(--sans);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.ya-chat-btn:hover, .ya-chat-btn:focus-visible { transform: translateY(-2px); border-color: rgb(var(--accent-rgb) / 0.9); }
.ya-chat-btn svg { width: 21px; height: 21px; fill: none; stroke: var(--lime); stroke-width: 1.7; stroke-linejoin: round; }
/* the assistant's picture (chat settings): on the button, at the top, beside its answers */
.ya-chat-btn.has-face { padding: 7px 20px 7px 7px; }
.ya-chat-btn-face { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.ya-chat-face { position: relative; flex: none; width: 38px; height: 38px; }
.ya-chat-face-img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; display: block; }
.ya-chat-face .ya-chat-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; box-shadow: 0 0 0 2px rgb(var(--bg-rgb)); }
.ya-chat-who { display: flex; align-items: center; gap: 6px; }
.ya-chat-who-face { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.ya-chat.open { z-index: 950; }   /* above the cookie notice */
.ya-chat.open .ya-chat-btn { display: none; }
.ya-chat-panel {
  display: flex; flex-direction: column; width: min(390px, calc(100vw - 40px)); height: min(600px, calc(100vh - 40px)); height: min(600px, calc(100dvh - 40px));
  border-radius: var(--radius); border: 1px solid var(--line-strong); color: var(--soft);
  background: linear-gradient(var(--panel), var(--panel)), rgb(var(--bg-rgb));   /* opaque: the page never shows through */
  box-shadow: 0 30px 80px -24px var(--shadow); overflow: hidden;
}
.ya-chat-panel[hidden] { display: none; }
.ya-chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.ya-chat-head h2 { flex: 1; margin: 0; font: 600 1.02rem/1.2 var(--sans); color: rgb(var(--fg-rgb)); }
.ya-chat-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / 0.18); }
.ya-chat-restart { background: none; border: 0; color: var(--muted); font: 500 0.8rem/1 var(--sans); cursor: pointer; padding: 6px; }
.ya-chat-restart:hover, .ya-chat-restart:focus-visible { color: rgb(var(--fg-rgb)); }
.ya-chat-x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--soft); font-size: 1.35rem; line-height: 1; cursor: pointer; }
.ya-chat-x:hover, .ya-chat-x:focus-visible { color: rgb(var(--fg-rgb)); border-color: var(--line-strong); }
.ya-chat-log { flex: 1; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.ya-chat-line { max-width: 88%; }
.ya-chat-line p { margin: 0; padding: 10px 14px; border-radius: 16px; font-size: 0.93rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.ya-chat-line.bot p, .ya-chat-line.staff p { background: rgb(var(--fg-rgb) / 0.07); color: rgb(var(--fg-rgb) / 0.92); border-bottom-left-radius: 6px; }
.ya-chat-line.visitor { align-self: flex-end; }
.ya-chat-line.visitor p { background: rgb(var(--accent-rgb) / 0.2); color: rgb(var(--fg-rgb)); border-bottom-right-radius: 6px; }
.ya-chat-line.system { align-self: center; max-width: 100%; }
.ya-chat-line.system p { padding: 4px 10px; font-size: 0.82rem; color: var(--muted); text-align: center; background: none; }
.ya-chat-who { display: block; margin: 0 0 4px 4px; font-size: 0.74rem; color: var(--muted); letter-spacing: 0.02em; }
.ya-chat-links { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ya-chat-links a {
  display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1px solid rgb(var(--accent-rgb) / 0.45);
  color: rgb(var(--fg-rgb)); font-size: 0.86rem; text-decoration: none; line-height: 1.3;
}
.ya-chat-links a:hover, .ya-chat-links a:focus-visible { background: rgb(var(--accent-rgb) / 0.16); }
.ya-chat-typing p { display: inline-flex; gap: 4px; }
.ya-chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: ya-chat-dot 1.2s infinite ease-in-out; }
.ya-chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.ya-chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ya-chat-dot { 0%, 80%, 100% { opacity: 0.3; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
.ya-chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 6px; border-top: 1px solid var(--line); }
.ya-chat-form[hidden] { display: none; }
.ya-chat-form textarea {
  flex: 1; resize: none; max-height: 120px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: rgb(var(--bg-rgb) / 0.6); color: rgb(var(--fg-rgb)); font: 0.95rem/1.45 var(--sans);
}
.ya-chat-form textarea:focus, .ya-chat-leave input:focus, .ya-chat-leave textarea:focus { outline: 2px solid rgb(var(--accent-rgb) / 0.6); outline-offset: 1px; }
.ya-chat-send { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--lime); cursor: pointer; display: grid; place-items: center; }
.ya-chat-send svg { width: 19px; height: 19px; fill: var(--on-accent); }
.ya-chat-leave { padding: 12px 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; overflow-y: auto; flex: none; max-height: 62%; }
.ya-chat-leave[hidden] { display: none; }
.ya-chat-leave-intro { margin: 0; font-size: 0.88rem; line-height: 1.5; }
.ya-chat-leave label { display: grid; gap: 4px; font-size: 0.84rem; color: var(--soft); }
.ya-chat-leave .ya-chat-lbl span { color: var(--muted); }
.ya-chat-leave input, .ya-chat-leave textarea {
  width: 100%; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: rgb(var(--bg-rgb) / 0.6); color: rgb(var(--fg-rgb)); font: 0.93rem/1.4 var(--sans);
}
.ya-chat-leave [aria-invalid="true"] { border-color: var(--r1); }
.ya-chat-err { margin: -4px 0 0; font-size: 0.84rem; color: var(--rose); }
.ya-chat-err[hidden] { display: none; }
.ya-chat-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ya-chat-leave-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ya-chat-leave-actions .btn { padding: 10px 20px; font-size: 0.9rem; }
.ya-chat-leave-cancel { color: var(--soft); font-size: 0.86rem; }
.ya-chat-foot { margin: 0; padding: 4px 16px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 0.78rem; color: var(--muted); }
.ya-chat-leave-open { color: var(--soft); font-size: 0.84rem; align-self: flex-start; }
.ya-chat-panel.leaving .ya-chat-leave-open { display: none; }
.ya-chat-note a { color: inherit; }
@media (max-width: 560px) {
  .ya-chat { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .ya-chat-btn-label { display: none; }
  .ya-chat-btn { padding: 14px; }
  .ya-chat-btn.has-face { padding: 5px; }
  .ya-chat-btn.has-face .ya-chat-btn-face { width: 46px; height: 46px; }
  .ya-chat.open { left: 0; right: 0; top: 0; bottom: 0; }
  .ya-chat-panel { width: 100%; height: 100%; border-radius: 0; border: 0; }
  .ya-notice.show ~ .ya-chat:not(.open) { display: none; }   /* the cookie notice comes first on phones */
}
@media (prefers-reduced-motion: reduce) { .ya-chat-btn { transition: none; } .ya-chat-typing span { animation: none; } }

/* ---------- Promotion pages (lib/promopage.php): coming soon, the sign-up box, ended ---------- */
.promo-veil {
  position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--line);
  aspect-ratio: 16 / 7; min-height: 220px; background: var(--deep); margin-bottom: 28px;
}
.promo-blur { position: absolute; inset: 0; }
.promo-blur img, .promo-blur-fill {
  display: block; width: 100%; height: 100%; object-fit: cover;
  filter: blur(22px) saturate(1.1); transform: scale(1.15);
}
.promo-blur-fill { background: radial-gradient(circle at 30% 40%, rgb(var(--glow-a) / .7), transparent 60%), radial-gradient(circle at 70% 60%, rgb(var(--glow-c) / .7), transparent 60%), var(--deep); }
.promo-veil::after { content: ""; position: absolute; inset: 0; background: rgb(var(--bg-rgb) / .28); }
.promo-veil-text {
  position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; text-align: center; padding: 24px;
}
.promo-soon-tag {
  margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1;
  color: var(--mist); text-shadow: 0 2px 24px rgb(var(--bg-rgb) / .6);
}
.promo-soon-when { margin: 12px 0 0; font-weight: 600; letter-spacing: .04em; color: var(--mist); text-shadow: 0 1px 12px rgb(var(--bg-rgb) / .7); }
.promo-box {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px 40px; align-items: center;
  padding: clamp(22px, 4vw, 36px); border-radius: 22px; border: 1px solid var(--line-strong); background: var(--veil);
}
.promo-box h2 { margin: 0 0 8px; }
.promo-box p { margin: 0; color: var(--soft); }
.promo-box .signup { margin: 0; }
.promo-ended .btn-row { margin-top: 20px; }
@media (max-width: 760px) {
  .promo-box { grid-template-columns: 1fr; }
  .promo-veil { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-transparency: reduce) { .promo-blur img { filter: blur(30px); } }
