/* Clay Icons marketing site: the landing page (index.html) and pricing (pricing.html).
   Paper background, tight black display type, mono captions, and flat poster-paint colour blocks that the
   clay pieces break out of. Assets come straight from the pack: ../icons, ../animations, the manifest. */

:root {
  --paper: #f4f2ec;
  --paper-2: #ebe8e0;
  --ink: #161616;
  --mute: #6d695f;
  --line: #d9d5ca;
  --grass: #25b34d;
  --sun: #fbbf14;
  --sky: #1b76d9;
  --pink: #f2668e;
  --white: #fffefb;

  --display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1240px;
  --gut: clamp(20px, 4vw, 56px);
  --radius-l: 28px;
  --radius-m: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.5 var(--display);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Type ─────────────────────────────────────────────────────────────── */
.mega, .h2, .h3 { font-family: var(--display); font-weight: 650; margin: 0; text-wrap: balance; }
.mega { font-size: clamp(50px, 7.4vw, 112px); line-height: 0.9; letter-spacing: -0.058em; font-variation-settings: "opsz" 96; }
.h2 { font-size: clamp(38px, 5.4vw, 76px); line-height: 0.95; letter-spacing: -0.048em; font-variation-settings: "opsz" 96; }
.h3 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.05; letter-spacing: -0.03em; }
.lede { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.35; letter-spacing: -0.012em; max-width: 34em; margin: 0; text-wrap: pretty; }
.body { color: var(--mute); max-width: 36em; margin: 0; text-wrap: pretty; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0.01em; color: var(--mute); }
code, pre, kbd { font-family: var(--mono); }

/* ── Buttons, chips ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 1.5px solid var(--ink); background: transparent;
  font-size: 18px; font-weight: 500; letter-spacing: -0.01em; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn.solid { background: var(--ink); color: var(--white); }
.btn.small { min-height: 40px; padding: 0 18px; font-size: 16px; }
.btn.on-color { border-color: transparent; background: var(--white); color: var(--ink); }
.btn img { width: 22px; height: 22px; margin: -4px -6px -4px -8px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 8px;
  border-radius: 999px; font: 500 14px/1 var(--mono); white-space: nowrap;
}
.chip img, .chip .sprite { width: 18px; height: 18px; }
.chip.ok { background: #e3f4e5; color: #1d7a36; }
.chip.wait { background: #fdf0c8; color: #8a6200; }
.chip.fail { background: #fde1e8; color: #b8264f; }
.chip.queue { box-shadow: inset 0 0 0 1.5px var(--line); color: var(--mute); }
.chip.retry { background: #dde9fb; color: #1b5bb0; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; cursor: pointer;
  font-size: 16px; color: var(--mute); white-space: nowrap;
}
.pill:hover { color: var(--ink); background: var(--paper-2); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.pill .n { font: 12px var(--mono); margin-left: 6px; opacity: 0.6; }

/* Painterly colour blocks: flat poster colour + the brush-dab texture on top. */
.paint { position: relative; isolation: isolate; }
.paint::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: url(paint.svg) 0 0 / 240px 240px, var(--paint, none) 0 0 / 420px 420px;
}
.grass { background-color: var(--grass); }
.sun { background-color: var(--sun); }
.sky { background-color: var(--sky); }
.pink { background-color: var(--pink); }

/* Claymation strips: one row of frames, stepped through with background-position. */
.sprite {
  display: inline-block; flex-shrink: 0; background-repeat: no-repeat; background-position: 0 0;
  animation-name: clay-strip; animation-iteration-count: infinite; animation-play-state: paused;
}
.sprite.go { animation-play-state: running; }
@keyframes clay-strip { from { background-position: 0 0; } to { background-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) { .sprite.go { animation-play-state: paused; } }

/* ── Header ───────────────────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 22px; font-weight: 650; letter-spacing: -0.035em; }
.brand img { width: 36px; height: 36px; margin: -4px 0; }
.brand .wm, .brand .wm-img { height: 58px; width: auto; display: block; overflow: visible; margin: 0; }
.foot .brand .wm, .foot .brand .wm-img { height: 64px; }
.brand .wm-small { font-size: 16px; font-weight: 700; letter-spacing: -0.04em; white-space: nowrap; }
.brand img.wm-h { width: auto; height: 46px; margin: -8px 0 -6px; }
@media (max-width: 560px) { .brand .wm, .brand .wm-img { height: 48px; } }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; font-size: 17px; }
.nav a:hover { background: var(--paper-2); }
.nav a[aria-current="page"] { background: var(--paper-2); }
@media (max-width: 860px) { .nav .wide { display: none; } }
@media (max-width: 560px) {
  .top .wrap { height: 64px; gap: 8px; }
  .nav { gap: 0; }
  .nav a { padding: 8px 10px; font-size: 16px; }
  .top .btn { display: none; }
}

/* ── Sections ─────────────────────────────────────────────────────────── */
.sec { padding: clamp(80px, 11vw, 150px) 0 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px 48px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head .body { justify-self: start; }
@media (max-width: 860px) { .sec-head { grid-template-columns: minmax(0, 1fr); } }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { padding-top: clamp(28px, 5vw, 64px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: clamp(28px, 4vw, 64px); align-items: stretch; }
.hero-copy { display: flex; flex-direction: column; gap: 32px; padding: clamp(8px, 3vw, 48px) 0; }
.hero-copy .mega { margin-bottom: 4px; }
.hero-copy .mono { margin-top: auto; }
.pile {
  position: relative; min-height: 600px; border-radius: var(--radius-l); overflow: visible;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab;
}
.pile.dragging { cursor: grabbing; }
.pile-bodies { position: absolute; inset: 0; border-radius: inherit; }
.pile-bodies > * { position: absolute; left: 0; top: 0; will-change: transform; pointer-events: none; }
.pile-bodies img, .pile-bodies .sprite { width: 100%; height: 100%; }
.pile-cap {
  position: absolute; left: 22px; right: 22px; top: 18px; display: flex; justify-content: space-between; gap: 12px;
  color: rgba(255, 255, 255, 0.92); font: 13px var(--mono); pointer-events: none;
}
.pile-cap span:last-child { text-align: right; }
.pile-tag {
  position: absolute; left: -22px; bottom: 38px; z-index: 3; max-width: 290px;
  background: var(--white); border-radius: 14px; padding: 14px 16px; box-shadow: 0 1px 0 var(--line), 0 18px 40px -18px rgba(30, 40, 20, 0.45);
  pointer-events: none;
}
.pile-tag .mono { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pile-tag p { margin: 0; font-size: 16px; line-height: 1.35; }
.pile-tag code { font-size: 14px; }
.pile-tag .row { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .pile { min-height: 480px; }
  .pile-tag { left: 14px; bottom: 14px; }
}
@media (max-width: 560px) { .pile { min-height: 420px; } .pile-tag { max-width: 250px; } .pile-cap span:first-child { display: none; } .pile-cap { justify-content: flex-end; } }

/* ── Small sizes demo ─────────────────────────────────────────────────── */
.demo { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
@media (max-width: 960px) { .demo { grid-template-columns: minmax(0, 1fr); } }
.app {
  --bg: #fffefb; --fg: var(--ink); --sub: #77746c; --rule: #e7e3da; --side: #f6f4ef; --hl: #efece4;
  background: var(--bg); color: var(--fg); border-radius: var(--radius-l); overflow: hidden;
  box-shadow: 0 0 0 1px var(--rule); display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 460px;
  transition: background 0.3s ease, color 0.3s ease;
}
.app.dark { --bg: #1c1b1f; --fg: #f2f0ea; --sub: #9b978d; --rule: #2e2c33; --side: #161518; --hl: #2a282e; }
.app-side { background: var(--side); border-right: 1px solid var(--rule); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; transition: background 0.3s ease; }
.app-side .ws { display: flex; align-items: center; gap: 10px; padding: 6px 10px 16px; font-weight: 600; letter-spacing: -0.02em; }
.app-side .ws img { width: 26px; height: 26px; }
.app-side a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; font-size: 15px; text-decoration: none; color: var(--fg); }
.app-side a[aria-current] { background: var(--hl); }
.app-side a img { width: 20px; height: 20px; }
.app-side a .n { margin-left: auto; font: 12px var(--mono); color: var(--sub); }
.app-main { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.app-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-bar h3 { margin: 0; font-size: 20px; letter-spacing: -0.03em; font-weight: 600; }
.app-bar .mono { color: var(--sub); }
.rows { display: flex; flex-direction: column; }
.task { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 2px; border-top: 1px solid var(--rule); font-size: 15px; }
.task img, .task .sprite { width: 22px; height: 22px; }
.task .meta { font: 12px var(--mono); color: var(--sub); }
.task .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app.dark .chip.ok { background: #183a22; color: #7fdc97; }
.app.dark .chip.wait { background: #3d3112; color: #f5cf63; }
.app.dark .chip.fail { background: #43172a; color: #ff97b3; }
.app.dark .chip.retry { background: #182c4a; color: #8db8f5; }
.app.dark .chip.queue { box-shadow: inset 0 0 0 1.5px #3b3940; color: var(--sub); }
.composer { margin-top: auto; display: flex; align-items: center; gap: 10px; border-radius: 999px; padding: 10px 10px 10px 18px; box-shadow: inset 0 0 0 1.5px var(--fg); font: 14px var(--mono); color: var(--sub); }
.composer kbd { white-space: nowrap; margin-left: auto; padding: 4px 8px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--rule); font-size: 12px; }
.composer img { width: 20px; height: 20px; }
@media (max-width: 640px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app-side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--rule); padding: 10px; }
  .app-side .ws, .app-side a .n { display: none; }
  .app-side a { flex-shrink: 0; }
  .task { grid-template-columns: 22px minmax(0, 1fr); }
  .task .chip { grid-column: 2; justify-self: start; }
}

.knobs { background: var(--paper-2); border-radius: var(--radius-l); padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.knob-row { display: flex; align-items: baseline; justify-content: space-between; }
.knob-row output { font: 500 28px/1 var(--display); letter-spacing: -0.03em; }
input[type="range"] { width: 100%; accent-color: var(--ink); }
.seg { display: inline-grid; grid-auto-flow: column; background: var(--paper); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 8px 16px; cursor: pointer; font-size: 15px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.preview {
  flex: 1; min-height: 220px; border-radius: var(--radius-m); background: var(--white); display: flex; flex-wrap: wrap;
  align-content: center; justify-content: center; gap: 10px; padding: 16px; transition: background 0.3s ease;
}
.preview.dark { background: #1c1b1f; }
.preview img { width: var(--px, 24px); height: var(--px, 24px); }
.ladder { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; }
.ladder figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ladder figcaption { font: 11px var(--mono); color: var(--mute); }

/* ── Specimens ────────────────────────────────────────────────────────── */
.specimens { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1.5px solid var(--ink); }
.spec { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: clamp(220px, 22vw, 300px); padding: 0 0 0 14px; }
.spec img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.spec .ruler { position: absolute; left: 0; bottom: 0; width: 9px; border-left: 1.5px solid var(--ink); }
.spec .ruler::before, .spec .ruler::after { content: ""; position: absolute; left: -5px; width: 9px; border-top: 1.5px solid var(--ink); }
.spec .ruler::before { top: 0; } .spec .ruler::after { bottom: 0; }
.spec .ruler span { position: absolute; top: -2px; left: 6px; font: 12px var(--mono); color: var(--mute); }
.spec-labels { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding-top: 10px; }
.spec-labels span { text-align: center; font: 13px var(--mono); color: var(--mute); }
.spec-labels span::before { content: ""; display: block; width: 1.5px; height: 8px; background: var(--ink); margin: -10px auto 8px; }
.spec-note { display: flex; justify-content: space-between; margin-top: 22px; gap: 16px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .specimens, .spec-labels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .specimens .spec:nth-child(n + 4), .spec-labels span:nth-child(n + 4) { display: none; }
}

/* ── Posters (loops) ──────────────────────────────────────────────────── */
.posters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 28px; border-radius: var(--radius-l); }
.poster { position: relative; isolation: isolate; aspect-ratio: 3 / 4; overflow: hidden; display: flex; flex-direction: column; padding: 26px; min-width: 0; }
.poster .h3 { font-size: clamp(26px, 2.8vw, 40px); letter-spacing: -0.045em; line-height: 0.98; }
.poster.paper { background: var(--paper); }
.poster.sky .h3 { color: var(--white); }
.poster .stats { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 2px 14px; margin-top: 14px; }
.poster .stats dt, .poster .stats dd { margin: 0; font: 13px var(--mono); }
.poster .stats dt { color: var(--mute); }
.poster .split { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: -1; }
.poster .big { position: absolute; }
.poster.one .big { width: 92%; aspect-ratio: 1; right: -12%; bottom: -6%; }
.poster.two .big { width: 60%; aspect-ratio: 1; left: 20%; top: 20%; }
.poster.three .big { width: 96%; aspect-ratio: 1; left: 12%; bottom: -14%; }
.poster.two { background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 100% 25%, 25% 100%; background-position: 0 -1px, -1px 0; background-color: var(--paper); }
.poster.two .mark { position: absolute; background: var(--grass); }
.poster.two .foot { margin-top: auto; font: 500 clamp(22px, 2.2vw, 32px) var(--mono); letter-spacing: -0.02em; position: relative; }
.poster.two .stamp { position: absolute; right: 20px; top: 22px; font: 13px var(--mono); padding: 4px 10px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); background: var(--paper); }
@media (max-width: 900px) {
  .posters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 16px; gap: 14px; }
  .poster.three { display: none; }
}
@media (max-width: 560px) {
  .posters { grid-template-columns: minmax(0, 1fr); }
  .poster.two { display: none; }
}

.loopwall { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 4px; margin-top: 20px; }
.loopwall button {
  aspect-ratio: 1; border: 0; background: transparent; border-radius: var(--radius-m); padding: 10px; cursor: pointer;
  display: grid; place-items: center;
}
.loopwall button:hover { background: var(--paper-2); }
.loopwall .sprite { width: 100%; height: 100%; }
@media (max-width: 560px) { .loopwall { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 0; } .loopwall button { padding: 6px; } }

/* ── Emoji swap ───────────────────────────────────────────────────────── */
.swap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 900px) { .swap { grid-template-columns: minmax(0, 1fr); } }
.feed { background: var(--white); border-radius: var(--radius-l); padding: 10px 24px 18px; box-shadow: 0 0 0 1px var(--line); }
.feed-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 8px; gap: 12px; }
.feed li { list-style: none; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); font-size: 17px; }
.feed ul { margin: 0; padding: 0; }
.feed .e { width: 28px; height: 28px; display: grid; place-items: center; font-size: 23px; line-height: 1; position: relative; }
.feed .e img { width: 28px; height: 28px; }
.feed .when { font: 13px var(--mono); color: var(--mute); }
.feed .e > * { transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1), opacity 0.2s ease; }
.feed .e .clay { position: absolute; inset: 0; transform: scale(0.2); opacity: 0; }
.feed.clayed .e .clay { transform: scale(1); opacity: 1; transition-delay: var(--d, 0s); }
.feed.clayed .e .emo { transform: scale(0.2); opacity: 0; transition-delay: var(--d, 0s); }
@media (prefers-reduced-motion: reduce) { .feed .e > * { transition: none !important; } }
.try { border-radius: var(--radius-l); padding: 26px; display: flex; flex-direction: column; gap: 16px; color: var(--ink); }
.try label { font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.try-field { display: flex; gap: 10px; align-items: center; background: var(--white); border-radius: 999px; padding: 6px 6px 6px 22px; }
.try-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 26px/1.2 var(--display); padding: 8px 0; }
.try-field input:focus-visible { outline: 0; }
.try-field:focus-within { box-shadow: 0 0 0 3px var(--ink); }
.try-out { flex: 1; min-height: 190px; display: grid; place-items: center; text-align: center; }
.try-out img { width: 150px; height: 150px; margin: 0 auto; }
.try-out p { margin: 8px 0 0; }
.try-out code { font-size: 15px; background: rgba(255, 255, 255, 0.7); padding: 4px 10px; border-radius: 8px; }
.try .quick { display: flex; gap: 6px; flex-wrap: wrap; }
.try .quick button { width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.55); font-size: 22px; cursor: pointer; }
.try .quick button:hover { background: var(--white); }

/* ── People ───────────────────────────────────────────────────────────── */
.people { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 900px) { .people { grid-template-columns: minmax(0, 1fr); } }
.tones-card { background: var(--paper-2); border-radius: var(--radius-l); padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.tone-pick { display: flex; gap: 8px; }
.tone-pick button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--paper-2); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; padding: 0; }
.tone-pick button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.tone-pick .auto { background: conic-gradient(#f2c7a5 0 25%, #c98d63 0 50%, #9a603c 0 75%, #6b4029 0); }
.crowd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.crowd img { width: 100%; aspect-ratio: 1; }
.builder-card { border-radius: var(--radius-l); padding: 26px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
.builder-card .h3, .builder-card p { color: var(--ink); }
.builder-card p { margin: 0; max-width: 30em; }
.faces { display: flex; gap: 0; margin: auto -10px 0; flex-wrap: wrap; justify-content: center; }
.faces img { width: 25%; aspect-ratio: 1; transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1); }
.faces img:hover { transform: translateY(-8px) rotate(-4deg); }
.builder-card pre { margin: 0; background: var(--ink); color: var(--white); border-radius: 12px; padding: 12px 14px; font-size: 13px; overflow-x: auto; }

/* ── Agent ────────────────────────────────────────────────────────────── */
.agent-band { border-radius: var(--radius-l); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 24px; padding: clamp(26px, 4vw, 56px); overflow: hidden; }
.agent-band .stage { position: relative; height: 320px; display: grid; place-items: center; }
.agent-band .stage .sprite { width: 260px; height: 260px; }
.agent-band .copy { display: flex; flex-direction: column; gap: 18px; }
.agent-band .moods { display: flex; flex-wrap: wrap; gap: 8px; }
.agent-band .moods button { border: 0; border-radius: 999px; padding: 8px 14px; background: rgba(255, 255, 255, 0.6); cursor: pointer; font-size: 15px; }
.agent-band .moods button:hover, .agent-band .moods button[aria-pressed="true"] { background: var(--white); }
@media (max-width: 860px) { .agent-band { grid-template-columns: minmax(0, 1fr); } .agent-band .stage { height: 240px; } .agent-band .stage .sprite { width: 200px; height: 200px; } }

/* ── Code ─────────────────────────────────────────────────────────────── */
.code { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 900px) { .code { grid-template-columns: minmax(0, 1fr); } }
.term { background: #1b1a1e; color: #ebe8df; border-radius: var(--radius-l); padding: 22px 24px; font: 14px/1.7 var(--mono); overflow-x: auto; position: relative; }
.term pre { margin: 0; white-space: pre; }
.term .c { color: #8f8a7e; }
.term .k { color: #f6a5c0; }
.term .s { color: #9fe0a8; }
.term .t { color: #ffd76a; }
.term .copy { position: absolute; top: 14px; right: 14px; border: 0; border-radius: 999px; padding: 6px 12px; background: #2c2a30; color: #ebe8df; font: 12px var(--mono); cursor: pointer; }
.term .copy:hover { background: #3a3840; }
.result { background: var(--white); border-radius: var(--radius-l); box-shadow: 0 0 0 1px var(--line); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.result .line { display: flex; align-items: center; gap: 10px; font-size: 17px; flex-wrap: wrap; }
.result .line img { width: 22px; height: 22px; }
.result .tiles { display: flex; gap: 12px; flex-wrap: wrap; }
.result .tile { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: #eef3e6; }
.result .tile img { width: 48px; height: 48px; }

/* ── Groups browser ───────────────────────────────────────────────────── */
.browse-bar { position: sticky; top: 76px; z-index: 5; background: var(--paper); padding: 10px 0; margin-bottom: 8px; }
.browse-bar .pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.browse-bar .pills::-webkit-scrollbar { display: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 2px; min-height: 360px; align-content: start; }
.grid figure { margin: 0; aspect-ratio: 1; display: grid; place-items: center; border-radius: 14px; padding: 8px; position: relative; }
.grid figure:hover { background: var(--paper-2); }
.grid figure img { width: 100%; height: 100%; }
.grid figcaption { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font: 10px var(--mono); color: var(--mute); opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.grid figure:hover figcaption { opacity: 1; }
.more { display: flex; justify-content: center; margin-top: 24px; }
@media (max-width: 560px) { .browse-bar { top: 64px; } .grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); } }

/* ── Closing CTA + footer ─────────────────────────────────────────────── */
.cta { border-radius: var(--radius-l); padding: clamp(36px, 6vw, 80px); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: end; overflow: visible; position: relative; }
.cta .h2 { max-width: 9em; }
.cta .btns { justify-self: end; }
.cta .peek { position: absolute; width: clamp(110px, 14vw, 180px); top: clamp(-90px, -7vw, -60px); right: clamp(24px, 8vw, 120px); }
@media (max-width: 760px) { .cta { grid-template-columns: minmax(0, 1fr); } .cta .btns { justify-self: start; } }
.foot { padding: 64px 0 48px; }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { text-decoration: none; color: var(--mute); }
.foot a:hover { color: var(--ink); }

/* ── Pricing page ─────────────────────────────────────────────────────── */
.price-hero { padding: clamp(36px, 6vw, 80px) 0 0; }
.price-hero .wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px 48px; align-items: end; }
@media (max-width: 860px) { .price-hero .wrap { grid-template-columns: minmax(0, 1fr); } }
.draft {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 999px;
  background: #fdf0c8; color: #6b4d00; font: 13px/1.3 var(--mono); justify-self: start;
}
.draft img { width: 22px; height: 22px; }
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: clamp(80px, 9vw, 120px); align-items: stretch; }
@media (max-width: 980px) { .tiers { grid-template-columns: minmax(0, 1fr); max-width: 560px; } }
.tier { position: relative; border-radius: var(--radius-l); padding: 30px 28px 28px; display: flex; flex-direction: column; gap: 18px; }
.tier.paper { background: var(--white); box-shadow: 0 0 0 1px var(--line); }
.tier .mascot { position: absolute; width: 132px; height: 132px; top: -78px; right: 18px; }
.tier .name { font-weight: 650; font-size: 26px; letter-spacing: -0.035em; }
.tier .for { margin: -12px 0 0; max-width: 19em; }
.tier .price { display: flex; align-items: baseline; gap: 10px; }
.tier .price b { font-weight: 650; font-size: clamp(56px, 6vw, 80px); line-height: 0.9; letter-spacing: -0.06em; }
.tier .price span { font: 13px var(--mono); }
.tier ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tier li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 16px; line-height: 1.35; }
.tier li img { width: 22px; height: 22px; }
.tier .btn { margin-top: auto; justify-content: center; }
.tier.sun .for, .tier.sun .price span { color: #5d4300; }
.tier.sky { color: var(--white); }
.tier.sky .for, .tier.sky .price span { color: rgba(255, 255, 255, 0.85); }
.tier .flag { position: absolute; top: 24px; right: 160px; font: 12px var(--mono); background: var(--ink); color: var(--white); border-radius: 999px; padding: 4px 10px; }
@media (max-width: 420px) { .tier .flag { display: none; } }
.note-line { margin-top: 20px; }

.compare-wrap { overflow-x: auto; border-radius: var(--radius-l); box-shadow: 0 0 0 1px var(--line); background: var(--white); }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 16px; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-top: 1px solid var(--line); vertical-align: middle; }
.compare thead th { border-top: 0; font-size: 18px; font-weight: 650; letter-spacing: -0.02em; position: sticky; top: 0; background: var(--white); }
.compare thead th small { display: block; font: 12px var(--mono); color: var(--mute); font-weight: 400; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; width: 18%; }
.compare td img { width: 22px; height: 22px; margin: 0 auto; }
.compare td.txt { font: 14px var(--mono); }
.compare tbody th { font-weight: 400; }
.compare tr.group th { font: 600 13px var(--mono); color: var(--mute); background: var(--paper); padding-top: 10px; padding-bottom: 10px; }
@media (max-width: 640px) {
  .compare { min-width: 0; font-size: 14px; }
  .compare th, .compare td { padding: 11px 6px; }
  .compare th:first-child { padding-left: 14px; }
  .compare td:not(:first-child), .compare th:not(:first-child) { width: 21%; }
  .compare thead th { font-size: 15px; }
  .compare td.txt { font-size: 12px; }
}

.faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px 48px; }
@media (max-width: 860px) { .faq { grid-template-columns: minmax(0, 1fr); } .faq-side img { width: 96px; } }
.faq details { border-top: 1.5px solid var(--ink); }
.faq details:last-child { border-bottom: 1.5px solid var(--ink); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 21px; font-weight: 550; letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary img { width: 26px; height: 26px; transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); flex-shrink: 0; }
.faq details[open] summary img { transform: rotate(45deg); }
.faq details p { margin: -4px 0 22px; color: var(--mute); max-width: 38em; }
.faq-side { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.faq-side img { width: 160px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--white); padding: 10px 18px; border-radius: 999px; font: 14px var(--mono); transition: 0.2s ease; pointer-events: none; z-index: 100; display: flex; align-items: center; gap: 8px; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast img { width: 20px; height: 20px; }

/* ── Draft switcher (remove once a design is chosen) ──────────────────── */
.variants {
  position: fixed; left: 16px; bottom: 16px; z-index: 90; display: flex; align-items: center; gap: 2px; padding: 4px;
  background: var(--ink); color: var(--white); border-radius: 999px; font: 13px var(--mono); max-width: calc(100vw - 32px); overflow-x: auto;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5); scrollbar-width: none;
}
.variants span { padding: 0 10px; opacity: 0.55; white-space: nowrap; }
.variants a { padding: 6px 12px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.variants a:hover { background: #2e2d33; }
.variants a[aria-current="page"] { background: var(--white); color: var(--ink); }
