/* Handled · the shared components (assets/components.js, assets/flows.js): headings, sections, chips, toggles, the
   fixed card, receipts, rows, states, controls, sheets and menus, in the Story Becomes grammar: lowercase headings
   with negative tracking, folder tabs (square left corners, rounded right), hard down-left extrusions, one red accent.
   Tokens only (light and dark both come from brand.css). Owner: ui-core. */

/* ---- type helpers */
.muted { color: var(--sb-ink-2); }
.small { font-size: 13.5px; color: var(--sb-ink-2); }
.pad { padding: 14px 4px; }
.mono { font-family: var(--sb-mono); font-size: 14px; letter-spacing: 0; }

/* ---- headings (Story Becomes' ac-pagehead, ac-h1, ac-h2) */
.page-head { display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; gap: 16px 24px; margin: 4px 0 26px; }
@media (min-width: 640px) { .page-head { grid-template-columns: minmax(0, 1fr) auto; } }
.page-head-text { display: grid; gap: 0; justify-items: start; }
.page-head-text .kicker { margin-bottom: 14px; }
.h1 { margin: 0; font-size: clamp(2.3rem, 8.4vw, 4.2rem); font-weight: 600; letter-spacing: -0.055em; line-height: 0.95; text-transform: lowercase; text-wrap: balance; overflow-wrap: anywhere; }
.page-sub { margin: 12px 0 0; color: var(--sb-ink-2); font-size: 17px; line-height: 1.4; letter-spacing: -0.01em; max-width: 36rem; }
.page-head-actions { display: flex; gap: 8px; align-self: end; justify-self: start; }
@media (min-width: 640px) { .page-head-actions { justify-self: end; } }
.sect { margin: 40px 0 0; }
.sect-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.h2 { margin: 0; font-size: 1.55rem; font-weight: 650; letter-spacing: -0.05em; line-height: 1.05; text-transform: lowercase; }
.h3 { margin: 0; font-size: 1.15rem; font-weight: 750; letter-spacing: -0.04em; text-transform: lowercase; }
.sect-count { color: var(--sb-ink-2); font-weight: 600; font-size: 0.75em; letter-spacing: -0.02em; vertical-align: 0.25em; margin-left: 2px; }
.sect-head .link-btn, .sect-head a { font-size: 15px; }

/* ---- the kicker: Story Becomes' small outlined tag, a red dot for "now" */
.kicker { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border: var(--sb-bw) solid currentColor; border-radius: 0 6px 6px 0;
  font-size: 13px; font-weight: 700; letter-spacing: -0.01em; text-transform: lowercase; white-space: nowrap; color: var(--sb-ink); }
.kicker-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sb-ribbon); }
.kicker--bad { color: var(--sb-bad); }
.kicker--ok { color: var(--sb-ok); }
.kicker--quiet { color: var(--sb-ink-2); border-color: var(--sb-line-soft); }

/* ---- stats: big numbers in a folder tab (Handled since you looked) */
.stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: var(--sb-bw) solid var(--sb-line); border-radius: var(--sb-r-lg); overflow: hidden; }
.stat { display: grid; gap: 2px; align-content: center; min-height: 72px; padding: 10px 14px; color: var(--sb-ink); text-decoration: none; border-left: 1px solid var(--sb-line-soft); }
.stat:first-child { border-left: 0; }
.stat-n { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.06em; line-height: 1; text-decoration: none; }
.stat-l { font-size: 13px; font-weight: 650; color: var(--sb-ink-2); text-transform: lowercase; letter-spacing: -0.01em; }
a.stat .stat-n { text-decoration: none; }
.stat-n { white-space: nowrap; }
.stat-n--long { font-size: 1.3rem; letter-spacing: -0.045em; }

/* ---- chips: small folder tabs */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 2px; }
/* Chips are facts, not buttons (2026-11-17 review): quiet pills, grey fill, no border, secondary ink. Only the date
   is filled: the hero ("Do by", a dark panel in dark mode, never a white slab) or red when overdue. */
.chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 0 10px; border: var(--sb-bw) solid transparent; border-radius: 999px;
  background: var(--sb-grey); color: var(--sb-ink-2); font-size: 13.5px; font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; }
.chip[data-tip] { text-decoration: none; }
.chip--safe_by { background: var(--sb-hero); color: var(--sb-on-hero); border-color: var(--sb-hero-line); font-weight: 750; }
.chip--red { background: var(--sb-ribbon); color: var(--sb-on-ribbon); border-color: var(--sb-ribbon); font-weight: 750; }
.chip--ink { background: var(--sb-hero); color: var(--sb-on-hero); border-color: var(--sb-hero-line); }
.chip--quiet, .chip--why_his, .chip--person, .chip--thing { color: var(--sb-ink-2); }
.chip--amount { color: var(--sb-ink); }
.chip--query { padding-right: 2px; background: var(--sb-grey); border-color: var(--sb-grey); color: var(--sb-ink); }
.chip--query.is-loose { border-style: dashed; border-color: var(--sb-ink-3); background: var(--sb-paper); }
.chip-x { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 28px; border: 0; background: transparent; color: var(--sb-ink-2); cursor: pointer; }
.chip-x .ic { width: 14px; height: 14px; }
.chip-alts { display: inline-flex; gap: 4px; margin: 0 4px; }
.chip-alt { border: 1px solid var(--sb-line); border-radius: var(--sb-r-xs); background: var(--sb-paper); color: var(--sb-ink); font: inherit; font-size: 12.5px; font-weight: 700; padding: 2px 7px; cursor: pointer; }

/* ---- toggles: the quick-filter row scrolls inside its own wrapper, never the page (Story Becomes' ac-chip) */
.scroller { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin: 0 calc(var(--sb-gutter) * -1); padding: 4px var(--sb-gutter) 8px; }
.scroller::-webkit-scrollbar { display: none; }
.toggles { display: flex; gap: 8px; width: max-content; }
.toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: var(--sb-bw) solid var(--sb-line); border-radius: var(--sb-r);
  background: var(--sb-paper); color: var(--sb-ink); font: inherit; font-size: 15px; font-weight: 700; letter-spacing: -0.03em; white-space: nowrap; cursor: pointer; text-transform: lowercase; }
.toggle[aria-pressed="true"] { background: var(--sb-hero); color: var(--sb-on-hero); border-color: var(--sb-ink); }
.toggle--more { border-style: dashed; }
.toggle--more .ic { width: 16px; height: 16px; }
.toggle--more[aria-pressed="true"] { border-style: solid; }
.toggle-ic { font-size: 15px; line-height: 1; }
.toggle .ic.toggle-ic { width: 17px; height: 17px; }
.toggle-grid { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- buttons that only this app needs */
.btn-quiet { --btn-h: 44px; height: auto; min-height: 44px; padding: 0 2px; border: 0; background: transparent; color: var(--sb-ink); font-size: 15.5px; font-weight: 650;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-color: var(--sb-line-soft); }
.btn-quiet:disabled { color: var(--sb-ink-3); border: 0; background: transparent; }
@media (hover: hover) { .btn-quiet:hover:not(:disabled) { text-decoration-color: currentColor; } }
.btn .ic { width: 18px; height: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-row--split > * { flex: 1 1 0; }

/* ---- the card: a folder tab with a hard extrusion (Story Becomes' ac-card--x) */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 0; }
.card .btn { height: auto; min-height: var(--btn-h); padding-block: 8px; white-space: normal; text-align: center; line-height: 1.2; max-width: 100%; }
.card { position: relative; margin: 0 0 6px 6px; padding: 14px 16px 14px 18px; border: var(--sb-bw) solid var(--sb-line); border-radius: var(--sb-r-xl); background: var(--sb-paper); box-shadow: -6px 6px 0 var(--sb-extrude);
  transition: transform 0.25s var(--sb-ease-snap), box-shadow 0.25s var(--sb-ease-snap); touch-action: pan-y; }
.card--urgent { border-color: var(--sb-ribbon); box-shadow: -6px 6px 0 var(--sb-ribbon); }
.card.is-swiping { transition: none; box-shadow: none; }
.card.is-unfolding { animation: hd-unfold 0.3s var(--sb-ease-snap) backwards; }
@keyframes hd-unfold { from { opacity: 0.4; } to { opacity: 1; } }
.card-prov { display: flex; align-items: center; gap: 6px; margin: -4px -10px 6px 0; color: var(--sb-ink-2); font-size: 13.5px; font-weight: 600; min-height: 36px; }
.card-prov-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-seen { flex: none; font-size: 12.5px; font-weight: 700; color: var(--sb-ink-2); }
.card-more { min-width: 40px; min-height: 40px; }
.card-title { overflow-wrap: anywhere; margin: 0; font-size: 1.32rem; font-weight: 750; letter-spacing: -0.04em; line-height: 1.15; }
.card-link { color: inherit; text-decoration: none; }
.card-why { margin: 6px 0 0; color: var(--sb-ink-2); font-size: 16px; line-height: 1.4; }
.card-verify { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 14.5px; font-weight: 700; color: var(--sb-warn); }
.card-verify--verified { color: var(--sb-ok); }
.card-verify--failed { color: var(--sb-bad); }
.card .btn-block { margin-top: 16px; }
.card-secs { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 2px; }
.card-default { margin: 8px 0 0; padding-top: 10px; border-top: 1px dashed var(--sb-line-soft); color: var(--sb-ink-2); font-size: 14px; }
.card-off { margin: 6px 0 0; color: var(--sb-ink-2); font-size: 13.5px; }
.card-toggle { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 6px; font-size: 14.5px; font-weight: 650; cursor: pointer; }
.card-ready { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 12px; background: var(--sb-ok-soft); color: var(--sb-ok); border-radius: var(--sb-r-sm); font-weight: 650; font-size: 14.5px; }
/* folded: the head only, tap to open (three cards fit one phone screen) */
.card--folded { cursor: pointer; padding-bottom: 12px; }
.card--folded .card-prov { margin-bottom: 2px; }
.card-fold-head { display: flex; align-items: flex-start; gap: 8px; }
.card-fold-head .card-title { flex: 1; font-size: 1.15rem; }
.card-unfold { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin: -6px -8px 0 0; border: 0; background: transparent; color: var(--sb-ink-2); cursor: pointer; }
.card--folded .chips { margin-top: 10px; }
/* the draft: exact words, with To, From and channel */
.draft { margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid var(--sb-ink); background: var(--sb-grey); border-radius: var(--sb-r-sm); }
.draft-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--sb-ink-2); font-size: 13px; font-weight: 600; }
.draft-meta b { color: var(--sb-ink); font-weight: 750; }
.draft-ch { margin-left: auto; }
.draft-text { margin: 8px 0 0; white-space: pre-wrap; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.draft-note { margin: 8px 0 0; color: var(--sb-ink-2); font-size: 13.5px; }
/* extras: compare, checklist, slots */
.compare { margin: 14px 0 0; overflow-x: auto; }
.compare table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.compare td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--sb-line-soft); vertical-align: top; }
.compare-price { font-weight: 800; font-size: 17px; letter-spacing: -0.04em; white-space: nowrap; }
.compare-terms, .compare-status { display: block; color: var(--sb-ink-2); font-size: 13.5px; }
.checklist { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.checklist .check { flex: none; width: 20px; height: 20px; border: var(--sb-bw) solid var(--sb-line); border-radius: var(--sb-r-xs); display: inline-flex; align-items: center; justify-content: center; }
.checklist .is-done .check { background: var(--sb-ink); color: var(--sb-paper); }
.checklist .is-done { color: var(--sb-ink-2); text-decoration: line-through; }
.checklist .check .ic { width: 14px; height: 14px; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.slot { min-height: 44px; padding: 0 14px; border: var(--sb-bw) solid var(--sb-line); border-radius: var(--sb-r); background: var(--sb-paper); color: var(--sb-ink); font: inherit; font-weight: 700; font-size: 15px; letter-spacing: -0.02em; cursor: pointer; }
.slot[aria-checked="true"] { background: var(--sb-ink); color: var(--sb-paper); }
/* swipe: what letting go will do */
.swipe-hint { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; padding: 6px 10px; border-radius: var(--sb-r-sm); font-size: 13px; font-weight: 800; letter-spacing: -0.02em; text-transform: lowercase; pointer-events: none; background: var(--sb-grey); color: var(--sb-ink-2); }
.swipe-hint--right { left: -4px; transform: translate(-100%, -50%); }
.swipe-hint--left { right: -4px; transform: translate(100%, -50%); }
.swipe-hint.is-armed { background: var(--sb-ink); color: var(--sb-paper); }
.is-leaving { overflow: hidden; opacity: 0; transition: height 0.3s var(--sb-ease-fill), opacity 0.2s ease, margin 0.3s var(--sb-ease-fill); margin: 0 !important; }

/* ---- the receipt a card becomes */
.receipt { display: flex; align-items: center; gap: 12px; min-height: 56px; margin: 0 0 6px 6px; padding: 10px 12px 10px 14px; border: var(--sb-bw) solid var(--sb-line-soft); border-radius: var(--sb-r-xl); background: var(--sb-paper); font-size: 15px; transition: padding 0.3s var(--sb-ease-snap); }
.receipt-mark { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--sb-ok); color: var(--sb-paper); }
.receipt-mark .ic { width: 16px; height: 16px; }
.receipt.is-pending .receipt-mark { background: var(--sb-grey); color: var(--sb-ink-2); }
.receipt.tone-bad .receipt-mark, .receipt.tone-warn .receipt-mark { background: var(--sb-ribbon); color: var(--sb-on-ribbon); }
.receipt.tone-ink .receipt-mark, .receipt.tone-quiet .receipt-mark { background: var(--sb-ink); color: var(--sb-paper); }
.receipt-body { flex: 1; min-width: 0; line-height: 1.35; }
.receipt-verb { font-weight: 800; letter-spacing: -0.03em; }
.receipt-text { color: var(--sb-ink-2); }
.receipt-quote { display: none; margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--sb-ink); background: var(--sb-grey); border-radius: var(--sb-r-xs); white-space: pre-wrap; font-size: 14.5px; }
.receipt-quote-meta { display: block; color: var(--sb-ink-2); font-size: 12.5px; font-weight: 650; margin-bottom: 2px; }
.receipt--open { padding-block: 16px; border-color: var(--sb-line); }
.receipt--open .receipt-quote { display: block; }
.receipt-verified { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: var(--sb-r-xs); font-size: 12px; font-weight: 800; text-transform: lowercase; background: var(--sb-grey); color: var(--sb-ink-2); }
.receipt-verified--verified { background: var(--sb-ok-soft); color: var(--sb-ok); }
.receipt-verified--failed { background: var(--sb-bad-soft); color: var(--sb-bad); }
.receipt-undo { flex: none; }

/* ---- rows and lists */
.list { display: grid; border-top: 1px solid var(--sb-line); }
.row { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 12px 2px; border: 0; border-bottom: 1px solid var(--sb-line-soft);
  background: transparent; color: var(--sb-ink); text-decoration: none; text-align: left; font: inherit; width: 100%; cursor: pointer; }
div.row { cursor: default; }
.row--needs .row-title::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 8px 2px 0; border-radius: 50%; background: var(--sb-ink); vertical-align: middle; }
.row-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.row-title { font-weight: 700; font-size: 16.5px; letter-spacing: -0.03em; overflow-wrap: anywhere; line-height: 1.25; }
.row-sub { color: var(--sb-ink-2); font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.row-ic, .row-emoji { flex: none; width: 26px; text-align: center; color: var(--sb-ink-2); font-size: 20px; }
.row-go { flex: none; color: var(--sb-ink-3); display: inline-flex; }
.row-go .ic { width: 18px; height: 18px; }
.row-acts { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.row .chip { flex: none; }
.badge { flex: none; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--sb-ink); color: var(--sb-paper); font-size: 12.5px; font-weight: 800; line-height: 24px; text-align: center; }
.badge--red { background: var(--sb-ribbon); color: var(--sb-on-ribbon); }
.badge--quiet { background: var(--sb-grey); color: var(--sb-ink-2); }

/* ---- faces, stream marks, bells */
.face { flex: none; display: inline-grid; place-items: center; border-radius: 50%; border: var(--sb-bw) solid var(--sb-line); background: var(--sb-grey); color: var(--sb-ink); font-weight: 800; letter-spacing: -0.04em; overflow: hidden; }
.face--sm { width: 34px; height: 34px; font-size: 13px; }
.face--md { width: 44px; height: 44px; font-size: 15px; }
.face--lg { width: 88px; height: 88px; font-size: 30px; border-width: 2px; }
.face--family { box-shadow: 0 0 0 2px var(--sb-paper), 0 0 0 4px var(--sb-ribbon); }
.smark { flex: none; display: inline-grid; place-items: center; border: var(--sb-bw) solid var(--sb-line); border-left-width: 4px; border-radius: var(--sb-r-sm); background: var(--sb-paper); line-height: 1; }
.smark--sm { width: 32px; height: 32px; font-size: 16px; }
.smark--md { width: 42px; height: 42px; font-size: 20px; }
.smark--lg { width: 64px; height: 64px; font-size: 32px; border-left-width: 6px; }
.tone-ink { border-left-color: var(--sb-ink); }
.tone-ribbon { border-left-color: var(--sb-ribbon); }
.tone-ok { border-left-color: var(--sb-ok); }
.tone-warn { border-left-color: var(--sb-warn); }
.tone-bad { border-left-color: var(--sb-bad); }
.tone-grey { border-left-color: var(--sb-ink-3); }
.bell { display: inline-flex; color: var(--sb-ink); }
.bell .ic { width: 18px; height: 18px; }
.bell--off, .bell--cancelled { color: var(--sb-ink-3); }
.info-tip { min-width: 36px; min-height: 36px; color: var(--sb-ink-2); }
.info-tip .ic { width: 18px; height: 18px; }

/* ---- states */
.empty { margin: 12px 0; padding: 24px 20px; border: var(--sb-bw) dashed var(--sb-line-soft); border-radius: var(--sb-r-lg); }
.empty-title { margin: 0; font-weight: 700; font-size: 1.35rem; letter-spacing: -0.045em; text-transform: lowercase; }
.empty-why { margin: 6px 0 16px; color: var(--sb-ink-2); }
.empty-why:last-child { margin-bottom: 0; }
.empty--error { border-style: solid; border-color: var(--sb-ribbon); }
.skel-list { display: grid; gap: 14px; }
.skel-row { height: 60px; }
.skel-card { height: 120px; }
.skel-text { height: 16px; width: 70%; }

/* ---- controls */
.ctl { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--sb-line-soft); cursor: pointer; }
.ctl--stack { flex-wrap: wrap; cursor: default; }
.ctl--off { color: var(--sb-ink-3); }
.ctl--off .ctl-help { color: var(--sb-ink-3); }
.ctl-text { display: grid; gap: 3px; flex: 1 1 220px; min-width: 0; }
.ctl-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; letter-spacing: -0.025em; }
.ctl-label .ic { width: 15px; height: 15px; }
.ctl-help { color: var(--sb-ink-2); font-size: 14px; line-height: 1.4; }
.ctl-key { color: var(--sb-ink-3); font: 500 12px var(--sb-mono); }
.ctl--off .ctl-key { color: var(--sb-ink-3); }
/* A control never runs off a phone: a select is as wide as its longest option, so it may shrink (with an ellipsis)
   inside its row, and the row wraps it under the label when it must (2026-11-17 review). */
.ctl-input { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; }
.ctl-input > .select, .ctl-input > .input { min-width: 0; max-width: 100%; flex: 1 1 auto; text-overflow: ellipsis; box-sizing: border-box; }
.ctl-unit { color: var(--sb-ink-2); font-size: 14px; }
.ctl .input { width: 160px; max-width: 100%; }
.ctl .input[type="number"] { width: 120px; }
.ctl .select { max-width: 100%; min-width: 0; }
.pick-btn { max-width: 100%; min-width: 0; }
.pick-btn .pick-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 32px; margin: 0; border: var(--sb-bw) solid var(--sb-line); border-radius: 16px; background: var(--sb-paper); position: relative; cursor: pointer; transition: background 0.2s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: var(--sb-ink); transition: transform 0.25s var(--sb-ease-snap), background 0.2s; }
.switch:checked { background: var(--sb-ink); }
.switch:checked::after { transform: translateX(20px); background: var(--sb-paper); }
.switch:disabled { opacity: 0.45; cursor: not-allowed; }
.switch:focus-visible { outline: 2px solid var(--sb-ink); outline-offset: 3px; }
.switch--sm { width: 44px; height: 26px; }
.switch--sm::after { width: 17px; height: 17px; }
.switch--sm:checked::after { transform: translateX(18px); }
.seg { display: inline-flex; max-width: 100%; border: var(--sb-bw) solid var(--sb-line); border-radius: var(--sb-r); overflow: hidden; }
.seg-opt { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1 1 auto; min-height: 42px; padding: 0 14px; border: 0; border-left: 1px solid var(--sb-line); background: var(--sb-paper); color: var(--sb-ink); font: inherit; font-weight: 700; font-size: 15px; letter-spacing: -0.02em; cursor: pointer; text-transform: lowercase; white-space: nowrap; }
.seg-opt:first-child { border-left: 0; }
.seg-opt .ic { width: 17px; height: 17px; }
.seg-opt[aria-checked="true"] { background: var(--sb-ink); color: var(--sb-paper); }
.seg--block { display: flex; width: 100%; }
.seg--sm .seg-opt { min-height: 36px; padding: 0 10px; font-size: 14px; }
.field { display: grid; gap: 6px; }
.field-label { font-weight: 700; font-size: 14px; letter-spacing: -0.02em; text-transform: lowercase; }
.field-help { margin: 0; color: var(--sb-ink-2); font-size: 13.5px; }
.field .input, .field .select, .field .textarea { width: 100%; box-sizing: border-box; }
.textarea { width: 100%; box-sizing: border-box; min-height: 110px; resize: vertical; line-height: 1.45; border-radius: var(--sb-r-lg); }
/* Story Becomes' underline input (the funnel's ac-input): one big line */
.input--big { width: 100%; box-sizing: border-box; height: 56px; border: 0; border-bottom: 2px solid var(--sb-ink); border-radius: 0; padding: 0 2px; font-size: 22px; font-weight: 600; letter-spacing: -0.03em; background: transparent; }
.input--big:focus { box-shadow: 0 1px 0 var(--sb-ink); }
.input--search { width: 100%; box-sizing: border-box; }
.input.input--emoji { width: 72px; text-align: center; font-size: 22px; }
.row-fields { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: end; }

/* ---- sheets: menus, pickers, meta lists */
.menu { display: grid; }
.menu-item { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--sb-line-soft); background: transparent; color: var(--sb-ink); font: inherit; font-size: 17px; font-weight: 650; letter-spacing: -0.025em; text-align: left; cursor: pointer; width: 100%; }
.menu-item:last-child { border-bottom: 0; }
.menu-item > .ic { width: 21px; height: 21px; color: var(--sb-ink-2); flex: none; }
.menu-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.menu-sub { color: var(--sb-ink-2); font-size: 13.5px; font-weight: 500; letter-spacing: -0.01em; }
.menu-item--danger, .menu-item--danger > .ic { color: var(--sb-bad); }
.menu-item--make { color: var(--sb-ink); }
.menu-item:disabled { color: var(--sb-ink-3); cursor: not-allowed; }
.menu-warn { color: var(--sb-warn); display: inline-flex; }
.menu-warn .ic { width: 18px; height: 18px; }
.pick-list { margin-top: 6px; }
.dlg-body > .input--search { margin-bottom: 4px; }
.meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; margin: 0 0 14px; font-size: 15px; }
.meta dt { color: var(--sb-ink-2); font-weight: 600; }
.meta dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.sheet-note { margin: 12px 0 0; color: var(--sb-ink-2); font-size: 14px; line-height: 1.4; }
.sheet-lead { margin: 0 0 14px; font-weight: 700; font-size: 17px; letter-spacing: -0.03em; }
.draft-edit { font-size: 16px; }
.pay-amount { margin: 4px 0 14px; font-size: 3.2rem; font-weight: 800; letter-spacing: -0.06em; line-height: 1; }
.picks { display: grid; gap: 10px; }
.pick { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 14px; border: var(--sb-bw) solid var(--sb-line); border-radius: var(--sb-r-lg); background: var(--sb-paper); color: var(--sb-ink); font: inherit; text-align: left; cursor: pointer; }
.pick[aria-checked="true"] { box-shadow: -4px 4px 0 var(--sb-extrude); transform: translate(2px, -2px); }
.pick-dot { flex: none; width: 20px; height: 20px; margin-top: 1px; border: var(--sb-bw) solid var(--sb-line); border-radius: 50%; }
.pick[aria-checked="true"] .pick-dot { background: var(--sb-ink); box-shadow: inset 0 0 0 3px var(--sb-paper); }
.pick-body { display: grid; gap: 4px; }
.pick-body span { color: var(--sb-ink-2); font-size: 14.5px; }
.pick-quote { white-space: pre-wrap; }
.pick:disabled { color: var(--sb-ink-3); cursor: not-allowed; }
.remind-custom { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 16px; }
.rule-preview { display: flex; align-items: center; gap: 8px; }

@media (hover: hover) {
  .row:hover { background: var(--sb-grey); }
  a.stat:hover { background: var(--sb-grey); }
  .toggle:hover:not([aria-pressed="true"]) { background: var(--sb-grey); }
  .menu-item:hover:not(:disabled) { background: var(--sb-grey); }
  .slot:hover:not([aria-checked="true"]), .seg-opt:hover:not([aria-checked="true"]) { background: var(--sb-grey); }
  .card--folded:hover { transform: translate(2px, -2px); box-shadow: -8px 8px 0 var(--sb-extrude); }
}
@media (prefers-reduced-motion: reduce) {
  .switch, .switch::after, .card, .receipt { transition: none; }
  .card.is-unfolding { animation: none; }
}
.copy-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; margin-left: 8px; padding: 0 8px; border: 1px solid var(--sb-line-soft); border-radius: var(--sb-r-sm); background: var(--sb-paper); color: var(--sb-ink-2); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; vertical-align: middle; }
.copy-btn .ic { width: 14px; height: 14px; }
.draft-meta .copy-btn { margin-left: 0; }
@media (hover: hover) { .copy-btn:hover { color: var(--sb-ink); border-color: var(--sb-line); } }

/* Touch targets on a phone (2026-11-17 review; CLAUDE.md: 44 px, 48 for a primary). The small sizes stay for dense
   desktop rows only; where the drawing must stay small (a chip's x, a chevron) an invisible ring makes the target. */
@media (max-width: 899px) {
  .btn-sm, .btn-xs { --btn-h: 44px; }
  .toggle, .seg-opt, .seg--sm .seg-opt { min-height: 44px; min-width: 44px; }
  .link-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
  .icon-btn, .card-more, .card-unfold { min-width: 44px; min-height: 44px; }
  .card-unfold { width: 44px; height: 44px; }
  .copy-btn { min-height: 44px; }
  .chip-x, .chip-alt { position: relative; }
  .chip-x::after, .chip-alt::after { content: ""; position: absolute; inset: -8px; }
}
/* Story Becomes lowercases every button, primary or quiet (2026-11-17 review: one casing per card). */
.btn, .link-btn { text-transform: lowercase; }
