/* Screenery gallery
   1. Tokens and base   2. Header   3. The board   4. Buttons
   5. Facts   6. Footer   7. Links and scaled frames
   9. Make it yours   10. Inspection table   11. Agents and FAQ   12. Scroll motion */

/* 1. Tokens and base -------------------------------------------------- */
:root {
  --paper: #eef0f2;
  --paper-2: #e1e4e8;
  --ink: #101214;
  --ink-2: #474d55;
  --line: rgb(16 18 20 / 0.14);
  --accent: #3d6bff;
  --accent-ink: #2447c9;
  --radius: 10px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sans: 'Epilogue', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Spline Sans Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  accent-color: var(--accent);
  caret-color: var(--accent);
  scrollbar-color: var(--ink) var(--paper-2);
}
::selection { background: var(--ink); color: var(--paper); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
h1, h2, h3, p, ul, ol, dl, dd, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--paper-2); padding: 0.1em 0.35em; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--ink); color: var(--paper); padding: 0.7rem 1rem; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 1rem; }

@view-transition { navigation: auto; }

/* 2. Header ----------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem var(--gutter);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.top.is-stuck { border-bottom-color: var(--line); }
.mark { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.02em; text-decoration: none; }
.top__nav { display: flex; gap: clamp(0.9rem, 2.5vw, 2rem); font-size: 0.95rem; }
.top__nav a { text-decoration: none; padding: 0.6rem 0; position: relative; }
.top__nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0.35rem; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.top__nav a:hover::after, .top__nav a:focus-visible::after { transform: scaleX(1); }

/* 3. The board: the whole collection on one screen ---------------------- */
/* Six by four. Twenty tiles, each set in its template's own colours and typeface,
   around a two-by-two block that holds the headline. */
.filterbar { position: sticky; top: 3.95rem; z-index: 15; padding: 0.35rem clamp(0.75rem, 1.6vw, 1.5rem) 0.6rem; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
.filterbar .filters { display: flex; gap: 0.3rem; overflow-x: auto; scrollbar-width: none; }
.filterbar .filter { flex: none; }
.board {
  --gap: 6px;
  /* Four rows fill the first screen; the rest of the collection continues below at the same size. */
  --row: clamp(9.5rem, calc((100svh - 7.6rem - 3 * var(--gap) - 1rem) / 4), 15.5rem);
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: var(--row); gap: var(--gap);
  padding: 0 clamp(0.75rem, 1.6vw, 1.5rem) clamp(0.75rem, 1.6vw, 1.5rem);
}
.board__tiles { display: contents; }
/* The headline block: the same inset on all four sides, headline pinned to the top edge,
   controls to the bottom edge, so it sits in its two-by-two space like a tile does. */
.board__copy { grid-column: 3 / 5; grid-row: 2 / 4; container-type: inline-size; display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; padding: var(--inset); min-width: 0; --inset: clamp(1rem, 1.7vw, 1.75rem); }
.board h1 span { display: block; white-space: nowrap; }
.board h1 { font-size: clamp(1.7rem, min(11.3cqw, 7.4vh), 5.5rem); font-weight: 600; line-height: 0.96; letter-spacing: -0.04em; margin: 0 0 0 -0.04em; }
.install { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.35rem 0.35rem 0.9rem; background: var(--ink); color: var(--paper); border-radius: 10px; }
.install code { flex: 1; min-width: 0; padding: 0; background: none; font: 400 clamp(0.75rem, 3.45cqw, 0.9375rem)/1.4 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.install code::before { content: '$ '; opacity: 0.55; }
.install__copy { flex: none; min-height: 2.25rem; min-width: 4.4rem; padding: 0 0.8rem; font: 500 0.875rem/1 var(--sans); color: var(--ink); background: var(--paper); border: 0; border-radius: 7px; cursor: pointer; }
.install__copy:hover { background: #fff; }
.install :focus-visible { outline-color: #8aa6ff; }
.board__lede { margin-top: 0.8rem; color: var(--ink-2); font-size: clamp(0.95rem, 1.05vw, 1.0625rem); line-height: 1.45; text-wrap: pretty; }
.filter {
  min-height: 2.25rem; padding: 0 0.75rem;
  font: 500 0.875rem/1 var(--sans); color: var(--ink);
  background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.filter:hover { border-color: var(--ink); }
.filter[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filter__n { font: 400 0.75rem/1 var(--mono); opacity: 0.65; margin-left: 0.2rem; }
.board__random { min-height: 2.25rem; margin-top: 0.6rem; padding: 0; font: 500 0.875rem/1.3 var(--sans); color: var(--ink); background: none; border: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent-ink); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.board__random:hover { color: var(--accent-ink); }

.tile { min-width: 0; min-height: 0; container-type: inline-size; transition: opacity 0.35s var(--ease), filter 0.35s var(--ease); animation: deal 0.7s var(--ease) backwards; animation-delay: calc(min(var(--i), 24) * 26ms); }
.tile a {
  position: relative; display: grid; grid-template-rows: auto 1fr auto; height: 100%;
  padding: clamp(0.6rem, 5cqw, 0.9rem); overflow: hidden;
  background: var(--bg); color: var(--fg); border-radius: 10px; text-decoration: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 12%, transparent);
}
.tile__n { font: 400 0.75rem/1.3 var(--mono); }
.tile__name { align-self: end; font-size: clamp(1.25rem, 15cqw, 2.9rem); line-height: 0.95; letter-spacing: -0.015em; text-wrap: balance; overflow-wrap: anywhere; }
.tile.is-long .tile__name { font-size: clamp(1.1rem, 11.5cqw, 2.2rem); }
.tile__type { margin-top: 0.5rem; font: 400 0.75rem/1.3 var(--mono); color: var(--ac); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Hover or focus lifts the curtain on the real screen. */
.tile__shot { position: absolute; inset: 0; opacity: 0; transform: scale(1.06); transition: opacity 0.35s var(--ease), transform 0.7s var(--ease); }
.tile__shot img { width: 100%; height: 100%; object-fit: cover; object-position: 0 0; }
.tile a:hover .tile__shot, .tile a:focus-visible .tile__shot { opacity: 1; transform: none; }
.tile a:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 10px; }
.tile[hidden] { display: none; }
@keyframes deal { from { opacity: 0; transform: translateY(14px) scale(0.97); } }

h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }

/* 4. Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0 1.35rem;
  font: 500 1rem/1 var(--sans); color: var(--ink);
  background: transparent; border: 1px solid var(--ink); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: background 0.25s, color 0.25s, transform 0.4s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: scale(0.97); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent-ink); border-color: var(--accent-ink); }


/* 5. Facts and steps ---------------------------------------------------- */
.inside, .use { padding: clamp(3.5rem, 8vw, 6.5rem) var(--gutter); border-top: 1px solid var(--line); }
.inside { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2rem clamp(2rem, 5vw, 5rem); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(1.5rem, 4vw, 3.5rem); }
.facts > div { padding: 1.4rem 0 1.6rem; border-top: 1px solid var(--line); }
.facts > div:nth-child(-n + 2) { border-top-color: var(--ink); }
.facts dt { font-weight: 600; font-size: 1.125rem; letter-spacing: -0.015em; }
.facts dd { margin-top: 0.45rem; color: var(--ink-2); max-width: 30rem; text-wrap: pretty; }

.use { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); gap: 2rem clamp(2rem, 5vw, 5rem); align-items: start; }
.steps { counter-reset: step; display: grid; gap: 1.75rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.4rem 1fr; column-gap: 1rem; }
.steps li::before { content: counter(step); grid-row: span 2; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font: 500 0.9rem/1 var(--mono); }
.steps h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.015em; line-height: 2.4rem; }
.steps p { color: var(--ink-2); max-width: 32rem; text-wrap: pretty; }
.tree { background: var(--ink); color: var(--paper); padding: 1.3rem 1.5rem; border-radius: var(--radius); font: 400 0.875rem/1.75 var(--mono); overflow-x: auto; }
.tree code { background: none; padding: 0; font-size: inherit; }

/* 6. Footer -------------------------------------------------------------- */
.foot { padding: clamp(3rem, 6vw, 5rem) var(--gutter) 0; border-top: 1px solid var(--ink); font-size: 0.95rem; color: var(--ink-2); overflow: hidden; }
.foot strong { display: block; color: var(--ink); font-weight: 700; font-size: 1.125rem; letter-spacing: -0.02em; margin-bottom: 0.3rem; }
.foot__cols { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); gap: 2rem clamp(1.5rem, 4vw, 4rem); }
.foot__cols ul { display: grid; gap: 0.15rem; align-content: start; }
.foot__cols a { display: inline-block; padding: 0.4rem 0; color: var(--ink); text-decoration: none; }
.foot__cols a:hover { text-decoration: underline; }
.foot__note { margin-top: 2.5rem; max-width: 44rem; font-size: 0.875rem; }
.wordmark { position: relative; margin-top: clamp(2rem, 5vw, 4rem); height: clamp(5.5rem, 22vw, 22rem); display: flex; align-items: flex-end; }
.wordmark__word { font-family: var(--sans); font-weight: 700; font-size: clamp(4rem, 16.4vw, 17rem); line-height: 0.8; letter-spacing: -0.03em; color: var(--ink); white-space: nowrap; transform: translateY(12%); }
.wordmark__cap { position: absolute; right: 0; top: 0; font: 400 0.8125rem/1.4 var(--mono); color: var(--ink-2); }

/* 7. Live stage ----------------------------------------------------------- */
.link { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--accent-ink); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.link:hover { color: var(--accent-ink); }

.yours__head p, .agents__head p, .checked__head p { text-wrap: pretty; }

/* A live page drawn at its real size, then scaled to fit its frame. */
.scaled { position: relative; overflow: hidden; background: var(--paper-2); }
.scaled iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #fff; }

/* 9. Make it yours -------------------------------------------------------- */
.yours, .checked, .agents, .faq { padding: clamp(3.5rem, 8vw, 6.5rem) var(--gutter); border-top: 1px solid var(--line); }
.yours { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2.5rem clamp(2rem, 5vw, 5rem); align-items: start; }
.yours__head { position: sticky; top: 6rem; }
.yours__head p, .agents__head p, .checked__head p { margin-top: 1.1rem; color: var(--ink-2); max-width: 32rem; }
.palettes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-top: 1.6rem; }
.pal { display: flex; align-items: center; gap: 0.65rem; min-height: 3rem; padding: 0 0.9rem; font: 500 0.95rem/1.2 var(--sans); color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; text-align: left; transition: border-color 0.2s, background 0.2s; }
.pal:hover { border-color: var(--ink); }
.pal[aria-pressed='true'] { border-color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--ink); }
.pal__sw { display: inline-flex; flex: none; }
.pal__sw i { width: 0.95rem; height: 0.95rem; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.pal__sw i + i { margin-left: -0.25rem; }
.tokens, .prompt pre { margin: 0; font: 400 0.875rem/1.75 var(--mono); overflow-x: auto; }
.tokens { margin-top: 1rem; padding: 1.1rem 1.3rem; background: var(--ink); color: var(--paper); border-radius: var(--radius); }
.tokens code, .prompt code { background: none; padding: 0; font-size: inherit; }
.yours__frame { border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 40px 70px -40px rgb(16 18 20 / 0.5); }

/* 10. Inspection table ----------------------------------------------------- */
.checked { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2.5rem clamp(2rem, 5vw, 5rem); align-items: start; }
.checked__list { margin: 1.5rem 0; border-bottom: 1px solid var(--line); }
.checked__list li { padding: 0.55rem 0; border-top: 1px solid var(--line); font-size: 0.95rem; line-height: 1.4; text-wrap: balance; }
.checked__table { overflow-x: auto; border-top: 1px solid var(--ink); }
.checked__table summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.015em; cursor: pointer; list-style: none; }
.checked__table summary::-webkit-details-marker { display: none; }
.checked__table summary::after { content: '+'; font: 400 1.4rem/1 var(--mono); transition: transform 0.4s var(--ease); }
.checked__table[open] summary::after { transform: rotate(45deg); }
.checked table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.checked th, .checked td { padding: 0.62rem 0.75rem 0.62rem 0; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.checked thead th { font: 400 0.8125rem/1.3 var(--mono); color: var(--ink-2); border-bottom-color: var(--ink); }
.checked tbody th { font-weight: 500; }
.checked tbody th a { text-decoration: none; }
.checked tbody th a:hover { text-decoration: underline; }
.checked td { font: 400 0.8125rem/1.3 var(--mono); }
.checked td.ok { color: #14663c; }
.checked td.ok::before { content: ''; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.45rem; border-radius: 50%; background: #1f9d5b; }
.checked td.bad { color: var(--accent-ink); font-weight: 500; }
.checked .num { text-align: right; padding-right: 0; color: var(--ink-2); }

/* 11. Agents and FAQ ------------------------------------------------------- */
.agents { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem clamp(2rem, 5vw, 5rem); align-items: start; }
.agents__files { display: grid; gap: 0; margin-top: 1.6rem; }
.agents__files li { padding: 0.8rem 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.agents__files .link { margin-right: 0.6rem; font-family: var(--mono); font-size: 0.9rem; }
.prompt { background: var(--ink); color: var(--paper); border-radius: 14px; overflow: hidden; }
.prompt__bar { display: flex; align-items: center; justify-content: space-between; padding: 0.55rem 0.6rem 0.55rem 1.3rem; border-bottom: 1px solid rgb(238 240 242 / 0.14); font: 400 0.8125rem/1.4 var(--mono); color: #a9b0b9; }
.prompt__copy { min-height: 2.25rem; min-width: 4.6rem; padding: 0 0.9rem; font: 500 0.875rem/1 var(--sans); color: var(--ink); background: #eef0f2; border: 0; border-radius: 8px; cursor: pointer; }
.prompt__copy:hover { background: #fff; }
.prompt pre { padding: 1.3rem; white-space: pre-wrap; }

.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2rem clamp(2rem, 5vw, 5rem); align-items: start; }
.q { border-top: 1px solid var(--line); }
.q:first-child { border-top-color: var(--ink); }
.q summary { display: flex; justify-content: space-between; gap: 1.5rem; padding: 1.15rem 0; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.015em; cursor: pointer; list-style: none; }
.q summary::-webkit-details-marker { display: none; }
.q summary::after { content: '+'; flex: none; font: 400 1.4rem/1 var(--mono); transition: transform 0.4s var(--ease); }
.q[open] summary::after { transform: rotate(45deg); }
.q p { padding: 0 3rem 1.4rem 0; color: var(--ink-2); max-width: 42rem; text-wrap: pretty; }

/* Responsive -------------------------------------------------------------- */
/* Short laptop screens: the headline and the controls are enough. */
@media (min-width: 75.01rem) and (max-height: 46rem) { .board__lede { display: none; } }
@media (max-width: 75rem) {
  .board { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: auto; grid-auto-rows: 9.5rem; }
  /* Stacked: the headline lines up with the logo above it, with equal air above and below. */
  .board__copy { grid-column: 1 / -1; grid-row: 1; display: block; padding: clamp(1.75rem, 4vw, 2.75rem) calc(var(--gutter) - clamp(0.75rem, 1.6vw, 1.5rem)); }
  .board h1 { font-size: clamp(1.9rem, 9.6cqw, 4.6rem); margin: 0 0 0 -0.04em; }
  .install { max-width: 30rem; margin-top: 1.4rem; }
  .board__lede { max-width: 34rem; margin-top: 1rem; }
}
@media (max-width: 62rem) {
  .inside, .yours, .checked, .agents, .faq { grid-template-columns: 1fr; }
  .yours__head { position: static; }
  .foot__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot__about { grid-column: 1 / -1; }
}
@media (max-width: 48rem) {
  .top__nav a:nth-child(n + 3) { display: none; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 8.25rem; }
  .filterbar { top: 3.9rem; padding-inline: var(--gutter); }
  .filter { min-height: 2.75rem; padding: 0 1rem; }
  .facts { grid-template-columns: 1fr; }
  .facts > div:nth-child(2) { border-top-color: var(--line); }
  .foot__cols { grid-template-columns: 1fr 1fr; }
  .q p { padding-right: 0; }
}

/* 12. Scroll motion -------------------------------------------------------- */
/* Everything is visible by default; these only run where scroll-driven animation exists. */
@supports (animation-timeline: scroll()) {
  /* A hairline under the header that tracks how far down the page you are. */
  .top::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
    animation: progress linear both; animation-timeline: scroll(root block);
  }
}
@keyframes progress { to { transform: scaleX(1); } }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    /* The board puts its screens away row by row as it leaves: each tile sinks back and dims. */
    .tile a {
      animation: recede linear both; animation-timeline: view(); animation-range: exit 0% exit 100%;
      transform-origin: 50% 0;
    }

    /* Rules are drawn in, left to right, like measurements being taken. */
    .facts > div, .checked__list li, .agents__files li, .q {
      --rule: var(--line);
      border-top-color: transparent;
      background: linear-gradient(var(--rule), var(--rule)) 0 0 / 0% 1px no-repeat;
      animation: rule linear both; animation-timeline: view(); animation-range: entry 20% cover 40%;
    }
    .facts > div:nth-child(-n + 2), .q:first-child { --rule: var(--ink); }

    /* The results come out of the inspector like a printout. */
    .checked__table { animation: printout linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }

    /* Live pages switch on: the crop opens and the frame settles onto the desk. */
    .yours__frame { animation: switch-on linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }

    /* The dark pieces pool in: lumps of ink jelly swell unevenly, wobble and run together until they fill the panel. */
    .jelly {
      --jelly:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M52 3C74 1 97 19 96 45c-1 18 3 31-9 43-14 13-36 10-51 6C17 89 2 74 4 52 6 31 14 23 25 13 32 7 41 4 52 3z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M46 4c19-3 30 9 41 20 11 12 11 25 8 39-4 17-16 33-36 34-17 1-35-6-47-20C1 63 3 45 10 31 18 15 30 7 46 4z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M55 5c15 2 32 13 38 30 5 15 2 25-3 37-7 15-21 25-41 24-20-1-38-12-44-30C0 49 8 30 20 18 30 9 41 3 55 5z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M46 4c19-3 30 9 41 20 11 12 11 25 8 39-4 17-16 33-36 34-17 1-35-6-47-20C1 63 3 45 10 31 18 15 30 7 46 4z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M52 3C74 1 97 19 96 45c-1 18 3 31-9 43-14 13-36 10-51 6C17 89 2 74 4 52 6 31 14 23 25 13 32 7 41 4 52 3z'/%3E%3C/svg%3E");
      -webkit-mask-image: var(--jelly); mask-image: var(--jelly);
      -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
      mask-position: 14% 26%, 76% 16%, 58% 84%, 94% 70%, 28% 94%;
      -webkit-mask-position: 14% 26%, 76% 16%, 58% 84%, 94% 70%, 28% 94%;
      -webkit-mask-size: 0 0, 0 0, 0 0, 0 0, 0 0; mask-size: 0 0, 0 0, 0 0, 0 0, 0 0;
      transform-origin: 50% 100%;
    }
    /* Played in time, not scrubbed by the scrollbar, so it stays smooth whatever the wheel does. */
    .jelly.is-in { animation: jelly 1.9s both, wobble 1.2s 1.25s both; }

    /* The last thing on the page: the wordmark rises out of the floor. */
    .wordmark { view-timeline: --wordmark block; }
    .wordmark__word { animation: rise linear both; animation-timeline: --wordmark; animation-range: entry 0% entry 100%; }
    .wordmark__cap { animation: settle linear both; animation-timeline: --wordmark; animation-range: entry 60% entry 100%; }
  }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 48rem) {
  /* On a phone the tiles are a long list; a gentler fall-off reads better. */
  @supports (animation-timeline: view()) { .tile a { animation-name: recede-soft; } }
}
@keyframes recede { to { transform: scale(0.9) translateY(4%); opacity: 0.15; filter: saturate(0.4); } }
@keyframes recede-soft { to { transform: scale(0.96); opacity: 0.4; } }
@keyframes rule { to { background-size: 100% 1px; } }
@keyframes printout { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes switch-on {
  from { clip-path: inset(8% 6% round 14px); transform: scale(0.96); filter: brightness(0.6) saturate(0.6); }
  to { clip-path: inset(0 0 round 14px); transform: none; filter: none; }
}
/* Each lump grows at its own pace, squashing wide then tall with less each time, like jelly settling. */
@keyframes jelly {
  0%, 14%, 28%, 42%, 56% { animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  70% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
  0%   { -webkit-mask-size: 0 0, 0 0, 0 0, 0 0, 0 0; mask-size: 0 0, 0 0, 0 0, 0 0, 0 0; }
  14%  { -webkit-mask-size: 18% 34%, 8% 16%, 12% 16%, 0 0, 4% 6%; mask-size: 18% 34%, 8% 16%, 12% 16%, 0 0, 4% 6%; }
  28%  { -webkit-mask-size: 30% 38%, 20% 34%, 28% 28%, 8% 18%, 14% 13%; mask-size: 30% 38%, 20% 34%, 28% 28%, 8% 18%, 14% 13%; }
  42%  { -webkit-mask-size: 33% 62%, 25% 42%, 33% 54%, 18% 27%, 17% 30%; mask-size: 33% 62%, 25% 42%, 33% 54%, 18% 27%, 17% 30%; }
  56%  { -webkit-mask-size: 52% 64%, 39% 60%, 53% 62%, 34% 48%, 37% 42%; mask-size: 52% 64%, 39% 60%, 53% 62%, 34% 48%, 37% 42%; }
  70%  { -webkit-mask-size: 68% 100%, 54% 84%, 70% 100%, 52% 88%, 56% 82%; mask-size: 68% 100%, 54% 84%, 70% 100%, 52% 88%, 56% 82%; }
  100% { -webkit-mask-size: 300% 300%, 300% 300%, 300% 300%, 300% 300%, 300% 300%; mask-size: 300% 300%, 300% 300%, 300% 300%, 300% 300%, 300% 300%; }
}
/* Once full, the panel itself wobbles and settles. */
@keyframes wobble {
  0%, 20%, 40%, 60%, 80% { animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  20% { transform: scale(1.022, 0.975); }
  40% { transform: scale(0.988, 1.016); }
  60% { transform: scale(1.008, 0.993); }
  80% { transform: scale(0.997, 1.003); }
}
@keyframes rise { from { translate: 0 75%; } to { translate: 0 0; } }
@keyframes settle { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
