/* Quorva on the phone: Quorva's navy and white, mirrored between the themes, iOS-sized. */
:root {
  --bg: #f4f5f9; --card: #ffffff; --ink: #19204e; --muted: #5b6285; --faint: #9196b0; --line: #e4e6ee; --accent: #19204e; --accent-ink: #ffffff; --soft: #eceef6;
  --amber: #a8650f; --amber-soft: #fbf1dd; --blue: #2f6cd2; --blue-soft: #e8eefb; --green: #2c8a4b; --green-soft: #e6f4ea; --red: #c63b35; --red-soft: #fbe7e6; --code: #f0f2f7;
  --hl-comment: #8a8fa8; --hl-keyword: #a6418d; --hl-string: #3e7d32; --hl-number: #b0560b; --hl-title: #2b64c6;
  --hl-builtin: #7a4ec2; --hl-attr: #1f7a8c; --hl-deletion: #c63b35; --hl-meta: #8a8fa8;
  /* What sits on a colour: a badge's number, a filled check, a toggle's knob, a coloured swipe action. */
  --on-tint: #ffffff;
  /* Rows that stand out: work left running in the background, a turn nobody has seen, a failure. */
  --tint-green: color-mix(in srgb, var(--green) 9%, var(--card)); --tint-blue: color-mix(in srgb, var(--blue) 9%, var(--card)); --tint-red: color-mix(in srgb, var(--red) 9%, var(--card));
  /* A tap's shade, a sheet's veil, and the shadow of what floats over the screen. */
  --press: rgba(25, 32, 78, .07); --veil: rgba(9, 12, 34, .4); --float: 0 12px 32px rgba(12, 16, 40, .2), 0 1px 3px rgba(12, 16, 40, .12);
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px); --safe-left: env(safe-area-inset-left, 0px); --safe-right: env(safe-area-inset-right, 0px);
  /* A screen's header, solid since nothing scrolls under it, and what a video plays on in either theme. */
  --bar: color-mix(in srgb, var(--card) 88%, var(--bg)); --stage: #000;
  /* One radius for cards and groups, one for the controls inside them; iOS's own curve for what moves. */
  --r-card: 14px; --r-ctl: 11px; --ease: cubic-bezier(.32, .72, 0, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e26; --card: #161b40; --ink: #f2f3fa; --muted: #a9aecb; --faint: #6f759a; --line: #262e5c; --accent: #ffffff; --accent-ink: #19204e; --soft: #232a57;
    --amber: #e2aa52; --amber-soft: #2e2716; --blue: #73a6ff; --blue-soft: #18254f; --green: #4fc277; --green-soft: #12291f; --red: #f2726c; --red-soft: #2d1a2c; --code: #10143a;
    --hl-comment: #7c82a8; --hl-keyword: #ff8fd2; --hl-string: #a5dc8f; --hl-number: #f5b56c; --hl-title: #8ab9ff;
    --hl-builtin: #c9a6ff; --hl-attr: #72d4e4; --hl-deletion: #ff8a85; --hl-meta: #7c82a8;
    --on-tint: #ffffff;
    --tint-green: color-mix(in srgb, var(--green) 15%, var(--card)); --tint-blue: color-mix(in srgb, var(--blue) 16%, var(--card)); --tint-red: color-mix(in srgb, var(--red) 15%, var(--card));
    --press: rgba(255, 255, 255, .07); --veil: rgba(0, 0, 0, .52); --float: 0 12px 32px rgba(0, 0, 0, .5), 0 0 0 .5px rgba(255, 255, 255, .1);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* The page itself never moves: only the lists inside it scroll, and each keeps its bounce to itself. iOS reads this from
   html, not body, and ignores it on a page that has nothing to scroll, so app.js also holds a drag with nothing to scroll. */
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overscroll-behavior: none; }
body { font: 15px/1.4 -apple-system, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
textarea { overscroll-behavior: contain; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
code { font: 0.86em/1.4 ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace; background: var(--code); border-radius: 5px; padding: 1px 5px; }
pre { margin: 0; }
svg.i { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hidden { display: none !important; }

/* The app fills what is visible, which on iOS is less than the screen while the keyboard is up (app.js sets the --vv* values). */
#app { position: fixed; left: 0; right: 0; top: var(--vvtop, 0px); height: var(--vvh, 100%); display: flex; flex-direction: column; max-width: 760px; margin: 0 auto; }
/* The space behind the status bar takes the colour of what is under it: the page under a large title, a header's bar. */
.top-safe { height: var(--safe-top); flex: none; background: var(--bg); }
.top-safe:has(+ .nav) { background: var(--bar); }
.body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; padding-bottom: 24px; }
/* A list that scrolls shows its title small at the top, as iOS does, over the large one the top would cut in half; a
   tap there goes back to the top. */
.mini { position: absolute; left: 0; right: 0; top: var(--safe-top); z-index: 5; height: 44px; display: grid; place-items: center; padding: 0 64px; font-size: 16px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--bg); border-bottom: .5px solid var(--line); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
#app.scrolled .mini { opacity: 1; pointer-events: auto; }
.tabs { flex: none; display: flex; justify-content: space-around; padding: 7px 8px calc(8px + var(--safe-bottom)); border-top: .5px solid var(--line); background: var(--bar); }
.tab { position: relative; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; min-width: 0; max-width: 88px; min-height: 44px; font-size: 10.5px; font-weight: 600; letter-spacing: .01em; color: var(--faint); padding: 2px 0; transition: color .15s ease; }
.tab.on { color: var(--accent); }
.tab .bdg { position: absolute; top: -3px; left: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: var(--on-tint); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; padding: 0 5px; box-shadow: 0 0 0 2px var(--bar); font-variant-numeric: tabular-nums; }

/* A list's large title, with its actions, and the line under it. */
.lt { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 10px 18px 2px; }
.lt h1 { font-size: 32px; line-height: 1.15; font-weight: 750; letter-spacing: -.022em; margin: 0; }
.lt .acts { display: flex; gap: 10px; padding-bottom: 5px; }
.circ { position: relative; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--soft); color: var(--accent); display: grid; place-items: center; flex: none; transition: opacity .15s ease; }
.circ::after { content: ""; position: absolute; inset: -5px; }
.lsub { padding: 3px 18px 4px; color: var(--muted); font-size: 13.5px; display: flex; gap: 4px 14px; flex-wrap: wrap; align-items: center; }
.lsub > span { display: inline-flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.on { background: var(--green); } .dot.run { background: var(--blue); animation: pulse 1.3s ease-in-out infinite; } .dot.need { background: var(--amber); } .dot.off { background: var(--faint); } .dot.err { background: var(--red); }
@keyframes pulse { 50% { opacity: .3; } }

/* Grouped lists: a header in small capitals, then a card of rows with separators inset to where the text starts. */
.sh { padding: 22px 18px 7px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sh .n { color: var(--faint); font-weight: 500; text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.grp { margin: 0 14px; background: var(--card); border-radius: var(--r-card); overflow: hidden; }
/* A group of rows lets each row paint the card, so a tinted row's rounded corner shows no rim of the card behind it. */
.grp:has(> .row, > .swipe, > .trow, > .todo) { background: none; }
.grp > .row, .grp > .trow, .grp > .todo, .swipe > .row { background-color: var(--card); }
.row { position: relative; display: flex; gap: 12px; align-items: center; width: 100%; min-height: 46px; border: 0; background: none; text-align: left; padding: 11px 14px; transition: background-color .15s ease; }
.row .mid { flex: 1; min-width: 0; }
.row .t { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .r { color: var(--faint); font-size: 12.5px; flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.row .val { color: var(--muted); font-size: 14.5px; flex: none; }
.trow, .todo, .swipe { position: relative; }
.grp > .row::after, .grp > .swipe::after, .grp > .trow::after, .grp > .todo::after { content: ""; position: absolute; z-index: 2; left: var(--sep, 14px); right: 0; bottom: 0; border-bottom: .5px solid var(--line); pointer-events: none; }
.grp > :last-child::after { display: none; }
.row:has(> .dot), .swipe { --sep: 34px; }
.row:has(> .lead-i), .row:has(> .ck), .row.vopt { --sep: 48px; }
.row:has(> .vc) { --sep: 50px; }
.foot { padding: 8px 18px 0; color: var(--faint); font-size: 12.5px; line-height: 1.45; }
.empty { padding: 10px 18px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.empty.done { text-align: center; padding: 6px 24px 10px; }
.empty .spin { vertical-align: -2px; margin-right: 6px; }
/* What a sheet says before what it asks. */
.lede { padding: 0 18px 12px; color: var(--muted); font-size: 14px; line-height: 1.45; }

.pcard { display: block; margin: 0 14px; background: var(--card); border-radius: var(--r-card); padding: 13px 14px 14px; border: 0; width: calc(100% - 28px); text-align: left; }
.pcard + .pcard { margin-top: 10px; }
.pcard.need { box-shadow: inset 3px 0 0 var(--amber); }
.pcard .t { display: block; font-weight: 650; font-size: 15.5px; line-height: 1.3; margin: 4px 0 2px; }
.pcard .s { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .s .i { vertical-align: -2px; margin-right: 1px; }
/* A permission prompt on its card in the Inbox: the tool, the command as it will run, and where. */
.pcard .k { display: flex; gap: 5px; align-items: center; margin-top: 6px; font-size: 11.5px; font-weight: 700; color: var(--amber); text-transform: uppercase; letter-spacing: .05em; }
.pcard pre.cmd { margin-top: 6px; background: var(--code); border-radius: 9px; padding: 8px 10px; font: 12.5px/1.45 ui-monospace, "SF Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.pcard pre.cmd + .s { margin-top: 5px; white-space: normal; }
.pcard .dir { display: block; margin-top: 5px; font-size: 11.5px; line-height: 1.4; color: var(--faint); overflow-wrap: anywhere; }
.meta { display: flex; gap: 5px; align-items: center; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; }
.meta b { color: var(--ink); font-weight: 600; }
.meta span:nth-child(even) { color: var(--faint); }
.acts2 { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.btn { position: relative; flex: 1; min-height: 44px; border-radius: var(--r-ctl); border: 0; background: var(--soft); color: var(--accent); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; text-decoration: none; transition: opacity .15s ease; }
.btn.pri { background: var(--accent); color: var(--accent-ink); }
.btn.warn { background: var(--red-soft); color: var(--red); }
.btn.sm { min-height: 32px; font-size: 14px; flex: none; padding: 0 12px; border-radius: 9px; }
.btn.sm::after { content: ""; position: absolute; inset: -6px -2px; }
.btn.big { min-height: 50px; font-size: 16px; width: 100%; flex: none; border-radius: 13px; }
.btn.line { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
/* A quiet choice beside the one a card is for, such as Dismiss beside Open the Canvas, which keeps the room. */
.btn.aside { flex: none; padding: 0 18px; }
.btn:disabled { opacity: .45; }
.tagm { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 10px; background: var(--soft); color: var(--muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.banner { margin: 12px 14px 0; border-radius: var(--r-card); padding: 11px 12px 11px 13px; font-size: 13.5px; line-height: 1.4; background: var(--soft); color: var(--muted); display: flex; gap: 10px; align-items: flex-start; }
.banner > .i { margin-top: 1px; }
.banner:has(> .btn) { align-items: center; padding-right: 10px; }
.banner:has(> .btn) > .i { margin-top: 0; }
.banner b { color: var(--ink); }
.banner.warn { background: var(--amber-soft); color: var(--amber); }
.banner .btn { flex: none; }
.banner .btn:not(.pri) { background: var(--card); }

/* A screen's header: Back, the title centred over the screen whatever sits beside it, and an action. */
.nav { flex: none; display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr); align-items: center; column-gap: 2px; min-height: 52px; padding: 2px 4px 6px; border-bottom: .5px solid var(--line); background: var(--bar); }
.nav > :first-child { justify-self: start; }
.nav > :last-child { justify-self: end; }
.nav .back { border: 0; background: none; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; gap: 1px; min-width: 44px; min-height: 44px; padding: 0 8px; font-size: 16px; text-decoration: none; transition: opacity .15s ease; }
.nav .back:disabled { opacity: .3; }
.nav .back > span { margin-left: -1px; }
.nav .navr { display: flex; }
.nav .ttl { justify-self: stretch; min-width: 0; text-align: center; padding: 0 2px; }
.nav .ttl .t { font-weight: 650; font-size: 16px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav .ttl .s { margin-top: 1px; color: var(--muted); font-size: 12px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav .ttl .s .dot { width: 7px; height: 7px; margin-right: 1px; vertical-align: 1px; box-shadow: none; }
.nav .ttl .s .i { vertical-align: -1px; }

/* A chat. */
.msgs { padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.older { align-self: center; }
.u { align-self: flex-end; max-width: 84%; background: var(--accent); color: var(--accent-ink); border-radius: 18px 18px 6px 18px; padding: 9px 14px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; }
.u code { background: color-mix(in srgb, var(--accent-ink) 16%, transparent); color: inherit; }
.ufoot { align-self: flex-end; font-size: 11.5px; color: var(--faint); margin: -5px 2px 0 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ufoot .sn { border: 0; background: var(--soft); color: var(--accent); border-radius: 9px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; }
.a { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.a.thinking { font-size: 14px; opacity: .78; border-left: 2px solid var(--line); padding-left: 10px; }
.a p { margin: 0 0 8px; } .a p:last-child { margin-bottom: 0; }
.a h1, .a h2, .a h3, .a h4, .a h5, .a h6 { margin: 16px 0 6px; line-height: 1.3; letter-spacing: -.01em; }
.a h1 { font-size: 20px; } .a h2 { font-size: 18px; } .a h3 { font-size: 16px; } .a h4, .a h5, .a h6 { font-size: 15px; }
.a > :first-child { margin-top: 0; }
.a hr { border: 0; border-top: .5px solid var(--line); margin: 12px 0; }
.a ul, .a ol { margin: 4px 0 8px; padding-left: 22px; } .a li { margin: 3px 0; }
.a pre { background: var(--code); border-radius: var(--r-ctl); padding: 10px 12px; overflow-x: auto; font: 12.5px/1.5 ui-monospace, "SF Mono", Consolas, monospace; margin: 8px 0; }
.a pre code { background: none; padding: 0; }
.hljs-comment, .hljs-quote { color: var(--hl-comment); font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-section, .hljs-doctag, .hljs-type { color: var(--hl-keyword); }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute, .hljs-meta .hljs-string { color: var(--hl-string); }
.hljs-number, .hljs-symbol, .hljs-bullet, .hljs-variable.constant_ { color: var(--hl-number); }
.hljs-title, .hljs-title.function_, .hljs-title.class_ { color: var(--hl-title); }
.hljs-built_in, .hljs-name, .hljs-tag, .hljs-selector-id, .hljs-selector-class { color: var(--hl-builtin); }
.hljs-attr, .hljs-variable, .hljs-template-variable, .hljs-property, .hljs-params { color: var(--hl-attr); }
.hljs-deletion { color: var(--hl-deletion); } .hljs-meta { color: var(--hl-meta); } .hljs-emphasis { font-style: italic; } .hljs-strong { font-weight: 600; }
.a pre:has(> code[data-source]) { background: none; padding: 4px 0; text-align: center; }
.a code[data-source] svg { max-width: 100%; height: auto; }
.a table { border-collapse: collapse; font-size: 13.5px; display: block; overflow-x: auto; margin: 6px 0 8px; }
.a th, .a td { border-bottom: .5px solid var(--line); padding: 6px 10px 6px 0; text-align: left; }
.a th { font-weight: 650; }
.a blockquote { margin: 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
.a a { color: var(--blue); }
/* A picture in what Claude wrote shows as the words that describe it, since loading it would be a request of its own. */
.a .alt { color: var(--muted); font-style: italic; }
.a .alt::before { content: "["; } .a .alt::after { content: "]"; }
.tool { display: block; width: 100%; min-height: 38px; text-align: left; border: 0; font-size: 13px; color: var(--muted); background: var(--card); border-radius: var(--r-ctl); padding: 9px 12px; }
.tool .line { display: flex; gap: 8px; align-items: center; min-height: 20px; }
.tool .nm { font-weight: 650; color: var(--ink); flex: none; }
.tool .ar { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12px; }
.tool .st { flex: none; font-size: 12px; display: inline-flex; align-items: center; gap: 3px; } .tool .st.ok { color: var(--green); } .tool .st.err { color: var(--red); font-weight: 600; }
.tool pre { margin-top: 9px; background: var(--code); border-radius: 8px; padding: 8px 10px; font: 12px/1.45 ui-monospace, "SF Mono", Consolas, monospace; white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; color: var(--ink); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--blue); animation: spin .9s linear infinite; flex: none; display: inline-block; }
/* A run of tool calls folded into one line that says what Claude did, which opens to every call. */
.run { display: flex; flex-direction: column; gap: 6px; }
.runhead { display: flex; gap: 8px; align-items: center; width: 100%; min-height: 38px; text-align: left; border: 0; font-size: 13px; line-height: 1.35; color: var(--muted); background: var(--card); border-radius: var(--r-ctl); padding: 9px 12px; }
.runhead > svg { flex: none; transition: transform .15s ease; } .run.open .runhead > svg { transform: rotate(90deg); }
.runhead .sum { flex: 1 1 auto; min-width: 0; color: var(--ink); }
.runhead .ar { flex: 0 1 40%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12px; } .runhead .ar:empty { display: none; }
.runhead .st { flex: none; font-size: 12px; } .runhead .st.err { color: var(--red); font-weight: 600; }
.runbody { display: flex; flex-direction: column; gap: 6px; margin-left: 6px; padding-left: 10px; border-left: 2px solid var(--line); }
@keyframes spin { to { transform: rotate(360deg); } }
.ask { background: var(--card); border-radius: var(--r-card); padding: 13px 14px 14px; box-shadow: inset 0 0 0 1.5px var(--amber); }
.ask.flash { animation: flash 1.4s ease 2; }
/* Run as administrator: Approve with Face ID takes the room it needs, and Refuse what is left. Approve waits until the
   command was scrolled to its end, which the note above the buttons asks for; a request the phone won't sign says why.
   The line under the command flows as text, so a code point shown() draws sits in it where the character was. */
.ask.admin .acts2 .btn.pri { flex: 1.6 1 auto; white-space: nowrap; }
.ask.admin .acts2 .btn.warn { flex: 1 1 auto; }
.ask.admin .dir.where { display: block; }
.ask.admin .dir.more { color: var(--amber); font-weight: 600; }
.ask.admin .why.bad { color: var(--red); font-weight: 600; }
@keyframes flash { 50% { box-shadow: inset 0 0 0 1.5px var(--amber), 0 0 0 6px var(--amber-soft); } }
.ask .k { font-size: 11.5px; font-weight: 700; color: var(--amber); text-transform: uppercase; letter-spacing: .05em; display: flex; gap: 6px; align-items: center; }
.ask .q { font-weight: 600; font-size: 15px; line-height: 1.35; margin: 6px 0 4px; }
.ask > .a { margin-top: 8px; }
.ask pre { margin-top: 8px; background: var(--code); border-radius: 9px; padding: 9px 11px; font: 12.5px/1.45 ui-monospace, "SF Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }
/* A character that hides or reorders text, shown as its code point by shown() in app.js. */
.inv { display: inline-block; margin: 0 1px; padding: 0 3px; border-radius: 4px; background: var(--amber-soft); color: var(--amber); font: 600 10px/1.5 ui-monospace, "SF Mono", Consolas, monospace; vertical-align: baseline; unicode-bidi: isolate; }
.ask .dir { display: flex; gap: 6px; align-items: center; font-size: 11.5px; line-height: 1.4; color: var(--faint); margin-top: 6px; overflow-wrap: anywhere; }
.ask .why { font-size: 13px; line-height: 1.4; color: var(--muted); margin-top: 7px; }
.popt { display: grid; grid-template-columns: 22px 1fr; gap: 9px; align-items: start; width: 100%; text-align: left; border: 0; background: var(--bg); border-radius: var(--r-ctl); padding: 11px 12px 11px 11px; margin-top: 7px; transition: box-shadow .15s ease; }
.popt .rd { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--faint); margin-top: 0; transition: box-shadow .15s ease; }
.popt.multi .rd { border-radius: 6px; }
.popt.sel { box-shadow: inset 0 0 0 1.5px var(--accent); }
.popt.sel .rd { box-shadow: inset 0 0 0 6px var(--accent); }
.popt .ol { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.35; } .popt .od { display: block; margin-top: 1px; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.note { font-size: 12.5px; line-height: 1.4; color: var(--muted); display: flex; gap: 7px; align-items: center; background: var(--card); border-radius: var(--r-ctl); padding: 9px 12px; }
.note b.ok { color: var(--green); } .note b.no { color: var(--red); }
.notice { font-size: 12.5px; color: var(--muted); text-align: center; }
.notice.error { color: var(--red); }
.turn { font-size: 11.5px; color: var(--faint); text-align: center; font-variant-numeric: tabular-nums; }
.canvas-card { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: var(--r-card); padding: 12px 14px; border: 0; width: 100%; text-align: left; color: var(--accent); }
.canvas-card > span { min-width: 0; color: var(--ink); }
.canvas-card .t { font-weight: 650; display: block; } .canvas-card .s { color: var(--muted); font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.typing { display: inline-flex; gap: 4px; padding: 6px 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 50% { opacity: .25; transform: translateY(-2px); } }
.comp { flex: none; display: flex; gap: 8px; align-items: flex-end; padding: 8px 10px calc(6px + var(--safe-bottom)); border-top: .5px solid var(--line); background: var(--bar); }
.comp .fld { flex: 1; min-height: 40px; max-height: 160px; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); background: var(--card); padding: 9px 14px; font-size: 16px; border: 0; outline: 0; resize: none; line-height: 1.35; transition: box-shadow .15s ease; }
.comp .fld:focus { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, var(--line)); }
.comp .rb { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--soft); color: var(--accent); flex: none; transition: opacity .15s ease, background-color .15s ease; }
.comp .rb:disabled { color: var(--faint); }
.comp .rb.pri { background: var(--accent); color: var(--accent-ink); } .comp .rb.stop { background: var(--red-soft); color: var(--red); }
/* Attachments wait over the box, in the composer's own bar. */
.chips { flex: none; display: flex; gap: 6px; padding: 8px 10px 0; flex-wrap: wrap; background: var(--bar); border-top: .5px solid var(--line); }
.chips + .comp { border-top: 0; padding-top: 7px; }
.chips .tagm { height: 28px; max-width: 100%; gap: 6px; padding: 0 3px 0 10px; border-radius: 14px; background: var(--card); color: var(--ink); font-size: 12.5px; font-weight: 500; box-shadow: inset 0 0 0 .5px var(--line); }
.chips .tagm .i { color: var(--muted); }
.chips .tagm .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.chips .chipx { position: relative; width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; background: var(--soft); color: var(--muted); flex: none; }
.chips .chipx::after { content: ""; position: absolute; inset: -8px; }

/* Sheets, toasts, overlays. */
.veil { position: fixed; inset: 0; background: var(--veil); z-index: 20; animation: fade .25s ease; }
.sheet { position: fixed; left: 0; right: 0; bottom: var(--vvbottom, 0px); max-height: min(calc(0.9 * var(--vvh, 100vh)), calc(var(--vvh, 100vh) - var(--safe-top) - 12px)); overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border-radius: 20px 20px 0 0; z-index: 21; padding: 0 0 calc(20px + var(--safe-bottom)); max-width: 760px; margin: 0 auto; animation: up .44s var(--ease); }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: var(--line); margin: 6px auto 2px; }
/* Its header stays while what is under it scrolls, the title centred between Cancel and the action. */
.sheet .shd { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr); align-items: center; column-gap: 8px; min-height: 50px; padding: 2px 16px 4px; background: var(--bg); }
.sheet .shd > :first-child { justify-self: start; }
.sheet .shd > :last-child { justify-self: end; }
.sheet .shd h2 { font-size: 17px; font-weight: 700; margin: 0; text-align: center; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet .shd .lnk { min-height: 44px; padding: 0 2px; }
.lnk.back-l { display: inline-flex; align-items: center; margin-left: -6px; }
.sheet .sh { padding-top: 16px; }
.lnk { border: 0; background: none; color: var(--blue); font-size: 16px; padding: 6px 2px; transition: opacity .15s ease; }
.lnk:disabled { opacity: .4; }
.seg2 { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px; }
.seg2 button { border: 0; border-radius: 10px; min-height: 36px; padding: 0 13px; background: var(--card); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; transition: box-shadow .15s ease, opacity .15s ease; }
.seg2 button.on { box-shadow: inset 0 0 0 2px var(--accent); font-weight: 600; }
.seg2 button:disabled { opacity: .45; }
.ta { display: block; width: calc(100% - 28px); margin: 0 14px; min-height: 96px; border: 0; border-radius: 12px; background: var(--card); padding: 11px 13px; font-size: 16px; line-height: 1.4; resize: vertical; outline: 0; }
.input { width: 100%; min-height: 40px; border: 0; border-radius: var(--r-ctl); background: var(--card); padding: 9px 13px; font-size: 16px; outline: 0; -webkit-appearance: none; appearance: none; }
.search { --pt: 2px; position: relative; display: block; padding: var(--pt) 14px 10px; }
.search > .i { position: absolute; left: 26px; top: calc(var(--pt) + 20px); transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .input { padding-left: 36px; }
.search .input::-webkit-search-decoration { -webkit-appearance: none; }
.search + .sh { padding-top: 12px; }
.toast { position: fixed; left: 14px; right: 14px; top: calc(10px + var(--safe-top) + var(--vvtop, 0px)); z-index: 40; width: -webkit-fit-content; width: fit-content; max-width: 520px; margin: 0 auto; background: var(--ink); color: var(--bg); border-radius: 14px; padding: 11px 16px; font-size: 14.5px; font-weight: 500; line-height: 1.35; box-shadow: var(--float); animation: drop .45s var(--ease); }
@keyframes drop { from { transform: translateY(-24px); opacity: 0; } }
.tog { position: relative; width: 51px; height: 31px; border-radius: 16px; background: var(--line); flex: none; border: 0; transition: background-color .2s ease; }
.tog::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: var(--on-tint); box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .25s var(--ease); }
.tog.on { background: var(--green); } .tog.on::after { transform: translateX(20px); }
select.val { border: 0; background: none; color: var(--muted); font-size: 14.5px; max-width: 46vw; }
input.val { border: 0; background: none; color: var(--muted); font-size: 14.5px; width: 76px; text-align: right; }
.code { font: 700 32px/1 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .14em; text-align: center; padding: 16px 0; background: var(--card); border-radius: var(--r-card); margin: 0 14px; }
.code + .empty.done { padding-top: 14px; }
.acts2.pad { padding: 0 14px; margin-top: 14px; }
.acts2.pad + .foot { padding-top: 12px; }
/* Done: a check in a green ring, as iOS confirms something; a cross in a red one when something must be undone. */
.okmark { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin: 4px auto 12px; background: var(--green-soft); color: var(--green); }
.okmark.no { background: var(--red-soft); color: var(--red); }
/* What a canvas asks to send, or where its link goes, as it is. */
pre.said { margin: 0 14px; background: var(--card); border-radius: 12px; padding: 11px 13px; font: 12.5px/1.5 ui-monospace, "SF Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 46vh; overflow: auto; color: var(--ink); }
.ob { padding: 22px 22px calc(22px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 12px; min-height: 100%; }
.ob .logo { width: 76px; height: 76px; border-radius: 18px; margin: 30px auto 4px; overflow: hidden; box-shadow: var(--float); }
.ob h2 { font-size: 25px; font-weight: 750; text-align: center; letter-spacing: -.01em; margin: 0; }
.ob .lead { text-align: center; color: var(--muted); font-size: 15px; margin: 0; }
.ob .spacer { flex: 1; }
.msft { display: grid; grid-template-columns: repeat(2, 9px); gap: 2px; }
.msft i { width: 9px; height: 9px; display: block; }
.canvas { position: fixed; left: 0; right: 0; top: var(--vvtop, 0px); height: var(--vvh, 100%); z-index: 30; background: var(--card); display: flex; flex-direction: column; padding-bottom: var(--safe-bottom); }
.canvas iframe { flex: 1; min-height: 0; border: 0; width: 100%; background: var(--bg); }
/* A page that comes in parts says how much has come until it opens. */
.canvas-wait { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); color: var(--muted); font-size: 15px; line-height: 1.45; text-align: center; }
.kb .comp { padding-bottom: 8px; }
.kb .sheet { padding-bottom: 12px; }
.kb .canvas { padding-bottom: 0; }
/* Usage: the plan's meters, this month's totals, fourteen days of bars, and the breakdowns. */
.upl { padding: 13px 14px 14px; display: grid; gap: 14px; }
.um-h { display: flex; justify-content: space-between; font-size: 14px; }
.um-h b { font-variant-numeric: tabular-nums; }
.um-bar { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; margin-top: 7px; }
.um-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.um-bar i.warm { background: var(--amber); } .um-bar i.hot { background: var(--red); }
.um-s { color: var(--muted); font-size: 12px; margin-top: 5px; }
/* Whose limits a group shows, when the machines sign in to more than one account. */
.uacct { display: grid; gap: 2px; min-width: 0; }
.uacct b { font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uacct span { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot + .upl { margin-top: 18px; }
.ut { display: flex; gap: 28px; padding: 14px; }
.ut b { display: block; font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.ut span { color: var(--muted); font-size: 13px; }
.udays { display: flex; align-items: flex-end; gap: 4px; height: 116px; padding: 14px 14px 26px; }
.ud { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.ud i { display: block; background: var(--accent); border-radius: 3px 3px 1px 1px; min-height: 2px; }
.ud span { position: absolute; bottom: -19px; left: -4px; right: -4px; text-align: center; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.ul .mid { display: grid; gap: 7px; }
.ub { display: block; height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.ub i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* Pull requests: the board's rows, a pull request's page, a file's diff and its threads. */
.row.pr { align-items: flex-start; }
.ck { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--soft); color: var(--faint); margin-top: 1px; }
.ck.passed { background: var(--green-soft); color: var(--green); }
.ck.failed { background: var(--red-soft); color: var(--red); }
.ck.running, .ck.waiting { background: var(--blue-soft); color: var(--blue); }
.rvs { display: flex; gap: 4px; margin-top: 7px; flex-wrap: wrap; }
.vc { min-width: 24px; height: 20px; border-radius: 10px; padding: 0 6px; font-size: 10.5px; font-weight: 700; line-height: 20px; text-align: center; background: var(--soft); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); flex: none; }
.vc.ok { background: var(--green-soft); color: var(--green); box-shadow: none; }
.vc.warn { background: var(--amber-soft); color: var(--amber); box-shadow: none; }
.vc.bad { background: var(--red-soft); color: var(--red); box-shadow: none; }
.vc.info { background: var(--blue-soft); color: var(--blue); box-shadow: none; }
.row .vc { margin-top: 1px; }
.pl { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12.5px; font-weight: 600; background: var(--soft); color: var(--muted); }
.pl.ok { background: var(--green-soft); color: var(--green); } .pl.bad { background: var(--red-soft); color: var(--red); } .pl.info { background: var(--blue-soft); color: var(--blue); }
.pl .i { width: 13px; height: 13px; }
.prh { padding: 14px 18px 2px; }
.prs { display: flex; gap: 6px; flex-wrap: wrap; }
.prb { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.prb code, .sheet code { font: 12.5px ui-monospace, "SF Mono", Consolas, monospace; background: var(--code); padding: 1px 5px; border-radius: 6px; color: var(--ink); }
.grp.pad { padding: 13px 14px 14px; }
.thr { margin: 0 14px; background: var(--card); border-radius: var(--r-card); padding: 12px 14px; }
.thr + .thr { margin-top: 10px; }
.thr.done { opacity: .72; }
.cm + .cm { margin-top: 10px; padding-top: 10px; border-top: .5px solid var(--line); }
.cmh { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 3px; }
.cmh b { color: var(--ink); font-weight: 600; }
.thr .a { font-size: 14.5px; }
.thra { display: flex; gap: 8px; margin-top: 11px; align-items: center; flex-wrap: wrap; }
.prbar { flex: none; padding: 9px 12px calc(6px + var(--safe-bottom)); border-top: .5px solid var(--line); background: var(--bar); }
.prbar .why { font-size: 12.5px; color: var(--muted); text-align: center; margin-bottom: 8px; }
.prbtns { display: flex; gap: 8px; }
.add { color: var(--green); } .del { color: var(--red); }
.fsum { padding: 11px 18px 9px; font-size: 13px; color: var(--muted); }
.diff { background: var(--card); margin-bottom: 14px; font: 12px/1.5 ui-monospace, "SF Mono", Consolas, monospace; border-top: .5px solid var(--line); border-bottom: .5px solid var(--line); }
.hk { padding: 5px 12px; background: var(--blue-soft); color: var(--blue); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl { display: grid; grid-template-columns: 34px 34px minmax(0, 1fr); }
.dl .ln { color: var(--faint); text-align: right; padding-right: 6px; user-select: none; -webkit-user-select: none; font-size: 10.5px; line-height: 18px; font-variant-numeric: tabular-nums; }
.dl .dt { white-space: pre-wrap; overflow-wrap: anywhere; padding: 0 10px 0 4px; min-height: 18px; }
.dl.add { background: var(--green-soft); } .dl.del { background: var(--red-soft); }
.dl.add .dt::before { content: "+"; color: var(--green); margin-left: -1px; } .dl.del .dt::before { content: "−"; color: var(--red); margin-left: -1px; }
.diff .thr { margin: 8px 10px; box-shadow: 0 0 0 1px var(--line); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; }
.vopt .radio { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line); flex: none; margin-top: 1px; transition: box-shadow .15s ease; }
.vopt.on .radio { box-shadow: inset 0 0 0 6px var(--accent); }
.vopt { align-items: flex-start; }
.prmd h1, .prmd h2, .prmd h3, .prmd h4, .prmd h5, .prmd h6 { font-size: 16px; line-height: 1.35; margin: 12px 0 6px; }
.prmd > :first-child { margin-top: 0; }
.prmd img { max-width: 100%; height: auto; }
a.lnk { text-decoration: none; }

/* Where a chat stands: working pulses in the accent, as on the desktop; work left running in the background is green;
   a turn nobody has seen is blue; a failed one red. Rows tint with the same colours, with an edge. */
.dot.work { background: var(--accent); animation: pulse 1.3s ease-in-out infinite; }
.dot.bgg { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); animation: pulse 2.4s ease-in-out infinite; }
.dot.fin { background: var(--blue); }
.row.tint-bg { background-color: var(--tint-green); box-shadow: inset 3px 0 0 var(--green); }
.row.tint-fin { background-color: var(--tint-blue); box-shadow: inset 3px 0 0 var(--blue); }
.row.tint-err { background-color: var(--tint-red); box-shadow: inset 3px 0 0 var(--red); }
.row.tint-bg .t, .row.tint-fin .t { font-weight: 700; }
.row .lead-i, .grp .lead-i { color: var(--accent); display: grid; place-items: center; width: 22px; flex: none; }
.row .lead-i.ok { color: var(--green); }
.row .mid > .s:only-child { margin-top: 0; }
.row .r .i { vertical-align: middle; }

/* A row swiped left shows what it offers behind it. */
.swipe { overflow: hidden; }
.swipe > .row { z-index: 1; transition: transform .34s var(--ease), background-color .15s ease; touch-action: pan-y; }
.swipe.dragging > .row { transition: none; }
.swipe.open > .row { transform: translateX(-152px); }
.swipe.one.open > .row { transform: translateX(-104px); }
/* The actions hide while the row covers them, or their colour would rim the group's rounded corner; they stay until
   a closing row has slid back over them. */
.swipe .acts3 { position: absolute; right: 0; top: 0; bottom: 0; display: flex; visibility: hidden; transition: visibility 0s linear .34s; }
.swipe.open .acts3, .swipe.dragging .acts3 { visibility: visible; transition-delay: 0s; }
.swipe .acts3 button { width: 76px; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 600; transition: opacity .15s ease; }
.swipe.one .acts3 button { width: 104px; }
.swipe .acts3 .sw-ren { background: var(--soft); color: var(--accent); }
.swipe .acts3 .sw-arc { background: var(--accent); color: var(--accent-ink); }
.swipe .acts3 .sw-un { background: var(--green); color: var(--on-tint); }

/* A chat's title opens its sheet. */
.nav .ttl.tap { border: 0; background: none; padding: 0 2px; font: inherit; color: inherit; cursor: pointer; border-radius: 10px; }
.nav .ttl.tap .t .tagm { vertical-align: 2px; height: 18px; padding: 0 6px; }
.field { box-shadow: inset 0 0 0 1.5px var(--accent); }

/* Sub agents and commands in a chat. */
.tool.agent { padding: 11px 12px 12px; }
.tool.agent .nm { display: inline-flex; gap: 6px; align-items: center; }
.tool .ar.desc { font-family: inherit; font-size: 13.5px; color: var(--ink); }
.tool .chips2 { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.tagm.bgc { background: var(--green-soft); color: var(--green); font-variant-numeric: tabular-nums; }
.tool .live { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool .live b { color: var(--ink); font-weight: 600; }
.tool .rep { display: block; margin-top: 8px; font-size: 13px; color: var(--ink); line-height: 1.4; }
.tool .rep .more, .note .more { color: var(--blue); font-weight: 600; white-space: nowrap; }
.note.callback { border: 0; width: 100%; text-align: left; }
.note.callback .cb-h { flex: 1; min-width: 0; }
.note.callback .i { color: var(--green); }
/* A side question's card: dashed, since none of it is part of the conversation. */
.side { display: flex; flex-direction: column; gap: 6px; border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--soft); border-radius: var(--r-card); padding: 10px 12px; }
.side .shd { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.side .shd b { color: var(--ink); font-weight: 600; }
.side .shd span { color: var(--faint); }
.side .sq { border-left: 2px solid color-mix(in srgb, var(--accent) 40%, var(--line)); padding-left: 9px; font-size: 14px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.side .sfrom { color: var(--faint); font-size: 12px; }
.side .serr { color: var(--amber); font-size: 14px; }
.side .sasking { display: flex; flex-direction: column; gap: 6px; padding: 2px 0; }
.side .sasking i { display: block; height: 9px; border-radius: 5px; background: linear-gradient(90deg, var(--line), var(--card), var(--line)); background-size: 200% 100%; animation: sideshim 1.1s linear infinite; }
.side .sasking i:last-child { width: 55%; }
@keyframes sideshim { to { background-position: -200% 0; } }
.side .sbtn { align-self: flex-start; border: 1px solid var(--line); background: var(--card); color: var(--accent); border-radius: 9px; font-size: 13px; font-weight: 600; padding: 4px 11px; }
.side .sbtn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.a.cbody, .a.rblk { background: var(--card); border-radius: 12px; padding: 11px 13px; font-size: 14px; }
.a.rblk { margin: 0 14px; }

/* What still runs, over the composer. */
.bgbar { flex: none; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 9px 12px 9px 14px; border: 0; border-top: .5px solid var(--line); background: var(--green-soft); color: var(--green); font-size: 13.5px; font-weight: 600; width: 100%; text-align: left; }
.bgbar.todo { background: var(--blue-soft); color: var(--blue); }
.bgbar .mid { flex: 1; min-width: 0; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bgbar .mid span { color: var(--muted); font-weight: 500; }
.stack { display: flex; flex: none; }
.stack i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--green); box-shadow: 0 0 0 2px var(--green-soft); }
.stack i.cmd { color: var(--accent); }
.bgbar.todo .stack i { color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }
.stack i + i { margin-left: -6px; }

/* The Running sheet: agents and commands with Stop, and Claude's task list. */
.sheet.tall { max-height: min(calc(0.92 * var(--vvh, 100vh)), calc(var(--vvh, 100vh) - var(--safe-top) - 12px)); }
.trow { display: flex; align-items: center; --sep: 57px; }
.trow .tmain { flex: 1; min-width: 0; display: flex; gap: 11px; align-items: center; min-height: 58px; padding: 11px 6px 11px 14px; border: 0; background: none; text-align: left; }
.trow .ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); flex: none; }
.trow .ico.cmd { background: var(--soft); color: var(--accent); }
.trow .mid { flex: 1; min-width: 0; }
.trow .t { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .s { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .s.mono, .ah-t.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12px; }
.trow .el { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; flex: none; }
.trow .x { position: relative; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--red-soft); color: var(--red); display: grid; place-items: center; flex: none; margin: 0 12px 0 4px; transition: opacity .15s ease; }
.trow .x::after { content: ""; position: absolute; inset: -6px; }
.todo { display: flex; gap: 11px; align-items: flex-start; padding: 11px 14px; font-size: 14.5px; line-height: 1.35; --sep: 44px; }
.todo .cb { width: 19px; height: 19px; border-radius: 6px; box-shadow: inset 0 0 0 1.8px var(--faint); flex: none; margin-top: 0; display: grid; place-items: center; }
.todo.done { color: var(--muted); }
.todo.done .cb { background: var(--green); box-shadow: none; color: var(--on-tint); }
.todo.done .tx { text-decoration: line-through; text-decoration-color: var(--faint); }
.todo.now { font-weight: 650; }
.todo.now .cb { box-shadow: inset 0 0 0 1.8px var(--blue); }
.todo.now .cb::after { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--blue); }
.todo .now-l { display: block; margin-top: 1px; font-size: 12px; font-weight: 500; color: var(--blue); }

/* An agent's sheet and a command's output. */
.ahd { padding: 2px 18px 12px; }
.ahd .ah-t { font-weight: 700; font-size: 19px; line-height: 1.3; letter-spacing: -.01em; margin-bottom: 8px; overflow-wrap: anywhere; }
.ahd .chips3 { display: flex; gap: 6px; flex-wrap: wrap; }
.pblk { display: block; width: calc(100% - 28px); margin: 0 14px 4px; border: 0; text-align: left; background: var(--card); border-radius: 12px; padding: 11px 13px; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.pblk b { display: block; color: var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.pblk .ptext { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; }
.pblk.open .ptext { display: block; }
.steps { padding: 0 14px; display: flex; flex-direction: column; gap: 6px; }
.steps .a { font-size: 14px; padding: 2px; }
.livebar { margin: 10px 14px 0; display: flex; gap: 8px; align-items: center; background: var(--green-soft); color: var(--green); border-radius: var(--r-ctl); padding: 10px 12px; font-size: 13px; font-weight: 600; }
.livebar span:not(.spin) { color: var(--ink); font-weight: 500; }
.livebar .spin { border-color: color-mix(in srgb, var(--green) 25%, transparent); border-top-color: var(--green); }
pre.outp { margin: 0 14px; background: var(--code); border-radius: 12px; padding: 11px 13px; font: 11.5px/1.55 ui-monospace, "SF Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 60vh; overflow: auto; color: var(--ink); }

/* A toast that offers to undo spans the width, with its action at the end. */
.toast.act { width: auto; display: flex; align-items: center; gap: 12px; padding: 7px 7px 7px 16px; }
.toast.act span { flex: 1; min-width: 0; }
.toast.act .lnk { flex: none; min-height: 36px; padding: 0 14px; border-radius: 10px; color: var(--bg); background: color-mix(in srgb, var(--bg) 14%, transparent); font-weight: 700; font-size: 15px; }

/* A canvas whose player fills the screen hides the app's header, and keeps the player clear of the home indicator and,
   sideways, of the notch: an iPhone gives the canvas's own frame none of those insets. */
.canvas.immersive { background: var(--stage); padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left); }
.canvas.immersive .nav { display: none; }
.canvas.immersive .top-safe { background: var(--stage); }
.canvas.immersive iframe { background: var(--stage); }
/* The app's own way out of a canvas that has the whole screen, over the frame where the page can't cover it, at the top
   right of the player's bar, and seen on any page: dark with a light rim. */
.imx { position: absolute; z-index: 2; top: calc(var(--safe-top) + 7px); right: calc(var(--safe-right) + 12px); width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; color: var(--on-tint); background: color-mix(in srgb, var(--stage) 62%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--on-tint) 30%, transparent), var(--float); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: opacity .15s ease; }
.imx::after { content: ""; position: absolute; inset: -6px; }
/* A sheet a canvas asked for opens over the canvas. */
.veil.oc { z-index: 34; }
.sheet.oc { z-index: 35; }

/* A tap shows where it landed. */
button.row:active, .trow .tmain:active, .canvas-card:active, button.tool:active, .note.callback:active, .pblk:active, .bgbar:active, button.pcard:active, .nav .ttl.tap:active { background-image: linear-gradient(var(--press), var(--press)); }
.btn:active:not(:disabled), .circ:active, .comp .rb:active:not(:disabled), .seg2 button:active, .lnk:active:not(:disabled), .nav .back:active:not(:disabled), .trow .x:active, .swipe .acts3 button:active, .tab:active, .imx:active { opacity: .62; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  /* A spinner still says that something is happening. */
  .spin { animation-duration: 1.6s !important; animation-iteration-count: infinite !important; }
}
