/* pipe — the marketing pages' whole stylesheet.
 *
 * Structure is basho.dev's system (base, shell, home, responsive), ported.
 * The SHEET is the pipeOS handout's: paper, ink, serif prose, one blue
 * accent — Sam's ruling 2026-08-26, resolving docs/mobile.md rule 2 against
 * the gold retune (#858/#860): the site converges on the artifact a buyer
 * holds. It is a second SYSTEM, not a skin — the pages that load it do not
 * load site.css (xtask's head_for picks exactly one sheet per page), so
 * nothing here has to out-rank anything, and nothing here can reach the app.
 *
 * Tokens keep basho's NAMES so the two files stay diffable; the VALUES are
 * the handout's, and every derived tint is a color-mix() on a token — no
 * colour literal lives outside :root (mobile.md rule 2 as amended).
 *
 * Component index — the canonical set:
 *   .nav            the header: brand + the accent "get started" left, links right
 *   .hero           the page-opening statement, sans, the breathing ring
 *   .info           one selling beat: label left, body right (basho's /rules)
 *   .panel / .stat  a raised card; .wgrid is the four-up of them
 *   .tiers / .tier  pricing: .stat cards with a bottom-pinned button
 *   pre.term        anything literally terminal; .p is the prompt
 *   .faq            details/summary, hairline rows
 *   .actions        a row of .button
 *   .docs           the docs shell: sidebar + measure, on the .info grid
 *   .home           the landing: the stage + the side panel
 *   footer .crawl   the sponsor crawl, then the legal line
 * A new marketing element is one of these or it argues its way in here.
 */

/* ── tokens ──────────────────────────────────────────────────────────── */
:root {
  /* the handout's sheet: paper, ink, one blue. pipeos setup.html is the
     source — the site converges on it (docs/mobile.md rule 2; Sam's ruling
     2026-08-26). Derived tones stay inside this block; components below mix
     the accent with color-mix() rather than restating any hue. */
  --bg: #ffffff;
  --panel: #f4f6f9;
  --fill: #eef1f6;
  --line: #c9ced8;
  --line-strong: #aab1bf;
  --fg: #16181d;
  --dim: #5e6165;
  --accent: #1849b8;
  --danger: #b23315;
  /* the trust ladder's middle rungs: neutrals between --dim and --fg, so
     the ladder climbs by contrast alone (the guard measures it) */
  --rung-2: #47494d;
  --rung-3: #2d2f33;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --reading: Charter, Georgia, "Times New Roman", serif;
  --measure: 76ch;
  --radius: 6px;
  --gutter: clamp(20px, 3vw, 56px);
  --ease: cubic-bezier(.16, 1, .3, 1);         /* expo-out: fast start, long soft landing */
  --ease-pop: cubic-bezier(.34, 1.45, .64, 1); /* back-out: a little overshoot, for pops */
  --ease-io: cubic-bezier(.45, 0, .55, 1);     /* sine in-out: for breathing loops */
  --fast: 180ms; --mid: 380ms; --slow: 720ms;
  /* ink on paper needs no halo */
  --text-shadow: none;
  color-scheme: light;
}
@supports (animation-timing-function: linear(0, 1)) {
  :root { --ease-pop: linear(0, .008 1.1%, .031 2.2%, .129 4.8%, .257 7.2%, .671 14.2%, .789 16.9%, .881 19.7%, .957 23%, 1.008 26.6%, 1.038 30.7%, 1.048 36.6%, 1.03 47.9%, 1.006 68.7%, 1); }
}

/* ── reset, type, the halo ───────────────────────────────────────────── */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--fg);
  background-image: radial-gradient(1100px 500px at 50% -120px, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%);
  font: 15px/1.6 var(--reading);
  /* every letter sits a hair off the page: crisp edge, a soft dark halo (inherits everywhere) */
  text-shadow: var(--text-shadow);
  min-height: 100vh; min-height: 100dvh;
}
/* dark-on-light spots (gold buttons, the gold chip) carry no halo:
   the dark shadow only ever pairs with light text */
button, .button, .chip.gold { text-shadow: none; }
.wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease); }
a:hover { border-color: var(--accent); }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: 22px; } h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
h3 { font-size: 14px; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 18px; } li { margin-bottom: 6px; }
code, pre { font-family: var(--mono); }
/* machine text stays mono now that prose reads as print: prices, counters,
   nicks, and the sponsor domains are wire values, not sentences */
.tier-price, .stat b, table.ladder td.c-by, table.ladder .num, .docs-body td:first-child, footer .item { font-family: var(--mono); }
code { background: var(--panel); padding: 1px 5px; border-radius: 3px; border: 1px solid var(--line); }
pre { background: var(--fill); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; overflow-x: auto; white-space: pre-wrap; font-size: 12.5px; margin: 0 0 1em; }
pre code { background: transparent; border: 0; padding: 0; }
.dim { color: var(--dim); } .small { font-size: 12px; }
em { font-style: normal; color: var(--accent); }

/* ── buttons, inputs ─────────────────────────────────────────────────── */
button, .button {
  font: inherit; color: var(--bg); background: var(--accent); border: 0; border-radius: var(--radius);
  padding: 8px 14px; cursor: pointer; display: inline-block; font-weight: 600;
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease), filter var(--fast) var(--ease);
}
button:hover, .button:hover { filter: brightness(1.08); border-color: transparent; transform: translateY(-1.5px); transition-timing-function: var(--ease-pop); box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
button:active, .button:active { transform: translateY(0) scale(.985); box-shadow: none; transition-duration: 60ms; }
button.plain, .button.plain { background: transparent; color: var(--fg); border: 1px solid var(--line); }
button.plain:hover, .button.plain:hover { border-color: var(--accent); box-shadow: none; }
button.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.button.wide { display: block; text-align: center; }
.button.big { font-size: 15px; padding: 11px 20px; }
input, textarea, select {
  font: inherit; color: var(--fg); background: var(--fill); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 10px; width: 100%;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
label { display: block; margin-bottom: 14px; color: var(--dim); font-size: 12px; }

/* ── tables ──────────────────────────────────────────────────────────── */
table { border-collapse: collapse; width: 100%; margin: 0 0 1em; }
td, th { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; transition: background var(--fast) var(--ease); }
th { color: var(--dim); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
tr:hover td { background: rgba(255, 255, 255, .025); }
/* a wide table on a narrow screen scrolls inside its own box, never the page */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: thin; }
table.q td:first-child { white-space: nowrap; color: var(--accent); padding-left: 0; }
table.q td.yes { color: var(--dim); }
/* the trust ladder: four neutrals climbing by contrast, the order the
   security page states in words — xtask measures that it holds */
td.level { font-weight: 500; }
td.level.t1 { color: var(--dim); }
td.level.t2 { color: var(--rung-2); }
td.level.t3 { color: var(--rung-3); }
td.level.t4 { color: var(--fg); font-weight: 600; }

/* ── the header ──────────────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; gap: 18px;
  padding: 14px var(--gutter); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.nav a, .nav b { border: 0; color: var(--dim); position: relative; padding: 2px 0; font-weight: 500; white-space: nowrap; }
.nav a::after, .nav b::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--mid) var(--ease); }
.nav b::after, .nav a:hover::after { transform: scaleX(1); }
.nav b, .nav a:hover { color: var(--fg); }
.nav .brand { font-weight: 700; font-size: 16px; color: var(--fg); display: inline-flex; align-items: center; gap: 10px; }
.nav .brand::after { display: none; }
/* the mark: a gold bar, the pipe. glows and leans on hover */
.nav .mark { width: 4px; height: 16px; border-radius: 2px; background: var(--accent); display: inline-block; box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); transition: box-shadow var(--mid) var(--ease), transform var(--mid) var(--ease); }
.nav .brand:hover .mark { box-shadow: 0 0 14px 1px color-mix(in srgb, var(--accent) 45%, transparent); transform: rotate(12deg) scaleY(1.1); transition-timing-function: var(--ease-pop); }
/* brand + the call to action sit left; everything after is pushed right */
.nav .cta { color: var(--accent); margin-left: 26px; margin-right: auto; }
.nav .cta:hover { color: var(--accent); }
/* the member cluster, signed in */
.nav .flux { display: inline-flex; align-items: center; gap: 5px; color: var(--dim); font-size: 12px; }
.nav .flux .drop { width: 7px; height: 9px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; background: var(--accent); display: inline-block; }
.nav .flux b { color: var(--fg); font-size: 12px; }
.nav .flux b::after { display: none; }
.nav .signout, .nav .alpha { font-size: 12px; }
.nav .alpha { color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }

/* ── main, the page widths ───────────────────────────────────────────── */
main { flex: 1; padding: 28px var(--gutter) 48px; width: 100%; }
.narrow { max-width: 1200px; margin: 0 auto; }
.page { max-width: 1400px; margin: 0 auto; }

/* ── the hero: a page's opening statement ────────────────────────────── */
.hero { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: clamp(40px, 9vh, 96px) 20px clamp(30px, 6vh, 64px); overflow: hidden; }
.hero .ring-bg { position: absolute; left: 50%; top: 50%; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; border: 10px solid var(--accent); opacity: .07; animation: breathe 7s var(--ease-io) infinite; pointer-events: none; }
@keyframes breathe { 0%, 100% { transform: scale(.96); opacity: .06; } 50% { transform: scale(1); opacity: .12; } }
.hero > * { position: relative; }
.hero h1 { font-family: var(--reading); font-weight: 700; font-size: clamp(30px, 5vw, 56px); line-height: 1.1; letter-spacing: -0.02em; max-width: 18ch; margin: 0 0 22px; text-wrap: balance; }
.hero h1 em { text-shadow: 0 0 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.hero .big { font-family: var(--reading); font-size: clamp(18px, 2.2vw, 26px); line-height: 1.4; max-width: 44ch; margin: 0 0 26px; color: var(--fg); text-wrap: balance; }
.hero .actions { justify-content: center; margin-bottom: 0; }

/* ── info: one beat, label left and body right ───────────────────────── */
.info { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2.6fr); gap: clamp(24px, 4vw, 72px); max-width: 1400px; margin: 0 auto; padding: 34px 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.info h2 { font-size: 13px; letter-spacing: .1em; }
.info-head p { font-size: 13.5px; max-width: 34ch; color: var(--dim); }
.info-body { font-size: 15px; min-width: 0; }
.info-body > p { max-width: 68ch; margin-bottom: 1.4em; }
.info-body > p:last-child, .info-body > .actions:last-child { margin-bottom: 0; }
.info-body ul { padding-left: 18px; } .info-body li { margin-bottom: 14px; }
.info-body pre { font-size: 13.5px; line-height: 1.55; padding: 18px 22px; }
.info-body table { font-size: 14px; }
.info-body table td { padding: 12px 18px 12px 0; }
.info.last { padding-bottom: 56px; }

/* ── panels, stats, tiers ────────────────────────────────────────────── */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; transition: border-color var(--mid) var(--ease); }
.panel:hover { border-color: var(--line-strong); }
.panel h2 { margin-bottom: 10px; }
.panel .more { display: block; margin-top: 10px; color: var(--dim); border: 0; font-size: 12px; }
.panel.stats { display: flex; gap: 16px; justify-content: space-between; color: var(--dim); font-size: 12px; }
.panel.stats b { color: var(--fg); font-size: 16px; display: block; font-variant-numeric: tabular-nums; }
.panel.stats:not(:has(div:not([hidden]))) { display: none; }
.wgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.wgrid.three { grid-template-columns: repeat(3, 1fr); }
.stat, .tier { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; transition: border-color var(--mid) var(--ease), transform var(--mid) var(--ease); }
.stat:hover, .tier:hover { border-color: var(--accent); transform: translateY(-2px); transition-timing-function: var(--ease-pop); }
.stat b { display: block; font-size: 24px; } .stat span { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 34px; }
.tiers.three { grid-template-columns: repeat(3, 1fr); }
.tier { display: flex; flex-direction: column; padding: 18px 18px 16px; }
.tier h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin: 0 0 8px; }
.tier .tier-price { font-size: 24px; font-weight: 600; margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.tier .tier-price span { font-size: 12px; color: var(--dim); font-weight: 500; margin-left: 4px; }
.tier ul { padding-left: 0; list-style: none; margin: 0 0 18px; font-size: 13px; }
.tier li { position: relative; padding-left: 14px; margin-bottom: 8px; color: var(--fg); }
.tier li::before { content: "·"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.tier .tier-cta { margin: auto 0 0; padding: 0; }
.tier .tier-cta .button { display: block; text-align: center; }
.tiers-head { margin: 0 auto; max-width: 1400px; padding: 34px 0 14px; border-top: 1px solid var(--line); }
.tiers-head h2 { margin: 0; }
.tiers-head .tiers-note { margin: 6px 0 0; color: var(--dim); font-size: 12px; }

/* ── terminal, digests, the copy chip ────────────────────────────────── */
pre.term .p { color: var(--accent); }
pre.term .c { color: var(--dim); }
pre.term.install { display: flex; align-items: center; gap: .6ch; cursor: pointer; white-space: nowrap; overflow-x: auto; }
pre.term.install .copy { margin-left: auto; color: var(--dim); font-size: 11px; padding: 4px 8px; user-select: none; flex: none; text-transform: uppercase; letter-spacing: .06em; transition: color var(--fast) var(--ease); }
pre.term.install:hover .copy { color: var(--accent); }
.script-fold { margin: 0 0 14px; }
.script-fold > summary { color: var(--dim); cursor: pointer; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; transition: color var(--fast) var(--ease); }
.script-fold > summary:hover { color: var(--accent); }
.script-fold[open] > summary { margin-bottom: 10px; }
.script-fold[open] > *:not(summary) { animation: fade-in var(--mid) var(--ease) both; }
.script-fold pre.script { max-height: 60vh; overflow: auto; white-space: pre; }
.digest-line { margin: 0 0 6px; font-size: 12.5px; }
.digest-line .digest { word-break: break-all; color: var(--dim); font-size: 11.5px; background: transparent; border: 0; padding: 0; display: block; }
.note-line { color: var(--dim); font-size: 12.5px; }
.error { color: var(--danger); border: 1px solid var(--danger); padding: 8px 12px; border-radius: var(--radius); }
.warn { color: var(--accent); border: 1px solid var(--accent); padding: 8px 12px; border-radius: var(--radius); font-size: 12.5px; }

/* ── actions, faq ────────────────────────────────────────────────────── */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; align-items: center; }
.faq details { border-top: 1px solid var(--line); padding: 12px 2px; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-size: 14px; font-weight: 500; transition: color var(--fast) var(--ease); list-style: none; position: relative; padding-right: 24px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 2px; top: 0; color: var(--accent); transition: transform var(--mid) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { color: var(--dim); max-width: 65ch; margin: 10px 0 4px; animation: fade-in var(--mid) var(--ease) both; }

/* ── docs ────────────────────────────────────────────────────────────── */
.docs-wrap { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 3.2fr); gap: clamp(24px, 4vw, 72px); max-width: 1400px; margin: 0 auto; padding: 10px 0 40px; }
.docs-nav { position: sticky; top: 72px; align-self: start; }
.docs-nav a, .docs-nav b { display: block; border: 0; color: var(--dim); font-size: 13px; line-height: 2.1; position: relative; width: fit-content; font-weight: 500; }
.docs-nav a::after, .docs-nav b::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--mid) var(--ease); }
.docs-nav b, .docs-nav a:hover { color: var(--fg); }
.docs-nav b::after, .docs-nav a:hover::after { transform: scaleX(1); }
.docs-body { max-width: var(--measure); font-size: 15px; line-height: 1.6; min-width: 0; }
.docs-body h1 { font-size: 22px; margin: 0 0 16px; }
.docs-body h2 { margin: 32px 0 10px; }
.docs-body h2:first-of-type { margin-top: 24px; }
.docs-body p { margin: 0 0 14px; }
.docs-body pre { font-size: 13px; margin: 10px 0 18px; }
.docs-body table { font-size: 13.5px; }
.docs-body td { padding: 8px 12px 8px 0; }
.docs-body td:first-child { white-space: nowrap; color: var(--accent); }
.docs-flags { color: var(--dim); font-size: 12px; }

/* ── the landing: the stage and the side panel ───────────────────────── */
.home { display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 380px); grid-template-rows: minmax(0, 1fr); gap: clamp(24px, 2.5vw, 40px); align-items: stretch; flex: 1; min-height: 0; max-width: 1500px; width: 100%; margin: 0 auto; }
/* the stage, at every width: the page itself does not scroll; the feed rolls
   inside its own pane beneath a pinned header. Heights fall out of flex. */
.wrap:has(.home) { height: 100vh; height: 100dvh; overflow: hidden; overscroll-behavior: none; }
.wrap:has(.home) main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: 0; }
@media (min-width: 861px) { .home { min-height: 480px; } }
.stage { min-height: 0; display: flex; flex-direction: column; }
.stage-head { flex: none; display: flex; align-items: baseline; gap: 12px; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.stage-head h2 { margin: 0; }
.stage-head .live { color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; display: inline-flex; align-items: center; gap: 6px; }
.stage-head .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2.4s var(--ease-io) infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.stage-head .more { margin-left: auto; color: var(--dim); border: 0; font-size: 12px; }
.stage-head .more:hover { color: var(--accent); }
.stage-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; overscroll-behavior: contain; padding-bottom: 24px;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent); }
/* the ladder: one thread a rung, newest on top — basho's banzuke, pipe's board */
table.ladder { margin: 0; }
table.ladder th { position: sticky; top: 0; background: var(--bg); z-index: 1; }
table.ladder th.num, table.ladder td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.ladder td { padding: 9px 10px; vertical-align: middle; }
table.ladder td.c-thread { padding-left: 10px; min-width: 0; }
table.ladder .subject { border: 0; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }
table.ladder .line { color: var(--dim); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }
table.ladder .line a { border: 0; color: var(--dim); }
table.ladder td.c-by { color: var(--accent); white-space: nowrap; }
table.ladder td.c-pot { color: var(--accent); }
table.ladder td.c-here { color: var(--fg); }
table.ladder td.none { color: var(--line); }
table.ladder tr.lrow { animation: rung-in var(--slow) var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes rung-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
table.ladder tr.lrow:hover td { background: rgba(255, 255, 255, .025); }
table.ladder tr.lrow:hover .subject { color: var(--accent); }
table.ladder tr.empty td { padding: 0; border: 0; }
table.ladder tr.empty td:hover { background: transparent; }
.side-panel { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; scrollbar-width: none; min-height: 0; }
.side-panel::-webkit-scrollbar { display: none; }
.side-panel .pitch h1 { font-family: var(--reading); font-size: clamp(22px, 1.8vw, 28px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 10px; text-wrap: balance; }
.side-panel .pitch .doors { list-style: none; margin: 14px 0 0; padding: 0; }
.side-panel .pitch .doors li { padding: 5px 0; border-top: 1px solid var(--line); font-size: 12px; }
.side-panel .pitch .doors a { color: var(--dim); border: 0; }
.side-panel .pitch .doors a:hover { color: var(--fg); }
.side-panel .pitch p { color: var(--dim); font-size: 13.5px; margin-bottom: 16px; }
.side-panel .pitch .button { margin-bottom: 6px; }
.threads { list-style: none; margin: 0; padding: 0; }
.threads li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; margin: 0 -6px; border-radius: 4px; border-bottom: 1px solid var(--line); font-size: 12.5px; transition: background var(--fast) var(--ease); }
.threads li:hover { background: rgba(255, 255, 255, .025); }
.threads li:last-child { border-bottom: 0; }
.threads a { border: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.threads .n { color: var(--dim); font-size: 11px; white-space: nowrap; flex: none; font-variant-numeric: tabular-nums; }
li.empty { color: var(--dim); font-size: 12px; }
.empty-ring { position: relative; padding: 70px 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); overflow: hidden; margin: 24px 0; }
.empty-ring::before { content: ""; position: absolute; left: 50%; top: 50%; width: 320px; height: 320px; margin: -160px 0 0 -160px; border-radius: 50%; border: 6px solid var(--accent); opacity: .08; animation: breathe 6s var(--ease-io) infinite; pointer-events: none; }
.empty-ring > * { position: relative; }
.empty-ring .head { font-weight: 600; letter-spacing: -0.01em; font-size: 28px; margin: 0 0 .5em; }
.empty-ring p { max-width: 50ch; margin: 0 auto 20px; color: var(--dim); }

/* ── the board (/boards/): board.js builds everything into main.board-col ──
   The list is a ladder of rows (subject, then one dim meta line); a thread
   is the record — posts as rules, not bubbles — with the composer at its
   foot and, signed in, the lobby strip pinned to the viewport bottom. */
.board-col { padding-bottom: calc(32px + var(--strip-clear, 0px)); }
.board-col.has-strip { --strip-clear: 56px; }
.ledger { max-width: 1100px; margin: 0 auto; width: 100%; }
.sub { color: var(--dim); font-size: 13px; margin: 0 0 18px; line-height: 1.6; max-width: 68ch; }
.sub a { color: var(--dim); } .sub a:hover { color: var(--accent); }
p.cta { margin: 20px 0 0; }
p.cta .btn { display: inline-block; }
/* .btn is the app's control name; it is .button here. .mini is the small outline one */
.btn { font: inherit; color: var(--bg); background: var(--accent); border: 0; border-radius: var(--radius); padding: 8px 14px; cursor: pointer; display: inline-block; font-weight: 600; text-shadow: none;
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease), filter var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.btn:hover { filter: brightness(1.08); transform: translateY(-1.5px); transition-timing-function: var(--ease-pop); box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn:active { transform: translateY(0) scale(.985); box-shadow: none; transition-duration: 60ms; }
.btn.mini, .btn.upvote, .btn.compose-open { background: transparent; color: var(--dim); border: 1px solid var(--line); font-weight: 500; text-shadow: var(--text-shadow); }
.btn.mini, .btn.upvote { padding: 2px 9px; font-size: 11.5px; border-radius: 3px; }
.btn.mini:hover, .btn.upvote:hover, .btn.compose-open:hover { color: var(--accent); border-color: var(--accent); box-shadow: none; transform: none; filter: none; }
.btn.upvote.done { color: var(--accent); border-color: var(--accent); }
b.btn.mini.here { color: var(--accent); border-color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.board-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 4px 0 22px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.board-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; }
h1.board-title { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin: 0; }
.sort-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 12px; color: var(--dim); }
.sort-row a { border: 0; color: var(--dim); } .sort-row a:hover { color: var(--accent); }
.sort-row .here { color: var(--accent); font-weight: 600; }
.board-pulse { margin-left: auto; color: var(--accent); font-size: 12px; }
.board-top .compose-slot { margin: 0; }
.compose-slot { margin: 0 0 24px; }
.btn.compose-open { display: block; width: 100%; text-align: left; padding: 9px 12px; font-size: 13px; }
.ledger-rows { display: flex; flex-direction: column; }
a.lrow { display: block; border: 0; padding: 10px 10px; margin: 0 -10px; border-bottom: 1px solid var(--line); border-radius: 4px; transition: background var(--fast) var(--ease); }
a.lrow:hover { background: rgba(255, 255, 255, .025); }
.lrow-subject { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.35; transition: color var(--fast) var(--ease); }
a.lrow:hover .lrow-subject { color: var(--accent); }
.lrow-meta { display: block; margin-top: 3px; color: var(--dim); font-size: 12px; }
.lrow-meta b { color: var(--accent); font-weight: 500; }
.lrow-here { color: var(--fg); font-size: 12px; white-space: nowrap; }
/* a thread */
.board-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
h2.thread-title { font-family: var(--reading); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; text-transform: none; color: var(--fg); margin: 0; }
.flux-chip { display: inline-block; border-radius: 3px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); font-size: 11.5px; padding: 2px 9px; white-space: nowrap; }
.record { display: flex; flex-direction: column; gap: 18px; margin: 0 0 24px; }
.post { border-left: 2px solid var(--line); padding: 4px 0 4px 14px; max-width: var(--measure); transition: border-color var(--fast) var(--ease); animation: msg-in var(--slow) var(--ease) both; }
.post:hover, .post:focus { border-left-color: var(--accent); outline: none; }
.post.root { border-left-color: var(--accent); }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.post-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 11px; color: var(--dim); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.post-meta b, .post-meta .nick-flare b { color: var(--accent); font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 12px; }
.post-meta .btn { text-transform: none; letter-spacing: 0; }
.post-text { font-family: var(--reading); font-size: 15.5px; line-height: 1.55; word-break: break-word; }
.post-text p { margin: 0 0 .8em; white-space: pre-line; } .post-text p:last-child { margin-bottom: 0; }
.post-text blockquote.quote { margin: 0 0 .8em; padding-left: 12px; border-left: 2px solid var(--dim); color: var(--dim); white-space: pre-line; }
.post-text h3, .post-text h4, .post-text h5, .post-text h6 { font-family: var(--reading); text-transform: none; letter-spacing: 0; color: var(--fg); margin: .6em 0 .3em; }
.post-text h3 { font-size: 17px; } .post-text h4 { font-size: 15.5px; } .post-text h5, .post-text h6 { font-size: 14px; }
.post-text ul, .post-text ol { margin: 0 0 .8em; padding-left: 20px; } .post-text li { margin-bottom: 4px; }
.post-text pre { font-size: 12.5px; margin: 0 0 .8em; }
.post-text code { font-size: .9em; }
a.ref { color: var(--accent); border: 0; } a.ref:hover { border-bottom: 1px solid var(--accent); }
.nick-flare { display: inline-flex; align-items: baseline; }
.flare-emoji { font-style: normal; opacity: .9; }
.readmark { display: flex; align-items: center; gap: 10px; margin: 4px 0; color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.readmark::before, .readmark::after { content: ""; flex: 1; border-top: 1px solid var(--accent); opacity: .35; }
/* the composer */
.composer { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 0 0 24px; }
.composer input, .composer textarea { margin: 0 0 8px; }
.composer textarea { min-height: 96px; resize: vertical; }
.composer-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.composer-foot .sub { margin: 0; }
.composer .note { font-size: 12px; color: var(--dim); }
.composer .note.err { color: var(--danger); }
/* the lobby strip: pinned to the viewport foot, signed in */
.lobby-strip { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: max(6px, env(safe-area-inset-bottom)); }
.lobby-strip-in { width: min(100%, 1100px); margin-inline: auto; padding: 0 var(--gutter); }
.lobby-bar { display: flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 11px 0 6px; font-size: 13px; color: var(--dim); cursor: pointer; }
.lobby-bar:hover { color: var(--fg); }
.lobby-bar .caret { color: var(--accent); width: 1ch; }
.lobby-bar .who { color: var(--fg); white-space: nowrap; }
.lobby-bar .last { flex: 1; min-width: 0; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-strip-body { max-height: 0; overflow: clip; opacity: 0; transition: max-height var(--mid) var(--ease), opacity var(--mid) var(--ease); display: flex; flex-direction: column; }
.lobby-strip.open .lobby-strip-body { max-height: 30vh; opacity: 1; padding: 0 0 10px; }
.lobby-meta { font-size: 12px; color: var(--dim); margin: 0 0 10px; }
.lobby-lines { flex: 1; min-height: 40px; max-height: 420px; overflow-y: auto; font-size: 13.5px; margin: 0 0 12px; overscroll-behavior: contain; scrollbar-width: thin; }
.lobby-line { padding: 2px 0; overflow-wrap: anywhere; }
.lobby-line b { color: var(--accent); font-weight: 600; }
.lobby-line .t { color: var(--dim); font-size: 11px; margin-left: 6px; }
.lobby-line .lobby-del { margin-left: 6px; padding: 0 6px; }
.lobby-say { display: flex; gap: 8px; }
.lobby-say input { flex: 1; min-width: 0; }
/* keys: the skip link, the help sheet */
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 60; padding: 8px 12px; background: var(--panel); border: 1px solid var(--accent); border-radius: var(--radius); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.keys-btn { margin-left: 8px; } .ledger .sub .keys-btn { float: right; margin: 0; }
.keys-help-back { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 24px; background: color-mix(in srgb, var(--bg) 80%, transparent); }
.keys-help { width: min(100%, 36ch); padding: 18px 20px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); outline: none; }
.keys-help h2 { margin-bottom: 12px; }
.keys-help-rows { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 14px; font-size: 13px; }
.keys-help-rows dt { color: var(--accent); } .keys-help-rows dd { margin: 0; color: var(--dim); }

/* visually hidden, present for assistive tech and crawlers */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ── footer: the crawl, the legal line ───────────────────────────────── */
footer { position: relative; flex: none; padding: 12px var(--gutter) 14px; border-top: 1px solid var(--line); color: var(--dim); font-size: 12px; text-align: center; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
footer .crawl { overflow: hidden; white-space: nowrap; line-height: 1.3; margin: 0 calc(-1 * var(--gutter)); width: calc(100% + 2 * var(--gutter)); -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent); }
footer .track { display: inline-flex; gap: 48px; padding-right: 48px; animation: crawl 105s linear infinite; will-change: transform; }
footer .crawl:hover .track { animation-play-state: paused; }
footer .item { font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--fg); }
footer .item a { border: 0; } footer .item a:hover { color: var(--accent); }
footer .sep { color: var(--accent); font-size: 14px; }
@keyframes crawl { from { transform: translateX(0); } to { transform: translateX(-50%); } }
footer .advertise { position: absolute; right: 12px; top: 6px; font-size: 10px; color: var(--dim); border-bottom-color: transparent; }
footer .advertise:hover { color: var(--accent); border-bottom-color: var(--accent); }
footer .legal { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 11px; }
footer .legal a { border: 0; color: var(--dim); } footer .legal a:hover { color: var(--accent); }
footer .pulse { color: var(--dim); }

/* ── two breakpoints (860: the phone and the narrow tablet; 480: the phone
   held upright), touch, reduced motion ──────────────────────────────── */
@media (max-width: 860px) {
  main { padding: 12px 12px 20px; }
  /* the frame: brand and "get started" on the first row, the links wrapping
     beneath them. The brand takes the row, so the links always start a new one. */
  .nav { position: static; flex-wrap: wrap; gap: 6px 14px; padding: 10px 12px; }
  .nav .brand { flex: 1; order: -2; }
  .nav .cta { order: -1; margin: 0; font-size: 13px; }
  .nav > a:not(.brand):not(.cta), .nav > b:not(.brand), .nav > span { font-size: 13px; }
  footer { padding: 8px 16px 10px; font-size: 11px; }
  footer .crawl { margin: 0 -16px; width: calc(100% + 32px); }
  footer .item, footer .sep { font-size: 12px; }
  footer .advertise { display: none; }
  .hero { padding: 36px 12px 28px; }
  .info, .docs-wrap { grid-template-columns: 1fr; gap: 14px; padding: 24px 0; }
  .docs-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .docs-nav a, .docs-nav b { line-height: 1.8; }
  .wgrid, .tiers, .tiers.three { grid-template-columns: repeat(2, 1fr); }
  .wgrid.three { grid-template-columns: 1fr; }
  .info-body table td { padding: 10px 10px 10px 0; }
  /* the stage: the feed alone; the pitch first, the panels hidden */
  .wrap:has(.home) { height: auto; overflow: visible; }
  .home { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 12px; }
  .side-panel { order: -1; overflow: visible; }
  .side-panel > :not(.pitch) { display: none; }
  .stage-body { overflow: visible; mask-image: none; -webkit-mask-image: none; }
  table.ladder th { position: static; }
  table.ladder .c-pot, table.ladder .c-here { display: none; }
  table.ladder .subject, table.ladder .line { max-width: 100%; white-space: normal; }
  td, th { padding: 6px 8px; }
  .board-top { margin-bottom: 16px; }
  h2.thread-title { font-size: 19px; }
  .post { padding-left: 10px; }
  .lobby-strip-in { padding: 0 12px; }
}

@media (max-width: 480px) {
  .tiers, .tiers.three, .wgrid { grid-template-columns: 1fr; }
  table.ladder .c-re, table.ladder .line { display: none; }
  table.ladder td { padding: 8px 6px; }
  .hero h1 { font-size: 28px; }
}

@media (hover: none) {
  footer .crawl:hover .track { animation-play-state: running; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
