/* SEE — Stage 2 (app core) components: the unified-UX pieces the base
   stylesheet doesn't carry yet (ask action bar, decision card amounts,
   digest rows, account hub rows, the receipt paper face, drawers,
   checklist steps, storm rows). Tokens are the base system's — this
   file adds components only, in the same hand. Foundation's base
   stylesheet keeps ownership of tokens/chrome; when the shell is
   rebuilt these components fold into it. */

/* The tab bar's measured height (UX-match shell train,
   2026-11-03: 67.8px incl. its border at phone widths) — the
   action bar rests exactly on top of it, no overlap, no gap. */
/* Slice 0: the tab bar's height is the shell's one token
   (styles.css :root --tabbar-h, the prototype's own token). */
:root{ --ux-tabbar-h: var(--tabbar-h); }

/* ---------- ask (decision) screen ---------- */
.askamt{font-family:var(--serif);font-weight:500;font-size:32px;line-height:40px;font-variant-numeric:tabular-nums}
.card.strong{border:1.5px solid var(--ink)}
body.has-actionbar #view{padding-bottom:calc(150px + env(safe-area-inset-bottom))}
.ux-actionbar{
  position:fixed;left:0;right:0;bottom:var(--ux-tabbar-h);z-index:40;
  background:var(--bg);border-top:1px solid var(--line);padding:12px 16px;
}
.ux-actionbar .inner{max-width:560px;margin:0 auto;display:flex;gap:12px;align-items:center}
.ux-actionbar .btn{flex:1}
.ux-actionbar .quietbtn{
  flex:none;padding:12px 16px;font-weight:600;color:var(--ink);background:none;
  border:1px solid var(--line-strong);border-radius:999px;font-size:16px;cursor:pointer;
}
@media (min-width:900px){ .ux-actionbar{bottom:0} }
/* Slip detail (founder, 2026-11-04): Change the limits + Pause
   sit in the flow directly under the limits card they change —
   this face has no fixed action bar (the bar's Pause was
   clipped at the right edge on the founder's wide screen) —
   and End lives in a quiet zone at the very bottom of the
   page, spanning the content width. */
.slip-actions{display:flex;gap:12px;align-items:center;margin-top:16px}
.slip-actions .btn{flex:1}
.slip-actions .quietbtn{
  flex:none;padding:12px 16px;font-weight:600;color:var(--ink);background:none;
  border:1px solid var(--line-strong);border-radius:999px;font-size:16px;cursor:pointer;
}
.endzone{grid-column:1/-1;margin-top:32px;border-top:1px solid var(--line);padding-top:16px}
.digestrow{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line-2);font-size:14px;line-height:20px}
.digestrow:last-child{border-bottom:0}
.stepup-ic{
  width:52px;height:52px;border-radius:50%;border:1.5px solid var(--ink);
  display:flex;align-items:center;justify-content:center;margin:16px auto 0;
  font-size:22px;color:var(--ink);
}

/* ---------- storm (held asks) ---------- */
.held{padding:12px 0;border-bottom:1px solid var(--line)}
.held:last-child{border-bottom:0}
.held .top{display:flex;align-items:flex-start;gap:12px}
.held .amt{font-family:var(--sans);font-weight:600;font-size:17px;flex:none;font-variant-numeric:tabular-nums}
.held .grow{flex:1;min-width:0}
.held .acts{display:flex;gap:12px;margin-top:8px}
.held .acts .btn{flex:1;padding:12px 16px}

/* ---------- hub / settings rows ---------- */
.sumrow{display:flex;align-items:center;gap:12px;padding:16px 0;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink);cursor:pointer}
.sumrow:last-child{border-bottom:0}
.sumrow .grow{flex:1;min-width:0}
.sumrow .chev{color:var(--ink-3);font-size:20px;flex:none}
/* Receipt rows align on the BASELINE (spacing pass,
   2026-11-04): the amount shares the first text line's
   baseline instead of floating at the two-line block's centre
   (measured 12px low on the base tree). */
.minirow{display:flex;align-items:baseline;gap:12px;padding:12px 0;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink);cursor:pointer}
.minirow:last-child{border-bottom:0}
.minirow .amt{font-family:var(--sans);font-weight:600;font-size:17px;flex:none;font-variant-numeric:tabular-nums;width:80px}
/* The Home limits card (spacing pass, 2026-11-04): the title
   takes the card's full width on its own line — as a .sumrow
   flex child it shared the row with the status pill and the
   chevron, and the column left over wrapped the title
   mid-phrase and squeezed the facts around the centred pill.
   The facts sit below in their own row, with the pill and
   chevron beside the facts they describe. */
.limitrow{display:block;text-decoration:none;color:var(--ink)}
.limitrow .lr-title{display:block}
.limitrow .lr-meta{display:flex;align-items:flex-start;gap:12px;margin-top:8px}
.limitrow .lr-meta .grow{flex:1;min-width:0}
.minirow .grow{flex:1;min-width:0}
.minirow .chev{color:var(--ink-3);font-size:18px;flex:none}
/* Receipt-row text block (row-alignment fix, 2026-11-04): the
   amount's seat is FIXED at 80px — measured against the shipped
   Plex Sans tabular figures, where every glyph of a money string
   advances 8.5px at 17px/600, so the format tops out at
   "$1,234.56" = 68px and "$12,345.67" = 76.5px — so the text
   column starts at one x on every row whatever the amount. The
   block is two lines by construction: line 1 never wraps (the
   merchant truncates with an ellipsis; the status word, a closed
   list, sits in its own non-shrinking seat and always fits
   whole), line 2 is the date · Receipt № fact line whose .fnw
   facts never split. .rstat mirrors .small's values (14/20,
   --ink-2) — it is a separate class so the line-1 status is
   never mistaken for the row's meta line. */
.minirow .rline1{display:flex;align-items:baseline;min-width:0}
.minirow .rmerch{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.minirow .rstat{flex:none;margin-left:4px;font-size:14px;line-height:20px;color:var(--ink-2)}
.minirow .rline2{margin-top:2px}
/* Receipt book list card — the approved design's .card chrome
   (unified.css .card: card surface, line-card edge, 16px radius,
   24px padding (spacing system s6); the receipts screen
   overrides vertical padding to 8px (s2). Scoped to the book:
   the live base .card is the
   shell's hairline section style, shared by every face, and
   this train does not restyle shared classes. */
.booklist{background:var(--card);border:1px solid var(--line-card);border-radius:var(--radius);padding:8px 24px;margin-top:16px}
/* The same unified .card chrome at full padding — the proof
   face's bundle card (receipt-proof.html). */
.ucard{background:var(--card);border:1px solid var(--line-card);border-radius:var(--radius);padding:24px}

/* ---------- first-run checklist ---------- */
.steprow{display:flex;gap:12px;padding:13px 0;border-bottom:1px solid var(--line-2);align-items:flex-start}
.steprow:last-child{border-bottom:0}
.steprow .n{
  flex:none;width:26px;height:26px;border-radius:50%;border:1.5px solid var(--line-strong);
  display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:600;color:var(--ink-2);
}
.steprow.done .n{border-color:var(--ink);background:var(--ink);color:#fff}
.steprow .grow{flex:1;min-width:0}

/* ---------- receipt paper face ---------- */
.rpaper{
  position:relative;background:#fff;border:1px solid var(--line);border-bottom:0;
  border-radius:16px 16px 0 0;max-width:408px;margin:16px auto 24px;
  padding:24px 24px 8px;box-shadow:0 1px 2px rgba(11,11,12,.05),0 12px 32px rgba(11,11,12,.06);
}
.rpaper::after{
  content:"";position:absolute;left:0;right:0;bottom:-10px;height:10px;
  background-image:radial-gradient(circle at 50% 0,#fff 5.5px,transparent 6.5px);
  background-size:14px 10px;background-repeat:repeat-x;
}
.rhead{text-align:center}
.rhead .lockup{height:30px;width:auto;display:inline-block}
.rrow{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line-2);font-size:14px;line-height:20px}
.rrow:last-child{border-bottom:0}
/* Value-seat containment (receipt-paper fix, 2026-11-04): a long
   unbroken value — a seller's reference, a code, a hash — wraps
   ANYWHERE inside its own seat and can never widen the paper or
   push the page sideways; the label keeps its seat (flex:none)
   and the amount seats (.ritem .a) never shrink. The same rule
   is declared in ux1.css (.ux1 .rrow/.ritem) and in the
   standalone check page's CSS (see/docpages.py) — the paper has
   three stylesheets and the rule lives in each. */
.rrow .k{color:var(--ink-2);flex:none}
.rrow .v{min-width:0;overflow-wrap:anywhere}
.checkrow{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid var(--line-2);align-items:flex-start}
.checkrow:last-child{border-bottom:0}
.checkrow .mark{flex:none;width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;border:1.5px solid var(--line-strong);color:var(--ink-2)}
.checkrow .mark.ok{border-color:var(--seal);color:var(--seal)}
.checkrow .mark.mid{border-color:var(--ink);color:var(--ink)}
.checkrow .grow{flex:1;min-width:0}

/* ---------- drawer (approved unified.css .drawer anatomy) ---- */
.ux-drawer-scrim{
  position:fixed;inset:0;background:rgba(20,20,30,.42);z-index:60;
  display:flex;align-items:flex-end;justify-content:center;
}
.ux-drawer{
  background:var(--card);border-radius:22px 22px 0 0;width:100%;max-width:560px;
  max-height:86vh;overflow:auto;padding:20px 20px 24px;
  box-shadow:0 -12px 44px rgba(20,20,30,.18);
}
.ux-drawer .grab{width:44px;height:5px;border-radius:99px;background:#CFC9BA;margin:4px auto 16px}
@media (min-width:900px){
  .ux-drawer-scrim{align-items:stretch;justify-content:flex-end}
  .ux-drawer{width:420px;max-width:420px;height:100%;max-height:none;border-radius:0}
}
.ux-drawer .dhead{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.ux-drawer .dtitle{font-family:var(--serif);font-size:22px;font-weight:500;line-height:28px}
.ux-drawer .dclose{flex:none;background:none;border:none;font:inherit;font-size:14px;font-weight:600;color:var(--ink);text-decoration:underline;text-underline-offset:3px;cursor:pointer;padding:2px 0}
.ux-drawer .dbody p{margin-top:12px}
.ux-drawer .btn{width:100%}

/* ---------- pairing code ---------- */
.paircode{font-family:var(--mono);font-size:32px;line-height:40px;font-weight:400;letter-spacing:.32em;text-align:center;padding:8px 0 4px}

/* kind chips in two groups (limits editor) */
.chipgroup-label{margin:20px 0 4px}

/* read-only kind chips on the slip face (the editor's toggle chips
   keep the base [aria-pressed] styling) */
.chip.on{background:var(--ink);color:var(--bg);border-color:var(--ink)}

/* ---------- UX-match alignment (founder directive, Nov 3) ----------
   The approved unified system (ux-unified-20261102/unified.css) is the
   spec; the base sheet restyled several components away from it
   (section-style cards with no box, letterspaced all-caps primary
   buttons, 500-weight 30px h2s). The rules below restore the approved
   component values verbatim. SHARED-SHELL EFFECT (named for the merge
   captain): .card/.btn/h1/h2/.small are global selectors, so every
   face — not only Stage 2's — moves toward its own approved screen,
   whose design system is this same unified.css.
   DEDUPE (app-core merge, DECISIONS #76): the shell train's dialect
   layer in styles.css states the same dialect; every declaration
   here that duplicated the shell's computed value was removed, so
   each duplicated rule lives in exactly one layer — the shell's.
   What remains below is only what the shell states differently or
   not at all: this app's own component values, each at its single
   home here. Verified by render-compare (390/440, zero diff). */
.card + .card{margin-top:16px}
.btn{font-size:16px;font-weight:600;letter-spacing:.02em;padding-left:26px;padding-right:26px;text-decoration:none}
.btn.primary{text-transform:none}
.btn.primary.sm{font-size:14px}
.btn.ghosty{background:none;color:var(--ink);border:1px solid var(--line-strong)}
.btn.textbtn{background:none;color:var(--ink);text-decoration:underline;text-underline-offset:3px;font-weight:500;padding:10px;width:auto;min-height:0}
.btn.danger{background:none;color:#8A2A1E;border:1px solid #D8B4AC}
.small{font-size:14px}
.secttl{font-family:var(--serif);font-weight:500;font-size:22px;line-height:28px;margin:32px 0 12px}
.secttl:first-child{margin-top:0}
.statusline{display:flex;align-items:center;gap:8px;font-size:14px;line-height:20px;color:var(--ink-2)}
.step{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid var(--line-2)}
.step:last-child{border-bottom:0}
.step .n{flex:none;width:27px;height:27px;border-radius:50%;border:1.5px solid var(--ink);display:flex;align-items:center;justify-content:center;font-weight:600;font-size:14px;margin-top:1px}
.step.done .n{background:var(--ink);color:var(--bg)}
.step .grow{flex:1;min-width:0}
.hairline{border:0;border-top:1px solid var(--line-2);margin:16px 0}
/* In-card section breaks (spacing pass, 2026-11-04): inside a
   card the hairline's margins are s3 (12px), and a .kv row
   directly above one drops its own border — ONE divider line
   between groups, never two lines with a void between them
   (the slip detail's empty band: the row's border-bottom,
   16px of margin, the hairline, 16px again, the next row). */
.card .hairline{margin:12px 0}
.kv:has(+ .hairline){border-bottom:0}
.pill.on{border-color:var(--ink)}
.bar>i{display:block;height:100%;background:var(--ink);border-radius:99px}
.kv{display:flex;justify-content:space-between;gap:16px;padding:8px 0;border-bottom:1px solid var(--line-2);font-size:16px}
.kv:last-child{border-bottom:0}
.kv .k{color:var(--ink-2)}
.kv .v{font-weight:600;text-align:right}
.waitstrip{display:flex;align-items:center;gap:12px;background:var(--card);border:1.5px solid var(--ink);border-radius:14px;padding:12px 16px;margin-top:16px;text-decoration:none;color:var(--ink)}
.waitstrip .grow{flex:1;min-width:0}
.waitstrip .chev{color:var(--ink-3);font-size:20px;flex:none}
.stormcard{border:1.5px solid var(--ink);border-radius:var(--radius);padding:20px;background:var(--card)}

/* The approved wrap: unified.css .wrap is 20px sides / 560px measure /
   22px top; the base shell's #view used 32px sides / 660px, narrowing
   every app face by 24px. SHARED-SHELL EFFECT (named): every face in
   #view takes the approved wrap; the wide rail keeps its 880px. */
/* Slice 0: #view is the plain region inside the workspace
   frame (#viewwrap carries the measures now); the old 560/880
   caps retire with the #48 ladder. Face measures belong to the
   face slices. */
#view{max-width:none}
#view.w-wide{max-width:none}
.chips{margin-top:8px}
.chip{border-radius:999px;padding:8px 12px;font-size:14px;font-weight:500;background:var(--card);min-height:0}
/* Approved .pill (unified.css): a bordered sentence-case chip. The base
   sheet's pill is an uppercase micro-label with a status dot — the dot
   survives in DECISIONS #42's contrast note, but the approved screens
   govern: no dot, no caps. (Layout declarations — display, alignment,
   gap, weight — are the shell layer's, stated once there.) */
.pill{border:1px solid var(--line-strong);border-radius:999px;padding:3px 11px;font-size:12px;letter-spacing:0;text-transform:none}
.pill::before{content:none}
/* Approved inputs sit on the white card surface (unified.css input
   rule), not the paper ground. */
.input{background:var(--card)}
.chip[aria-pressed="true"]{background:var(--card);color:var(--ink);border:1.5px solid var(--ink);font-weight:600}
/* Approved field labels (unified.css .flabel): sentence case, 13px —
   the base sheet's are letterspaced uppercase micro-labels. */
.flabel, label.flabel{font-size:var(--type-label);font-weight:500;color:var(--ink-2);margin:16px 0 8px;letter-spacing:0;text-transform:none}
.authcue{text-align:center;padding:12px 0 4px}
.authring{width:74px;height:74px;border-radius:50%;border:1.5px solid var(--ink);display:inline-flex;align-items:center;justify-content:center;font-size:30px}
body.flushbar .ux-actionbar{bottom:0}
details.acc{border-top:1px solid var(--line)}
details.acc>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;padding:16px 0}
details.acc>summary::-webkit-details-marker{display:none}
details.acc>summary .chev{transition:transform .15s}
details.acc[open ]>summary .chev{transform:rotate(90deg)}
details.acc .accbody{padding:0 0 16px}
.idxrow{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink)}
.idxrow:last-child{border-bottom:0}
.idxrow .grow{flex:1;min-width:0}
.dot{width:7px;height:7px;border-radius:50%;background:var(--seal);display:inline-block;flex:none}
.swrow{display:flex;align-items:center;gap:12px;padding:16px 0;border-bottom:1px solid var(--line-2)}
.swrow:last-child{border-bottom:none}
input.switch{appearance:none;-webkit-appearance:none;width:48px;height:28px;border-radius:99px;background:var(--track);border:1px solid var(--line-strong);position:relative;cursor:pointer;flex:none;transition:background .15s;padding:0;margin:0}
input.switch::after{content:"";position:absolute;top:2px;left:2px;width:22px;height:22px;border-radius:50%;background:var(--card);border:1px solid var(--line-strong);transition:left .15s}
input.switch:checked{background:var(--ink);border-color:var(--ink)}
input.switch:checked::after{left:22px;background:var(--bg);border-color:var(--bg)}
input.switch:disabled{opacity:.45;cursor:default}
/* ================================================================
   UX-MATCH — CONNECT CLUSTER (founder directive, 2026-11-03:
   "Approved UX should be the live.") The approved gallery
   (ux-unified-20261102/unified.css) is the spec; its metrics are
   ported here, scoped to #view.cxu — the connect faces and the
   keys faces, toggled in route() — so no other cluster's render
   changes. Classes whose live values already mirror unified.css
   (.sumrow, .kitblock, .copybtn, .cxradio, .steplabel, .bar,
   .backlink) are not repeated.
   ================================================================ */
#view.cxu{max-width:560px;padding:32px 20px 110px}
/* Merge adjudication (DECISIONS #80): a cxu face that is an app data
   face (Connected/keys, pairing — the views that call wideView())
   takes the DECISIONS #48 data rail at wide widths, as every other
   data face does and as the F83 gate pins; the cxu composition
   (cards, pills, picker, metrics) is unchanged, and at phone widths
   the 560px cap never binds. The gallery drew these faces at 560;
   the shipped layout law wins over the drawing. */
#view.cxu.w-wide{max-width:880px}
#view.cxu h1,#view.cxu h2{font-weight:500}
#view.cxu h3{font-weight:600}
#view.cxu h1{line-height:1.18}
#view.cxu .small{font-size:14px;line-height:20px}
#view.cxu .micro{font-size:12px;letter-spacing:.14em;font-weight:600;color:var(--ink-2)}
#view.cxu .card{background:var(--card);border:1px solid var(--line-card);border-radius:var(--radius);padding:24px;margin-top:0}
#view.cxu .card + .card{margin-top:16px}
#view.cxu .card.strong{border:1.5px solid var(--ink)}
#view.cxu .btn{display:flex;width:100%;min-height:0;padding:14px 26px;border-radius:999px;font-size:16px;font-weight:600;letter-spacing:.02em;text-transform:none;text-decoration:none;background:var(--ink);color:var(--bg);border:1px solid transparent;align-items:center;justify-content:center}
#view.cxu .btn.primary{background:var(--ink);color:var(--bg)}
#view.cxu .btn.quiet{background:transparent;border:1px solid var(--line-strong);color:var(--ink)}
#view.cxu .btn.textbtn{width:auto;padding:10px;background:none;border:0;font-weight:500;text-decoration:underline;text-underline-offset:3px;color:var(--ink)}
#view.cxu .btn.copybtn{width:auto;padding:7px 14px;font-size:13px;background:var(--card);border:1px solid var(--line-strong);color:var(--ink)}
/* Founder UAT 2026-11-10 (Connected apps): the rule above made every
   button here a full-width black primary, so a connection's quiet
   "Disconnect" link read as the page's main action, and its confirm
   pair lost their outline/text look. These keep their own shapes. */
#view.cxu .btn.textsm{width:auto;min-height:40px;padding:0 4px;border-radius:0;background:none;border:0;font-size:14px;font-weight:500;color:var(--ink-2);text-decoration:underline;text-underline-offset:3px}
#view.cxu .btn.textsm:hover{color:var(--ink)}
#view.cxu .btn.danger-quiet{width:auto;padding:10px 20px;background:transparent;border:1px solid var(--line-strong);color:var(--ink)}
#view.cxu .btn.danger-quiet:hover{border-color:var(--ink)}
/* ...and a card's own spacing class wins over the face's margin reset
   (the Claude card sat glued to "Connect your agent"). */
#view.cxu .card.mt16{margin-top:16px}
#view.cxu .card.mt24{margin-top:24px}
/* A connection's name never breaks mid-word for its state pill: on a
   narrow card the pill drops under the name instead. The confirm pair
   wraps as whole buttons. */
.rowline.connhead{flex-wrap:wrap;row-gap:8px}
.rowline.connhead > h3{overflow-wrap:break-word}
.rowline.connconfirm{flex-wrap:wrap;justify-content:flex-start;gap:12px 24px}
.rowline.connconfirm .btn{white-space:nowrap}
/* Connected apps (founder UAT 2026-11-10, "design page properly"): a
   header with the one primary action, then two lists in the key
   list's anatomy — apps, and keys behind the Advanced heading. */
#view.cxu .pagehead{align-items:flex-start;flex-wrap:nowrap}
#view.cxu .pagehead-text{flex:1;min-width:0}
#view.cxu .pagehead h1,#view.cxu .pagehead .secttl{margin:0}
#view.cxu .pagehead .lede{margin-top:12px;max-width:720px}
#view.cxu .heading-action .btn{width:auto;padding:12px 22px;font-size:15px;white-space:nowrap}
#view.cxu .secthead{margin-top:44px;margin-bottom:16px}
#view.cxu .listcard{padding:4px 20px}
#view.cxu .listcard .idxrow{padding:16px 0;align-items:center}
#view.cxu .listcard .idxrow strong{font-size:16px;font-weight:600}
#view.cxu .approw-main{flex:1;min-width:0}
#view.cxu .approw .connhead{justify-content:flex-start;gap:8px 12px}
#view.cxu .approw-line{margin-top:4px;color:var(--ink-2)}
#view.cxu .keyacts{display:flex;align-items:center;gap:24px;flex:none}
#view.cxu .keyacts .btn{min-height:40px;padding:10px 0}
#view.cxu .connconfirm-box{margin-top:12px;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--bg)}
#view.cxu .connconfirm-box .connconfirm{margin-top:12px}
#view.cxu .approw-repoint{margin-top:8px}
#view.cxu .approw-repoint .flabel{margin-top:8px}
#view.cxu .approw-repoint-row{display:flex;gap:12px;align-items:center}
#view.cxu .approw-repoint-row .input{flex:1;min-width:0}
#view.cxu .approw-repoint-row .btn{width:auto}
#view.cxu .sect-intro{margin-top:8px;color:var(--ink-2)}
#view.cxu details.offkeys{margin-top:12px;border-top:0}
#view.cxu details.offkeys > summary{font-size:14px;font-weight:600;color:var(--ink-2);padding:10px 0}
#view.cxu .sect-note{margin-top:16px;color:var(--ink-2);max-width:720px}
@media(max-width:767px){
  #view.cxu .pagehead{flex-direction:column;align-items:stretch;gap:16px}
  #view.cxu .pagehead .heading-action .btn{width:100%}
  #view.cxu .listcard{padding:4px 16px}
  #view.cxu .approw .dotsep{display:none}
  #view.cxu .approw .approw-active{display:block;margin-top:2px}
}
}
#view.cxu .flabel{display:block;margin:16px 0 8px;font-size:13px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--ink-2)}
#view.cxu details.acc{border-top:1px solid var(--line)}
#view.cxu details.acc>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;padding:16px 0}
#view.cxu details.acc>summary::-webkit-details-marker{display:none}
#view.cxu details.acc>summary .chev{color:var(--ink-3);font-size:18px;flex:none;transition:transform .15s}
#view.cxu details.acc[open]>summary .chev{transform:rotate(90deg)}
#view.cxu details.acc .accbody{padding:0 0 16px}
#view.cxu .input{min-height:0;padding:12px 16px;border-radius:12px;background:var(--card)}
#view.cxu .cxcheck{padding:11px 0}
#view.cxu [hidden]{display:none !important}
#view.cxu .secttl{font-family:var(--serif);font-size:22px;font-weight:500;line-height:28px;margin:32px 0 12px;color:var(--ink)}
#view.cxu .idxrow{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:12px 2px;border-top:1px solid var(--line-soft)}
#view.cxu .idxrow:first-child{border-top:none}
#view.cxu .idxrow.off{opacity:.62}
/* UX sweep 2026-11-10: on phones a key's Rotate / Revoke column squeezed its details into a
   thin column (5-6 lines); the actions drop to their own line under the details. */
@media(max-width:767px){
  #view.cxu .idxrow:has(> .keyacts){flex-wrap:wrap}
  #view.cxu .idxrow > .keyacts{flex-basis:100%;display:flex;gap:24px}
}
#view.cxu .copyrow .mono{word-break:break-all}
#view.cxu .statusline{display:flex;align-items:flex-start;gap:8px;font-size:14px;line-height:20px;color:var(--ink-2)}
#view.cxu .statusline .dot{width:7px;height:7px;border-radius:50%;background:var(--seal);flex:none;margin-top:6px}

/* ================================================================
   WIDE APP COMPOSITIONS (wide-surfaces train,
   2026-11-04) — the signed-in faces at 768px and up, inside
   the rail shell (styles.css carries the shell + the measures).
   The elements are the phone faces' own, unchanged — same cards,
   rows, buttons, words, order. Only their composition widens:
   whole blocks take grid columns; nothing is split, moved
   between parents, duplicated, or invented. Where the wide
   design asked for a composition the live DOM cannot take
   without splitting an element (the Waiting decision panel, the
   slip card's inner columns), the recorded fallback
   is built instead: the block widens whole.
   Grid children shed their stacked-flow margins (inline ones
   included) and the grid's row gap carries the rhythm instead —
   that trade exists only inside these grids, only at wide
   widths; below 768px nothing in this section applies.
   ================================================================ */
@media(min-width:768px){
  /* The fixed action bars (Waiting's decision bar, the slip
     detail's Change/Pause bar) start at the rail's edge and
     rest on the page ground — no tab bar exists here. Their
     inner row aligns with the content column's text edge. */
  body.tabbed .ux-actionbar{left:0;bottom:0}
  body.tabbed .ux-actionbar .inner{max-width:1020px;padding:0 26px}
  #view.g-home,#view.g-wait,#view.g-book,#view.g-slip,#view.g-acct{align-items:start}
  #view.g-home > *,#view.g-book > *,#view.g-slip > *,#view.g-acct > *{margin:0 !important}

  /* Receipt book: the month sentence is the list card's own
     header strip — the first row inside the card, over the
     card's hairline — and the book is a single column at every
     wide width (founder, 2026-11-04: the sentence dressed as a
     separate summary card, exiled to a side column at desktop,
     read as orphaned from the list it summarises). The strip
     and the rows share the one card the .bookcard wrap carries
     at these widths: the wrap takes the card chrome, the
     sentence takes the strip seat (its inline margin shed, the
     rows' own hairline under it), and the list sheds its own
     chrome inside it. Without a month sentence the wrap stays
     plain and the list keeps its own card, exactly as on the
     phone; below 768px none of this applies and the phone
     seating is untouched. The retention sentence stays where
     the live face keeps it: under the card. */
  #view.g-book > .bookcard:has(> .monthline){
    background:var(--card);border:1px solid var(--line-card);
    border-radius:var(--radius);margin-top:16px !important;
  }
  #view.g-book > .bookcard > .monthline{
    margin:0 !important;padding:12px 24px;
    border-bottom:1px solid var(--line);
  }
  #view.g-book > .bookcard:has(> .monthline) > .booklist{
    background:transparent;border:0;border-radius:0;margin-top:0;
  }
  /* The closing lines moved out of the wrap with the strip
     change; as direct children their live margins would fall
     to the grid faces' margin shed above — restore the 16px
     rhythm they have always kept under the list. */
  #view.g-book > p.fine,#view.g-book > p.small.center{margin-top:16px !important}
  /* UAT 2026-11-10 spacing review: the reset above also zeroed the book's own rhythm —
     the description sat on the heading, "N entries" on the search box, and the footnotes
     on the last row's hairline and on each other. Restored on the house scale. */
  #view.g-book > .page-description{margin-top:14px !important}
  #view.g-book > p.minor{margin-top:16px !important}
  #view.g-book > :not(.ledger-note) + .ledger-note{margin-top:28px !important}
  #view.g-book > .ledger-note + .ledger-note{margin-top:8px !important}

  /* Waiting: the ask card's item list takes two columns at
     desktop (below, in the 1120 block) — the rows stay whole. */
  #view.g-wait .card.strong .digestrow{break-inside:avoid}
}
@media(min-width:768px) and (max-width:1119px){
  /* Home, tablet: the ask (or the setup card) spans; the limits
     and pause cards pair in one row when both are present;
     receipts run full width below. */
  #view.g-home{display:grid;grid-template-columns:1fr 1fr;column-gap:24px;row-gap:16px}
  #view.g-home > h1,#view.g-home > .statusline,#view.g-home > .card.strong,
  #view.g-home > h2.secttl,#view.g-home > .card:has(> .minirow){grid-column:1 / -1}
  /* UAT 2026-11-10: the three limitrow-pairing rules that stood here nested
     :has() inside :has() — invalid CSS, so browsers dropped them and the pause
     card sat half-width alone. The faces this grid still carries (the "Almost
     ready" setup faces) have no limits card, so the pause card simply spans. */
  #view.g-home > .card:has(#home-pause){grid-column:1 / -1}
  /* The remaining plain cards (the setup steps, receipts)
     always run full width at tablet. */
  #view.g-home > .card:not(.strong):not(:has(> .limitrow)):not(:has(#home-pause)){grid-column:1 / -1}
  /* UAT spacing review 2026-11-10: the limit detail took the 768 margin reset but its
     desktop grid (and that grid's 16px row gap) only from 1120 — so at tablet widths the
     back link, eyebrow, heading, panels and end zone all touched. Same grid as desktop. */
  #view.g-slip{display:grid;grid-template-columns:minmax(0,1fr);column-gap:24px;row-gap:16px}
}
@media(min-width:1120px){
  body.tabbed .ux-actionbar{left:0}
  body.tabbed .ux-actionbar .inner{padding:0 44px}

  /* Home, desktop: the main column carries the ask (or, when
     nothing waits, the limits card); the side column carries
     the limits card, the pause card and Latest receipts, in
     the live order. The setup states compose the same way:
     the Connect card is the main column, Getting set up and
     the pause card the side. */
  #view.g-home{display:grid;grid-template-columns:minmax(0,1fr) 324px;column-gap:24px;row-gap:16px}
  #view.g-home > h1,#view.g-home > .statusline{grid-column:1 / -1}
  #view.g-home > .card.strong{grid-column:1}
  #view.g-home:has(> .card.strong) > .card:has(> .limitrow){grid-column:2}
  #view.g-home:not(:has(> .card.strong)) > .card:has(> .limitrow){grid-column:1}
  #view.g-home > .card:has(#home-pause){grid-column:2}
  #view.g-home:has(> .card.strong) > h2.secttl{grid-column:2}
  #view.g-home:not(:has(> .card.strong)) > h2.secttl{grid-column:1}
  #view.g-home:has(> .card.strong) > .card:not(.strong):not(:has(> .limitrow)):not(:has(#home-pause)){grid-column:2}
  #view.g-home:not(:has(> .card.strong)) > .card:not(:has(> .limitrow)):not(:has(#home-pause)){grid-column:1}
  /* UAT 2026-11-10 (founder photo): the side column (Getting set up, its steps,
     the pause card) auto-placed into the rows BELOW the Connect card, so the
     heading sat at the top over a tall gap. The Connect card spans the side
     column's three rows, which stack directly beside it. */
  #view.g-home:has(> .card.strong):has(> h2.secttl) > .card.strong{grid-row:span 3}

  /* Receipt book, desktop: no grid — the book stays the single
     list column of the content measure, its month strip seated
     inside the list card by the 768 block above (founder,
     2026-11-04). */

  /* Slip detail, desktop: ONE column in the live order —
     limits card, the in-flow actions row directly under it,
     the Connect / Who-can-ask card, then the end zone. The
     two-column seat drawn here originally (Connect card and
     the End line in a 320px side column, the actions in the
     fixed bar) was superseded on this face by the founder's
     2026-11-04 placement order (DECISIONS #113): Change/Pause
     sit in the flow directly under the limits card and End
     in a separated zone at the very bottom — a geometry the
     side column cannot take without stranding the Connect
     card below a void. The other faces keep their grids. */
  #view.g-slip{display:grid;grid-template-columns:minmax(0,1fr);column-gap:24px;row-gap:16px}
  #view.g-slip > .backlink,#view.g-slip > h1,#view.g-slip > p:first-of-type,
  #view.g-slip > .waitstrip,#view.g-slip > #drawer-slot{grid-column:1 / -1}
  #view.g-slip > .card:has(.bar){grid-column:1}
  #view.g-slip > .slip-actions{grid-column:1}
  #view.g-slip > .card:has(> .sumrow){grid-column:1}
  #view.g-slip > .endzone{grid-column:1 / -1}

  /* Your account, desktop: the index card whole in the main
     column (its ten rows are one live card — the design's
     two-card split would cut it in half), the pause card and
     Sign out stacked beside it. */
  #view.g-acct{display:grid;grid-template-columns:1fr 1fr;column-gap:24px;row-gap:16px}
  #view.g-acct > h1{grid-column:1 / -1}
  #view.g-acct > .card.uxcard.rows{grid-column:1;grid-row:2 / span 3}
  #view.g-acct > .card.uxcard:not(.rows){grid-column:2}
  #view.g-acct > #acct-signout{grid-column:2}

  /* Waiting, desktop: the items the agent reports take two
     columns inside the ask card; the card, its facts and the
     decision bar stay exactly the live elements. */
  #view.g-wait .card.strong > div:has(> .digestrow){columns:2;column-gap:32px}
}

/* Slice 0: at desktop the fixed action bars start past the
   224px rail (the rail band starts at 1200, not 1120). */
@media(min-width:1200px){
  body.tabbed .ux-actionbar{left:224px}
}

/* ===== Slice 5: named step chrome + picker + ledger note (prototype
   metrics from ConnectPages.jsx / styles.css) ===== */
#view.cxu .setup-progress{display:flex;gap:16px;padding:0 0 24px;margin:0 0 36px;border-bottom:1px solid var(--line,#e3e0d8);list-style:none}
#view.cxu .setup-progress li{font-size:14px;color:var(--ink-3,#8a8578);flex:1;display:flex;align-items:center;gap:8px}
#view.cxu .setup-progress li>span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;border:1px solid var(--line-strong,#c9c4b4);font-size:12px;flex:none}
#view.cxu .setup-progress li.current{color:var(--ink,#1c1a16)}
#view.cxu .setup-progress li.current>span{background:var(--ink,#1c1a16);color:var(--card,#fff);border-color:var(--ink,#1c1a16)}
#view.cxu .setup-progress li.done{color:var(--ink,#1c1a16)}
#view.cxu .connect-paths{display:flex;gap:24px;margin:18px 0 24px;align-items:center;flex-wrap:wrap}
#view.cxu .picker-list{max-width:800px}
#view.cxu .ledger-note{max-width:680px;margin:30px 0 0;font-size:13px;color:var(--ink-3,#8a8578)}
@media (max-width:640px){
  #view.cxu .setup-progress{gap:9px}
  #view.cxu .setup-progress li{font-size:12px}
  #view.cxu .setup-progress li>span{width:23px;height:23px;font-size:11px}
}

/* (moved out of the 1120px block: the old reset zeroes margins from 768px) */
@media(min-width:768px){
  /* UAT 2026-11-10 (founder photo, 1512px): the rules above are the OLD index's
     (a .rows card + #acct-signout). The regrouped hub (.settings-groups, Slice 6)
     is one column with its own two-column section grid; under the old grid it was
     auto-placed into the right half and every gap was zeroed. It flows as one
     column, with its rhythm restored (heading -> lede 12, the account rhythm). */
  #view.g-acct:has(> .settings-groups){display:block}
  #view.g-acct:has(> .settings-groups) > .lede{margin-top:12px !important}
  #view.g-acct:has(> .settings-groups) > .settings-groups{margin-top:40px !important}
  #view.g-acct:has(> .settings-groups) > .card{margin-top:40px !important;max-width:1000px}
  #view.g-acct:has(> .settings-groups) > .settings-signout{margin-top:35px !important;max-width:1000px}
}

/* One connect screen for any agent (founder 2026-11-11): the limits
   card edited in place, one action, a state that reports itself. */
#view.cxu .cxl{display:flex;flex-direction:column;gap:14px}
#view.cxu .cxl-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
#view.cxu .cxl-row label{font-size:16px;font-weight:600}
#view.cxu .cxl-more .cxl-row label{font-size:15px;font-weight:500}
#view.cxu .cxl-money{display:flex;align-items:center;gap:6px;height:44px;padding:0 12px;border:1px solid var(--line-strong);border-radius:12px;background:var(--card);flex:none}
#view.cxu .cxl-money > span{color:var(--ink-2)}
#view.cxu .cxl-money input{width:64px;border:0;outline:0;background:transparent;font:inherit;font-size:16px;font-weight:600;color:var(--ink)}
#view.cxu .cxl-money:focus-within{border-color:var(--ink)}
#view.cxu .cxl-toggle{width:auto;align-self:flex-start;padding:10px 18px;font-size:14px}
#view.cxu .cxl-more{display:flex;flex-direction:column;gap:14px;padding-top:14px;border-top:1px solid var(--line)}
#view.cxu .cxl-chips{display:flex;flex-wrap:wrap;gap:8px}
#view.cxu .cxl-date{width:auto;min-height:44px;padding:8px 12px}
#view.cxu .cxl-done{display:flex;align-items:center;gap:12px;margin-top:6px}
#view.cxu .cxl-done h1{margin:0}
#view.cxu .cxl-tick{width:36px;height:36px;border-radius:50%;background:var(--ink);color:var(--bg);display:flex;align-items:center;justify-content:center;flex:none}
#view.cxu .cxl-tick svg{width:18px;height:18px}
#view.cxu .cxl-say{margin-top:8px;padding:12px 14px;background:var(--line-soft,#F3F1EA);border-radius:10px;font-size:14px;line-height:21px;overflow-wrap:anywhere}
#view.cxu .cxl-chips .chip[aria-pressed="true"]{background:var(--ink);color:var(--card);border-color:var(--ink)}

/* Brand marks (2026-11-19): a soft rounded tile per third-party product. */
.brand-tile{display:inline-flex;align-items:center;justify-content:center;flex:none;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 1px 2px rgba(20,18,10,.04)}
.brand-tile img{display:block;width:58%;height:58%;object-fit:contain}
.brand-tile.bt-s{width:28px;height:28px;border-radius:8px}
.brand-tile.bt-m{width:44px;height:44px}
.brand-tile.bt-l{width:48px;height:48px;border-radius:13px}
.brand-tile.bt-letter{font:600 17px/1 "Plex Sans",system-ui,sans-serif;color:var(--ink-2);background:var(--paper,#FAFAF8)}
.brand-tile.bt-s.bt-letter{font-size:13px}
.brand-stack{display:inline-flex;flex:none;width:44px;height:44px;align-items:center}
.brand-stack .brand-tile{width:24px;height:24px;border-radius:7px;margin-left:-8px;background:#fff}
.brand-stack .brand-tile:first-child{margin-left:0}
.cx-row{gap:14px}
.steplabel-brand{display:flex;align-items:center;gap:10px}
.agent-head{display:flex;align-items:center;gap:14px}
.agent-head .grow{flex:1;min-width:0}
.connhead{display:flex;align-items:center;gap:10px}
.cx-brand-h1{display:flex;align-items:center;gap:14px}
.keyrow-name{display:inline-flex;align-items:center;gap:10px}

/* Integration discovery and the owner's agent inventory share the app's data rail. */
#view.g-connect-picker{max-width:1440px;padding:40px 48px 110px}
#view.g-connect-picker .cx-picker{max-width:none}
#view.g-connect-picker .page-description{max-width:680px;color:var(--ink-2);margin-top:12px}
#view.g-connect-picker .connect-paths{display:flex;align-items:center;flex-wrap:wrap;gap:20px;margin:24px 0}
#view.g-connect-picker #cx-find{max-width:560px;margin-bottom:24px}
#view.g-connect-picker .picker-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;max-width:none}
.integration-choice{border:1px solid var(--line);border-radius:16px;background:var(--paper,var(--bg));overflow:hidden;min-width:0}
#view.g-connect-picker .integration-choice .sumrow{display:flex;align-items:center;gap:14px;border:0;padding:24px;margin:0;min-height:112px}
.integration-choice .grow{min-width:0;flex:1}
.integration-choice .small{overflow-wrap:anywhere}
.integration-choice .cx-view{font-size:13px;color:var(--ink-2)}
.integration-choice-actions{display:flex;flex-wrap:wrap;gap:12px;padding:0 24px 20px}
.integration-choice-actions:empty{display:none}
.integration-choice-actions a{display:inline-flex;align-items:center;min-height:44px;font-size:13px;color:var(--ink);text-decoration:underline;text-underline-offset:3px}
#view.g-agents .page-heading{margin-bottom:28px}
#view.g-agents .heading-line{display:flex;align-items:center;justify-content:space-between;gap:24px}
#view.g-agents .page-description{margin-top:12px;color:var(--ink-2)}
.agent-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:24px 0}
.agent-card{display:flex;flex-direction:column;gap:18px;padding:28px;border:1px solid var(--line);border-radius:16px;min-width:0}
.agent-card h2{font-size:22px;line-height:1.3;overflow-wrap:anywhere}
.agent-card .minor{font-size:13px;line-height:1.6;color:var(--ink-2);overflow-wrap:anywhere}
.agent-state{font-size:12px;flex:none;color:var(--ink-2)}
.agent-status{padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.agent-status strong{font-size:15px}
.agent-status p{font-size:14px;color:var(--ink-2);line-height:1.6;margin-top:8px}
.agent-actions{display:flex;align-items:center;flex-wrap:wrap;gap:16px;margin-top:auto}
.agent-actions a{display:inline-flex;align-items:center;min-height:44px;color:var(--ink);font-size:13px}
.agent-actions .agent-revoke{margin-left:auto}
@media(max-width:1199px){
  #view.g-connect-picker .picker-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  #view.g-connect-picker{padding:32px 28px 110px}
}
@media(max-width:767px){
  #view.g-connect-picker{padding:24px 20px 110px}
  #view.g-connect-picker .picker-list,.agent-grid{grid-template-columns:minmax(0,1fr)}
  #view.g-connect-picker .integration-choice .sumrow{padding:20px;min-height:96px}
  .integration-choice-actions{padding:0 20px 16px}
  #view.g-agents .heading-line{align-items:stretch;flex-direction:column;gap:16px}
  .agent-card{padding:22px}
  .agent-head{flex-wrap:wrap}
  .agent-state{margin-left:auto}
}
