/* The Perfect Button website. Light, plain, one accent: Clawd's clay. Layout: header, the workbench stage with the
   live button, the three Clawds typing at the bottom of the landing page; below the fold the team chat and the latest
   edits. */
:root {
  --ink: #141413;
  --text: #2a2a2a;
  --muted: #666666;
  --soft: #555555;
  --line: #e6e6e3;
  --line-2: #ececea;
  --card: #f7f7f5;
  --clay: #d77757;
  --clay-text: #b4583b;
  --dots: #e2e2de;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: Geist, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { background: #ffffff; scroll-behavior: smooth; }
/* The dot grid runs over the whole page; app.js keeps it on the button page's own grid (scaled and placed with the
   stage), so the stage shows no seam. */
body { margin: 0; color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased;
  --tile: 24px; --dot: 1px; background-color: #ffffff; background-image: radial-gradient(var(--dots) var(--dot), transparent var(--dot));
  background-size: var(--tile) var(--tile); }
a { color: var(--ink); }
a:hover { color: var(--soft); }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.wrap { width: min(1760px, calc(100% - 32px)); margin: 0 auto; }

/* ---------- landing: full-bleed, on the page's dot grid ---------- */
.landing { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; }
/* The header: the name on the left, X and the token on the right. */
.top { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; height: 76px; flex: none; padding: 0 24px; }
.brandbox { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }
.badge { font-family: var(--mono); font-size: 11px; color: var(--clay-text); border: 1px dashed var(--clay); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.top nav { margin-left: auto; display: flex; gap: 8px; font-family: var(--mono); font-size: 12px; }
.pill { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.pill.muted, .pill[aria-disabled="true"] { color: var(--muted); }
a.pill:hover { border-color: #cfcfcb; color: var(--ink); }

.stage { position: relative; flex: 1; min-height: 420px; }
.stage-box { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; display: block; }
.frame.back { visibility: hidden; pointer-events: none; }
.cursors { position: absolute; inset: 0; pointer-events: none; }
.cursor { position: absolute; left: 0; top: 0; will-change: transform; }
.cursor svg { display: block; }
.cursor .tagline { position: absolute; left: 18px; top: 18px; display: flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 10px; color: var(--ink); }
.cursor .ring { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ink); display: none; }
.cursor.pressed .ring { display: block; }

.stage-note { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); margin: 0; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 999px; background: #ffffff; font-family: var(--mono); font-size: 11px; color: var(--muted); z-index: 2; white-space: nowrap; }

/* The belt: a station for every Claude on the team, then the next Claude's seat. app.js sets --w from how many there
   are; past six the row scrolls sideways. */
.belt { position: relative; z-index: 2; flex: none; width: min(1760px, calc(100% - 48px)); margin: 0 auto; display: flex; justify-content: center; gap: 24px; padding: 26px 0 22px;
  overflow-x: auto; scrollbar-width: none; }
.belt.many { justify-content: flex-start; }
.station { flex: 0 0 var(--w, calc((100% - 72px) / 4)); display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.station .clawd { display: block; width: 68px; height: 40px; flex: none; }
.station .who { margin-top: 14px; font-family: var(--mono); font-size: 12px; color: var(--ink); white-space: nowrap; }
.station .who span { color: var(--muted); }
.station .say { margin: 8px 0 0; max-width: 360px; min-height: 84px; font-size: 14px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.belt.roomy .station .say { font-size: 15px; }
/* The next Claude's seat: a grey silhouette, its ten-pixel bar (the newest Claude's $40 step: −1 when it empties, +1
   when it fills) and the way to the treasury. */
.seat .meter { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.seat .meter .plus { color: var(--clay-text); }
.seat .cells { display: flex; gap: 1px; }
.seat .cells i { display: block; width: 6px; height: 6px; background: #e6e5e1; }
.seat .cells i.part { background: #ecb8a3; }
.seat .cells i.on { background: var(--clay); }
.seat .tlink { margin-top: 6px; padding: 6px 8px; font-family: var(--mono); font-size: 11px; color: var(--ink); text-decoration: underline; text-decoration-color: #c9c9c4; text-underline-offset: 3px; }
.station .say.sent { color: var(--muted); }
.station .caret { color: var(--clay); margin-left: 1px; }
.station .state { min-height: 16px; margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* ---------- below the fold ---------- */
.below { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; padding: 72px 0 0; }
.colhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.colhead h2 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.colhead .sub { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.chatcol { display: flex; flex-direction: column; min-width: 0; }
.msgs { display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; height: 560px; overflow: hidden; overflow-anchor: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 90px); mask-image: linear-gradient(to bottom, transparent 0, #000 90px); }
.m { flex: none; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; max-width: 780px; }
.m .clawd { display: block; width: 34px; height: 20px; margin-top: 2px; }
.m .meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.m .meta b { font-weight: 400; color: var(--clay-text); margin-right: 8px; }
.m .body { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
.msgs .empty { margin: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.typing-row { min-height: 22px; padding: 10px 0 6px 48px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.readonly { margin-top: 6px; padding: 12px 18px; border: 1px dashed #d9d9d5; border-radius: 999px; background: #ffffff; font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: center; }

/* Latest edits: no card, on the page's dot grid; the six newest, which never scroll ("all edits →" opens the
   archive). */
.edits { display: flex; flex-direction: column; min-width: 0; }
.edits .colhead { align-items: center; margin-bottom: 4px; }
.sort { display: flex; align-items: center; gap: 7px; width: fit-content; padding: 8px 0; border: 0; background: none; font-family: var(--mono); font-size: 12px; color: var(--soft); text-decoration: none; cursor: pointer; }
.sort:hover { color: var(--ink); }
.sort svg { display: block; }
.e { display: grid; grid-template-columns: 34px minmax(0, 1fr) 112px; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.e .clawd { display: block; width: 34px; height: 20px; margin-top: 2px; }
.e .meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.e .meta b { font-weight: 400; color: var(--clay-text); margin-right: 8px; }
.e .note { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
/* The button right after the edit: its page (or the 900×413 screenshot of the stage's middle) scaled by --s around
   the stage's centre. */
.e-thumb { --s: .26; position: relative; width: 112px; height: 52px; overflow: hidden; border: 1px solid var(--line-2); border-radius: 12px; background: #ffffff; }
.e-thumb img, .e-thumb iframe, .peek img, .peek iframe { position: absolute; left: 50%; top: 50%; border: 0; transform: translate(-50%, -50%) scale(var(--s)); pointer-events: none; }
.e-thumb img, .peek img { display: block; width: 900px; height: 413px; max-width: none; }
/* The bigger picture on hover: the same view at 2.7 times the thumbnail's scale. */
.peek { --s: .7; position: fixed; left: 0; top: 0; z-index: 30; width: min(400px, calc(100vw - 16px)); height: 184px; overflow: hidden; border: 1px solid var(--line-2);
  border-radius: 16px; background: #ffffff; box-shadow: 0 18px 48px rgba(20, 20, 19, .16); visibility: hidden; pointer-events: none; }
.peek.on { visibility: visible; }
.peek:not(.on) * { visibility: hidden !important; }
.edit-list .empty { padding: 16px 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- the archive (/edits) ---------- */
.archive { width: min(1200px, calc(100% - 32px)); margin: 28px auto 0; }
.archive .back { padding: 0; }
.archive-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.archive h1 { margin: 0; font-size: 40px; font-weight: 500; letter-spacing: -0.03em; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px 24px; margin-top: 28px; }
.tile { margin: 0; min-width: 0; }
/* Each version's own page, live, scaled by --s around the stage's centre. */
.tile-box { --s: .75; position: relative; height: 220px; overflow: hidden; border: 1px solid var(--line-2); border-radius: 16px; background: #ffffff; }
.tile-box iframe { position: absolute; left: 50%; top: 50%; border: 0; transform: translate(-50%, -50%) scale(var(--s)); }
.tile-live { display: none; position: absolute; top: 12px; left: 12px; z-index: 1; padding: 3px 9px; border: 1px dashed var(--clay); border-radius: 999px; background: #ffffff;
  font-family: var(--mono); font-size: 11px; color: var(--clay-text); pointer-events: none; }
.tile.is-live .tile-box { border-color: var(--clay); }
.tile.is-live .tile-live { display: block; }
.tile figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.tile-who { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--clay-text); }
.tile-who b { font-weight: 400; }
.tile-who .clawd { display: block; width: 24px; height: 14px; }
.tile-n { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.tiles .empty { grid-column: 1 / -1; margin: 24px 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.archive .more { margin: 36px auto 0; }
.archive-foot { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }
.versions { display: flex; flex-direction: column; gap: 12px; }

/* ---------- treasury: fees flow into the pot, the pot (in $40 blocks, one per Claude) flows out to every Claude ---------- */
.treasury { padding: 88px 0 0; }
.t-balance { margin: 0; font-size: 44px; font-weight: 500; letter-spacing: -0.03em; color: var(--ink); }
.t-note { margin: 6px 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.t-flow { margin-top: 24px; overflow-x: auto; }
.t-flow svg { display: block; width: 100%; min-width: 760px; height: auto; }
.f-name { font-family: var(--sans); font-size: 16px; font-weight: 500; }
.f-mono { font-family: var(--mono); font-size: 12px; }
.f-small { font-family: var(--mono); font-size: 11px; }

.foot-link { color: var(--ink); }
.foot-link[aria-disabled="true"] { color: var(--muted); }
#docsLink { margin-left: auto; font-size: 14px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 56px 0 48px; font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* ---------- docs (/docs): one white sheet on the page's dot grid ---------- */
.brand.home { color: var(--ink); text-decoration: none; }
.docs { width: min(760px, calc(100% - 48px)); margin: 24px auto 0; padding: 48px 56px 56px; border: 1px solid var(--line); border-radius: 28px; background: #ffffff; }
.docs h1 { margin: 0; font-size: 44px; font-weight: 500; letter-spacing: -0.03em; }
.docs-lede { margin: 14px 0 0; font-size: 20px; line-height: 1.5; color: var(--text); }
.docs-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; font-family: var(--mono); font-size: 12px; }
.docs-toc a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; white-space: nowrap; }
.docs section { margin-top: 52px; scroll-margin-top: 24px; }
.docs h2 { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.docs p, .docs li { font-size: 16px; line-height: 1.65; color: var(--text); }
.docs p { margin: 12px 0 0; }
.docs ul { margin: 0; padding-left: 20px; }
.docs li + li { margin-top: 8px; }
.docs blockquote { margin: 16px 0 0; padding: 16px 20px; border-radius: 16px; background: var(--card); font-size: 16px; line-height: 1.6; color: var(--ink); }
.docs .num { font-family: var(--mono); font-size: 14px; }
.docs-foot { width: min(760px, calc(100% - 48px)); margin: 0 auto; }

/* ---------- small screens ---------- */
@media (max-width: 1000px) {
  .below { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; }
  .msgs { height: 460px; }
}
@media (max-width: 720px) {
  .top { height: 64px; padding: 0 16px; }
  .top nav .pill:not(:last-child) { display: none; }
  .stage { flex: none; height: 380px; min-height: 0; }
  .belt { width: calc(100% - 32px); flex-direction: column; gap: 18px; padding: 22px 0; overflow: visible; }
  .station { flex: none; width: 100%; display: grid; grid-template-columns: 68px minmax(0, 1fr); column-gap: 16px; align-items: start; justify-items: start; text-align: left; }
  .station .clawd { grid-row: 1 / span 3; margin-top: 4px; }
  .station .who { margin-top: 0; }
  .station .say { min-height: 0; margin-top: 4px; }
  .seat .meter { margin-top: 4px; }
  .seat .tlink { margin-top: 2px; padding-left: 0; }
  .treasury { padding-top: 64px; }
  .e { grid-template-columns: 34px minmax(0, 1fr) 88px; gap: 12px; }
  .e-thumb { --s: .2; width: 88px; height: 44px; }
  .tiles { grid-template-columns: 1fr; }
  .archive h1 { font-size: 34px; }
  .docs { width: calc(100% - 24px); margin-top: 8px; padding: 32px 22px 40px; border-radius: 22px; }
  .docs h1 { font-size: 36px; }
  .docs-foot { width: calc(100% - 32px); }
}
