/* ============================================================
   base.css: reset, the room frame, the atmosphere, the house
   lights, type, focus, buttons and the reveal. Every room builds
   on this file.
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--velvet);
  color-scheme: dark;
  scrollbar-color: var(--velvet-600) transparent;
  transition: background-color var(--dur-lights) var(--ease-grace);
}
html[data-field="light"] {
  background: var(--ivory);
  color-scheme: light;
  scrollbar-color: rgba(53, 25, 30, 0.28) transparent;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-text);
  font-size: var(--t-body);
  line-height: 1.62;
  letter-spacing: 0.005em;
  color: var(--warm);
  background: var(--velvet);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-lights) var(--ease-grace), color var(--dur-lights) var(--ease-grace);
}
html[data-field="light"] body { background: var(--ivory); color: var(--ink); }
/* the blue pages (30 September 2026): lapis, crossfading in exactly like the ivory story does */
html[data-field="blue"] { background: var(--lapis); scrollbar-color: rgba(247, 239, 228, 0.3) transparent; }
html[data-field="blue"] body { background: var(--lapis); color: var(--warm); }
html[data-room="win"] body, html[data-room="win"] { background: var(--velvet-900); }

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ruby { ruby-position: over; }
[hidden] { display: none !important; }

::selection { background: var(--gold); color: var(--velvet-900); }
html[data-field="light"] ::selection { background: var(--gold-deep); color: var(--ivory); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
  border-radius: 6px;
}
html[data-field="light"] :focus-visible,
.on-light :focus-visible { outline-color: var(--gold-deep); }
/* a room's title takes focus on arrival only so a screen reader starts there; it is not a control, so it draws no
   ring (a keyboard visitor saw a gold box around "Every bridge needs two ends.", found in the audit, 4 October 2026) */
h1[tabindex="-1"]:focus-visible, h2[tabindex="-1"]:focus-visible { outline: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: fixed; top: 12px; left: 12px; z-index: 400;
  padding: 10px 16px; border-radius: var(--r-pill);
  font: 700 var(--t-ui)/1 var(--font-ui);
  background: var(--warm); color: var(--velvet-900);
  transform: translateY(-160%);
  transition: transform var(--dur-hover) var(--ease-ui);
}
.skip:focus-visible { transform: none; }

/* ---------------- the atmosphere: grain and vignette, under everything ---------------- */
.atmos { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 0; pointer-events: none; }
.atmos__vignette {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(125% 115% at 50% 40%,
              transparent 52%, rgba(18, 4, 5, 0.46) 84%, rgba(18, 4, 5, 0.9) 100%);
  transition: opacity var(--dur-lights) var(--ease-grace);
}
.atmos__grain {
  position: absolute; top: -50%; right: -50%; bottom: -50%; left: -50%;
  opacity: 0.055; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  transition: opacity var(--dur-lights) var(--ease-grace);
}
html[data-field="light"] .atmos__vignette { opacity: 0; }
html[data-field="light"] .atmos__grain { opacity: 0.04; mix-blend-mode: multiply; }
html[data-field="blue"] .atmos__vignette { opacity: 0.55; }

/* ---------------- rooms ---------------- */
.rooms { position: relative; z-index: 1; }
.room { position: relative; min-height: 100vh; min-height: 100dvh; }
.room[data-state="leaving"] {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 2; pointer-events: none;
  animation: room-leave 620ms var(--ease-ui) forwards;
}
@keyframes room-leave {
  to { opacity: 0; filter: blur(6px); transform: scale(0.985); }
}

/* ---------------- the way home (every room but home) ---------------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px;
  pointer-events: none;
  opacity: 0; transform: translateY(-10px);
  transition: opacity var(--dur-open) var(--ease-grace), transform var(--dur-open) var(--ease-grace);
}
html[data-room]:not([data-room="home"]) .topbar,
html[data-room="home"][data-home-scrolled="true"] .topbar { opacity: 1; transform: none; }
.topbar > * { pointer-events: auto; }
.homelink {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 6px 16px 6px 8px; margin-left: -8px;
  border-radius: var(--r-pill);
  color: var(--warm);
  transition: background-color var(--dur-hover) var(--ease-ui), color var(--dur-lights) var(--ease-grace);
}
/* his mark, World Builder (2 October 2026): Lk in a gold globe (tools/logo.py); the 金 coin before it is in
   parked/jin-icons/. On the ivory and the blue fields the gold deepens so it still reads. */
.homelink__mark {
  width: 40px; height: 40px; margin: -4px 0;
  filter: drop-shadow(0 4px 10px rgba(212, 168, 83, 0.28));
  transition: filter var(--dur-lights) var(--ease-grace);
}
html[data-field="light"] .homelink__mark { filter: brightness(0.66) saturate(1.35) drop-shadow(0 3px 8px rgba(122, 85, 24, 0.2)); }
.homelink__name { font: 400 1.08rem/1 var(--font-display); letter-spacing: 0.01em; }
.homelink:hover { background: rgba(247, 239, 228, 0.07); }
html[data-field="light"] .homelink { color: var(--ink); }
html[data-field="light"] .homelink:hover { background: rgba(53, 25, 30, 0.06); }
.homelink[aria-hidden="true"] { visibility: hidden; }

/* ---------------- type helpers ---------------- */
.zh { font-family: var(--font-zh); font-style: normal; letter-spacing: 0.02em; }
.it { font-family: var(--font-text); font-style: italic; }
.eyebrow {
  font: italic 400 var(--t-lead)/1.2 var(--font-text);
  color: var(--gold);
}
html[data-field="light"] .eyebrow, .on-light .eyebrow { color: var(--gold-deep); }

/* ---------------- buttons and links that act ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-dark);
  font: 700 var(--t-ui)/1 var(--font-ui); letter-spacing: 0.02em;
  color: var(--warm);
  background: rgba(247, 239, 228, 0.04);
  transition: transform var(--dur-hover) var(--ease-ui), border-color var(--dur-hover) var(--ease-ui),
              background-color var(--dur-hover) var(--ease-ui);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:active { transform: translateY(1px) scale(0.985); }
.on-light .btn { color: var(--ink); border-color: var(--line-light); background: rgba(53, 25, 30, 0.03); }
.btn.btn--gold, .on-light .btn.btn--gold {
  color: #2A1206; background: var(--grad-gold); border-color: transparent;
  box-shadow: 0 10px 22px -12px rgba(122, 85, 24, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); border-color: var(--gold-line); background: rgba(247, 239, 228, 0.08); }
  .btn.btn--gold:hover, .on-light .btn.btn--gold:hover { background: var(--grad-gold); border-color: transparent; }
  .on-light .btn:hover { border-color: rgba(122, 85, 24, 0.45); background: rgba(122, 85, 24, 0.06); }
}

/* sky: secondary and social actions (see tokens) */
.btn.btn--sky { color: var(--sky); border-color: var(--sky-line); background: var(--sky-wash); }
.on-light .btn.btn--sky, html[data-field="light"] .btn.btn--sky { color: var(--sky-ink); border-color: rgba(43, 94, 138, 0.34); background: rgba(156, 199, 236, 0.2); }
@media (hover: hover) and (pointer: fine) {
  .btn.btn--sky:hover { border-color: var(--sky); background: rgba(156, 199, 236, 0.18); }
  .on-light .btn.btn--sky:hover, html[data-field="light"] .btn.btn--sky:hover { border-color: var(--sky-ink); background: rgba(156, 199, 236, 0.32); }
}

.textlink {
  color: inherit;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: color var(--dur-hover) var(--ease-ui);
}
@media (hover: hover) and (pointer: fine) {
  .textlink:hover { color: var(--gold-bright); }
  .on-light .textlink:hover, html[data-field="light"] .textlink:hover { color: var(--gold-deep); }
}

/* ---------------- the reveal: things arrive, they do not appear (M1) ---------------- */
.rv {
  opacity: 0;
  transform: translate3d(0, var(--rise), 0) scale(0.985);
  filter: blur(var(--settle));
  /* the colour rides along (the house lights), so no rule giving an element its own colour fade can replace the
     arrival: that is what made the home page's titles burst in instead of rising (his note, 4 October 2026) */
  transition: opacity var(--dur-grace) var(--ease-grace),
              transform var(--dur-grace) var(--ease-grace),
              filter var(--dur-grace) var(--ease-grace),
              color var(--dur-lights) var(--ease-grace);
  transition-delay: var(--d, 0ms), var(--d, 0ms), var(--d, 0ms), 0ms;
}
.rv.is-in { opacity: 1; transform: none; filter: none; }

/* ---------------- doorways between rooms ---------------- */
.onward {
  display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center;
}
.onward__label { width: 100%; font: italic 400 var(--t-lead)/1.3 var(--font-text); color: var(--warm-muted); }
html[data-field="light"] .onward__label { color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  html, body { transition-duration: 1ms; }
  .rv { transform: none; filter: none; transition: opacity 600ms linear; transition-delay: 0ms; }
  .room[data-state="leaving"] { animation: room-leave-still 300ms linear forwards; }
  @keyframes room-leave-still { to { opacity: 0; } }
  .topbar { transition: opacity 300ms linear; transform: none; }
}

/* ---------------- the nav, "Lacquer" (his pick, 4 October 2026; js/nav.js) ----------------
   ui-lab variant C, after the 3D Adaptive Navigation Bar he saved on 21st.dev: his words on it were "that kind of
   shade, that gradient of a little bit of darkness". The SURFACE is that lacquer (a gradient body, a lit 2 px ridge
   along the top, a gloss caught top-left, shaded walls); on a desktop it is always the full row (his change: no
   shrinking), and it carries variant A's bubble on the page you are on. On a phone it is C as it was. */
.topbar { justify-content: center; padding: max(14px, env(safe-area-inset-top)) 12px 0; }
.topbar {
  --fg: var(--warm); --fg-2: var(--warm-muted); --acc: var(--gold); --hair: var(--line-dark);
}
html[data-field="light"] .topbar { --fg: var(--ink); --fg-2: var(--ink-soft); --acc: var(--gold-deep); --hair: var(--line-light); }
.pill {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; height: 58px; padding: 0 9px 0 10px; border-radius: 29px;
  color: var(--fg); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); transition: color 500ms var(--ease-ui);
}
html[data-field="light"] .pill { text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9); }
/* the wine and lapis glass blur what is behind them (the ivory lacquer is opaque and needs none); one blur, on the
   pill, kept modest because this bar is fixed on every page */
html:not([data-field="light"]) .pill { -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }

/* the lacquered body: three materials that crossfade with the page's colour */
.mat { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 700ms var(--ease-ui); }
.mat::before {             /* the 2 px ridge along the top edge */
  content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 2px; border-radius: 2px; filter: blur(0.3px);
}
.mat::after {              /* the gloss, a soft ellipse caught top-left */
  content: ""; position: absolute; left: 6%; top: 15%; width: 150px; height: 12px; border-radius: 50%; filter: blur(4px); transform: rotate(-6deg);
}
.mat--dark {               /* wine glass (4 October 2026, his note: the solid wine was "too thick"): the page shows through */
  background:
    radial-gradient(120% 150% at 10% 0%, rgba(255, 220, 182, 0.16), rgba(255, 220, 182, 0) 58%),
    linear-gradient(180deg, rgba(122, 60, 68, 0.58) 0%, rgba(92, 42, 50, 0.48) 46%, rgba(66, 26, 33, 0.46) 100%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px -12px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 228, 196, 0.32), inset 0 -1px 2px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(247, 239, 228, 0.13), inset 0 0 18px rgba(255, 220, 190, 0.07);
}
.mat--dark::before { background: linear-gradient(90deg, rgba(255, 232, 196, 0), rgba(255, 232, 196, 0.62) 20%, rgba(255, 242, 220, 0.92) 50%, rgba(255, 232, 196, 0.62) 80%, rgba(255, 232, 196, 0)); }
.mat--dark::after, .mat--blue::after { background: radial-gradient(ellipse at center, rgba(255, 236, 212, 0.3) 0%, rgba(255, 236, 212, 0.1) 55%, rgba(255, 236, 212, 0) 100%); }
.mat--light {
  background: linear-gradient(135deg, #FFFDFA 0%, #FBF6EF 15%, #F5EEE4 30%, #EFE6DA 45%, #E9DFD1 60%, #E3D8C9 75%, #DDD1C0 90%, #E1D6C6 100%);
  box-shadow:
    0 3px 6px rgba(53, 25, 30, 0.12), 0 8px 16px rgba(53, 25, 30, 0.1), 0 16px 32px rgba(53, 25, 30, 0.08), 0 1px 2px rgba(53, 25, 30, 0.12),
    inset 0 2px 1px rgba(255, 255, 255, 0.75), inset 0 -2px 6px rgba(53, 25, 30, 0.1),
    inset 2px 2px 8px rgba(53, 25, 30, 0.08), inset -2px 2px 8px rgba(53, 25, 30, 0.07), inset 0 0 1px rgba(53, 25, 30, 0.15);
}
.mat--light::before { background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95) 6%, #fff 18%, #fff 82%, rgba(255, 255, 255, 0.95) 94%, rgba(255, 255, 255, 0)); left: 4%; right: 4%; }
.mat--light::after { background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.3) 45%, rgba(255, 255, 255, 0) 100%); }
/* the blue pages (his quote, Say Hi): the same lacquer in lapis */
.mat--blue {               /* lapis glass, its sibling on the blue pages */
  background:
    radial-gradient(120% 150% at 10% 0%, rgba(200, 220, 255, 0.17), rgba(200, 220, 255, 0) 58%),
    linear-gradient(180deg, rgba(70, 96, 170, 0.56) 0%, rgba(46, 70, 140, 0.46) 46%, rgba(30, 50, 112, 0.44) 100%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.28), 0 12px 28px -12px rgba(2, 6, 20, 0.5),
    inset 0 1px 1px rgba(214, 230, 255, 0.34), inset 0 -1px 2px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(214, 230, 255, 0.14), inset 0 0 18px rgba(200, 220, 255, 0.07);
}
.mat--blue::before { background: linear-gradient(90deg, rgba(210, 228, 255, 0), rgba(210, 228, 255, 0.6) 20%, rgba(232, 242, 255, 0.9) 50%, rgba(210, 228, 255, 0.6) 80%, rgba(210, 228, 255, 0)); }
html:not([data-field="light"]):not([data-field="blue"]) .mat--dark, html[data-field="light"] .mat--light, html[data-field="blue"] .mat--blue { opacity: 1; }

.pill .pill__id { display: inline-flex; align-items: center; gap: 11px; min-height: 44px; margin: 0; padding: 0 14px 0 0; border-radius: var(--r-pill); color: var(--fg); background: none; }
.pill .pill__id:hover { background: none; }
.pill .homelink__mark { width: 36px; height: 36px; margin: 0; }

/* where you are: shown in the phone capsule only */
.pill__here {
  display: none; align-items: center; gap: 9px; overflow: hidden; white-space: nowrap;
  font: 400 0.86rem/1 var(--font-ui); letter-spacing: 0.01em; color: var(--fg-2);
}
.pill__here i { width: 4px; height: 4px; border-radius: 50%; background: var(--acc); flex: none; }
.pill__toggle {
  display: none; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; color: var(--fg-2);
  transition: color 300ms var(--ease-ui), background-color 300ms var(--ease-ui);
}
.pill__toggle svg { transition: transform 450ms var(--ease-grace); }
.pill[data-open="true"] .pill__toggle svg { transform: rotate(180deg); }

/* the row, always open on a desktop (his change to C), and A's bubble on the page you are on */
.pill__links { display: flex; align-items: center; height: 100%; }
.pill__in { position: relative; display: flex; align-items: center; gap: 2px; padding-left: 4px; }
.pill__bubble {
  position: absolute; left: 0; top: 50%; height: 40px; margin-top: -20px; width: 0; border-radius: var(--r-pill); pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(255, 236, 212, 0.13), rgba(255, 236, 212, 0.05));
  box-shadow: inset 0 1px 0 rgba(255, 236, 212, 0.16), inset 0 0 0 1px rgba(247, 239, 228, 0.07), 0 2px 6px -2px rgba(0, 0, 0, 0.35);
  transition: transform 520ms cubic-bezier(0.34, 1.26, 0.5, 1), width 520ms cubic-bezier(0.34, 1.26, 0.5, 1), opacity 300ms var(--ease-ui);
}
html[data-field="light"] .pill__bubble {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.35));
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(53, 25, 30, 0.07), 0 2px 6px -3px rgba(53, 25, 30, 0.3);
}
html[data-field="blue"] .pill__bubble { background: linear-gradient(180deg, rgba(220, 232, 255, 0.14), rgba(220, 232, 255, 0.05)); box-shadow: inset 0 1px 0 rgba(220, 232, 255, 0.18), inset 0 0 0 1px rgba(220, 232, 255, 0.08), 0 2px 6px -2px rgba(0, 0, 0, 0.3); }
.pill__link {
  position: relative; z-index: 1; display: inline-flex; align-items: center; min-height: 40px; padding: 0 15px;
  font: 400 0.95rem/1 var(--font-ui); letter-spacing: 0.01em; white-space: nowrap; color: var(--fg-2);
  transition: color 350ms var(--ease-ui);
}
.pill__link:hover, .pill__link[aria-current="page"] { color: var(--fg); }
.pill__link[aria-current="page"]::after {   /* where you are: one small gold point under the word */
  content: ""; position: absolute; left: 50%; bottom: 5px; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: var(--acc);
}
/* "Say hi" is a glass button (.gbtn, shared.css), as every call to action on the site; on Say Hi it is filled */
.pill .pill__cta { min-height: 40px; padding: 0 18px; margin-left: 8px; }
.pill .pill__cta[aria-current="page"] {
  --gb-top: rgba(176, 214, 246, 0.96); --gb-bot: rgba(122, 176, 230, 0.86); --gb-gloss: rgba(255, 255, 255, 0.6);
  --gb-ink: #0C1638; --gb-edge: rgba(255, 255, 255, 0.85); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}
html[data-field="light"] .pill .pill__cta[aria-current="page"] {
  --gb-top: rgba(78, 134, 184, 0.98); --gb-bot: rgba(43, 94, 138, 0.96); --gb-gloss: rgba(255, 255, 255, 0.35);
  --gb-ink: #fff; --gb-edge: rgba(255, 255, 255, 0.5); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* ---------------- phone: C's capsule, unfolding downward into a card ---------------- */
@media (max-width: 959px) {
  .topbar { padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
  .pill {
    display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "id here toggle" "links links links"; align-items: center;
    width: 100%; max-width: 520px; height: auto; padding: 0 8px 0 10px; border-radius: 29px;
  }
  .pill .pill__id { grid-area: id; height: 58px; padding-right: 8px; gap: 10px; }
  .pill .homelink__name { font-size: 1rem; }
  .pill__here { grid-area: here; display: inline-flex; max-width: 0; opacity: 0; transition: max-width 380ms var(--ease-grace), opacity 300ms var(--ease-ui); }
  .pill__here.has { max-width: 150px; opacity: 1; margin: 0 4px 0 0; padding-left: 12px; box-shadow: -1px 0 0 var(--hair); }
  .pill__here b { display: block; max-width: 110px; overflow: hidden; text-overflow: ellipsis; font-weight: 400; }
  .pill[data-open="true"] .pill__here { max-width: 0; opacity: 0; padding-left: 0; margin: 0; box-shadow: none; }
  .pill__toggle { grid-area: toggle; display: grid; }
  .pill__links { grid-area: links; display: grid; grid-template-rows: 0fr; align-items: stretch; height: auto; margin: 0 -8px 0 -10px; transition: grid-template-rows 520ms var(--ease-grace); }
  .pill[data-open="true"] .pill__links { grid-template-rows: 1fr; }
  /* the open card carries words over whatever is behind it, so its glass thickens while it is open */
  .pill[data-open="true"] .mat--dark { background: radial-gradient(120% 60% at 10% 0%, rgba(255, 220, 182, 0.14), rgba(255, 220, 182, 0) 58%), linear-gradient(180deg, rgba(96, 44, 52, 0.92) 0%, rgba(58, 24, 30, 0.94) 100%); }
  .pill[data-open="true"] .mat--blue { background: radial-gradient(120% 60% at 10% 0%, rgba(200, 220, 255, 0.14), rgba(200, 220, 255, 0) 58%), linear-gradient(180deg, rgba(40, 62, 128, 0.93) 0%, rgba(20, 36, 88, 0.95) 100%); }
  .pill__in { display: flex; flex-direction: column; align-items: stretch; gap: 0; min-height: 0; overflow: hidden; padding: 0 26px 0 28px; visibility: hidden; transition: visibility 0s linear 520ms; }
  .pill[data-open="true"] .pill__in { visibility: visible; transition-delay: 0s; }
  .pill__bubble { display: none; }
  .pill__link { min-height: 54px; padding: 0 2px; border-top: 1px solid var(--hair); font: 400 1.5rem/1.1 var(--font-display); opacity: 0; transform: translateY(6px); transition: opacity 250ms ease-out, transform 250ms ease-out, color 350ms var(--ease-ui); }
  .pill__link[aria-current="page"]::after { display: none; }
  .pill__link[aria-current="page"] { color: var(--acc); }
  .pill .pill__cta { margin: 12px 0 20px; min-height: 50px; opacity: 0; transform: translateY(6px); transition: opacity 250ms ease-out, transform 250ms ease-out; }
  .pill[data-open="true"] .pill__link, .pill[data-open="true"] .pill .pill__cta, .pill[data-open="true"] .pill__cta {
    opacity: 1; transform: none; transition-delay: calc(110ms + var(--i) * 60ms);
  }
}
@media (hover: hover) and (pointer: fine) {
  .pill__toggle:hover { color: var(--fg); background: rgba(247, 239, 228, 0.07); }
  html[data-field="light"] .pill__toggle:hover { background: rgba(53, 25, 30, 0.06); }
}
@media (prefers-reduced-motion: reduce) {
  .pill__links, .pill__link, .pill .pill__cta, .pill__here, .mat, .pill__bubble { transition-duration: 1ms !important; transition-delay: 0s !important; }
}
