/* ==========================================================================
   Astragal — design system
   Palette A-5 Sage Garden · type B-2 Unbounded + Manrope · direction C-4 Bento
   Grid · edges E2-3 Pill & feather · header E1-2 Floating pill · gate D-2 Glass
   Garden · accent strategy 2 (tinted section backgrounds).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  --bg: #F5F7F2;
  --surface: #FDFEFC;
  --surface-2: #EDF1E7;
  --text: #232B1F;
  --muted: #5C6754;
  --accent: #5A7350;
  --accent-2: #A8BF9B;
  --on-accent: #FFFFFF;
  --line: rgba(35, 43, 31, .10);
  --line-strong: rgba(35, 43, 31, .18);

  /* The gate paints a gradient. A gradient element reports rgba(0,0,0,0) to
     getComputedStyle, so gate ink needs its own token defined in BOTH themes —
     borrowing --on-accent here puts near-black text on a dark wash. */
  --gate-wash: linear-gradient(135deg, #F0F4EA, #E1EAD6 50%, #D2E0C4);
  --gate-glass: rgba(255, 255, 255, .58);
  --gate-glass-line: rgba(255, 255, 255, .72);
  --on-gate: #1E2519;
  --on-gate-muted: #46523E;
  --gate-blob-1: rgba(90, 115, 80, .38);
  --gate-blob-2: rgba(168, 191, 155, .55);
  --gate-blob-3: rgba(120, 150, 108, .30);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --r-card: 20px;
  --r-tile: 22px;
  --r-btn: 999px;
  --r-chip: 999px;
  --sh-feather: 0 2px 12px rgba(35, 43, 31, .05);
  --sh-lift: 0 6px 22px rgba(35, 43, 31, .09);

  --column: 44rem;
  --shell: 1140px;
  --head-h: 66px;
  --border: 1px;

  --f-head: 'Unbounded', 'Trebuchet MS', system-ui, sans-serif;
  --f-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --t-xs: .8125rem;
  --t-sm: .9375rem;
  --t-md: 1.0625rem;
  --t-lg: clamp(1.2rem, .9rem + .9vw, 1.45rem);
  --t-xl: clamp(1.5rem, 1.05rem + 1.7vw, 2.1rem);
  --t-2xl: clamp(2rem, 1.3rem + 3vw, 3.2rem);
}

:root[data-theme="dark"] {
  --bg: #151A12;
  --surface: #1D2419;
  --surface-2: #222A1D;
  --text: #E8EDE3;
  --muted: #A8B59D;
  --accent: #8FA983;
  --accent-2: #5F7A54;
  --on-accent: #131810;
  --line: rgba(232, 237, 227, .12);
  --line-strong: rgba(232, 237, 227, .22);

  --gate-wash: linear-gradient(135deg, #1B2317, #212B1B 50%, #27321F);
  --gate-glass: rgba(28, 36, 24, .55);
  --gate-glass-line: rgba(232, 237, 227, .14);
  --on-gate: #ECF1E6;
  --on-gate-muted: #B3C0A8;
  --gate-blob-1: rgba(143, 169, 131, .26);
  --gate-blob-2: rgba(95, 122, 84, .38);
  --gate-blob-3: rgba(120, 150, 108, .22);

  --sh-feather: 0 2px 12px rgba(0, 0, 0, .34);
  --sh-lift: 0 6px 22px rgba(0, 0, 0, .42);
}

/* --------------------------------------------------------------------------
   2. Page frame
   -------------------------------------------------------------------------- */

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: var(--t-md);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  /* The fixed header is out of flow, so body reserves its FULL height: the
     pill, the strip of padding around it top and bottom, and the hairline.
     Reserving only --head-h leaves a few px of content under the bar. */
  padding-block-start: calc(var(--head-h) + (var(--space-3) * 2) + var(--border) + var(--space-4));
}

h1, h2, h3 {
  font-family: var(--f-head);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.015em;
}

.agl-main { display: block; }

.agl-skip {
  position: fixed;
  inset-block-start: var(--space-2);
  inset-inline-start: var(--space-2);
  z-index: 60;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--r-btn);
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  transform: translateY(-200%);
}
.agl-skip:focus-visible { transform: translateY(0); }

/* --------------------------------------------------------------------------
   3. Header — E1-2 floating pill
   -------------------------------------------------------------------------- */

.agl-head {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 40;
  padding: var(--space-3) clamp(var(--space-4), 4vw, var(--space-6));
  /* the strip around the floating card is painted, not transparent — an unpainted
     inset lets the article scroll through it and the bar reads as torn off */
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  border-block-end: var(--border) solid transparent;
  transition: border-color .2s ease, background-color .2s ease;
}
.agl-head.is-stuck { border-block-end-color: var(--line); }

@supports not (backdrop-filter: blur(2px)) {
  .agl-head { background: var(--bg); }
}

.agl-head__pill {
  max-width: var(--shell);
  margin-inline: auto;
  min-height: var(--head-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  border-radius: var(--r-btn);
  background: var(--surface);
  border: var(--border) solid var(--line);
  box-shadow: var(--sh-feather);
}

.agl-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  text-decoration: none;
  color: var(--text);
}
.agl-brand__mark { width: 30px; height: 30px; flex: 0 0 auto; color: var(--text); }
.agl-brand__mark .agl-mark__ring { color: var(--text); }
.agl-brand__mark .agl-mark__dot { color: var(--accent); }
.agl-brand__word {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(.86rem, .62rem + .8vw, 1.06rem);
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.agl-head__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 0 0 auto;
}

/* Icon-only buttons are fixed size and grid-centred: a shrink-to-fit flex
   button whose only child is an <svg> collapses to 0 width on iOS Safari. */
.agl-icobtn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: var(--border) solid var(--line);
  border-radius: var(--r-btn);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease;
}
.agl-icobtn:hover { background: var(--accent-2); border-color: var(--line-strong); }
.agl-icobtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* theme toggle: both icons share one grid cell and cross-fade, otherwise they
   stack and render on top of each other */
.agl-theme__slot { display: grid; width: 20px; height: 20px; }
.agl-theme__slot > svg { grid-area: 1 / 1; transition: opacity .22s ease, transform .32s ease; }
.agl-theme__moon { opacity: 0; transform: rotate(-42deg) scale(.7); }
:root[data-theme="dark"] .agl-theme__sun { opacity: 0; transform: rotate(42deg) scale(.7); }
:root[data-theme="dark"] .agl-theme__moon { opacity: 1; transform: none; }

.agl-burger__bars { display: grid; gap: 4px; width: 18px; }
.agl-burger__bars i { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform .24s ease, opacity .18s ease; }
.agl-burger[aria-expanded="true"] .agl-burger__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.agl-burger[aria-expanded="true"] .agl-burger__bars i:nth-child(2) { opacity: 0; }
.agl-burger[aria-expanded="true"] .agl-burger__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   4. Language controls — exactly ONE on screen at any width
   -------------------------------------------------------------------------- */

.agl-lang { position: relative; }

.agl-lang__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 44px;
  padding-inline: var(--space-4);
  border: var(--border) solid var(--line);
  border-radius: var(--r-btn);
  background: var(--surface-2);
  font-size: var(--t-sm);
  font-weight: 600;
  cursor: pointer;
}
.agl-lang__chev { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.agl-lang__btn[aria-expanded="true"] .agl-lang__chev { transform: rotate(180deg); }

.agl-lang__pop {
  position: absolute;
  inset-block-start: calc(100% + var(--space-2));
  inset-inline-end: 0;
  min-width: 214px;
  padding: var(--space-2);
  border-radius: var(--r-card);
  background: var(--surface);
  border: var(--border) solid var(--line);
  box-shadow: var(--sh-lift);
}
.agl-lang__pop[hidden] { display: none; }

.agl-lang__list { list-style: none; margin-block: 0; padding: 0; display: grid; gap: 2px; }
.agl-lang__list li a,
.agl-lang__shortcode a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--r-chip);
  font-size: var(--t-sm);
  text-decoration: none;
  color: var(--text);
}
.agl-lang__list li a:hover,
.agl-lang__shortcode a:hover { background: var(--surface-2); }
.agl-lang__list img,
.agl-lang__shortcode img { width: 18px; height: auto; border-radius: 3px; }
.agl-lang__shortcode .trp-language-switcher-container { display: grid; gap: 2px; }

/* Scoped: a bare `.agl-lang { display:none }` would take the in-sheet copy
   down with it and the burger menu would open with no languages in it. */
@media (max-width: 899px) {
  .agl-head__actions .agl-lang { display: none; }
}
/* the other half of the pair — without it desktop shows both controls */
@media (min-width: 900px) {
  .agl-burger { display: none; }
}

/* TranslatePress ships a floating switcher, on by default, which paints a
   second picker in a page corner. The theme supplies its own. */
#trp-floater-ls,
.trp-floater,
#trp-floater-ls-current-language,
.trp-floater-ls-disabled-language { display: none !important; }

/* --------------------------------------------------------------------------
   5. Sheet + scrim
   z-order: dock 30 · cookie 35 · header 40 · scrim 50 · sheet 51 · skip 60
   -------------------------------------------------------------------------- */

.agl-scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(20, 26, 17, .46);
  opacity: 0;
  transition: opacity .24s ease;
}
.agl-scrim[hidden] { display: none; }
.agl-scrim.is-open { opacity: 1; }

.agl-sheet {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  z-index: 51;
  width: min(88vw, 340px);
  padding: var(--space-5) var(--space-5) calc(var(--space-6) + env(safe-area-inset-bottom));
  background: var(--surface);
  border-inline-start: var(--border) solid var(--line);
  box-shadow: var(--sh-lift);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.32, .72, .32, 1);
  overflow-y: auto;
}
.agl-sheet.is-open { transform: translateX(0); }
.agl-sheet[aria-hidden="true"] { visibility: hidden; }
.agl-sheet.is-open[aria-hidden="false"] { visibility: visible; }

.agl-sheet__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-block-end: var(--space-4); }
.agl-sheet__title { font-family: var(--f-head); font-weight: 700; font-size: var(--t-sm); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.agl-sheet__links { list-style: none; margin-block: var(--space-5) 0; padding: 0; display: grid; gap: var(--space-1); border-block-start: var(--border) solid var(--line); padding-block-start: var(--space-4); }
.agl-sheet__links a { display: flex; align-items: center; min-height: 44px; font-size: var(--t-sm); color: var(--muted); text-decoration: none; }
.agl-sheet__links a:hover { color: var(--text); }

/* --------------------------------------------------------------------------
   6. Reading column
   Zero specificity, so every component rule below can still override it.
   Only the gate is exempt — it is a full card with its own wider max-width.
   -------------------------------------------------------------------------- */

.agl-entry {
  padding-inline: clamp(var(--space-4), 4vw, var(--space-6));
  padding-block-end: var(--space-8);
}

.agl-entry > :where(*:not(.agl-gate)) {
  max-width: var(--column);
  margin-inline: auto;
}

.agl-entry > :where(h1, h2, p, ul, ol, figure, blockquote, div) { margin-block: 0 var(--space-5); }
.agl-entry > :where(h2) { margin-block: var(--space-8) var(--space-4); }
.agl-entry > :where(figure, div) { margin-block: var(--space-7); }

.agl-h1 {
  font-size: var(--t-2xl);
  margin-block: var(--space-6) var(--space-5);
  scroll-margin-top: calc(var(--head-h) + var(--space-6));
}
.agl-entry h2 { font-size: var(--t-xl); scroll-margin-top: calc(var(--head-h) + var(--space-6)); }
.agl-entry h3 { font-family: var(--f-head); font-size: var(--t-md); letter-spacing: -.01em; }

.agl-lede { font-size: var(--t-lg); line-height: 1.55; color: var(--text); }

.agl-entry p { color: var(--text); }
.agl-entry strong { font-weight: 700; }

/* Gutenberg lists carry .wp-block-list, so a ul:not([class]) rule never sees
   them and the ul[class] padding reset leaves them without markers. */
.agl-entry .wp-block-list {
  list-style: disc;
  padding-inline-start: 1.35em;
  display: grid;
  gap: var(--space-4);
}
.agl-entry .wp-block-list li { padding-inline-start: var(--space-1); }
.agl-entry .wp-block-list li::marker { color: var(--accent); }

.agl-entry a:not([class]) {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.agl-entry--plain { padding-block: var(--space-7) var(--space-8); display: grid; gap: var(--space-5); }
.agl-entry--plain > * { max-width: var(--column); margin-inline: auto; width: 100%; }

/* --------------------------------------------------------------------------
   7. Age gate — D-2 Glass Garden, content centred
   -------------------------------------------------------------------------- */

.agl-gate {
  position: relative;
  isolation: isolate;
  max-width: min(960px, 100%);
  margin-inline: auto;
  margin-block: var(--space-4) var(--space-7);
  padding: clamp(var(--space-6), 6vw, var(--space-8)) clamp(var(--space-4), 5vw, var(--space-7));
  border-radius: 28px;
  overflow: hidden;
  background: var(--gate-wash);
  border: var(--border) solid var(--line);
  scroll-margin-top: calc(var(--head-h) + var(--space-6));
}

.agl-gate__wash { position: absolute; inset: -18%; z-index: 0; }
.agl-gate__wash i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(58px);
  will-change: transform;
}
.agl-gate__wash i:nth-child(1) { width: 44%; height: 62%; left: 4%;  top: 6%;  background: var(--gate-blob-1); animation: agl-drift-a 23s ease-in-out infinite; }
.agl-gate__wash i:nth-child(2) { width: 38%; height: 58%; right: 6%; top: 14%; background: var(--gate-blob-2); animation: agl-drift-b 19s ease-in-out infinite; }
.agl-gate__wash i:nth-child(3) { width: 34%; height: 48%; left: 38%; bottom: 2%; background: var(--gate-blob-3); animation: agl-drift-c 26s ease-in-out infinite; }

@keyframes agl-drift-a { 0%, 100% { transform: none; } 50% { transform: translate3d(7%, 5%, 0) scale(1.07); } }
@keyframes agl-drift-b { 0%, 100% { transform: none; } 50% { transform: translate3d(-6%, 7%, 0) scale(1.05); } }
@keyframes agl-drift-c { 0%, 100% { transform: none; } 50% { transform: translate3d(4%, -6%, 0) scale(1.08); } }

.agl-gate__glass {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin-inline: auto;
  text-align: center;
  padding: clamp(var(--space-5), 4vw, var(--space-7));
  border-radius: var(--r-tile);
  background: var(--gate-glass);
  border: var(--border) solid var(--gate-glass-line);
  backdrop-filter: blur(22px) saturate(150%);
  color: var(--on-gate);
}
@supports not (backdrop-filter: blur(2px)) {
  :root .agl-gate__glass { background: color-mix(in srgb, var(--surface) 88%, transparent); }
}

.agl-gate__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-block-end: var(--space-4);
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1);
  border-radius: var(--r-chip);
  background: color-mix(in srgb, var(--on-gate) 8%, transparent);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--on-gate-muted);
}
.agl-gate__badge span {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 26px;
  border-radius: var(--r-chip);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--f-head);
  font-weight: 700;
  letter-spacing: 0;
}

.agl-gate__q {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(1.28rem, .95rem + 1.5vw, 1.95rem);
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--on-gate);
}
.agl-gate__sub { margin-block: var(--space-4) var(--space-6); color: var(--on-gate-muted); font-size: var(--t-sm); }
.agl-gate__note { margin-block-start: var(--space-4); color: var(--on-gate-muted); font-size: var(--t-xs); }

.agl-gate__go,
.agl-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding-inline: var(--space-7);
  border-radius: var(--r-btn);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--f-head);
  font-weight: 700;
  font-size: var(--t-sm);
  letter-spacing: -.01em;
  text-decoration: none;
  overflow: hidden;
  box-shadow: var(--sh-feather);
  transition: transform .2s ease, box-shadow .2s ease;
}
.agl-gate__go span,
.agl-btn span { position: relative; z-index: 1; }
/* gate variant 4: a fill sweeps in from the leading edge on hover */
.agl-gate__go::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: color-mix(in srgb, var(--accent) 68%, var(--text));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .34s cubic-bezier(.32, .72, .32, 1);
}
.agl-gate__go:hover::after,
.agl-gate__go:focus-visible::after { transform: scaleX(1); }
.agl-gate__go:hover,
.agl-btn:hover { transform: translateY(-1px); box-shadow: var(--sh-lift); }

/* Zero-specificity floor, so the primary control can never render as a bare
   link if the class is lost — and, being :where(), it cannot repaint the
   button either. */
:where(a[href="/chat.html"]) {
  color: var(--on-accent);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   8. Illustration — H-10 signal waves
   -------------------------------------------------------------------------- */

.agl-illus {
  margin-inline: auto;
  margin-block: var(--space-7);
  max-width: var(--column);
}
.agl-illus__svg {
  width: 100%;
  /* scoped, not a global svg rule: a bare svg{max-width} collapses
     icon-only flex buttons to zero width on iOS Safari */
  max-width: 100%;
  height: auto;
  border-radius: var(--r-tile);
  overflow: hidden;
}

/* :where() floor first, so nothing can fall back to the SVG default black,
   then the per-shape rules paint on top. */
:where(.agl-illus__svg) * { fill: none; stroke: var(--accent); }

.agl-illus__bg { fill: var(--surface-2); stroke: var(--line); stroke-width: 1; }
.agl-illus__ring circle { fill: none; stroke: var(--line-strong); stroke-width: 1.4; }
.agl-illus__arc path { fill: none; stroke: var(--accent-2); stroke-width: 3.4; stroke-linecap: round; }
.agl-illus__core { fill: var(--accent); stroke: none; }
.agl-illus__pulse { fill: none; stroke: var(--accent); stroke-width: 2; opacity: .55; }
.agl-illus__node rect { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.4; }
.agl-illus__glyph circle { fill: var(--accent-2); stroke: none; }
.agl-illus__glyph path { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; }
.agl-illus__tick path { fill: none; stroke: var(--line-strong); stroke-width: 3; stroke-linecap: round; }

@media (prefers-reduced-motion: no-preference) {
  .agl-illus__pulse { animation: agl-pulse 4.6s ease-in-out infinite; transform-origin: 196px 214px; }
}
@keyframes agl-pulse {
  0%, 100% { transform: scale(1); opacity: .55; }
  55% { transform: scale(1.22); opacity: .16; }
}

/* --------------------------------------------------------------------------
   9. Bento blocks — features, comparison, quote, chips
   accent strategy 2: tinted panels rather than coloured type
   -------------------------------------------------------------------------- */

.agl-feat {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: var(--space-3);
  margin-inline: auto;
  margin-block: var(--space-6);
  max-width: var(--column);
}
.agl-feat__card {
  padding: var(--space-5);
  border-radius: var(--r-tile);
  background: var(--surface);
  border: var(--border) solid var(--line);
  box-shadow: var(--sh-feather);
  transition: transform .2s ease, box-shadow .2s ease;
}
.agl-feat__card:nth-child(2n) { background: var(--surface-2); }
.agl-feat__card:hover { transform: translateY(-2px); box-shadow: var(--sh-lift); }
.agl-feat__icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-block-end: var(--space-4);
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent-2) 46%, transparent);
  color: var(--accent);
}
.agl-feat__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.agl-feat__card h3 { margin-block-end: var(--space-2); }
.agl-feat__card p { font-size: var(--t-sm); color: var(--muted); }

.agl-cmp {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: var(--space-3);
  margin-inline: auto;
  margin-block: var(--space-6);
  max-width: var(--column);
}
.agl-cmp__card {
  padding: var(--space-5);
  border-radius: var(--r-tile);
  border: var(--border) solid var(--line);
}
.agl-cmp__card--a { background: color-mix(in srgb, var(--accent-2) 30%, var(--surface)); }
.agl-cmp__card--b { background: var(--surface); }
.agl-cmp__card h3 {
  margin-block-end: var(--space-4);
  padding-block-end: var(--space-3);
  border-block-end: var(--border) solid var(--line-strong);
}
.agl-cmp__card dl { display: grid; gap: var(--space-1); }
.agl-cmp__card dt {
  font-size: var(--t-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  margin-block-start: var(--space-3);
}
.agl-cmp__card dd { margin-inline: 0; font-size: var(--t-sm); }

.agl-pull {
  margin-inline: auto;
  margin-block: var(--space-7);
  max-width: var(--column);
  padding: var(--space-6) var(--space-5) var(--space-6) clamp(var(--space-6), 8vw, var(--space-8));
  border-radius: var(--r-tile);
  background: var(--surface-2);
  border: var(--border) solid var(--line);
  position: relative;
}
.agl-pull::before {
  content: "\201C";
  position: absolute;
  inset-block-start: -.1em;
  inset-inline-start: .18em;
  font-family: var(--f-head);
  font-size: 4.4rem;
  line-height: 1;
  color: var(--accent-2);
}
.agl-pull p {
  font-family: var(--f-head);
  font-weight: 500;
  font-size: var(--t-lg);
  line-height: 1.36;
  letter-spacing: -.015em;
}

/* F-5 marquee: a centred box the width of the reading column, scrolling
   INSIDE itself. Never a full-bleed row while the text sits in a column. */
.agl-mq {
  margin-inline: auto;
  margin-block: var(--space-6);
  max-width: var(--column);
  overflow: hidden;
  padding-block: var(--space-2);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.agl-mq__track { display: flex; gap: var(--space-3); width: max-content; }
.agl-mq__chip {
  flex: 0 0 auto;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--r-chip);
  background: var(--surface);
  border: var(--border) solid var(--line);
  font-size: var(--t-sm);
  color: var(--muted);
  white-space: nowrap;
}
@media (prefers-reduced-motion: no-preference) {
  .agl-mq__track { animation: agl-slide 34s linear infinite; }
  .agl-mq:hover .agl-mq__track { animation-play-state: paused; }
}
@keyframes agl-slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   10. Sticky mobile CTA, cookie notice, footer
   -------------------------------------------------------------------------- */

.agl-dock {
  position: fixed;
  z-index: 30;
  inset-inline: var(--space-4);
  inset-block-end: calc(var(--space-4) + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 54px;
  border-radius: var(--r-btn);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--f-head);
  font-weight: 700;
  font-size: var(--t-sm);
  text-decoration: none;
  box-shadow: var(--sh-lift);
  opacity: 0;
  transform: translateY(140%);
  transition: opacity .24s ease, transform .28s cubic-bezier(.32, .72, .32, 1);
}
.agl-dock[hidden] { display: none; }
.agl-dock.is-up { opacity: 1; transform: translateY(0); }
.agl-dock__age {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 26px;
  border-radius: var(--r-chip);
  background: color-mix(in srgb, var(--on-accent) 22%, transparent);
  font-size: var(--t-xs);
}
@media (min-width: 900px) { .agl-dock { display: none; } }
/* while the sheet is open the dock and the cookie card stand down */
body.agl-locked .agl-dock,
body.agl-locked .agl-cookie { opacity: 0; pointer-events: none; }

.agl-cookie {
  position: fixed;
  z-index: 35;
  inset-inline-end: var(--space-4);
  inset-block-end: calc(var(--space-4) + env(safe-area-inset-bottom));
  inset-inline-start: auto;
  max-width: min(420px, calc(100vw - var(--space-6)));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--r-card);
  background: var(--surface);
  border: var(--border) solid var(--line-strong);
  box-shadow: var(--sh-lift);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .3s ease, transform .3s ease;
}
.agl-cookie[hidden] { display: none; }
.agl-cookie.is-up { opacity: 1; transform: none; }
/* laid out but not yet raised — it is measured in this state, so it must not
   catch a tap meant for whatever is underneath it */
.agl-cookie:not(.is-up) { pointer-events: none; }
.agl-cookie__text { font-size: var(--t-xs); color: var(--muted); flex: 1 1 220px; line-height: 1.55; }
.agl-cookie__text a { color: var(--accent); }
.agl-cookie__ok {
  min-height: 44px;
  padding-inline: var(--space-5);
  border: 0;
  border-radius: var(--r-btn);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--f-head);
  font-weight: 700;
  font-size: var(--t-xs);
  cursor: pointer;
}
/* On a phone the notice must clear the dock, and it must never cover the
   age-gate button. Keeping it to one compact row buys most of the headroom;
   main.js does the rest by measuring before it raises the card. */
@media (max-width: 899px) {
  .agl-cookie {
    inset-inline: var(--space-4);
    inset-block-end: calc(var(--space-8) + var(--space-5) + env(safe-area-inset-bottom));
    max-width: none;
    flex-wrap: nowrap;
    gap: var(--space-3);
    padding: var(--space-4);
  }
  .agl-cookie__text { flex: 1 1 auto; font-size: .75rem; line-height: 1.45; }
  .agl-cookie__ok { flex: 0 0 auto; padding-inline: var(--space-4); }
}

.agl-foot {
  margin-block-start: var(--space-8);
  padding-block: var(--space-7) calc(var(--space-8) + env(safe-area-inset-bottom));
  padding-inline: clamp(var(--space-4), 4vw, var(--space-6));
  background: var(--surface-2);
  border-block-start: var(--border) solid var(--line);
}
.agl-foot__inner { max-width: var(--shell); margin-inline: auto; display: grid; gap: var(--space-4); justify-items: center; text-align: center; }
.agl-foot__copy { font-family: var(--f-head); font-weight: 500; font-size: var(--t-sm); }
.agl-foot__menu { list-style: none; margin-block: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-5); }
.agl-foot__menu a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t-sm); color: var(--muted); text-decoration: none; }
.agl-foot__menu a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.agl-foot__age { font-size: var(--t-xs); color: var(--muted); }

.agl-404__num { font-family: var(--f-head); font-weight: 700; font-size: clamp(4rem, 2rem + 16vw, 9rem); line-height: .9; color: var(--accent-2); }

/* --------------------------------------------------------------------------
   11. Reveal — Bank O-3 family: scroll-driven CSS first, IO only as fallback.
   Deliberately TRANSFORM-ONLY. Nothing here can make content invisible, so a
   timeline or a callback that never fires costs the animation, never the page.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .agl-entry > h2,
    .agl-entry > figure,
    .agl-entry > div,
    .agl-entry > blockquote {
      animation: agl-rise linear both;
      animation-timeline: view();
      animation-range: entry 4% cover 20%;
    }
  }
  @supports not (animation-timeline: view()) {
    .agl-entry > .agl-armed { transform: translateY(14px); transition: transform .5s cubic-bezier(.22, .68, .3, 1); }
    .agl-entry > .agl-armed.is-in { transform: none; }
  }
}
@keyframes agl-rise { from { transform: translateY(16px); } to { transform: none; } }

/* --------------------------------------------------------------------------
   12. Admin bar, motion, breakpoints
   -------------------------------------------------------------------------- */

/* WordPress fixes #wpadminbar only above 783px; at =<782px it goes
   position:absolute and scrolls away, so offsetting there hangs the header
   46px below the viewport top for the rest of the page. */
@media (min-width: 783px) {
  body.admin-bar .agl-head { inset-block-start: 32px; }
  body.admin-bar .agl-sheet { inset-block-start: 32px; }
}
@media (max-width: 782px) {
  body.admin-bar .agl-head { inset-block-start: 0; }
  body.admin-bar .agl-sheet { inset-block-start: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .agl-gate__wash i { animation: none; }
}

@media (min-width: 768px) {
  .agl-entry { padding-inline: clamp(var(--space-6), 5vw, var(--space-8)); }
}
@media (max-width: 400px) {
  /* the brand absorbs the squeeze, never the tap targets: 44px is the floor */
  .agl-brand__word { font-size: .74rem; }
  .agl-head__pill { padding-inline: var(--space-3) var(--space-1); gap: var(--space-2); }
}
