/* Brownies. One stylesheet for the three pages.
   Palette: ink, bone, one accent (sugar). Type: Bricolage Grotesque (display and text, optical sizes) and
   JetBrains Mono (numbers and code). No gradients, no glass, no shadows as texture. */

:root {
  --ink: #0E0E0C;
  --ink-2: #161613;
  --ink-3: #20201C;
  --line: #2B2B26;
  --bone: #F3EFE6;
  --bone-2: #E8E3D7;
  --line-b: #D6D0C2;
  --accent: #FF5A1F;
  --accent-2: #E64A12;
  --muted: #A6A196;      /* secondary text on ink, 7.6:1 */
  --muted-b: #5F5B52;    /* secondary text on bone, 5.9:1 */

  --font: "Bricolage Grotesque", "Arial Narrow", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --wrap: 1180px;
  --gut: 28px;
  --r: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.bone .muted { color: var(--muted-b); }

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
h1 { font-size: clamp(52px, 8.6vw, 116px); letter-spacing: -0.05em; line-height: 0.94; }
h2 { font-size: clamp(34px, 4.6vw, 56px); }
h3 { font-size: 24px; letter-spacing: -0.025em; line-height: 1.15; }
p { margin: 0; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; color: var(--muted); }
.bone .eyebrow { color: var(--muted-b); }
.lead { font-size: clamp(19px, 1.9vw, 23px); line-height: 1.45; max-width: 34em; }
.dot { color: var(--accent); }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: var(--ink); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; min-height: 44px; }
.brand img { width: 32px; height: 32px; }
.brand span { font-weight: 800; font-size: 25px; letter-spacing: -0.045em; line-height: 1; }
.nav nav { display: flex; align-items: center; gap: 6px; }
.nav .links { display: flex; align-items: center; gap: 2px; }
.nav nav a.txt { text-decoration: none; padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: 16px; min-height: 44px; display: inline-flex; align-items: center; }
.nav nav a.txt[aria-current="page"] { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 9px; border: 1px solid transparent;
  background: var(--accent); color: var(--ink);
  font-weight: 700; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn.sm { min-height: 44px; padding: 0 16px; font-size: 16px; }
.btn.ghost { background: transparent; color: var(--bone); border-color: var(--line); }
.bone .btn.ghost { color: var(--ink); border-color: var(--line-b); }
.btn.dark { background: var(--ink); color: var(--bone); }
.btn.bone-btn { background: var(--bone); color: var(--ink); }
.btn[disabled] { background: var(--ink-3); color: #7b776d; border-color: transparent; cursor: not-allowed; }
.btn.ghost[disabled] { background: transparent; border-color: var(--line); }
.btn.busy { cursor: progress; }
.link { font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 1px; min-height: 44px; display: inline-flex; align-items: center; }
@media (hover: hover) and (pointer: fine) {
  .btn:not([disabled]):hover { background: var(--accent-2); }
  .btn.ghost:not([disabled]):hover { background: var(--ink-3); }
  .bone .btn.ghost:not([disabled]):hover { background: var(--bone-2); }
  .btn.dark:not([disabled]):hover { background: #000; }
  .btn.bone-btn:not([disabled]):hover { background: #fff; }
  .nav nav a.txt:hover { background: var(--ink-3); }
  .link:hover { color: var(--accent); }
  .bone .link:hover { color: var(--ink); text-decoration-thickness: 2px; }
}

/* ---------- home: the intro ---------- */
/* A full-screen stage over the page. intro.js runs the scene; the class "out" lifts it like a curtain. */
.intro { display: none; }
.intro-on .intro, .intro.out { display: block; position: fixed; inset: 0; z-index: 100; background: var(--bone); color: var(--ink); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
.intro.out { transform: translateY(-101%); transition: transform 640ms var(--ease-in-out); pointer-events: none; }
html.intro-on { overflow: hidden; }
.intro .stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.intro-copy { position: absolute; left: 0; right: 0; top: 0; max-width: var(--wrap); margin: 0 auto; padding: clamp(20px, 5vh, 56px) var(--gut) 0; pointer-events: none; }
.intro-word { font-weight: 800; font-size: clamp(60px, min(13vw, 20vh), 168px); letter-spacing: -0.055em; line-height: 0.88; }
.intro-tag { font-weight: 800; font-size: clamp(24px, min(3.6vw, 5.5vh), 46px); letter-spacing: -0.035em; line-height: 1; margin-top: clamp(10px, 1.6vh, 18px); }
.intro-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: clamp(16px, 3vh, 30px); }
.intro-row .btn { pointer-events: auto; }
.intro-hint { font-family: var(--mono); font-size: 14px; color: var(--muted-b); }
.intro .tag-name { font-family: var(--font); font-weight: 800; letter-spacing: -0.03em; fill: var(--bone); }
.intro .tag-job { font-family: var(--mono); fill: var(--muted); }
/* the row of brownies in the hero waits for the curtain, then pops */
.intro-on .lineup .m { animation: none; }

/* ---------- home: hero ---------- */
/* The brownies stand on the bottom edge of the hero. The section under it is ink, so that edge is their floor. */
.hero { position: relative; overflow: hidden; }
.hero .wrap { padding-top: clamp(36px, 7vh, 80px); }
.hero-top { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 28px 56px; align-items: end; }
.hero h1 { font-size: clamp(46px, min(7.2vw, 12vh), 104px); text-wrap: balance; }
.hero .lead { max-width: 30em; }
.hero .lead b { font-weight: 700; }
.cta { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.hero .cta { margin-top: 26px; }
.hero-team { margin-top: clamp(28px, 5vh, 56px); display: flex; justify-content: center; }
.lineup svg { display: block; width: 100%; height: auto; }
.lineup.all { width: min(100%, 134vh); }   /* never taller than about a third of the window */
.lineup.shelf, .lineup.floor { display: none; }
/* backwards only: once a brownie has landed the animation lets go of it, and it is painted like any other shape */
.lineup .m { animation: pop 520ms var(--ease-out) backwards; animation-delay: calc(var(--i) * 70ms + 120ms); }
@keyframes pop { from { transform: translateY(36px); opacity: 0; } }
[data-mascot] .eyes { transform-box: fill-box; transform-origin: center; }
[data-mascot] .eyes.shut { transform: scaleY(0.08); }   /* mascot.js shuts one pair of eyes for an instant, now and then */

/* ---------- home: the team ---------- */
section[id] { scroll-margin-top: 64px; }
.team { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.member { background: var(--bone); color: var(--ink); border-radius: var(--r); padding: 4px 20px 22px; min-width: 0; }
.member .pic svg { display: block; width: 100%; height: auto; transition: transform 220ms var(--ease-out); }
.member h3 { font-size: 30px; letter-spacing: -0.04em; line-height: 1; }
.member .job { display: block; font-family: var(--mono); font-size: 13px; color: var(--muted-b); margin-top: 7px; }
.member p { color: var(--muted-b); font-size: 16.5px; line-height: 1.45; margin-top: 8px; }
@media (hover: hover) and (pointer: fine) { .member:hover .pic svg { transform: translateY(-6px); } }
.facts { list-style: none; margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.facts li { padding: 22px 28px 0 0; }
.facts li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.facts h3 { margin-bottom: 8px; }
.facts p { color: var(--muted); font-size: 17px; line-height: 1.5; }

/* ---------- home: sections ---------- */
section.band { padding: clamp(64px, 8vw, 120px) 0; }
.bone { background: var(--bone); color: var(--ink); }
.band-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px 56px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.band-head p { font-size: 19px; line-height: 1.5; max-width: 30em; }

/* where the tax goes */
.splitbar { display: grid; grid-template-columns: 50fr 40fr 10fr; height: 84px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--ink); }
.splitbar div { display: flex; align-items: center; padding: 0 20px; font-family: var(--mono); font-weight: 500; font-size: 22px; min-width: 0; }
.splitbar .s1 { background: var(--accent); color: var(--ink); }
.splitbar .s2 { background: var(--ink); color: var(--bone); }
.splitbar .s3 { background: var(--bone); color: var(--ink); border-left: 1px solid var(--ink); padding: 0 12px; justify-content: center; }
.splitkey { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 32px; margin-top: 22px; }
.splitkey b { display: flex; align-items: center; gap: 10px; font-size: 19px; letter-spacing: -0.015em; }
.splitkey b::before { content: ""; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--ink); flex: none; }
.splitkey .k1 b::before { background: var(--accent); }
.splitkey .k2 b::before { background: var(--ink); }
.splitkey span { display: block; color: var(--muted-b); font-size: 16px; line-height: 1.45; margin-top: 4px; max-width: 24em; }
.steps { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.steps li { padding: 22px 28px 0 0; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--line-b); }
.steps .n { font-family: var(--mono); font-size: 14px; color: var(--muted-b); }
.steps h3 { margin: 10px 0 8px; }
.steps p { color: var(--muted-b); font-size: 17px; line-height: 1.5; }

/* the key */
.use-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px 64px; align-items: start; }
.use-grid h2 { margin-bottom: 20px; }
.use-grid p { color: var(--muted); font-size: 19px; line-height: 1.5; max-width: 26em; }
.use-grid p + p { margin-top: 14px; }
.use-grid .cta { margin-top: 28px; }
pre.code { margin: 0; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; overflow-x: auto; font-family: var(--mono); font-size: 14.5px; line-height: 1.7; color: #DDD8CC; tab-size: 2; }
pre.code .c { color: #7d796f; }
pre.code .k { color: var(--accent); }
.bone pre.code { background: var(--ink); border-color: var(--ink); }

/* live numbers: shown only when the chain answers */
.live { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.live .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.live .cell { padding: 26px 24px 26px 0; }
.live .cell + .cell { padding-left: 24px; border-left: 1px solid var(--line); }
.live .v { font-family: var(--mono); font-size: 26px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.live .l { color: var(--muted); font-size: 15px; margin-top: 2px; }

/* contracts table */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 13px; color: var(--muted-b); padding: 0 16px 12px 0; border-bottom: 1px solid var(--ink); }
.tbl td { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line-b); vertical-align: top; font-size: 17px; line-height: 1.45; }
.tbl td:first-child { font-weight: 700; letter-spacing: -0.015em; white-space: nowrap; }
.tbl td.addr { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.tbl td.addr a { text-underline-offset: 3px; }
.ink-tbl .tbl th { color: var(--muted); border-bottom-color: var(--line); }
.ink-tbl .tbl td { border-bottom-color: var(--line); }

/* ---------- kitchen and progress ---------- */
.page-head { padding-top: 44px; padding-bottom: 30px; }
.page-head h1 { font-size: clamp(42px, 6vw, 76px); }
.page-head .lead { color: var(--muted); margin-top: 16px; }
/* the building site: a light stage with the oven, the tower and the brownies, and one line about what is pointed at */
.site { background: var(--bone); color: var(--ink); border-radius: var(--r); overflow: hidden; }
.site-stage { position: relative; height: min(62vh, 600px); min-height: 400px; }
.site-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.site-label { position: absolute; left: 22px; top: 18px; pointer-events: none; }
.site-label h2 { font-size: clamp(28px, 3.4vw, 44px); }
.site-count { font-family: var(--mono); font-size: 14px; color: var(--muted-b); margin-top: 6px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; pointer-events: auto; }
.site-nav button { min-height: 44px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-b); background: var(--bone); color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 160ms ease; }
.site-nav button:active { transform: scale(0.97); }
.site-info { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px 22px 18px; background: var(--ink-2); color: var(--bone); border-top: 1px solid var(--line); min-height: 104px; }
.site-info .face { width: 56px; height: 56px; border-radius: 12px; background: var(--bone); overflow: hidden; }
.site-info .face svg { display: block; width: 100%; height: 100%; }
.site-info .meta { font-size: 15px; color: var(--muted); }
.site-info .what { font-size: 19px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; margin-top: 2px; overflow-wrap: anywhere; }
.site-info .more { color: #DAD5C9; margin-top: 6px; overflow-wrap: anywhere; }
.site-info .link { min-height: 44px; }
.brick { cursor: pointer; }
.brick rect { fill: var(--ink); }
.brick .win { fill: var(--bone); }
.brick.gold rect { fill: var(--accent); }
.brick.gold .win { fill: var(--ink); }
.brick.on > rect:first-child { stroke: var(--accent); stroke-width: 8; }
.brick.gold.on > rect:first-child { stroke: var(--ink); }
.roof .flag, .city .flag { font-family: var(--mono); font-weight: 500; fill: var(--bone); }
.site .actor { cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .site-nav button:hover { background: var(--bone-2); }
  .tower .brick:hover > rect:first-child { stroke: var(--accent); stroke-width: 8; }
}
.crew-wrap { padding-top: 56px; }
/* the city: every tower so far, side by side; it scrolls sideways when the city outgrows the page */
.city-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; margin-bottom: 16px; }
.city-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.city-head p { color: var(--muted); font-size: 18px; }
.city { background: var(--ink); border: 1px solid var(--line); border-radius: var(--r); height: 340px; overflow-x: auto; overflow-y: hidden; }
.city svg { display: block; height: 100%; min-width: 100%; background: var(--bone); }
.city .lot { fill: none; stroke: var(--line-b); stroke-width: 6; stroke-dasharray: 22 18; }
.city .plot { font-family: var(--mono); fill: var(--muted); }
.city a.tower { cursor: pointer; }
.city a.tower:focus-visible { outline: none; }
.city a.tower:focus-visible .brick > rect:first-child { stroke: var(--accent); stroke-width: 6; }
.city-foot { color: var(--muted); font-size: 15px; margin: 10px 0 34px; }
.crewlive { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: start; }
.live-card { background: var(--bone); color: var(--ink); border-radius: var(--r); padding: 4px 18px 18px; min-width: 0; }
.live-card .pic svg { display: block; width: 100%; height: auto; }
.live-card h3 { font-size: 28px; letter-spacing: -0.04em; line-height: 1; }
.live-card .job { display: block; font-family: var(--mono); font-size: 13px; color: var(--muted-b); margin-top: 6px; }
.live-card .line { color: var(--muted-b); font-size: 16px; line-height: 1.4; margin-top: 8px; }
.live-card .now { margin-top: 12px; font-size: 16px; line-height: 1.4; font-weight: 700; overflow-wrap: anywhere; }
.live-card .now.rest { color: var(--muted-b); font-weight: 400; }
.live-card dl { margin: 12px 0 0; }
.live-card dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line-b); font-size: 15px; }
.live-card dt { color: var(--muted-b); }
.live-card dd { margin: 0; font-family: var(--mono); font-size: 14px; text-align: right; }
.feed-wrap { padding-top: 56px; padding-bottom: 88px; }
.feed-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 24px; margin-bottom: 18px; }
.feed-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { min-height: 44px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: transparent; font-weight: 600; font-size: 15px; cursor: pointer; transition: transform 160ms var(--ease-out); }
.chips button[aria-pressed="true"] { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.chips button:active { transform: scale(0.97); }
.feed, .timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.feed li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.feed .face { width: 56px; height: 56px; border-radius: 12px; background: var(--bone); overflow: hidden; }
.feed .face svg { display: block; width: 100%; height: 100%; }
.feed .meta, .timeline .meta { font-size: 15px; color: var(--muted); }
.feed .meta b { color: var(--bone); font-weight: 700; }
.feed .what, .timeline .what { font-size: 19px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; margin-top: 2px; overflow-wrap: anywhere; }
.feed .more, .timeline .more { color: #DAD5C9; margin-top: 6px; overflow-wrap: anywhere; }
.timeline .meta { margin-top: 6px; }
.feed-more { margin-top: 20px; }
.empty-line { color: var(--muted); padding: 18px 0; }
.timeline li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.timeline time { font-family: var(--mono); font-size: 14px; color: var(--muted); padding-top: 5px; }
.grid.tight { padding-bottom: 0; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 40px 0 56px; }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: start; }
.foot p { color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 44em; margin-top: 14px; }
.foot nav { display: flex; gap: 4px 22px; flex-wrap: wrap; }
.foot nav a { font-weight: 600; font-size: 16px; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
@media (hover: hover) and (pointer: fine) { .foot nav a:hover { color: var(--accent); } }

/* ---------- app ---------- */
.app-head { padding: 44px 0 26px; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; }
.app-head h1 { font-size: clamp(40px, 5.4vw, 68px); }
.app-head p { color: var(--muted); max-width: 30em; font-size: 18px; line-height: 1.45; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; padding-bottom: 72px; }
.panel { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; min-width: 0; }
.panel.wide { grid-column: 1 / -1; }
.panel h2 { font-size: 26px; letter-spacing: -0.03em; }
.panel .sub { color: var(--muted); font-size: 16px; line-height: 1.45; margin-top: 6px; max-width: 34em; }
.kv { margin: 18px 0 0; display: grid; gap: 0; }
.kv div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); }
.kv dt { color: var(--muted); font-size: 16px; }
.kv dd { margin: 0; font-family: var(--mono); font-size: 17px; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.kv dd.big { font-size: 26px; letter-spacing: -0.02em; }
.form { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.field { display: flex; align-items: center; min-width: 0; background: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 0 6px 0 14px; min-height: 58px; transition: border-color 160ms ease; }
.field:focus-within { border-color: var(--bone); }
.field input, .field select { flex: 1; width: 100%; min-width: 0; background: transparent; border: 0; outline: 0; font-family: var(--mono); font-size: 18px; padding: 10px 0; }
.field select { font-family: var(--font); font-size: 16px; }
.field select option { background: var(--ink); color: var(--bone); }
.field .unit { color: var(--muted); font-family: var(--mono); font-size: 14px; padding: 0 8px; white-space: nowrap; }
.field button.max { background: transparent; border: 1px solid var(--line); border-radius: 7px; min-height: 44px; padding: 0 12px; font-family: var(--mono); font-size: 13px; cursor: pointer; transition: transform 160ms var(--ease-out); }
.field button.max:active { transform: scale(0.97); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row .btn { flex: 1 1 140px; }
.hint { color: var(--muted); font-size: 15px; line-height: 1.45; }
.keybox { margin-top: 14px; background: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; font-family: var(--mono); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
textarea.prompt { width: 100%; min-height: 96px; resize: vertical; background: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; font-size: 17px; line-height: 1.5; outline: 0; transition: border-color 160ms ease; }
textarea.prompt:focus { border-color: var(--bone); }
.reply { margin-top: 14px; padding: 16px 18px; border-left: 2px solid var(--accent); background: var(--ink); border-radius: 0 9px 9px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 17px; line-height: 1.55; }
.reply .meta { display: block; margin-top: 10px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 40px; }

/* wallet chip, menu, modal */
.chip { position: relative; }
.chip > button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 9px; background: var(--ink-3); border: 1px solid var(--line); cursor: pointer; font-family: var(--mono); font-size: 14px; transition: transform 160ms var(--ease-out); }
.chip > button:active { transform: scale(0.97); }
.chip img { width: 18px; height: 18px; border-radius: 4px; }
.chip .net { color: var(--muted); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px; transform-origin: top right; transition: opacity 140ms var(--ease-out), transform 140ms var(--ease-out); }
.menu.out { opacity: 0; transform: scale(0.96); }
@starting-style { .menu { opacity: 0; transform: scale(0.96); } }
.menu a, .menu button { display: flex; width: 100%; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 7px; background: transparent; border: 0; text-decoration: none; font-size: 16px; font-weight: 600; cursor: pointer; text-align: left; }
@media (hover: hover) and (pointer: fine) { .menu a:hover, .menu button:hover, .wallet-item:hover { background: var(--ink-3); } }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(14, 14, 12, 0.72); transition: opacity 160ms var(--ease-out); }
.modal.out { opacity: 0; }
.modal .sheet { width: 100%; max-width: 420px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 14px; padding: 22px; transition: transform 200ms var(--ease-out), opacity 200ms var(--ease-out); }
.modal.out .sheet { transform: scale(0.97); opacity: 0; }
@starting-style { .modal { opacity: 0; } .modal .sheet { transform: scale(0.96); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-head h2 { font-size: 24px; }
.x { width: 44px; height: 44px; border-radius: 9px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.x svg { width: 18px; height: 18px; }
.wallet-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 10px; border-radius: 9px; background: transparent; border: 0; cursor: pointer; text-align: left; text-decoration: none; font-weight: 700; font-size: 17px; }
.wallet-item img, .wallet-item .ph { width: 32px; height: 32px; border-radius: 8px; background: var(--ink-3); flex: none; }
.wallet-item .sub { display: block; font-family: var(--mono); font-weight: 400; font-size: 12px; color: var(--muted); }
.empty { color: var(--muted); padding: 6px 10px 12px; }
.netwarn { background: var(--accent); color: var(--ink); }
.netwarn .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 10px; padding-bottom: 10px; font-weight: 600; }

/* toasts */
.toasts { position: fixed; z-index: 60; right: 20px; bottom: 20px; display: grid; gap: 10px; width: min(380px, calc(100vw - 40px)); }
.toast { background: var(--bone); color: var(--ink); border-radius: 10px; padding: 14px 16px; font-size: 16px; line-height: 1.4; font-weight: 600; transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out); }
.toast.err { background: var(--ink-3); color: var(--bone); border: 1px solid var(--accent); }
.toast a { font-family: var(--mono); font-weight: 400; font-size: 13px; }
.toast.out { opacity: 0; transform: translateY(8px); }
@starting-style { .toast { opacity: 0; transform: translateY(100%); } }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 64px; padding-top: 48px; padding-bottom: 96px; }
.toc { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
.toc a { display: flex; align-items: center; min-height: 38px; padding: 0 12px; border-left: 2px solid var(--line); text-decoration: none; color: var(--muted); font-weight: 600; font-size: 16px; }
.toc a.on { color: var(--bone); border-left-color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .toc a:hover { color: var(--bone); } }
.toc-m { display: none; }
.prose { max-width: 720px; min-width: 0; }
.prose h1 { font-size: clamp(42px, 6vw, 72px); margin-bottom: 22px; }
.prose > .lead { color: var(--muted); margin-bottom: 8px; }
.prose section { padding-top: 56px; scroll-margin-top: 72px; }
.prose h2 { font-size: clamp(28px, 3.4vw, 38px); margin-bottom: 16px; }
.prose h3 { margin: 30px 0 10px; font-size: 21px; }
.prose p { margin: 0 0 16px; color: #DAD5C9; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; color: #DAD5C9; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--muted); }
.prose a { text-underline-offset: 4px; text-decoration-thickness: 1px; }
.prose code { font-family: var(--mono); font-size: 0.86em; background: var(--ink-3); border-radius: 5px; padding: 2px 6px; overflow-wrap: anywhere; }
.prose pre.code { margin: 0 0 18px; }
.prose pre.code code { background: transparent; padding: 0; font-size: inherit; }
.prose .tbl-wrap { overflow-x: auto; margin: 0 0 18px; }
.prose .tbl td { font-size: 16px; padding: 14px 16px 14px 0; }
.crew { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.crew div { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 12px; background: var(--bone); border-radius: var(--r); padding: 4px 16px 4px 6px; }
.crew .pic svg { display: block; width: 100%; height: auto; }
.crew p { margin: 0; color: var(--ink); font-size: 16px; line-height: 1.4; }
.note { border-left: 2px solid var(--accent); padding: 4px 0 4px 18px; margin: 0 0 18px; }
.note p { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .hero-top, .band-head, .use-grid { grid-template-columns: minmax(0, 1fr); }
  .hero .lead { max-width: 34em; }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crewlive { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 28px; }
  .toc { display: none; }
  .toc-m { display: block; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; }
  .toc-m summary { list-style: none; cursor: pointer; min-height: 48px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
  .toc-m summary::-webkit-details-marker { display: none; }
  .toc-m nav { padding: 0 8px 10px; display: grid; }
  .toc-m nav a { min-height: 44px; display: flex; align-items: center; padding: 0 10px; border-radius: 7px; text-decoration: none; font-weight: 600; color: var(--muted); }
}
@media (max-width: 860px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li, .steps li + li { padding: 20px 0; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line-b); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts li, .facts li + li { padding: 20px 0; border-left: 0; }
  .facts li + li { border-top: 1px solid var(--line); }
  .live .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live .cell { padding: 20px 16px 20px 0; }
  .live .cell + .cell { padding-left: 16px; }
  .live .cell:nth-child(3) { padding-left: 0; border-left: 0; }
  .live .cell:nth-child(n+3) { border-top: 1px solid var(--line); }
  .two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  :root { --gut: 18px; }
  body { font-size: 16.5px; }
  /* phone header: the logo and the button on one row, the page links on a second row */
  .nav .wrap { height: auto; min-height: 60px; flex-wrap: wrap; row-gap: 0; }
  .nav nav { display: contents; }
  .nav .links { order: 3; flex-basis: 100%; border-top: 1px solid var(--line); margin: 0 calc(var(--gut) * -1); padding: 0 calc(var(--gut) - 10px); }
  .nav nav > .btn, .nav nav > .chip { margin-left: auto; }
  .brand span { font-size: 23px; }
  .site-stage { height: auto; min-height: 0; aspect-ratio: 3 / 4; }
  .site-label { left: 16px; top: 14px; }
  .site-info { padding: 14px 16px 16px; }
  .city { height: 280px; }
  .crewlive { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .live-card { display: grid; grid-template-columns: 116px minmax(0, 1fr); column-gap: 14px; align-items: start; padding: 10px 16px 14px 6px; }
  .live-card .pic { grid-row: 1 / span 6; }
  .live-card dl, .live-card .now { grid-column: 2; }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .hero-team { display: block; }
  .lineup.all { display: none; }
  .lineup.shelf, .lineup.floor { display: block; }
  .lineup.shelf { border-bottom: 3px solid var(--ink); margin-bottom: 22px; }
  .lineup.floor { width: 92%; margin: 0 auto; }
  .team { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .member { display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: center; gap: 4px 14px; padding: 6px 16px 6px 6px; }
  .member h3 { font-size: 26px; }
  .splitbar { height: 64px; }
  .splitbar div { font-size: 17px; padding: 0 12px; }
  .splitbar .s3 { padding: 0 4px; font-size: 14px; }
  .splitkey { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .tbl td:first-child { white-space: normal; }
  .tbl.stack thead { display: none; }
  .tbl.stack tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line-b); }
  .ink-tbl .tbl.stack tr { border-bottom-color: var(--line); }
  .tbl.stack td { display: block; border: 0; padding: 2px 0; }
  .tbl.stack td.addr { white-space: normal; overflow-wrap: anywhere; }
  .foot .wrap { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 20px 18px; }
  .row .btn { flex: 1 1 100%; }
  .app-head { padding-top: 30px; }
  .toasts { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
  .crew { grid-template-columns: minmax(0, 1fr); }
  pre.code { font-size: 13px; padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lineup .m { animation: fade 300ms ease backwards; }
  .intro.out { transition: none; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  .member .pic svg { transition: none; }
  .member:hover .pic svg { transform: none; }
  .btn, .chip > button, .field button.max { transition: none; }
  .btn:active, .chip > button:active { transform: none; }
}
