/* ==========================================================================
   COMPONENTS — every reusable piece found across the Figma pages
   Each block references tokens only.
   ========================================================================== */

/* ---------- Icon ---------- */
.icon {
  flex: none;
  width: var(--icon-md);
  height: var(--icon-md);
}
.icon--sm { width: var(--icon-sm); height: var(--icon-sm); }
.icon--lg { width: var(--icon-lg); height: var(--icon-lg); }

/* ---------- Site header (all pages) ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--header-y);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-10);
  font-size: var(--text-md);
  line-height: var(--leading-md);
  letter-spacing: var(--tracking-logo);
  color: var(--color-text-strong);
}
.logo__mark {
  display: grid;
  place-items: center;
  width: var(--icon-lg);
  height: var(--icon-lg);
}
.logo__mark img {
  width: 87.5%; /* 21px glyph inside 24px box, per Figma */
  height: auto;
}

/* Fixed header: stays at the top while scrolling, like the bottom Menu.
   Only the links take pointer events, so the bar never blocks the page. */
.site-header--fixed {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  padding-inline: var(--grid-margin);
  pointer-events: none;
}
.site-header--fixed > * { pointer-events: auto; }
/* Phones: tucked away while scrolling down (scripts/menu.js) */
.site-header--fixed { transition: translate 350ms var(--ease-out); }
.site-header--fixed.is-tucked { translate: 0 -110%; }
/* Blend: the header inverts against whatever scrolls under it — dark on the paper,
   light over dark images and panels. White + difference ≈ #1C1E22 on the paper. */
.site-header--fixed {
  mix-blend-mode: difference;
}
.site-header--fixed .logo { color: var(--white); }
.site-header--fixed .logo__mark img { filter: invert(1); }  /* dark glyph → white, so it blends too */
/* The orb has colour: pre-invert it so the blend shows it close to its own colours */
.site-header--fixed canvas { filter: invert(1); }

/* ---------- Button (dark) — "View project", "Send message", "Menu" ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: 0.375rem var(--space-8) 0.375rem var(--space-10); /* 6 + 20 line + 6 = 32 tall */
  border-radius: var(--radius-md);
  background: var(--color-inverse-bg);
  color: var(--color-inverse-text);
  font-size: var(--text-md);
  line-height: var(--leading-md);
  white-space: nowrap;
  transition: background-color var(--duration-fast) var(--ease-out),
    color var(--duration-base) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}
/* Hover — Figma 75:1580: light fill, dark label + arrow */
.btn:not(.btn--menu):hover { background: var(--color-surface-muted); color: var(--color-text); }
.btn:not(.btn--menu):hover .icon--arrow { filter: var(--icon-hover-filter); } /* #BABABA → #333 (light theme) */
.btn:active { transform: scale(0.97); }
.btn .icon { transition: transform var(--duration-base) var(--ease-out), filter var(--duration-base) var(--ease-out); }
.btn:hover .icon--arrow { transform: translateX(2px); }
/* Circle fill on hover (scripts/circle-fill.js): the hover colour grows as a circle from
   where the cursor enters and shrinks away into where it leaves.
   Only the fill layer clips, so the magnetic label can still lean freely. */
.has-circle-fill .btn:not(.btn--menu) {
  position: relative;
  isolation: isolate;
}
.has-circle-fill .btn:not(.btn--menu):hover { background: var(--color-inverse-bg); } /* the circle does the hover */
.btn__fill {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.btn__fill > span {
  position: absolute;
  border-radius: var(--radius-full);
  background: var(--color-surface-muted); /* Figma hover fill #D1D1D1 */
  transform: scale(0);
}
/* Magnetic label wrapper (scripts/magnetic.js) — keeps the button's own gap and alignment */
.btn__inner {
  display: inline-flex;
  align-items: center;
  gap: inherit;
}

.btn--menu {
  padding-inline: var(--space-8);
  background: var(--color-menu-btn);
  color: var(--color-menu-btn-text);
  -webkit-backdrop-filter: blur(var(--blur-glass));
  backdrop-filter: blur(var(--blur-glass));
}
.btn--menu .icon { filter: var(--menu-icon-filter); transition: filter var(--duration-fast) var(--ease-out); }
.btn--menu:hover { background: var(--color-inverse-bg); color: var(--color-menu-btn-hover-text); }
.btn--menu:hover .icon { filter: var(--menu-icon-hover-filter); }

/* ---------- Line-mask reveal (shared: story text, deck captions, menu links) ----------
   Each line sits in its own clip and slides up into view. */
.line-mask {
  display: block;
  overflow: clip;
  padding-bottom: 0.15em; /* keep descenders inside the mask */
  margin-bottom: -0.15em;
}
.line {
  display: block;
  transform: translateY(120%);
  will-change: transform;
}

/* ---------- Menu: button that grows into the glass panel (scripts/menu.js) ----------
   Figma: closed = Menu button (82 × 32, #1A1A1A @ 75%), open = panel 10:127
   (223 × 248, #222 @ 50%, radius 8, padding 16). Both share the bottom-right corner,
   so opening clips the panel from the button's rect out to its full size. */
.site-nav {
  --menu-ease: cubic-bezier(0.32, 0.72, 0, 1); /* drawer curve: fast start, soft landing */
  --menu-open: 460ms;
  --menu-close: 300ms;
  position: fixed;
  right: var(--grid-margin);
  bottom: var(--space-32);
  z-index: 50;
  width: 13.9375rem;  /* 223 */
  height: 15.5rem;    /* 248 */
  pointer-events: none;
}
.site-nav .btn--menu {
  position: absolute;
  right: 0;
  bottom: 0;
  pointer-events: auto;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out),
    opacity 120ms ease var(--menu-close); /* reappears as the panel lands back on it */
}
.site-nav.is-open .btn--menu {
  opacity: 0;
  pointer-events: none;
  transition: opacity 80ms ease;
}

.menu-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  gap: var(--space-8);
  width: 100%;
  height: 100%;
  padding: var(--space-16);
  background: var(--color-menu-btn);          /* starts as the button's tint */
  -webkit-backdrop-filter: blur(var(--blur-glass));
  backdrop-filter: blur(var(--blur-glass));
  /* Closed: clipped to the button's rect (size set by menu.js) */
  clip-path: inset(calc(100% - var(--btn-h, 32px)) 0 0 calc(100% - var(--btn-w, 82px)) round var(--radius-md));
  visibility: hidden;
  pointer-events: none;
  transition:
    clip-path var(--menu-close) var(--menu-ease),
    background-color var(--menu-close) var(--menu-ease),
    visibility 0s linear var(--menu-close);
}
.site-nav.is-open .menu-panel {
  clip-path: inset(0 0 0 0 round var(--radius-md));
  background: var(--color-glass-panel);
  visibility: visible;
  pointer-events: auto;
  transition:
    clip-path var(--menu-open) var(--menu-ease),
    background-color var(--menu-open) var(--menu-ease),
    visibility 0s;
}

.menu-panel__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.menu-panel__label {
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
  color: var(--color-inverse-text-muted);
}
.menu-panel__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);                      /* Figma: 8 */
  list-style: none;
  padding: 0;
}
.menu-panel__links a {
  font-size: var(--text-lg);
  line-height: var(--leading-lg);
  color: var(--color-inverse-text-strong);
  transition: opacity var(--duration-fast) var(--ease-out);
}
.menu-panel__links a:hover { opacity: 0.7; }
.menu-panel__close {
  display: grid;
  place-items: center;
  width: var(--icon-md);
  height: var(--icon-md);
  align-self: flex-start;
}

/* Content: leaves together and quickly; arrives once the glass has room */
.menu-panel__label,
.menu-panel__close {
  opacity: 0;
  transition: opacity 120ms ease;
}
.menu-panel__close img {
  transform: rotate(0deg);                  /* the button's + … */
  transition: transform var(--menu-close) var(--menu-ease);
}
/* Links: masked line reveal on open (same as the story text); on close the list
   fades out fast while the lines drop back behind their masks */
.menu-panel__links {
  opacity: 0;
  transition: opacity 120ms ease;
}
.menu-panel__links .line {
  transition: transform 0s linear 120ms;
}
.site-nav.is-open .menu-panel__label,
.site-nav.is-open .menu-panel__close {
  opacity: 1;
  transition: opacity 240ms ease 140ms;
}
.site-nav.is-open .menu-panel__close img {
  transform: rotate(45deg);                 /* … turns into the panel's × */
  transition: transform var(--menu-open) var(--menu-ease);
}
.site-nav.is-open .menu-panel__links {
  opacity: 1;
  transition: none;
}
.site-nav.is-open .menu-panel__links .line {
  transform: translateY(0);
  transition: transform 700ms cubic-bezier(0.23, 1, 0.32, 1) calc(140ms + var(--i, 0) * 35ms);
}
.menu-panel__links li:nth-child(1) { --i: 0; }
.menu-panel__links li:nth-child(2) { --i: 1; }
.menu-panel__links li:nth-child(3) { --i: 2; }
.menu-panel__links li:nth-child(4) { --i: 3; }

@media (prefers-reduced-motion: reduce) {
  .menu-panel,
  .site-nav.is-open .menu-panel { transition: visibility 0s; }
  .menu-panel__links .line,
  .site-nav.is-open .menu-panel__links .line { transform: none; transition: none; }
  .menu-panel__close img,
  .site-nav.is-open .menu-panel__close img { transition: none; }
}

/* ---------- Tag ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-xs);
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
  white-space: nowrap;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}

/* Meta row — tag · read time */
.meta {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--color-text-muted);
}
.meta__dot {
  width: 3px;
  height: 3px;
  border-radius: var(--radius-full);
  background: var(--grey-150);
}

/* ---------- Filter tabs (Works) ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-10);
}
.filter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-10);
  padding: 6px var(--space-8);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--text-md);
  line-height: var(--leading-md);
  transition: background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}
.filter:hover { color: var(--color-text); }
.filter[aria-pressed="true"] {
  background: var(--color-surface-muted);
  color: var(--color-text);
}
.filter__count {
  padding-inline: 5px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-strong);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
  font-variant-numeric: tabular-nums;
}

/* ---------- Icon button / view toggle (Works) ---------- */
.icon-toggle {
  display: flex;
  gap: var(--space-10);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  height: 36px;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-md);
  transition: background-color var(--duration-fast) var(--ease-out);
}
.icon-btn:hover { background: color-mix(in srgb, var(--color-surface-muted) 50%, transparent); }
.icon-btn[aria-pressed="true"] { background: var(--color-surface-muted); }

/* ---------- Divider ---------- */
.divider {
  height: 1px;
  border: 0;
  background: var(--color-border);
}
/* Elastic divider (scripts/elastic-divider.js): a 1px rule that bends toward the cursor */
.elastic-divider {
  position: relative;
  height: 1px;
  background: var(--color-border);  /* shown until the script draws the line */
}
.elastic-divider:has(svg) { background: none; }
.elastic-divider svg {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 5rem;                       /* reach × 2 */
  translate: 0 -50%;
  overflow: visible;
  pointer-events: none;
}
.elastic-divider path {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* ---------- Media frame ---------- */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
img.media,
video.media { display: block; width: 100%; height: auto; object-fit: cover; } /* a photo used directly as the media box */
.media img,
.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--xl { border-radius: var(--radius-xl); }
.media--placeholder {
  display: grid;
  place-items: center;
  background: var(--grey-25);
}
/* Figma's checker placeholder — swap the element for an <img> when the photo is ready */
.media--checker {
  background: var(--color-surface) url("../assets/images/placeholder.png") repeat 0 0 / 26.25rem;
}

/* ---------- Project card (Works grid, Home) ---------- */
.project-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}
.project-card__description {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--color-text-muted);
}
.project-card__media { position: relative; }
.project-card__cta {
  position: absolute;
  left: 50%;
  top: 60%;
  translate: -50% 0;
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
}
.project-card:hover .project-card__cta,
.project-card:focus-within .project-card__cta { opacity: 1; }
.project-card__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-8);
}
.project-card__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-8);
}
.project-card__name { color: var(--color-text); }
.project-card__year {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

/* ---------- List row (About experience, Works list view) ---------- */
.list {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--color-border);
}
/* Same columns as the Works list view: three equal thirds, the middle item a fixed-width
   block centred in its third, so every role starts at the same x */
.list-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: var(--space-16);
  padding-block: var(--space-24);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-md);
  line-height: var(--leading-md);
  color: var(--color-text);
}
.list-row > :first-child { font-weight: var(--weight-medium); }
.list-row > :nth-child(2) {
  justify-self: center;
  width: min(100%, 13.875rem);       /* 222 — as .works-row__tags */
}
.list-row > :last-child {
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

/* ---------- Text block (label + paragraph) ---------- */
.text-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}
.text-block--center { text-align: center; align-items: center; }

/* ---------- Case study: table of contents ---------- */
.toc {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);                      /* Figma 33:1307: 4 between items */
  list-style: none;
  padding: 0;
}
.toc__back {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--color-text-muted);
}
.toc__back .icon { transform: scaleY(-1); } /* undo icon, flipped vertically */
.toc__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-md);          /* navigation corners: 8 */
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--color-text-muted);
  transition: background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}
.toc__item:hover { color: var(--color-text); }
.toc__item[aria-current="true"] {
  background: var(--color-surface);
  color: var(--color-text);
}
.toc__item--sub {
  justify-content: flex-end;
  align-self: flex-end;
}

/* ---------- Case study: article section ---------- */
.article-section {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.article-section__eyebrow {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--color-text-secondary);
}
.article-section__body {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--color-text-muted);
}
.article-section__body--lg {
  font-size: var(--text-md);
  line-height: var(--leading-md);
}

/* ---------- Contact: fill-in-the-blank (no line while hovering or typing) ---------- */
.blank {
  color: var(--color-text-muted);
  outline: none;
}

/* ---------- Image trail (small logos strung along the cursor path) ---------- */
[data-image-trail] {
  position: relative;
  overflow: clip;
}
.image-trail {
  --trail-size: clamp(2.5rem, 1.5rem + 2.2vw, 3.5rem); /* 40 → 56 */
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.trail-item {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--trail-size);
  height: var(--trail-size);
  margin: calc(var(--trail-size) / -2) 0 0 calc(var(--trail-size) / -2); /* centre on the pointer */
  will-change: transform;
}
.trail-item__inner {
  width: 100%;
  height: 100%;
  opacity: 0;
  will-change: transform, opacity;
}
.trail-logo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
}
/* Rive: black mark on white, positioned as in Figma (inset 22% / 25%) */
.trail-logo--rive {
  position: relative;
  background: var(--white); /* brand mark: stays white in dark mode (surface turns dark) */
}
.trail-logo--rive img {
  position: absolute;
  left: 22%;
  top: 22%;
  width: 53%;
  height: 56%;
}

/* ---------- A.O.D LLM chat (scripts/llm-chat.js) ----------
   The user's Webflow embed CSS, scoped to .aod-llm (panel, header band, body, motion).
   Header row, greeting + suggestions and input follow Figma 57:1559 / 57:1500 / 57:1532;
   colours follow Figma 57:1476. Changed lines are marked "Figma". */
.aod-llm {
  --chat-width: clamp(320px, 38vw, 520px);
}
[data-llm-open].is-hidden { opacity: 0; pointer-events: none; }
[data-llm-open] { transition: opacity 0.25s ease; }

.aod-llm .overlay {
  position: fixed;
  inset: 0;
  z-index: 890;
  background: transparent;              /* Figma: no backdrop tint (embed: rgba(8,8,10,.55) + blur) */
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.aod-llm .overlay.is-open { opacity: 1; pointer-events: auto; }

.aod-llm .menu-wrapper {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--chat-width);
  height: 100svh;
  z-index: 900;
  pointer-events: none;
  overflow: hidden;
}
.aod-llm .menu-wrapper.is-open { pointer-events: auto; }

.aod-llm .menu-bg {                      /* the embed's morphing path, as a clip */
  position: absolute;
  inset: 0;
  background: var(--color-glass-panel); /* Figma: #222 @ 50% (embed: rgba(16,18,15,.96)) */
  -webkit-backdrop-filter: blur(var(--blur-heavy));
  backdrop-filter: blur(var(--blur-heavy)); /* only the area the panel covers */
}

.aod-llm .menu-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  opacity: 0;
}
.aod-llm .chat-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.aod-llm .chat-header {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
/* Header row — Figma 57:1559: title left, icons right */
.aod-llm .chat-header-name {
  display: inline-flex;
  align-items: center;
  gap: var(--space-10);                 /* same as the site header logo */
  font-size: var(--text-md);
  line-height: var(--leading-md);
  font-weight: var(--weight-regular);
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
}
.aod-llm .chat-header-right {
  display: flex;
  align-items: center;
  gap: 16px;                            /* Figma: 16 */
  flex-shrink: 0;
}
.aod-llm .icon-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: opacity 0.15s;
}
.aod-llm .icon-btn:hover { opacity: 0.7; }
.aod-llm .icon-btn img { width: 20px; height: 20px; } /* Figma: 20px #F5F5F5 */

.aod-llm .chat-body {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem 1.5rem;
  gap: 1rem;
  min-height: 0;
  overflow: hidden;
}
.aod-llm .chat-scroll {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.aod-llm .chat-scroll::-webkit-scrollbar { width: 4px; }
.aod-llm .chat-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 2px; }

/* Greeting + suggestions — Figma 57:1500 */
.aod-llm .chat-empty {
  display: flex;
  flex-direction: column;
  gap: 16px;                            /* Figma: 16 */
  margin-top: auto;
}
.aod-llm .chat-empty.is-hidden { display: none; }
.aod-llm .chat-greeting {
  font-size: var(--text-sm);                      /* Figma: 14/20 regular #F9F9F9, title case */
  line-height: var(--leading-sm);
  font-weight: var(--weight-regular);
  text-transform: capitalize;
  color: var(--grey-5);
}

.aod-llm .suggestions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;                            /* Figma: 12 */
}
.aod-llm .sug-btn {
  display: flex;
  align-items: center;
  gap: 10px;                            /* Figma: 10 */
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--text-sm);                      /* Figma: 14/20 #D1D1D1, title case */
  line-height: var(--leading-sm);
  text-transform: capitalize;
  color: var(--grey-100);
  text-align: left;
  padding: 0;
  font-family: inherit;
  transition: color 0.15s;
}
.aod-llm .sug-btn:hover { color: var(--grey-5); }
.aod-llm .sug-icon { width: 16px; height: 16px; flex-shrink: 0; } /* Figma: 16px #F5F5F5 */

.aod-llm .messages { display: flex; flex-direction: column; gap: 14px; }
.aod-llm .msg {
  max-width: 88%;
  font-size: var(--text-sm);                      /* Figma body size 14/20 (embed: 13.5px / 1.5) */
  line-height: var(--leading-sm);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.aod-llm .msg-user {
  align-self: flex-end;
  background: var(--grey-450);          /* Figma: #333 (embed: white @ 8%) */
  color: var(--grey-5);                 /* Figma: #F9F9F9 */
  padding: 9px 14px;
  border-radius: 16px;
}
.aod-llm .msg-assistant {
  align-self: flex-start;
  color: var(--grey-5);                 /* Figma: #F9F9F9 (embed: white @ 92%) */
}
.aod-llm .msg-text { display: block; }
.aod-llm .msg-assistant.is-thinking .msg-text { display: none; }
.aod-llm .msg-assistant:not(.is-thinking) .thinking { display: none; }
.aod-llm .thinking {                  /* thinking orb while the answer is on its way */
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 0;
}
.aod-llm .thinking canvas { display: block; }

.aod-llm .followups {
  display: flex;
  flex-direction: column;
  gap: 12px;                            /* same as the suggestions */
  margin-top: 2px;
  align-self: flex-start;
  max-width: 100%;
}

/* Input — Figma 57:1532: 40 tall, #333, radius 8, padding 10, arrow right */
.aod-llm .input-row {
  display: flex;
  align-items: flex-end;                          /* the send button stays on the last line */
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: var(--grey-450);
  flex-shrink: 0;
}
.aod-llm .chat-input {
  flex: 1;
  min-width: 0;
  height: 20px;                                   /* one line; grows with what's typed (llm-chat.js) */
  max-height: 120px;
  padding: 0;
  resize: none;
  overflow-y: hidden;
  align-self: center;
  border: none;
  background: none;
  font-family: inherit;
  font-size: var(--text-sm);                      /* Figma: 14/20 */
  line-height: var(--leading-sm);
  color: var(--grey-5);
  outline: none;
}
.aod-llm .chat-input::placeholder { color: var(--grey-200); text-transform: capitalize; } /* #A3A3A3 */
.aod-llm .send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}
.aod-llm .send-btn img { width: 16px; height: 16px; } /* Figma: 16px #A3A3A3 */
.aod-llm .send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 480px) {
  .aod-llm { --chat-width: 100vw; }
}

/* ---------- Letter roll (scripts/letter-roll.js): Menu button + menu links ----------
   Each letter slides up out of its slot while a copy rolls in from below, staggered. */
.roll {
  display: inline-flex;
  overflow: clip;
  vertical-align: top;
}
.roll__char {
  position: relative;
  display: inline-block;
  white-space: pre;
  transition: transform 550ms var(--ease-roll, cubic-bezier(0.65, 0, 0.35, 1));
  transition-delay: calc(var(--i) * 22ms);
}
.roll__char::after {
  content: attr(data-char);
  position: absolute;
  left: 0;
  top: 100%;
}
.btn--menu:hover .roll__char,
.btn--menu:focus-visible .roll__char,
.menu-panel__links a:hover .roll__char,
.menu-panel__links a:focus-visible .roll__char { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) {
  .roll__char { transition: none; }
  .btn--menu:hover .roll__char,
  .menu-panel__links a:hover .roll__char { transform: none; }
}

/* ---------- Cursor follower (scripts/cursor.js) ----------
   A dot trails the mouse; over [data-cursor="view"] it morphs into the View project pill. */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  width: 10px;
  height: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 5px;                 /* half the dot = a circle; a real px value so it eases
                                         straight to the pill's 8px instead of snapping from 999px */
  background: var(--color-inverse-bg);
  pointer-events: none;
  opacity: 0;
  will-change: transform;
  transition:
    width 450ms var(--ease-out),
    height 450ms var(--ease-out),
    border-radius 450ms var(--ease-out),
    opacity 200ms var(--ease-out);
}
.cursor.is-visible { opacity: 1; }
/* As a dot it inverts against what it passes over (dark on paper, light on dark) */
.cursor:not(.is-view) {
  background: var(--white);
  mix-blend-mode: difference;
}
.cursor.is-stick {                   /* swells into a circle behind an icon button */
  width: var(--stick, 44px);
  height: var(--stick, 44px);
  border-radius: calc(var(--stick, 44px) / 2);   /* px, so it eases from the dot's 5px */
}
.cursor.is-view {
  width: var(--pill-w, 9.5rem);
  height: 2rem;                       /* 32 — button height (6 + 20 line + 6) */
  border-radius: var(--radius-md);
}
.cursor__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-4) var(--space-8) var(--space-4) var(--space-10);
  white-space: nowrap;
  color: var(--color-inverse-text);
  font-size: var(--text-md);
  line-height: var(--leading-md);
  opacity: 0;
  filter: blur(4px);
  transition: opacity 150ms var(--ease-out), filter 150ms var(--ease-out);
}
.cursor.is-view .cursor__label {
  opacity: 1;
  filter: none;
  transition-duration: 300ms;
  transition-delay: 120ms;            /* text arrives once the pill has opened */
}

/* ---------- Sliding tab pill (scripts/tab-pill.js) ---------- */
.has-tab-pill { position: relative; }
.has-tab-pill > :not(.tab-pill) { position: relative; z-index: 1; }
.has-tab-pill > [aria-pressed="true"],
.has-tab-pill > [aria-selected="true"] { background: transparent; }
.tab-pill {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);  /* Figma active tab #D1D1D1 */
  pointer-events: none;
  transition:
    transform 250ms cubic-bezier(0.22, 1, 0.36, 1),
    width 250ms cubic-bezier(0.22, 1, 0.36, 1),
    height 250ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, width;
}
@media (prefers-reduced-motion: reduce) {
  .tab-pill { transition: none; }
}

/* ---------- Theme (dark / light) ---------- */
/* Line icons on the page flip with the theme; icons on glass, in the LLM and in the
   header (blended) are already light and stay as they are. */
.icon-btn .icon,
.btn:not(.btn--menu) .icon,
.cursor .icon { filter: var(--icon-filter); }
.media--checker { filter: var(--placeholder-filter); }

/* Theme change: the new theme dissolves in, in organic patches from the lamp's bulb. The mask is drawn frame by frame by scripts/lib/dissolve.js; this hold
   animation just keeps the transition open for as long as the dissolve runs. */
html:active-view-transition-type(theme)::view-transition-old(root) { animation: none; z-index: 0; }
html:active-view-transition-type(theme)::view-transition-new(root) {
  animation: theme-hold var(--theme-ms, 1100ms) linear both;
  z-index: 1;
}
@keyframes theme-hold { from { opacity: 1; } to { opacity: 1; } }

/* ---------- Bend (scripts/lib/bend.js) ----------
   Images drawn by the WebGL canvas: the real element keeps its place, just unseen. */
.is-bent,
.is-bent .media { visibility: hidden; }

/* ---------- Lamp: the pull-cord light / dark switch (scripts/lamp.js) ----------
   A viewport-sized, click-through WebGL layer; only the grab zone over the handle takes
   input. #lamp-anchor sets where the lamp hangs and how big it is — edit it to move it.
   It sits just left of the "A.O.D LLM" button in the header. */
#lamp {
  /* Only the corner the lamp can reach — a full-window WebGL layer would be re-blended on
     every scroll frame. The cord can't be pulled further than ~420px from where it hangs. */
  position: fixed;
  top: 0;
  right: 0;
  width: min(100vw, 46rem);
  height: min(100vh, 60rem);
  z-index: 45;                         /* above the header (40), below the menu (50) */
  pointer-events: none;
  opacity: 0;
  transition: opacity 600ms var(--ease-out);
}
#lamp.is-ready { opacity: 1; }
#lamp canvas { display: block; width: 100%; height: 100%; }
#lamp-anchor {
  position: fixed;
  top: 0;
  right: calc(var(--grid-margin) + 6.5rem);
  width: 300px;
  height: 480px;
  pointer-events: none;
  visibility: hidden;
}
#lamp-grab {
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 72px;
  border-radius: 24px;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  outline: none;
}
#lamp-grab:active { cursor: grabbing; }
#lamp-grab:focus-visible { box-shadow: 0 0 0 2px var(--color-text); }
/* Warm glow that spreads from the bulb when the light comes on */
#lamp-bloom {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 44;
  width: 140vmax;
  height: 140vmax;
  margin: -70vmax 0 0 -70vmax;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(closest-side, rgba(255, 196, 120, 0.42), rgba(255, 196, 120, 0.12) 45%, rgba(255, 196, 120, 0) 72%);
}
@media (max-width: 40rem) {
  #lamp-anchor { right: calc(var(--grid-margin) + 4.5rem); width: 220px; height: 352px; }
}
/* While the theme dissolves, the lamp and its glow get their own layers and stay live
   (the rest of the page is a snapshot), so the bulb keeps swinging through the change */
html.is-theme-switching #lamp { view-transition-name: lamp; }
html.is-theme-switching #lamp-bloom { view-transition-name: lamp-bloom; }
html:active-view-transition-type(theme)::view-transition-group(lamp),
html:active-view-transition-type(theme)::view-transition-group(lamp-bloom) { animation: none; }
html:active-view-transition-type(theme)::view-transition-old(lamp),
html:active-view-transition-type(theme)::view-transition-old(lamp-bloom) { display: none; }
html:active-view-transition-type(theme)::view-transition-new(lamp),
html:active-view-transition-type(theme)::view-transition-new(lamp-bloom) { animation: none; }

/* ---------- Sole Mates thumbnail (scripts/sole-map.js) ----------
   The running photo, with a live map card at its bottom-left (Figma 112:213 → 112:215).
   The Works card and the case study's overview use the same one. */
.sole-thumb { position: relative; container-type: inline-size; overflow: hidden; background: #0d0d0d; }
.sole-thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sole-map { position: absolute; top: auto; transform-origin: 50% 0%; } /* rings like a bell, from the top */
.sole-map__card {
  position: absolute; inset: 0; overflow: hidden; box-sizing: border-box; background: #EEF0F2;
  transform-origin: 0% 100%;
  box-shadow: 0 2.4cqw 5cqw rgb(0 0 0 / 0.5), 0 0.4cqw 1cqw rgb(0 0 0 / 0.25);
}
.sole-map img { max-width: none; }
.sole-map__pin img, .sole-map__badge img { height: auto; }
.sole-map__scene { position: absolute; left: 0; top: 0; width: 551px; height: 530px; transform-origin: 0 0; font-family: var(--font-sans); color: #111; }
.sole-map__view { position: absolute; overflow: hidden; }
.sole-map__svg { position: absolute; left: 0; top: 0; overflow: visible; }
.sole-map__runner, .sole-map__pin, .sole-map__open { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.sole-map__runner img { position: absolute; left: -30px; top: -30px; width: 60px; height: 60px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px #fff, 0 8px 18px rgb(0 0 0 / 0.28); }
.sole-map__bubble {
  position: absolute; left: 0; top: 0; padding: 10px 16px; border-radius: 18px 18px 18px 5px;
  background: #fff; color: #111; font-size: 20px; line-height: 24px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap;
  transform-origin: 0% 100%; box-shadow: 0 10px 24px rgb(0 0 0 / 0.18);
}
.sole-map__pin i { position: absolute; left: -58px; top: -58px; width: 116px; height: 116px; border-radius: 50%; background: #111; box-shadow: 0 0 0 5px #fff, 0 12px 26px rgb(0 0 0 / 0.35); }
.sole-map__pin img { position: absolute; left: -42px; top: -18px; width: 84px; }
.sole-map__open { display: block; }
.sole-map__open::before { content: "?"; position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #B9BEC6; color: #fff; font-size: 26px; font-weight: 700; box-shadow: 0 0 0 4px #fff; }
.sole-map__open { font-size: 0; }
.sole-map__post { position: absolute; inset: 0; padding: 28px; }
.sole-map__head { display: flex; align-items: center; gap: 14px; }
.sole-map__head b { display: block; font-size: 22px; line-height: 26px; letter-spacing: -0.02em; }
.sole-map__head small { display: block; font-size: 16px; line-height: 20px; color: #8a8a8a; }
.sole-map__badge { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #111; }
.sole-map__badge img { width: 42px; }
.sole-map__text { margin: 18px 0 0; font-size: 27px; line-height: 32px; font-weight: 600; letter-spacing: -0.03em; }
.sole-map__foot { position: absolute; left: 28px; right: 28px; bottom: 24px; display: flex; align-items: center; justify-content: space-between; }
.sole-map__fire { font-size: 20px; font-weight: 600; color: #444; }
.sole-map__join { position: relative; overflow: hidden; display: inline-grid; height: 50px; padding: 0 24px; border-radius: 999px; color: #fff; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.sole-map__join > span { grid-area: 1 / 1; align-self: center; text-align: center; white-space: nowrap; }
.sole-map__emoji { position: absolute; left: 0; font-size: 11cqw; line-height: 1; pointer-events: none; filter: drop-shadow(0 1cqw 1.4cqw rgb(0 0 0 / 0.35)); }

/* ---------- Aurai Website thumbnail (scripts/aurai-globe.js) ----------
   A dotted globe in Aurai gold, country borders traced, relay arcs between countries */
.aurai-globe { position: relative; overflow: hidden; background: #0A0A0A; }
.aurai-globe > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.aurai-globe { container-type: inline-size; }
.aurai-globe__labels { position: absolute; inset: 0; pointer-events: none; }
.aurai-globe__city { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; will-change: transform, opacity; }
.aurai-globe__pill {
  padding: 0.3em 0.55em 0.35em; border-radius: 0.4em; white-space: nowrap;
  font-size: clamp(8px, 2.5cqw, 13px); font-weight: 500; letter-spacing: -0.005em; line-height: 1.2;
  background: rgb(26 24 20 / 0.92); border: 1px solid rgb(254 198 0 / 0.18); color: #ebe8e3;
  transition: background-color 0.35s ease, color 0.35s ease, transform 0.5s cubic-bezier(.2,.8,.2,1);
}
.aurai-globe__stem { width: 1px; height: calc(clamp(7px, 2.2cqw, 12px) * var(--lift, 1)); background: rgb(254 198 0 / 0.45); transition: height 0.5s cubic-bezier(.2,.8,.2,1); }
.aurai-globe__mark { width: clamp(3px, 1cqw, 5px); aspect-ratio: 1; background: #FEC600; transition: transform 0.35s ease; }
.aurai-globe__city.is-lit .aurai-globe__pill { background: #FEC600; color: #0A0A0A; transform: translateY(-4px); }
.aurai-globe__city.is-lit .aurai-globe__stem { height: calc(clamp(7px, 2.2cqw, 12px) * var(--lift, 1) + clamp(3px, 0.8cqw, 6px)); background: #FEC600; }
.aurai-globe__city.is-lit .aurai-globe__mark { transform: scale(1.4); }

/* ---------- Footer (Figma 19:124) · scripts/gravity-footer.js ----------
   "Let's work together" over a rope. Balls rain in and rest on the rope, which sags under
   them; the chips rest on it too. Without the script (or with reduced motion) the chips sit
   where the design puts them and the divider is the rope. */
.site-footer {
  position: relative;
  min-height: clamp(36rem, 100svh, 64rem);
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  padding: var(--space-32) var(--grid-margin) 5.625rem;          /* 32 / 60 / 90 */
  overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  color: var(--color-text-strong);
}
.site-footer__title {
  margin: auto 0; max-width: 5.2em; text-align: center;
  font-size: clamp(3.5rem, 8.9vw, 8rem); line-height: 1.1; font-weight: var(--weight-regular); letter-spacing: -0.035em;
  position: relative; z-index: 1; cursor: default;   /* hover shows the projects (footer-preview.js) */
}
.site-footer__base { align-self: stretch; display: flex; flex-direction: column; gap: var(--space-24); }
.site-footer__rope { display: block; height: 1px; background: var(--color-border); }
.site-footer.is-live .site-footer__rope { visibility: hidden; }   /* the canvas draws the real rope */
.site-footer__copy { margin: 0; font-size: 1rem; line-height: 1.5rem; color: var(--color-text-strong); }
.site-footer__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 2; pointer-events: none; }
.site-footer__chip {
  position: absolute; z-index: 3; left: calc(var(--x) * 100%); bottom: calc(5.625rem + 1.5rem + var(--space-24) + 6px);
  translate: -50% 0; rotate: var(--tilt);
  display: inline-flex; align-items: center; gap: var(--space-8); padding: 4px 8px 4px 10px;
  border: 0; border-radius: var(--radius-md); background: var(--color-inverse-bg); color: var(--color-inverse-text); /* Figma 33:1121: #1A1A1A / #BABABA in light mode */
  font: inherit; font-size: 1rem; line-height: 1.5rem; white-space: nowrap; text-decoration: none;
  cursor: grab; user-select: none; touch-action: none; -webkit-user-drag: none;
}
.site-footer__chip:active { cursor: grabbing; }
.site-footer__label { min-width: 0; overflow: hidden; } /* narrows with the chip as "Copied" swaps in and out */
.site-footer__chip:focus-visible { outline: 2px solid var(--color-text-strong); outline-offset: 2px; }
.site-footer.is-live .site-footer__chip { left: 0; top: 0; bottom: auto; translate: none; rotate: none; will-change: transform; }
.site-footer__icon { width: 20px; height: 20px; flex: none; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.site-footer__icon--copy { --i: url("../assets/icons/copy-bold.svg"); }
.site-footer__icon--out { --i: url("../assets/icons/arrow-up-right.svg"); }

/* Footer heading hover: a project preview trails the cursor (scripts/footer-preview.js) —
   the Works list view's preview, on every page */
.footer-preview {
  position: fixed; left: 0; top: 0; z-index: 30;
  width: 17.5rem; aspect-ratio: 4 / 3; border-radius: var(--radius-md); overflow: hidden;
  pointer-events: none;
  opacity: 0; scale: 0.6; will-change: transform;
  transition: opacity 250ms var(--ease-out), scale 400ms var(--ease-out);   /* as the list view */
}
.footer-preview.is-visible { opacity: 1; scale: 1; }
.footer-preview__item { position: absolute; inset: 0; overflow: hidden; isolation: isolate; background: var(--color-surface); } /* each its own layer: a globe's labels stay inside it */
.footer-preview__item > video, .footer-preview__item > img, .footer-preview__item > .aurai-globe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.footer-preview__item.is-bent .footer-preview__name,
.footer-preview__item.is-bent .aurai-globe__labels { visibility: visible; } /* the canvas draws the picture; these stay DOM */
.footer-preview__item:not(.is-current) .footer-preview__name,
.footer-preview__item:not(.is-current) .aurai-globe__labels { visibility: hidden; }
.footer-preview__name {
  position: absolute; left: var(--space-8); bottom: var(--space-8); z-index: 1;
  padding: 2px 8px; border-radius: var(--radius-sm); background: rgb(0 0 0 / 0.55); color: #fff;
  font-size: var(--text-xs); line-height: var(--leading-xs); white-space: nowrap;
}
@media (hover: none), (prefers-reduced-motion: reduce) { .footer-preview { display: none; } }

/* Preloader (Figma 119:158) — scripts/preloader.js. Once per visit; the page stays hidden
   (html.is-preloading, set before first paint) until the curtain lifts. */
html.is-preloading { background: #151515; }
html.is-preloading body { visibility: hidden; overflow: hidden; }
.preloader {
  position: fixed; inset: 0; z-index: 1000; visibility: visible;
  display: flex; align-items: center; justify-content: center; padding: 90px 60px;
  background: #151515; color: #fff;                      /* Figma: #151515, white */
}
.preloader__row { display: flex; align-items: center; gap: 10px; }
.preloader__track {
  position: relative; width: min(404px, 100vw - 9rem); height: 1px; overflow: hidden;
  background: #565656;                                   /* Figma: the unfilled line */
}
.preloader__fill { position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: 0 50%; }
.preloader__count {
  display: inline-flex; min-width: 4ch;                  /* room for "100%": the line doesn't shift */
  font-family: var(--font-sans); font-size: 14px; line-height: 1; font-variant-numeric: tabular-nums;
}
.preloader__digits { display: inline-flex; }
.odo { display: inline-block; width: 1ch; height: 1em; overflow: hidden; }          /* a wheel's window */
.odo__strip { display: flex; flex-direction: column; transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1); }
.odo__strip > span { display: block; height: 1em; }
.preloader__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.preloader__thread { fill: none; stroke: #fff; stroke-width: 1px; stroke-linecap: round; stroke-linejoin: round; }

/* A launch countdown tag ("Live in 6d 15h 02m 11s"): fixed-width digits so it doesn't jitter as it ticks */
.tag--countdown { font-variant-numeric: tabular-nums; }

/* ---------- Project summary (scripts/lib/project-summary.js) ----------
   In the cursor with a mouse (.cursor.is-summary); a tip where the tap landed otherwise. */
.summary {
  width: min(calc(100vw - 32px), 20rem);
  padding: var(--space-16);
  color: var(--color-inverse-text);
  font-size: var(--text-md);
  line-height: var(--leading-md);
  white-space: normal;
}
.summary__name { margin: 0 0 var(--space-8); font-weight: var(--weight-medium); }
.summary__text { position: relative; margin: 0; }
.summary__word { display: inline-block; white-space: pre; }
.summary__letter {
  display: inline-block;
  opacity: 0;
  filter: blur(4px);
  transition: opacity 220ms ease-out, filter 220ms ease-out;
}
.summary__letter.is-on { opacity: 1; filter: blur(0); }
.summary__caret {
  position: absolute;
  top: 0;
  left: 0;
  width: 1.5px;
  height: 1lh;
  background: currentColor;
  transition: opacity 200ms ease-out;
}
.summary__caret.is-done { opacity: 0; }

.cursor__summary {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  filter: blur(6px);
  transition: opacity 150ms var(--ease-out), filter 150ms var(--ease-out);
}
.cursor.is-summary {
  width: var(--summary-w);
  height: var(--summary-h);
  border-radius: var(--radius-lg);
}
.cursor.is-summary .cursor__label { opacity: 0; filter: blur(4px); transition: opacity 120ms var(--ease-out), filter 120ms var(--ease-out); }
.cursor.is-summary .cursor__summary {
  opacity: 1;
  filter: none;
  transition-duration: 300ms;
  transition-delay: 140ms;            /* comes in once the pill has started to open */
}

.summary-tip {
  position: fixed;
  z-index: 60;
  width: 10px;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;                 /* starts as the cursor's dot */
  background: var(--color-inverse-bg);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition:
    width 450ms var(--ease-out),
    height 450ms var(--ease-out),
    border-radius 450ms var(--ease-out),
    opacity 200ms var(--ease-out);
}
.summary-tip.is-open {
  width: var(--summary-w);
  height: var(--summary-h);
  border-radius: var(--radius-lg);
  opacity: 1;
}
.summary-tip .summary {
  opacity: 0;
  filter: blur(6px);
  transition: opacity 150ms var(--ease-out), filter 150ms var(--ease-out);
}
.summary-tip.is-open .summary {
  opacity: 1;
  filter: none;
  transition-duration: 300ms;
  transition-delay: 140ms;
}
@media (prefers-reduced-motion: reduce) {
  .summary-tip, .summary-tip .summary { transition: none; }
}

/* ---------- Feedback bell (scripts/feedback.js) ----------
   A bell in the nav, just before A.O.D LLM. It opens a thread of visitors' notes with a box to
   add one. The thread is its own fixed layer: the header blends with "difference". */
.site-header__end { display: inline-flex; align-items: center; gap: var(--space-24); }
.fb-bell { position: relative; padding: 0; border: 0; background: none; cursor: pointer; }
.fb-bell__icon svg { width: 100%; height: 100%; overflow: visible; }   /* the strike arcs sit outside */
.fb-bell__icon { transition: transform 160ms var(--ease-out); }
.fb-bell:active .fb-bell__icon { transform: scale(0.92); }
.fb-bell__wave { opacity: 0; }
/* The bell fills while its thread is open */
.fb-bell__shell { fill: transparent; transition: fill 200ms var(--ease-out); }
.fb-bell[aria-expanded="true"] .fb-bell__shell { fill: currentColor; }
.fb-bell:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: var(--radius-md); }
.fb-bell__dot {
  position: absolute; top: 1px; right: 0; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
}
.fb {
  position: fixed;
  top: calc(var(--header-h) - var(--space-16));
  right: var(--grid-margin);
  z-index: 48;                                 /* over the lamp (45), under the menu (50) */
  display: flex;
  flex-direction: column;
  width: min(23.75rem, calc(100vw - 2rem));
  max-height: min(70dvh, 36rem);
  overflow: hidden;
  border-radius: 16px;
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: 0 0 0 1px var(--color-border);
}
.fb[hidden], .fb [hidden] { display: none !important; }
.fb__head { padding: var(--space-16) var(--space-16) var(--space-12); border-bottom: 1px solid var(--color-border); }
.fb__title { margin: 0; font-size: var(--text-md); line-height: var(--leading-md); font-weight: 500; }
.fb__sub { margin: 2px 0 0; font-size: var(--text-sm); line-height: 1.45; color: var(--color-text-muted); }
.fb__list { flex: 1 1 auto; min-height: 4rem; margin: 0; padding: var(--space-4) 0; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.fb__post { padding: var(--space-12) var(--space-16); }
.fb__post + .fb__post { border-top: 1px solid var(--color-border); }
.fb__meta { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-12); margin: 0 0 2px; font-size: var(--text-sm); }
.fb__who { font-weight: 500; }
.fb__meta time { flex: none; font-size: 0.75rem; color: var(--color-text-muted); }
.fb__msg { margin: 0; font-size: var(--text-sm); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; color: var(--color-text-muted); }
.fb__empty { padding: var(--space-24) var(--space-16); text-align: center; font-size: var(--text-sm); color: var(--color-text-muted); }
.fb__form, .fb__thanks { border-top: 1px solid var(--color-border); background: var(--color-surface-subtle); }
.fb__form { display: flex; flex-direction: column; gap: var(--space-8); padding: var(--space-12); }
.fb__form textarea, .fb__form input {
  width: 100%; border: 0; border-radius: var(--radius-md); background: var(--color-bg); color: inherit;
  font: inherit; font-size: var(--text-sm); line-height: 1.5; outline: none;
  box-shadow: 0 0 0 1px var(--color-border);
}
.fb__form textarea { padding: var(--space-8) var(--space-10); resize: none; }
.fb__form input { padding: 0 var(--space-10); height: 32px; }
.fb__form textarea:focus-visible, .fb__form input:focus-visible { box-shadow: 0 0 0 1.5px var(--color-text); }
.fb__form ::placeholder { color: var(--color-text-muted); }
.fb__row { display: flex; gap: var(--space-8); }
.fb__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fb__send {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--space-12);
  border: 0; border-radius: var(--radius-md); background: var(--color-inverse-bg); color: var(--color-inverse-text);
  font: inherit; font-size: var(--text-sm); cursor: pointer;
  transition: transform 160ms var(--ease-out), opacity 160ms var(--ease-out);
}
.fb__send:active:not(:disabled) { transform: scale(0.97); }
.fb__send:disabled { opacity: 0.4; cursor: not-allowed; }
.fb__spin { display: none; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: fb-spin 0.7s linear infinite; }
.fb[data-state="sending"] .fb__spin { display: inline-block; }
@keyframes fb-spin { to { transform: rotate(1turn); } }
.fb__hint { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 0.75rem; color: var(--color-text-muted); }
.fb__hint kbd { padding: 0 4px; border: 1px solid var(--color-border); border-radius: 4px; background: var(--color-bg); font: inherit; font-size: 0.6875rem; }
.fb__error { margin: 0; font-size: var(--text-sm); color: #d9534f; }
.fb__error:empty { display: none; }
.fb__thanks { display: flex; align-items: center; gap: var(--space-8); padding: var(--space-16); font-size: var(--text-sm); }
.fb__check { flex: none; width: 16px; height: 16px; color: #22a06b; }
.fb__check path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: fb-draw 300ms var(--ease-out) 200ms forwards; }
@keyframes fb-draw { to { stroke-dashoffset: 0; } }
@media (hover: none) { .fb__hint { display: none; } }   /* no keyboard shortcut on touch */
@media (prefers-reduced-motion: reduce) {
  .fb__spin { animation: none; }
  .fb__check path { stroke-dashoffset: 0; animation: none; }
}

/* ---------- Logo: the signature (scripts/logo-signature.js) ---------- */
.logo__sig {
  display: block;
  height: 2rem;                 /* 32: the A's tail hangs a little below the line, like a signature */
  width: auto;
  margin-block: -0.25rem;       /* keeps the nav's line height */
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 35;             /* viewBox units: 1.6px at 32px tall */
  stroke-linecap: round;
  stroke-linejoin: round;
  /* the glare: a soft band of lighter ink that sweeps across while signing */
  -webkit-mask-image: linear-gradient(100deg, #000 42%, rgba(0, 0, 0, 0.2) 50%, #000 58%);
  mask-image: linear-gradient(100deg, #000 42%, rgba(0, 0, 0, 0.2) 50%, #000 58%);
  -webkit-mask-size: 300% 100%;
  mask-size: 300% 100%;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;
}
.logo__sig path { stroke-dasharray: 1 1; stroke-dashoffset: 0; }
