/* The app's own styles, on the Cambrian system. tokens.css and components.css load first and are the system's
   files; this sheet lays the screens out with them. Colour comes from the products only: the chrome is grey,
   and the one hue is the small live dot (cb-dot). */

@font-face { font-family: "Chivo Mono"; src: url("assets/fonts/ChivoMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("assets/fonts/Archivo-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("assets/fonts/Archivo-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }

:root {
  --edge: rgba(255, 255, 255, .08);
  --top-h: 52px;
  --nav-room: 104px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; }
html.locked, html.locked body { overflow: hidden; }
body { min-height: 100dvh; font: 400 16px/1.5 var(--font-sans); overflow-x: hidden; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, b, strong { font-weight: 400; }
h1 { font-size: 34px; line-height: 1.06; letter-spacing: -.01em; text-wrap: balance; }
h2 { font: 400 11px/1.4 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 20px; }
h3 { font-size: 20px; line-height: 1.15; overflow-wrap: anywhere; }
a { color: inherit; }
button, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 60; background: var(--ink); color: var(--ground); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---- the frame: a quiet top line, and one Card2 bar at the bottom centre ---- */
.top {
  position: fixed; inset: 0 0 auto 0; height: var(--top-h); z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 0 var(--page-margin); background: rgba(0, 0, 0, .88); backdrop-filter: blur(10px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; font-size: 17px; }
.brand img { width: 24px; height: 24px; }
.grow { flex: 1; }
.badge { display: inline-flex; align-items: center; font: 400 10px/12px var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.iconbtn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--caption); }
.iconbtn:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.iconbtn svg, .nav svg, .send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.count {
  position: absolute; top: 5px; right: 4px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--ground); font: 400 10px/15px var(--font-mono); font-style: normal; text-align: center;
}
.modeline {
  position: fixed; inset: var(--top-h) 0 auto 0; z-index: 29; height: 24px; padding: 0 var(--page-margin); overflow: hidden;
  font: 400 10px/24px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; text-overflow: ellipsis; background: rgba(0, 0, 0, .88); border-bottom: 1px solid var(--edge);
}
.nav {
  position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30;
  width: max-content; max-width: calc(100vw - 16px); gap: 0; flex-wrap: wrap;
}
.nav .cb-nav-btn { text-decoration: none; flex: none; }
.nav .cb-nav-div { margin: 0 4px; flex: none; }
.nav-glyphs { display: flex; align-items: center; gap: 4px; min-width: 0; }
.nav-input { flex: 1 1 0; min-width: 0; }

main { display: block; padding: calc(var(--top-h) + 24px + 28px) var(--page-margin) var(--nav-room); max-width: 1224px; margin: 0 auto; }
main:focus { outline: none; }
.screen { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.screen > * { min-width: 0; }
.head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.lede { color: var(--caption); font-size: 16px; line-height: 1.5; max-width: 62ch; }
.plain { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; min-width: 0; }
.row.start { justify-content: flex-start; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gutter); }
.spacer { flex: 1; }

/* ---- type helpers: hierarchy is size and grey, never weight ---- */
.cap, .eyebrow, .kvrow, .state, .origin {
  font: 400 10px/12px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--caption);
}
.eyebrow { font-size: 11px; letter-spacing: .2em; color: var(--muted); }
.kvrow { line-height: 15px; overflow-wrap: anywhere; }
.kvrow b { color: var(--muted); }
.kvrow .raw { text-transform: none; letter-spacing: .04em; }
.kvs { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.state { display: inline-flex; align-items: center; gap: 6px; }
.origin { color: var(--muted); display: block; }
.ring { width: 8px; height: 8px; box-sizing: border-box; border-radius: 50%; border: 1px solid var(--muted); display: inline-block; flex: none; }
.ring.is-fill { background: var(--ink); border-color: var(--ink); }
.ring.is-now { border-color: var(--ink); animation: pulse 1.2s ease-in-out infinite; }
.mono { font-family: var(--font-mono); }
.small { font-size: 12.5px; }
.dim { color: var(--muted); }
.ok, .bad { color: var(--ink); }
.big { font-size: 22px; }
.hash { font: 400 12.5px/1.5 var(--font-mono); overflow-wrap: anywhere; word-break: break-all; }
.link { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--done); overflow-wrap: anywhere; }
.link:hover { text-decoration-color: var(--ink); }
.note { font-size: 13.5px; line-height: 1.45; color: var(--caption); border-left: 1px solid var(--hairline); padding: 2px 0 2px 12px; max-width: 76ch; }
.banner { font: 400 10px/14px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.statement, h2.statement {
  margin: 0; font: 400 clamp(30px, 4.4vw, 44px)/1.06 var(--font-sans); letter-spacing: -.01em; text-transform: none;
  color: var(--ink); max-width: 820px; text-wrap: balance;
}
.verdict { display: flex; align-items: center; gap: 10px; font-size: 22px; line-height: 1.2; }
.verdict .cb-dot { width: 6px; height: 6px; flex: none; }

/* ---- cards: Card1 is the base, Card2 nests inside it; colour never sits on a card ---- */
.cb-card { min-width: 0; }
.cb-card.pad { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.cb-card.pad.has-top { padding-top: 38px; }
.cb-card.pad.has-bottom { padding-bottom: 38px; }
.cb-cap { white-space: nowrap; max-width: calc(100% - 22px); overflow: hidden; }
a.cb-card { text-decoration: none; display: block; }
a.cb-card.pad { display: flex; }
a.cb-card:hover::before { background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .12)); }
.cb-card p { overflow-wrap: anywhere; }

/* ---- buttons: a white pill, or a transparent pill with a 1px outline; both at least 44px tall ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: var(--radius-pill);
  border: 0; background: var(--ink); color: var(--ground); font: 500 14px/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  text-align: center;
}
.btn:hover { background: var(--caption); }
.btn.ghost, .textbtn { background: transparent; color: var(--ink); border: 1px solid var(--selected-outline); font-weight: 400; }
.btn.ghost:hover, .textbtn:hover { border-color: var(--selected-ring); background: transparent; }
.btn.small { padding: 0 16px; font-size: 13px; }
.btn.tall { min-height: 48px; font-size: 15px; }
.btn:disabled, .textbtn:disabled { opacity: .4; cursor: not-allowed; }
.btn:focus-visible, .textbtn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-pill); }
.textbtn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: var(--radius-pill);
  font: 400 13px/1.2 var(--font-sans); cursor: pointer;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions.col { flex-direction: column; align-items: stretch; gap: 8px; }

/* ---- timeline: a step in mono over a line of text, joined by a 1px rule and 9px dots ---- */
.tl { position: relative; display: flex; flex-direction: column; }
.tl li { position: relative; display: grid; grid-template-columns: 9px minmax(0, 1fr); column-gap: 14px; padding-bottom: 14px; }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: 4px; top: 12px; bottom: -3px; width: 1px; background: rgba(255, 255, 255, .16); }
.tl li:last-child::before { display: none; }
.tl li > i {
  position: relative; z-index: 1; width: 9px; height: 9px; box-sizing: border-box; border-radius: 50%; margin-top: 2px;
  border: 1px solid var(--muted); background: var(--card1-top); transition: background .25s, border-color .25s;
}
.tl li > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tl .step { font: 400 10px/12px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--done); }
.tl .said { font-size: 13.5px; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }
.tl [data-state="on"] > i, .tl .is-done > i { background: var(--ink); border-color: var(--ink); }
.tl [data-state="on"] .said, .tl [data-state="now"] .said, .tl [data-state="red"] .said, .tl .is-done .said, .tl .is-now .said { color: var(--ink); }
.tl [data-state="now"] > i, .tl .is-now > i { border-color: var(--ink); animation: pulse 1s ease-in-out infinite; }
.tl [data-state="red"] > i { border-color: var(--ink); }
.tl .is-off > i { border-style: dashed; }
.feather { position: relative; padding: 22px 0; }
.feather::before, .feather::after { content: ""; position: absolute; left: 0; right: 0; height: 22px; pointer-events: none; z-index: 2; }
.feather::before { top: 0; background: linear-gradient(180deg, var(--card1-top), transparent); opacity: .7; }
.feather::after { bottom: 0; background: linear-gradient(0deg, var(--card1-bottom), transparent); opacity: .7; }

/* ---- product imagery: a glossy squircle with a white glyph over a blurred field of the product's own colour ---- */
.field { position: absolute; inset: 0; border-radius: var(--radius-card); overflow: hidden; z-index: 0; pointer-events: none; }
.field::before {
  content: ""; position: absolute; inset: -40px; filter: blur(36px); opacity: .38;
  background: radial-gradient(60% 55% at 25% 22%, #ff9a4a, transparent 70%), radial-gradient(55% 60% at 85% 85%, #3a4fd8, transparent 70%);
}
.field ~ * { position: relative; }
.field ~ .cb-cap { position: absolute; }
.squircle {
  position: relative; width: 60px; height: 60px; flex: none; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--card2-top), var(--card2-bottom));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 6px 14px rgba(0, 0, 0, .5);
}
.squircle svg { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.squircle.is-upread {
  background: radial-gradient(circle at 30% 22%, #ffd8a8, #ff8a3d 48%, #b4400e);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, .65), inset 0 -6px 12px rgba(0, 0, 0, .28), 0 8px 18px rgba(0, 0, 0, .55);
}
.squircle.is-big { width: 72px; height: 72px; border-radius: 22px; }
.squircle.is-big svg { width: 34px; height: 34px; }

/* ---- home: seven beats ---- */
.beat { display: flex; flex-direction: column; margin-top: 72px; min-width: 0; }
.beat:first-child { margin-top: 28px; }
.hero h1 { margin-top: 20px; font-size: clamp(44px, 7vw, 84px); line-height: .98; letter-spacing: -.025em; max-width: 1000px; }
.hero .lede { margin-top: 24px; font-size: clamp(16px, 1.6vw, 20px); max-width: 760px; }
.hero .actions { margin-top: 28px; }
.h2 { margin: 10px 0 0; font: 400 clamp(26px, 3.2vw, 36px)/1.08 var(--font-sans); letter-spacing: -.01em; text-transform: none; color: var(--ink); max-width: 860px; }
.body { margin-top: 12px; font-size: 16px; line-height: 1.5; color: var(--caption); max-width: 760px; }
.sub { font-size: 13px; line-height: 1.4; color: var(--muted); }
.beat > .sub { margin-top: 14px; max-width: 760px; }
.beat > .cb-members, .beat > .capital, .beat > .decision, .beat > .machine, .beat > .proof { margin-top: 28px; }
.cb-members.flush { padding: 0; }
.cb-member-fig img.figure { height: 100%; width: auto; object-fit: contain; }
.capital, .machine { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
.capcard { min-height: 150px; gap: 6px; }
.capcard .big { font-size: clamp(20px, 2.4vw, 30px); line-height: 1.1; }
.capcard .big.is-none { color: var(--muted); font-size: 17px; line-height: 1.3; }
.machine .cb-card { min-height: 150px; font-size: 15px; line-height: 1.4; }
.decision { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.decision > .brief-mini { grid-column: 1 / -1; min-height: 200px; }
.brief-mini .title { font-size: 22px; line-height: 1.15; }
.brief-mini .line { font-size: 15px; line-height: 1.4; color: var(--caption); }
.seat { height: 132px; }
.seat .cb-member-fig { inset: 26px 12px; }
.seat .cb-key { width: 30px; height: 30px; aspect-ratio: auto; opacity: .35; }
.seat.is-selected .cb-key { opacity: .9; }
.proof { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gutter); align-items: stretch; }
.listcard { gap: 12px; }
.listcard .item { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: baseline; padding-top: 12px; border-top: 1px solid var(--edge); text-decoration: none; }
.listcard .item:first-of-type { border-top: 0; padding-top: 0; }
.listcard .item > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 14px; line-height: 1.35; }
.listcard a.item:hover > span:first-child > span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.door { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; padding-top: 40px; border-top: 1px solid var(--edge); }
.door .h2 { margin: 0; font-size: clamp(28px, 3.8vw, 44px); max-width: 760px; }

/* ---- product cards ---- */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--gutter); }
.product { min-height: 340px; padding: 44px 22px 40px !important; gap: 0 !important; }
.product-name { margin-top: 20px; font-size: 28px; line-height: 1.1; }
.product-sub { margin-top: 6px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.product-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 16px; }
.product-top { display: flex; align-items: center; gap: 16px; }
.product-top h2 { margin: 0; font: 400 24px/1.1 var(--font-sans); letter-spacing: 0; text-transform: none; color: var(--ink); }
.product-top p { margin-top: 4px; font-size: 14px; color: var(--muted); }

/* ---- the brief card ---- */
.brief { gap: 12px !important; }
.brief h3 { font-size: 22px; }
.brief .fragment { font-size: 13px; color: var(--muted); margin-top: -8px; }
.brief .goal { color: var(--ink); font-size: 15px; line-height: 1.4; }
.brief .dim { font-size: 13.5px; }
.checks { margin-top: 6px; }
.checks li { position: relative; padding: 2px 0 2px 26px; font-size: 13.5px; line-height: 1.35; color: var(--caption); }
.checks li::before { content: ""; position: absolute; left: 0; top: 6px; width: 10px; height: 10px; box-sizing: border-box; border-radius: 50%; border: 1px solid var(--muted); }

/* ---- talk: Cambrian answers in plain text; the bottom bar is the input ---- */
.chat { display: flex; flex-direction: column; gap: 18px; min-height: 120px; }
.msg { display: flex; flex-direction: column; gap: 10px; max-width: 640px; min-width: 0; }
.msg.is-member { align-self: flex-end; align-items: flex-end; max-width: 84%; }
.msg.is-member > p {
  padding: 10px 14px; border-radius: var(--radius-card); font-size: 15px; line-height: 1.4;
  background: linear-gradient(180deg, var(--card2-top), var(--card2-bottom)); box-shadow: var(--shadow-card2);
}
.msg.is-cambrian > p:not(.small) { font-size: 16px; line-height: 1.45; }
.divider { font: 400 10px/12px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--done); text-align: center; padding: 6px 0; }
.typing { display: inline-flex; gap: 5px; padding: 6px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: pulse 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
.talk-foot { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.talk-foot select {
  min-height: 44px; padding: 0 14px; border-radius: var(--radius-pill); border: 1px solid var(--selected-outline);
  background: var(--ground); color: var(--ink); font-size: 14px;
}
.nav.has-input { width: min(980px, calc(100vw - 16px)); }
.composer { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 2px 0 8px; }
.composer textarea {
  flex: 1; min-width: 0; height: 44px; resize: none; padding: 11px 0; border: 0; background: transparent; color: var(--ink);
  font: 400 15px/22px var(--font-sans);
}
.composer textarea::placeholder { color: var(--muted); opacity: 1; }
.composer textarea:disabled { opacity: .7; }
.composer textarea:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 8px; }
.send { width: 44px; height: 44px; min-height: 44px; padding: 0; flex: none; }
.send span { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.screen[data-screen="talk"] { padding-bottom: 56px; }

/* ---- approvals: ideas before the council, and the vote ---- */
.queue { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gutter); align-items: start; }
.ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--gutter); min-width: 0; }
.idea { min-height: 380px; padding: 40px 18px 36px !important; gap: 14px !important; }
.idea .title { font-size: 24px; line-height: 1.1; overflow-wrap: anywhere; }
.idea .line { font-size: 15px; line-height: 1.45; color: var(--caption); }
.sigs { display: flex; flex-direction: column; gap: 10px; }
.sig { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; column-gap: 12px; align-items: center; font-size: 13.5px; color: var(--muted); }
.sig > i { width: 10px; height: 10px; box-sizing: border-box; border-radius: 50%; border: 1px solid var(--muted); }
.sig.is-signed { color: var(--ink); }
.sig.is-signed > i { background: var(--ink); border-color: var(--ink); }
.sig .cap { color: var(--done); }
.sig .result { grid-column: 2 / -1; font-size: 12.5px; color: var(--caption); }
.cb-todo { width: 100%; min-height: 0; }
.cb-todo-head img { width: 26px; }
.cb-todo-row a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--done); }
.council3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.council3 .seat { height: 110px; }
.screen > .stack > .council3 { max-width: 640px; }
a.textbtn { text-decoration: none; }
button.seat { border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; width: 100%; }
.vote-head { display: flex; flex-direction: column; gap: 12px; }
.vote-head h2.statement { font-size: 30px; }
.vote-head .lede { font-size: 14px; line-height: 1.45; }
.released { display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.released .cb-dot { width: 6px; height: 6px; flex: none; }
.released div { display: flex; flex-direction: column; gap: 3px; font-size: 15px; min-width: 0; }
.released span + span { font-size: 13px; color: var(--caption); }
.footcap { text-align: center; color: var(--done); }

/* ---- the sheet ---- */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .7); animation: fade .2s ease both; }
.sheet {
  position: relative; width: 100%; max-height: 92dvh; display: flex; flex-direction: column; border-radius: var(--radius-nav) var(--radius-nav) 0 0;
  background-color: var(--ground); box-shadow: inset 0 0 0 1px var(--edge), 0 -20px 60px rgba(0, 0, 0, .7);
  animation: rise .28s cubic-bezier(.16, 1, .3, 1) both;
}
.sheet:focus { outline: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 8px 20px; border-bottom: 1px solid var(--edge); flex: none; }
.sheet-head .cap { letter-spacing: .2em; }
.sheet-body { overflow: auto; padding: 20px 20px calc(28px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }

/* ---- the line ---- */
.runs { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gutter); align-items: start; }
.run { gap: 12px !important; }
.run h3 { font-size: 20px; }
.log { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; }
.log li { font: 400 11.5px/1.5 var(--font-mono); color: var(--caption); overflow-wrap: anywhere; white-space: pre-wrap; animation: fade .25s ease both; }

/* ---- rows, receipts ---- */
.rows { display: flex; flex-direction: column; margin-top: 6px; }
.rows li { border-top: 1px solid var(--edge); padding: 10px 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rows li > a { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; text-decoration: none; min-width: 0; min-height: 32px; }
.rows li > a > span { min-width: 0; overflow-wrap: anywhere; }
.rows li > a:hover { text-decoration: underline; text-underline-offset: 3px; }
.receipt-row { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: start; padding: 16px 18px; }
.receipt-row > span:first-child { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.receipt-row .name { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.receipt-row .cost { font-size: 15px; }
.receipt-row .cap { line-height: 15px; white-space: normal; }
.receipt-row .faint { color: var(--muted); }
.verify .btn { align-self: flex-start; }
.verify-out { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.kv dt, .facts dt { font: 400 10px/14px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kv dt { margin-top: 6px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; border-top: 1px solid var(--edge); }
.facts > div { padding: 10px 0; border-bottom: 1px solid var(--edge); min-width: 0; }
.facts > .wide { grid-column: 1 / -1; }
.facts dd { font-size: 17px; overflow-wrap: anywhere; }
section { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.checklist li { display: flex; gap: 10px; padding: 3px 0; font-size: 14.5px; }
.checklist li b { flex: none; width: 14px; color: var(--caption); }
.checklist li span { color: var(--ink); min-width: 0; }
.checklist li em { display: block; font: 400 11.5px/1.45 var(--font-mono); color: var(--muted); font-style: normal; overflow-wrap: anywhere; }
.tablewrap { overflow-x: auto; max-width: 100%; padding: 4px 8px; }
table { border-collapse: collapse; width: 100%; font: 400 11.5px/1.3 var(--font-mono); color: var(--caption); }
th, td { padding: 7px 6px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--edge); }
th { color: var(--muted); letter-spacing: .1em; text-transform: uppercase; font-weight: 400; font-size: 10px; }
.n { text-align: right; font-variant-numeric: tabular-nums; }
td.model { max-width: 64px; overflow: hidden; text-overflow: ellipsis; }
tfoot td { border-top: 1px solid var(--selected-outline); border-bottom: 0; color: var(--ink); }

/* ---- lessons, stake, notifications ---- */
.lessons { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gutter); align-items: start; }
.lesson { gap: 12px !important; }
.lesson .rule { font-size: 15px; line-height: 1.4; }
.lesson .from { font-size: 13px; line-height: 1.4; color: var(--muted); }
.lesson .failure { font-size: 13.5px; line-height: 1.45; color: var(--caption); }
.split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.split > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.split .big { font-size: clamp(18px, 2.4vw, 30px); line-height: 1.1; }
.split .big.is-none { color: var(--muted); font-size: 15px; line-height: 1.3; }
.formula { padding: var(--card2-pad); display: flex; flex-direction: column; gap: 10px; }
.rate { display: block; font-size: 15px; line-height: 1.5; color: var(--caption); }
.notes { display: flex; flex-direction: column; gap: var(--gutter); max-width: 820px; }
.notes li > * { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 16px; text-decoration: none; }
.notes .age { font: 400 10px/12px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--done); }
.note-text { font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.note-raw { font: 400 11.5px/1.5 var(--font-mono); color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.tag { font: 400 10px/14px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; font-style: normal; color: var(--muted); margin-left: 8px; }

/* ---- toasts ---- */
#toasts { position: fixed; left: 12px; right: 12px; bottom: calc(132px + env(safe-area-inset-bottom)); z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  max-width: 520px; padding: 12px 16px; border-radius: var(--radius-card); font-size: 14px; line-height: 1.35;
  background: linear-gradient(180deg, var(--card2-top), var(--card2-bottom)); box-shadow: var(--shadow-card2), 0 8px 30px rgba(0, 0, 0, .5);
  animation: rise .25s ease both;
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- a phone: the bar spans the screen, and on Talk the glyphs sit under the input ---- */
@media (max-width: 699px) {
  .nav { width: calc(100vw - 16px); }
  .nav-glyphs { flex: 1 1 0; gap: 0; }
  .nav-glyphs .cb-nav-btn { flex: 1 1 0; width: auto; min-width: 0; }
  .nav.has-input .nav-glyphs { flex: 1 0 100%; margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--edge); }
  .screen[data-screen="talk"] { padding-bottom: 108px; }
  .composer textarea { height: 56px; padding: 6px 0; }
}

/* ---- wider screens ---- */
@media (min-width: 700px) {
  :root { --page-margin: 48px; }
  .top { height: 60px; }
  :root { --top-h: 60px; }
  .modeline { inset: 0 190px auto auto; height: var(--top-h); line-height: var(--top-h); background: none; border: 0; z-index: 31; padding: 0; }
  main { padding-top: calc(var(--top-h) + 36px); }
  h1 { font-size: 44px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lessons, .runs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capital, .machine { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .capcard { min-height: 190px; padding: 44px 18px 36px !important; }
  .machine .cb-card { padding: 44px 18px 36px !important; }
  .beat { margin-top: 112px; }
  .decision { grid-template-columns: minmax(0, 1fr) repeat(3, 150px); }
  .decision > .brief-mini { grid-column: auto; }
  .decision .seat { height: auto; min-height: 200px; }
  .door { flex-direction: row; justify-content: space-between; align-items: flex-end; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kv { grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; align-items: baseline; }
  .kv dt { margin-top: 0; }
  .sheet-wrap { align-items: center; padding: 24px; }
  .sheet { width: min(560px, 100%); max-height: calc(100dvh - 48px); border-radius: var(--radius-nav); }
  .sheet-body { padding: 24px 28px 28px; }
  td.model { max-width: none; }
  .send { width: auto; padding: 0 20px; }
  .send span { display: inline; }
  .send svg { display: none; }
  #toasts { bottom: 96px; }
}
@media (min-width: 1105px) {
  .lessons, .runs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .queue.has-todo { grid-template-columns: minmax(0, 1fr) 336px; }
  .proof { grid-template-columns: minmax(0, 1fr) 380px 380px; }
  .decision { grid-template-columns: minmax(0, 1fr) repeat(3, 180px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---- details that open ---- */
details { min-width: 0; }
summary { cursor: pointer; font: 400 11.5px/1.5 var(--font-mono); color: var(--caption); padding: 6px 0; }
details[open] > summary { margin-bottom: 6px; }

/* ---- Cambrian Mini: four-item nav, the member's menu, and the home sections ---- */
.nav .nav-link { width: auto; padding: 0 14px; font-size: 13.5px; white-space: nowrap; }
.top .access { min-height: 36px; white-space: nowrap; text-decoration: none; }
.member-menu { display: inline-flex; align-items: center; gap: 4px; }
.textlink { font-size: 13.5px; color: var(--caption); text-decoration: none; padding: 0 8px; min-height: 44px; display: inline-flex; align-items: center; }
.textlink:hover { color: var(--ink); }
.fine { margin-top: 20px; max-width: 620px; }
.beat > .steps, .beat > .trio, .beat > .panel, .beat > .actions { margin-top: 28px; }
.beat > .panel { margin-top: var(--gutter); }

.steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; list-style: none; padding: 0; counter-reset: none; }
.steps li { min-width: 0; }
.steps a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 0; border-top: 1px solid var(--edge); text-decoration: none; font-size: 14px; line-height: 1.4; color: var(--caption); }
.steps a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.steps .num { font: 400 10px/12px var(--font-mono); letter-spacing: .2em; color: var(--muted); }
.steps b { font-weight: 500; font-size: 16px; color: var(--ink); }
.steps .cap { margin-top: 4px; white-space: normal; line-height: 15px; color: var(--muted); }

.trio { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gutter); }
.say { min-height: 150px; gap: 8px; font-size: 15px; line-height: 1.4; color: var(--caption); }
.say b { font-weight: 500; font-size: 18px; color: var(--ink); }
.cb-card.panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
.stat { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stat .cap { white-space: normal; line-height: 14px; }
.stat .big { font-size: clamp(24px, 3vw, 36px); line-height: 1.05; }
.stat .big.is-none { font-size: 16px; color: var(--muted); }

.capital { grid-template-columns: minmax(0, 1fr); }
.capital:empty { display: none; }
a.capcard { text-decoration: none; }
.cb-members.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.invite { display: block; background: none; box-shadow: none; border: 1px dashed var(--selected-outline); text-decoration: none; }
.invite::before { display: none; }
.invite:hover { border-color: var(--selected-ring); }

.story { max-width: 760px; margin: 28px 0 0; }
.story .said { font-size: 16px; line-height: 1.45; }
.story li { padding-bottom: 22px; scroll-margin-top: 120px; }
.story .link { font-size: 13.5px; align-self: flex-start; }
.head.second { margin-top: 72px; }

@media (max-width: 699px) {
  .nav .nav-link { padding: 0 6px; font-size: 12.5px; }
  .top { gap: 8px; }
  .top .access { padding: 0 12px; font-size: 12.5px; }
  .top .brand { font-size: 15px; gap: 8px; }
}
@media (min-width: 700px) {
  .modeline { inset: 0 260px auto auto; }
  :root.is-member .modeline { display: none; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--gutter); }
  .trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .say { min-height: 200px; padding: 28px 22px 36px !important; }
  .cb-card.panel { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 28px 22px !important; }
  .capital { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .head.second { margin-top: 112px; }
}
@media (min-width: 1105px) {
  .steps { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0 16px; }
  .steps a { font-size: 13px; }
  .cb-members.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* a taste note with a signature, and what a revision build says about itself */
.taste { width: 100%; max-width: 520px; font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--edge);
  border-radius: 10px; padding: 10px 12px; resize: vertical; }
.taste-note { display: block; color: var(--caption); font-size: 13px; }
.revision { display: block; color: var(--caption); }

/* Watch a build: the player above the seven steps */
.player { max-width: 760px; margin: 22px 0 0; display: flex; flex-direction: column; gap: 10px; }
.playlabel { color: var(--caption); }
.playbar { height: 2px; background: rgba(255, 255, 255, .14); border-radius: 2px; overflow: hidden; }
.playbar > i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .4s ease; }
.player .row { gap: 10px; flex-wrap: wrap; align-items: center; }
.story [data-state="off"] .said, .story [data-state="off"] .link { visibility: hidden; }
.story [data-state="off"] .step { color: var(--done); opacity: .6; }
@media (prefers-reduced-motion: reduce) { .playbar > i { transition: none; } }
