/* The Mac app's look: black ground, Liquid Glass on the functional layer (sidebar, toolbar, composer, tab bar, sheets).
   Tokens come from tokens.css; glass.js sets <html data-glass="refract|blur|opaque">. */
:root { --bg:var(--t-bg); --card:var(--t-card); --them:var(--t-card); --ink:var(--t-ink); --dim:var(--t-dim); --line:var(--t-line);
  --acc:var(--t-acc); --acc-ink:var(--t-acc-ink); --yes:var(--t-acc); --on-yes:var(--t-on-acc); --no:var(--t-deny); --info:var(--t-info);
  --you:color-mix(in srgb, #ff9500 22%, var(--t-card));  /* your bubble stays brown (v16 T1: only the accent turns blue) */ --glass:var(--t-glass); --side:264px; --tabbar:0px; --kb:0px }
body { font-family:-apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Segoe UI", sans-serif }

/* Liquid Glass: frosted tint, specular rim, soft shadow; the rim and the press response are the same on every surface */
.lg { position:relative; isolation:isolate; background:var(--glass); box-shadow:inset 0 1px 0 rgb(255 255 255 / .3), inset 0 0 0 1px var(--t-rim), 0 12px 32px var(--t-shadow);
  -webkit-backdrop-filter:blur(18px) saturate(1.8); backdrop-filter:blur(18px) saturate(1.8) }
[data-glass=refract] .lg { -webkit-backdrop-filter:none; backdrop-filter:var(--lg-filter, blur(0)) blur(10px) saturate(1.9) brightness(1.1) }
.lg::before { content:""; position:absolute; inset:0; z-index:-1; border-radius:inherit; padding:1px; pointer-events:none;
  background:linear-gradient(135deg, rgb(255 255 255 / .6), rgb(255 255 255 / 0) 28%, rgb(255 255 255 / 0) 68%, rgb(255 255 255 / .28));
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask-composite:exclude }
dialog.lg { position:fixed }  /* .lg's relative would unseat the modal */
[data-glass=opaque] .lg { -webkit-backdrop-filter:none; backdrop-filter:none; background:var(--t-glass-solid) }
@media (prefers-reduced-transparency:reduce) { .lg { -webkit-backdrop-filter:none !important; backdrop-filter:none !important; background:var(--t-glass-solid) } }
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) { .lg { background:var(--t-glass-solid) } }
button, summary { transition:transform .4s cubic-bezier(.22, 1, .36, 1), background-color .2s } button:active:not(:disabled), summary:active { transform:scale(.95) }
@media (prefers-reduced-motion:reduce) { button, summary { transition:none } button:active:not(:disabled), summary:active { transform:none } }

/* Surfaces and controls, as the app draws them */
.card, .task, .hcard, .score, dialog .card { border:0; border-radius:var(--t-r-card) }
.btn { border:0; background:var(--t-fill2); color:var(--acc-ink); font-weight:500 }
.btn.yes { background:var(--acc); color:var(--on-yes); font-weight:600 }
.btn.no, .btn[data-act=cancel] { background:var(--t-deny); color:#fff }
.btn[data-act=approve] { background:var(--t-approve); color:#fff }
.btn[data-act=approve], .btn[data-act=cancel] { min-height:52px; border-radius:var(--t-r-button); padding-inline:22px; font-size:17px }
.btn[data-act=approve] { margin-left:auto; order:9 }
.chip { background:color-mix(in srgb, var(--acc) 20%, transparent); color:var(--acc-ink); text-transform:capitalize }
.link, .threadline .link, .needs { color:var(--acc-ink) }
input, textarea, select { border:0; background:var(--t-fill) }
dialog { border:0; border-radius:var(--t-r-panel); background:var(--t-glass-dialog); color:var(--ink); padding:22px }
dialog::backdrop { background:rgb(0 0 0 / .5); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px) }
[data-glass=opaque] dialog { background:var(--t-card) }
.badge { margin-left:auto; min-width:22px; padding:1px 7px; border-radius:99px; background:var(--acc); color:var(--on-yes); font:600 13px/1.5 inherit; text-align:center }

/* Header: a circle, the page title, a toolbar pill, floating over the content */
header { position:sticky; top:0; z-index:6; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:8px; pointer-events:none;
  padding:calc(12px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 18px max(16px, env(safe-area-inset-left));
  background:linear-gradient(var(--bg) 52%, transparent) }
header > * { pointer-events:auto }
header h1 { margin:0; font-size:17px; font-weight:600; text-align:center }
.opts { justify-self:start } .opts summary { display:grid; place-items:center; width:48px; height:48px; padding:0; border:0; border-radius:50%; color:var(--ink); font-size:22px; line-height:1 }
.opts .menu { position:absolute; top:calc(100% + 10px); left:0; z-index:9; width:min(320px, calc(100vw - 32px)); max-height:calc(100dvh - 120px); overflow:auto; display:flex; flex-direction:column; gap:8px; padding:14px; border-radius:var(--t-r-panel) }
.opts .menu label { position:static; width:auto; border:0; background:none; padding:4px } .opts .menu .btn { text-align:left }
.opts .more { display:flex; flex-wrap:wrap; gap:8px }
.tools { justify-self:end; display:flex; border-radius:999px; padding:0 4px }
.tools button { display:grid; place-items:center; width:48px; height:48px; border:0; background:none; color:var(--acc-ink); border-radius:50% }
.ic { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; flex:none }

/* Navigation (v13 S4): wide, a sidebar (Main chat, channels, Settings) and a right panel (Tasks, Make or Sessions) beside
   the chat, as the Mac app; phone, a floating tab bar (Chat, Tasks, Make, Computers), as the iPhone */
#pages { position:fixed; z-index:8; display:flex; padding:8px; overflow:auto }
#pages button { position:relative; display:flex; align-items:center; gap:12px; min-height:44px; border:0; background:none; color:var(--ink); white-space:nowrap }
#pages button[aria-current=page] { background:var(--t-fill2) }
.side button { width:100%; font-size:15px !important } .side h3 { margin:14px 14px 4px; font-size:12px; color:var(--dim); text-transform:uppercase; letter-spacing:.04em }
.pbtns { display:none } .pbtns button[aria-pressed=true] { background:var(--t-fill2) }
@media (min-width:1024px) {
  :root { --panel:0px }
  body.haspanel { --panel:min(400px, 34vw) }
  #app { padding-left:calc(var(--side) + 24px); padding-right:var(--panel) }
  #pages { left:12px; top:12px; bottom:12px; width:var(--side); flex-direction:column; gap:2px; padding:56px 10px 14px; border-radius:var(--t-r-panel) }
  #pages button { border-radius:999px; padding:8px 14px; font:17px/1.2 inherit }
  #pages [data-bar] { display:none } #pages .sfoot { margin-top:auto }
  .pbtns { display:flex }
  body { --cl:calc(var(--side) + 24px) }  /* on body, where .noside sets --side: on :root it kept the open sidebar's 288px */
  .composer { right:var(--panel) }
  header { padding-left:16px } header .opts { justify-self:start }
  body.haspanel main.panel { display:block !important; position:fixed; top:12px; right:12px; bottom:12px; width:calc(var(--panel) - 24px); max-width:none; margin:0; overflow:auto;
    padding:16px 16px 24px; border-radius:var(--t-r-panel); background:var(--t-glass-panel, var(--card)); z-index:9 }
}
@media (max-width:1023px) {
  :root { --tabbar:calc(76px + env(safe-area-inset-bottom)) }
  #pages { left:12px; right:12px; bottom:calc(10px + env(safe-area-inset-bottom)); justify-content:space-around; gap:2px; padding:6px; border-radius:34px }
  #pages button { flex:1; min-width:0; flex-direction:column; gap:2px; padding:6px 2px; border-radius:28px; font-size:10.5px; min-height:54px }
  #pages [data-side], #pages .side { display:none }
  #pages .badge { position:absolute; top:2px; right:10px; min-width:18px; margin:0; font-size:11px }
  .kb #pages { display:none }
  main { padding-bottom:calc(150px + var(--tabbar)) } #toast { bottom:calc(110px + var(--tabbar)) }
}

/* Composer: a glass pill over the content, never a bar */
.composer { position:fixed; left:var(--cl, 0px); right:0; bottom:calc(var(--kb) + var(--tabbar)); z-index:7; background:none; border:0; -webkit-backdrop-filter:none; backdrop-filter:none; padding:0 max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); pointer-events:none }
.composer > * { pointer-events:auto } .kb .composer { bottom:var(--kb) }
@media (min-width:900px) { .composer { bottom:var(--kb) } }
.composer form { max-width:calc(var(--col, 760px) - 32px); margin:0 auto; border-radius:999px }  /* the column's inner width: its edges meet the cards' */
.cform { padding:5px; border-radius:24px; display:flex; gap:6px; align-items:flex-end } .cform:not(.lg) { background:var(--card); border:1px solid var(--line) }  /* every composer: the chat's pill */
.cform textarea:focus-visible { outline:none } .cform:has(textarea:focus-visible) { outline:2px solid var(--acc); outline-offset:1px }
.cform textarea { border:0; min-width:0; resize:none; max-height:160px; flex:1; background:none; border-radius:22px; padding:11px 14px; min-height:44px }
.cform textarea::placeholder { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--dim) }  /* the theme's hint gray, not the browser's */  /* one line, like the app: "Message Agents" wrapped at 390 px */
.cform .btn.yes { flex:none; border-radius:50%; width:44px; height:44px; min-height:0; padding:0; font-size:0; position:relative }
.cform .btn.yes::after { content:""; position:absolute; inset:0; margin:auto; width:16px; height:16px; background:currentColor; -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 14V3M3 8l5-5 5 5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 14V3M3 8l5-5 5 5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat }
.sugg .btn { background:color-mix(in srgb, var(--acc) 18%, transparent) }

/* Analytics: model, agent, effort and job tables */
.scroll { overflow-x: auto; }
table.stats { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
table.stats th, table.stats td { text-align: right; padding: 5px 8px; border-bottom: 1px solid var(--line, rgba(128,128,128,.25)); white-space: nowrap; }
table.stats th:first-child, table.stats td:first-child { text-align: left; white-space: nowrap; position: sticky; left: 0; background: var(--t-card); }  /* the name stays put while the numbers scroll */
table.stats th { font-weight: 500; opacity: .65; }
#keyLogin { border: 0; padding: 0; margin: 0; min-width: 0 }
.keyHead { display:flex; gap:10px; align-items:center } .keyHead h2 { margin:0; min-width:0; overflow-wrap:anywhere }
.keyMark { width:32px; height:32px; border-radius:8px; display:grid; place-items:center; font-weight:700; background:var(--card); color:var(--ink); flex:none }
.keyMark:empty { display:none } .keyLink { display:inline-block; margin:6px 0 0 }
.keyErr { color:var(--no); background:var(--card); border-radius:var(--t-r-card); padding:10px 12px; margin:8px 0 }
#keyAdv { margin:12px 0 } #keyAdv summary { padding:6px 0; cursor:pointer }

/* Make (v13 S5): an ask box, then rows of cards, as the app's MakeView */
.mkask { display:flex; align-items:center; gap:10px; padding:8px 8px 8px 16px; border-radius:999px; margin:4px 0 8px }
.mkask input { flex:1; min-width:0; background:none; padding:10px 0 } .mkask .acc { color:var(--acc-ink) } .mkask .btn { min-height:40px; width:40px; padding:0 }
.mkrow { display:flex; gap:10px; overflow-x:auto; padding-bottom:4px; scrollbar-width:none }
.mk { flex:none; width:150px; min-height:120px; display:flex; flex-direction:column; align-items:flex-start; gap:4px; padding:14px; border:0; border-radius:18px; background:var(--t-fill); color:var(--ink); text-align:left; cursor:pointer }
.mk b { font-size:14px; line-height:1.25 } .mk small { font-size:12px } .mi { color:var(--acc-ink); font-size:20px; margin-bottom:auto }
@media (min-width:1024px) { body.haspanel .composer { right:var(--panel) } }  /* after the composer's own rule: the panel never covers it */

/* Channels and groups (v13 S14) */
.side .ch { display:flex; align-items:center; gap:10px; width:100%; min-height:40px; padding:6px 14px; border:0; border-radius:999px; background:none; color:var(--ink); text-align:left; cursor:pointer }
.side .ch.on, #pages button.on { background:var(--t-fill2) } .side .ch .badge { margin-left:auto }
.side .grp summary { padding:8px 14px 4px; color:var(--dim); font-size:13px; font-weight:600; cursor:pointer; list-style:none }
.side .grp .ch { padding-left:26px }
.newch input { width:100%; margin:4px 0; padding:8px 14px; border-radius:999px; background:none; color:var(--dim) } .newch input:focus { background:var(--t-fill); color:var(--ink) }
.chmenu { display:flex; flex-direction:column; gap:8px; margin:6px 0; padding:12px; border-radius:18px }
.chmenu form { display:flex; gap:6px } .chmenu input, .chmenu select { flex:1; min-width:0; padding:8px 12px; border-radius:12px }
@media (min-width:1024px) { #menuChannels { display:none } }
.side .grp .ch { padding-left:30px !important }
@media (min-width:1024px) { #pages .pl { display:none } } @media (max-width:1023px) { #pages .wl { display:none } }

/* Tasks segments (v14 B1), as the app's Active and Up next */
.seg { display:flex; gap:4px; padding:4px; border-radius:999px; background:var(--t-fill); margin:4px 0 12px }
.seg button { flex:1; min-height:36px; border:0; border-radius:999px; background:none; color:var(--dim); font-weight:600; cursor:pointer }
.seg button[aria-selected=true], .seg button[aria-checked=true] { background:var(--t-fill2); color:var(--ink) }

/* Settings rows and pages (v14 B2), as the app's */
.shead { display:flex; align-items:center; gap:12px; margin:4px 0 12px } .shead h2 { margin:0; font-size:22px; color:var(--ink); text-transform:none; letter-spacing:0 }
.srow { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:52px; padding:10px 16px; margin:0 0 2px; border:0; border-radius:14px; background:var(--t-fill); color:var(--ink); text-align:left; font:inherit; cursor:pointer }
.srow:hover { background:var(--t-fill2) } .srow select { min-height:36px; border-radius:10px; padding:4px 8px }
.sfind { width:100%; margin:8px 0; padding:10px 14px; border-radius:12px } #settings h3 { margin:18px 0 8px; font-size:13px; color:var(--dim); text-transform:uppercase; letter-spacing:.04em }

/* Chat like Claude Duet (v14 B3): one quiet column; your words in bubbles, the manager's as plain text; one status pill */
/* The chat column, as ChatLayout.swift: 68% of the area beside the sidebar and the panel, 760 px at least, 1120 px at most,
   never wider than that area. The messages, the composer and the notes over it share it, so they share one center */
body { --area:calc(100vw - var(--cl, 0px) - var(--panel, 0px)); --col:min(var(--area), max(760px, calc(var(--area) * .68)), 1120px) }
#chat { max-width:var(--col) }
.duet { margin:14px 0 } .duet.me { display:flex; justify-content:flex-end } .duet.me .you { max-width:78% }
.duet.ai .said { background:none; padding:0; max-width:100%; border-radius:0; line-height:1.55 }
.ttl { display:flex; flex-direction:column; align-items:center; gap:4px }
.pill { padding:3px 12px; border-radius:999px; background:var(--t-fill2); color:var(--ink); font-size:13px; font-weight:600 }
.composer .foot { margin:6px 0 0; text-align:center; font-size:12px; color:var(--dim) }
#chat { padding-bottom:calc(230px + var(--dock, 0px) + var(--tabbar) + env(safe-area-inset-bottom)) }  /* room for suggestions, the bar and its footnote */

/* Sign-in like Optimus (v14 B4): a headline beside a card at wide width, the card under it on a phone */
.login { min-height:100dvh; display:grid; grid-template-columns:1fr; align-content:center; gap:28px; max-width:1100px; margin:0 auto; padding:72px 20px 32px; position:relative }
.login::before { content:""; position:fixed; inset:0; z-index:-1; opacity:.35; background-image:linear-gradient(var(--t-line) 1px, transparent 1px), linear-gradient(90deg, var(--t-line) 1px, transparent 1px); background-size:8.33vw 12.5vh }
.lbrand { position:absolute; top:22px; left:20px; font-size:20px; font-weight:700 }
.lkick { color:var(--dim); font:13px ui-monospace, monospace } .lkick::before { content:""; display:inline-block; width:28px; height:1px; margin-right:10px; vertical-align:middle; background:var(--dim) }
.lhero h1 { margin:18px 0 0; font-size:clamp(2.4rem, 6vw, 4.6rem); line-height:.95; letter-spacing:-.02em } .lhero p { color:var(--dim); font-size:18px; max-width:28em }
.lcard { display:flex; flex-direction:column; gap:10px; width:100%; max-width:440px; padding:28px; border-radius:var(--t-r-panel); background:var(--t-card); border:1px solid var(--t-line) }
.lcard h2 { margin:0; font-size:24px } .lcard input { min-height:48px; padding:0 16px; border-radius:12px; border:1px solid var(--t-line) }
.lgo { min-height:54px; font-size:16px } .lalt { min-height:48px } .lreset { background:none; border:0; color:var(--dim); text-decoration:underline; cursor:pointer }
.lor { display:flex; align-items:center; gap:10px; color:var(--dim); font:12px ui-monospace, monospace } .lor span { flex:1; height:1px; background:var(--t-line) }
.linvite { text-align:center; color:var(--dim); font:12px ui-monospace, monospace } #codeRow { display:flex; flex-direction:column; gap:10px } #codeRow[hidden] { display:none }
@media (min-width:900px) { .login { grid-template-columns:1fr 1fr; align-items:center } .lcard { justify-self:end } }
@media (prefers-reduced-motion:no-preference) { .lhero, .lcard { animation:rise .8s ease both } .lcard { animation-delay:.15s } @keyframes rise { from { opacity:0; transform:translateY(16px) } } }
.mwhy { margin-top:4px; font-size:12px; color:var(--dim) }

/* Computers (v14 B10): what each can do, and Watch */
.where { list-style:none; padding:0; margin:0 0 8px; display:grid; gap:8px }
.where .task { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px 12px }
.where .task .name { flex:1 1 140px; min-width:0 }
.where .task > span:last-child { display:flex; gap:6px; align-items:center }
.task.wait { display:flex; align-items:center; gap:8px; padding:10px 12px; margin-top:8px }
.task.wait .name { flex:1; min-width:0 }
.caps { width:100%; border-collapse:collapse; font-size:14px } .caps th, .caps td { text-align:left; padding:8px; border-bottom:1px solid var(--t-line) } .caps th { color:var(--dim); font-weight:600 }
#osHow ol { padding-left:20px; line-height:1.6 } #osHow code { word-break:normal; overflow-wrap:anywhere }  /* a command breaks between its words; only a word too long for the line breaks inside */
dialog.watch { width:min(96vw, 1400px); max-width:none; padding:12px; border:0; border-radius:var(--t-r-panel); background:var(--t-card); color:var(--ink) }
dialog.watch .top { display:flex; align-items:center; gap:12px; margin-bottom:8px }
.wscreen { outline:none; border-radius:10px; overflow:hidden; background:#000 } .wscreen:focus { box-shadow:0 0 0 2px var(--acc) }
.wscreen img { display:block; width:100%; height:auto; cursor:crosshair; user-select:none; -webkit-user-drag:none }

/* Desktop power (v14 B9) */
@media (min-width:1100px) { body.haspanel { --panel:var(--panelw, min(400px, 34vw)) } }
.panelgrip { position:fixed; top:12px; bottom:12px; width:10px; right:calc(var(--panel) - 17px); cursor:col-resize; z-index:30; display:none }
@media (min-width:1100px) { body.haspanel .panelgrip { display:block } .panelgrip:hover { background:linear-gradient(90deg, transparent 4px, var(--acc) 4px 6px, transparent 6px) } }
.dropchip { display:flex; align-items:center; gap:8px; margin:0 0 6px; padding:6px 12px; border-radius:999px; background:var(--t-fill2); width:max-content; max-width:100%; font-size:13px }
.dropchip[hidden], .dropchips[hidden] { display:none }
.dropchips { display:flex; flex-wrap:wrap; gap:6px; margin:0 auto 6px; max-width:calc(var(--col, 760px) - 32px) }  /* several waiting files, one chip each, in the column (as .usage) */
.dropchips .dropchip { margin:0; padding:0 0 0 12px }
.dropchip .x { min-width:44px; min-height:44px; font-size:18px }  /* each remove is a 44 px target */
body.dropping #chat { outline:2px dashed var(--acc); outline-offset:-8px; border-radius:18px }
dialog.keys { border:0; border-radius:var(--t-r-panel); background:var(--t-card); color:var(--ink); padding:20px; min-width:320px }
dialog.keys td { padding:6px 12px 6px 0 } kbd { font:12px ui-monospace, monospace; padding:2px 6px; border-radius:6px; background:var(--t-fill2) }

/* Motion (v14 B9): one spring curve; panels and menus come out, new things rise. Off with reduced motion. */
:root { --spring:cubic-bezier(.32, .72, 0, 1) }
@media (prefers-reduced-motion:no-preference) {
  body.haspanel main.panel { animation:panelIn .45s var(--spring) both }
  @keyframes panelIn { from { opacity:0; transform:translateX(28px) scale(.985) } }
  #opts[open] .menu { animation:menuIn .42s var(--spring) both; transform-origin:top left }
  @keyframes menuIn { from { opacity:0; transform:translateY(-10px) scale(.96) } }
  main.enter { animation:rise .35s var(--spring) both }
  #chat > .fresh { animation:rise .45s var(--spring) both }
  @keyframes rise { from { opacity:0; transform:translateY(8px) } }
  .seg button, .srow, .ch, #pages button { transition:background-color .25s var(--spring), color .25s, transform .4s var(--spring) }
  dialog[open]:not(.full) { animation:menuIn .35s var(--spring) both } dialog.full[open] { animation:fadeIn .25s ease both } @keyframes fadeIn { from { opacity:0 } }
}
.duet.me { flex-direction:column; align-items:flex-end } .duet .quote { margin:0 0 4px }
.quote { margin:10px 0 -6px 46px; padding:2px 0 2px 10px; border-left:2px solid var(--t-line); color:var(--dim); font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:70% }
.quote.mine { margin-left:auto } .quote span { color:var(--ink); font-weight:600 }

/* The phone drawer (v14, as Duet's): the menu from the left, the page pushed aside on one spring */
@media (max-width:1023px) {
  #app > main, #app > .composer, #pages, header .ttl, header .tools { transition:transform .5s var(--spring), border-radius .5s var(--spring), filter .5s }
  body.drawer #app > main, body.drawer #app > .composer, body.drawer #pages, body.drawer header .ttl, body.drawer header .tools {
    transform:translateX(78vw) scale(.94); border-radius:28px; filter:brightness(.6); pointer-events:none }
  body.drawer #app > main { overflow:hidden }
  #opts[open] .menu { position:fixed; inset:0 auto 0 0; width:78vw; max-width:none; max-height:none; margin:0; border-radius:0; overflow:auto; z-index:60;
    padding:calc(env(safe-area-inset-top) + 20px) 14px 24px; border:0; gap:4px; background:var(--bg, #0b0b0c); box-shadow:none; animation:drawerIn .5s var(--spring) both }
  @keyframes drawerIn { from { transform:translateX(-30%); opacity:0 } }
  body.drawer #opts > summary { visibility:hidden } #opts[open] .menu { border-right:0 }
  html:has(body.drawer), body.drawer { overflow:hidden; overscroll-behavior:none }
  #opts[open] .menu .btn { background:none; color:var(--ink); min-height:44px; font-weight:500; padding:8px 12px }
}
@media (prefers-reduced-motion:reduce) { body.drawer #app > main, #opts[open] .menu { transition:none; animation:none } }

.menu .dhead { display:none } .menu .every { display:none }
@media (max-width:1023px) {
  .menu .dhead { display:flex; align-items:center; gap:10px; padding:8px 8px 16px; margin-bottom:8px; border-bottom:1px solid var(--t-line) } .dbrand { font-size:22px; font-weight:700 }
  .menu .every { display:flex; align-items:center; gap:12px; min-height:60px; padding:8px 12px; border:0; border-radius:18px; background:none; color:var(--ink); text-align:left; font:inherit; font-size:17px; cursor:pointer }
  .menu .every .ic { color:var(--acc-ink) } .menu .every small { display:block; font-size:12.5px; color:var(--dim) }
  .menu .side .ch { min-height:48px; font-size:16px; border-radius:18px }
}
/* The composer sits on a soft fade (Duet): what scrolls under it dims instead of clashing */
.composer::before { content:""; position:absolute; inset:-56px 0 calc(-1 * (var(--tabbar, 0px) + 24px)); z-index:-1; pointer-events:none;
  background:linear-gradient(to bottom, transparent, var(--bg, #000) 56px) }
/* Talk (Duet): an empty box offers Talk; typing (or a held file) turns it into Send */
.cform .talk { display:inline-flex; align-items:center; gap:6px; min-height:40px; margin:4px; padding:0 16px; border:0; border-radius:999px; background:var(--ink); color:var(--bg, #000); font-weight:700; cursor:pointer }
.cform .talk svg { width:18px; height:18px }
#send:has(#msg:placeholder-shown) button[type=submit] { display:none }
#send:not(:has(#msg:placeholder-shown)) .talk, .composer:has(#dropChip:not([hidden])) .talk { display:none }
.composer:has(#dropChip:not([hidden])) #send button[type=submit] { display:inline-flex }
.opts .menu .grp summary { all:unset; display:block; padding:10px 12px 4px; color:var(--dim); font-size:13px; font-weight:600; cursor:pointer }

/* Inside the phone or Mac app (v14 C2, D5): the Settings page alone; the app's own bar goes back */
html.inapp #pages, html.inapp header, html.inapp .composer, html.inapp .panelgrip, html.inapp #demoBar, html.inapp .shead [data-sback] { display:none !important }
html.inapp #app { padding:8px 16px calc(32px + env(safe-area-inset-bottom)) !important } html.inapp main { padding-top:0 !important; max-width:none } html.inapp .shead h2 { display:none }
html.inapp body { background:transparent }
/* Reactions (v14 parity) */
.rpills { display:flex; gap:6px; margin-top:4px; flex-wrap:wrap } .duet.me .rpills { justify-content:flex-end }
.rpill { border:1px solid var(--t-line); background:var(--t-fill); color:var(--ink); border-radius:999px; padding:2px 8px; font-size:13px; cursor:pointer } .rpill.mine { border-color:var(--acc-ink) }
.rpick { position:fixed; z-index:80; display:flex; gap:2px; padding:6px; border-radius:999px; background:var(--t-card); box-shadow:0 8px 24px rgb(0 0 0 / .4) }
.rpick button { border:0; background:none; font-size:22px; width:40px; height:40px; border-radius:50%; cursor:pointer } .rpick button:hover { background:var(--t-fill2) }

/* Connections (v14 B12, Duet's) */
.chero { display:flex; flex-direction:column; align-items:center; gap:10px; margin:8px 0 18px } .chero b { font-size:22px }
.corb { width:84px; height:84px; border-radius:50%; background:radial-gradient(circle at 50% 50%, var(--acc) 0 30%, var(--t-fill2) 31%) }
.cgroup { border-radius:20px; background:var(--t-fill); overflow:hidden; margin-bottom:12px } .cgroup .srow { border-radius:0; margin:0; background:none; border-bottom:1px solid var(--t-line) } .cgroup .srow:last-child { border-bottom:0 }
.srow.cap b { display:block; font-weight:600 } .srow.cap small, .cname small { display:block; font-size:13px }
.capr, .cname { display:flex; align-items:center; gap:12px } .cname > span { display:flex; flex-direction:column }
.clogo { width:40px; height:40px; flex:none; border-radius:12px; background:var(--t-fill); display:grid; place-items:center; padding:7px; object-fit:contain; font-weight:700; color:var(--ink) }
.clogo.add { background:none; border:1.5px dashed var(--dim); color:var(--dim); font-size:20px; padding:0 }
.chead { display:flex; align-items:center; justify-content:space-between } .chead .link { background:none; border:0; color:var(--dim); cursor:pointer; font-size:15px }
.btn.wide { width:100%; min-height:52px; margin:0 0 14px }
.clogo img { width:100%; height:100%; object-fit:contain }
.clogo:has(img) { background:#000 }  /* a real logo on Duet's black tile; the letter on the theme's fill */

/* v15-1: a task's chip, its view and its status sheet (Duet's) */
.taskchip { display:inline-flex; align-items:center; gap:8px; margin:12px 0 2px 46px; padding:4px 10px 4px 6px; border:0; border-radius:999px; background:none; color:var(--dim); font:inherit; font-size:14px; cursor:pointer }
.taskchip:hover { color:var(--ink); background:var(--t-fill) } .taskchip::before { content:""; width:14px; height:14px; margin-left:-30px; margin-right:12px; border:2px solid var(--t-line); border-right:0; border-bottom:0; border-radius:10px 0 0 0 }
.tc { width:20px; height:20px; border-radius:6px; background:#000; display:inline-grid; place-items:center; position:relative; font-size:11px; color:var(--dim) } .tc::before { content:"≡" } .tc.spin::before { content:none }
.tc.spin::after { content:""; position:absolute; inset:4px; border-radius:50%; border:2px solid #3b82f6; border-top-color:transparent; animation:tspin 1s linear infinite } @keyframes tspin { to { transform:rotate(360deg) } }
dialog.taskview { width:min(760px, 100vw); height:min(900px, 100dvh); max-width:none; max-height:none; padding:0; border:0; border-radius:var(--t-r-panel); background:var(--bg, #000); color:var(--ink); display:none; flex-direction:column }
dialog.taskview[open] { display:flex }
.tvhead { display:flex; align-items:center; gap:10px; padding:12px } .tvpill { flex:1; display:flex; align-items:center; gap:12px; text-align:left; padding:8px 16px 8px 8px; border:1px solid var(--t-line); border-radius:999px; background:var(--t-fill); color:var(--ink); font:inherit; cursor:pointer }
.tvpill b { display:block } .tvpill small { color:var(--dim) } .tvpill small.work { color:#60a5fa } .tvpill small.need { color:var(--acc-ink) }
.tvicon { width:36px; height:36px; border-radius:10px; background:#000; display:grid; place-items:center }
.tvbody { flex:1; overflow:auto; padding:8px 16px } .tvbody .working { animation:pulse 1.6s ease infinite } @keyframes pulse { 50% { opacity:.4 } }
/* A task's updates (Mitch, 11-21): open by default, who over the words; long ones four lines and Show all; a tap folds one */
.tvup { margin:6px 0 } .tvline { display:flex; align-items:center; gap:6px; width:100%; min-height:44px; padding:0; border:0; background:none; color:var(--dim); font:inherit; font-size:13px; text-align:left; cursor:pointer }
.tvwho { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis } .tvgist { display:none } .tvup.folded .tvgist { display:inline }
.tvtext { margin:0 0 4px 22px; font-size:15px; line-height:1.5; overflow-wrap:anywhere; color:var(--ink) } .tvtext :is(p, ol, ul, pre) { margin:0 0 6px }
.tvtext.clamp { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:4; line-clamp:4; overflow:hidden }
.tvmore { margin-left:22px; min-height:44px; font-size:13px; font-weight:600 } .tvup.folded .tvtext, .tvup.folded .tvmore { display:none }
#tvreply { margin:8px 12px 12px }
dialog.tvstatus { width:min(560px, 100vw); max-height:86dvh; border:0; border-radius:28px 28px 0 0; padding:22px; background:var(--t-card); color:var(--ink); margin-bottom:0 }
.tvstatus .top { display:flex; align-items:center; gap:8px } .tvstatus h2 { margin:0; font-size:22px } .tvstatus h3 { font-size:15px; margin:18px 0 8px }
.steps, .ups { list-style:none; padding:0; margin:0 } .tvst { display:flex; gap:12px; padding:7px 0 } .tvst .tvmk { width:20px; flex:none; color:var(--dim) } .tvst.completed .tvmk { color:var(--ink) } .tvst.in_progress .tvmk { color:#60a5fa } .tvst.need .tvmk { color:var(--acc-ink) }
.ups li { padding:6px 0 6px 16px; position:relative } .ups li::before { content:"•"; position:absolute; left:0 } .ups small { display:block }
.wave { height:12px; margin:14px 0; background:radial-gradient(circle at 6px -2px, transparent 6px, var(--t-line) 6.5px 7.5px, transparent 8px) 0 0 / 12px 12px repeat-x }
/* W5: the sidebar toggle (wide only) */
.sidetoggle { display:none } .sidetoggle.lg { font-size:18px }
@media (min-width:1024px) {
  /* in the sidebar's top corner, as the app's; with the sidebar hidden, beside the menu button (never on top of it) */
  .sidetoggle { display:grid; place-items:center; position:fixed; top:18px; left:calc(var(--side) - 60px); z-index:70; width:40px; height:40px; border-radius:50%; border:0; background:var(--t-fill); color:var(--ink); cursor:pointer }
  .sidetoggle .ic { width:20px; height:20px } body.noside .sidetoggle { left:76px }
  body.noside { --side:0px } body.noside #pages { transform:translateX(-110%); opacity:0; pointer-events:none }
  #pages { transition:transform .45s var(--spring), opacity .3s } #app, .composer { transition:padding .45s var(--spring), left .45s var(--spring) }
}


/* 1:1 with the app (v15): iOS type scale (17 body, 15 secondary, 13 caption), cards, top bar, composer, tab bar */
body { font-size:17px; line-height:1.35 }
.msg.bare { display:block; margin-top:14px } .msg.bare .mb { max-width:none }
.card { border-radius:28px; padding:18px 20px } .card .top { gap:10px; font-size:17px; font-weight:600 } .card .top .time { font-size:15px; font-weight:400; color:var(--dim) }
.card .text { font-size:17px; line-height:1.4; margin-top:8px }
.chip { font-size:13px; font-weight:600; padding:3px 9px; border-radius:999px }
.chip.t-acc { background:color-mix(in srgb, var(--acc) 16%, transparent); color:var(--acc-ink) } .chip.t-blue { background:#3b82f626; color:#60a5fa }
.chip.t-purple { background:#a855f726; color:#c084fc } .chip.t-indigo { background:#6366f126; color:#818cf8 } .chip.t-red { background:#ef444426; color:#f87171 }
.chip.t-gray { background:#8e8e9326; color:#a1a1aa } .chip.t-green { background:#22c55e26; color:#4ade80 }
.ran { margin-top:12px; font:13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color:var(--dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.rrep { display:inline-flex; align-items:center; gap:10px; margin-top:12px; font-size:17px; color:var(--acc-ink) } .rrep .ic { width:20px; height:20px }
.donel { display:flex; align-items:center; gap:10px; margin-top:12px; font-size:17px; color:var(--dim) } .donel .ck { width:22px; height:22px; border-radius:50%; background:var(--t-fill2); display:grid; place-items:center; font-size:12px; color:var(--ink) }
/* top bar: the manager's face in the center, its state under it; your avatar on the right */
.orb { pointer-events:auto; width:64px; height:64px; padding:0; border-radius:50%; border:1px solid var(--t-line); background:var(--t-fill); overflow:hidden; cursor:pointer }
.orb img { width:100%; height:100%; object-fit:cover; display:block } .orb img:not([src]), .orb img[src=''] { visibility:hidden }
body:not(.on-chat) .orb { display:none } body.on-chat header h1 { display:none }
.ttl { gap:0 } .ttl .pill { margin-top:-8px; position:relative; font-size:13px }
#meBtn { pointer-events:auto; margin-left:8px; flex:none; width:48px; height:48px; border-radius:50%; border:0; background:#bcd3f5; color:#16233a; font-weight:700; font-size:17px; cursor:pointer }
/* composer: + and mic beside Talk, as the app's */
.cform .cplus, .cform .cmic { flex:none; width:40px; height:40px; border:0; border-radius:50%; background:none; color:var(--ink); font-size:26px; line-height:1; cursor:pointer }
.cform .cmic svg { width:22px; height:22px } .cform .cmic.on { color:var(--acc-ink) }
@media (max-width:1023px) {
  /* tab bar: Chat, Tasks and Make in one pill, Computers in its own circle */
  #pages { right:96px; overflow:visible } #pages [data-tab=sessions] { position:absolute; right:-84px; top:50%; transform:translateY(-50%); width:72px; height:72px; flex:none; border-radius:50%; background:var(--t-glass, var(--t-card)); border:1px solid var(--t-line) }
  #pages [data-tab=sessions] span { display:none } #pages button { font-size:11px }
}

.duet.me .you { width:fit-content; max-width:min(78%, 680px) }  /* words stay near 75 characters a line however wide the column */
.tools { align-items:center }
.duet { align-self:stretch; width:100%; box-sizing:border-box }  /* a column parent must not shrink a row to its words */

/* The Connect card (Duet's) */
.ccard { padding:20px } .cchead { display:flex; gap:16px; align-items:flex-start } .cchead b { display:block; font-size:19px }
.cchead small { display:block; margin-top:2px; font-size:16px; color:var(--dim); line-height:1.35 }
.cclogo { width:56px; height:56px; flex:none; border-radius:14px; background:#000; border:1px solid var(--t-line); display:grid; place-items:center; padding:10px; font-weight:700; font-size:20px; color:#fff }
.cclogo img { width:100%; height:100%; object-fit:contain }
.ccbtns { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:20px }
.ccbtns .btn { min-height:52px; border-radius:999px; font-size:17px; font-weight:600 }
.ccbtns .ccno { background:none; border:1px solid var(--t-line); color:var(--ink) } .ccbtns .ccgo { background:#f4f2ee; color:#111; border:0 }

/* v16 W2: the manager's words in a gray bubble (the app's), a hover bar with the time, task links (W3) */
.duet.ai .said { background:var(--t-card); padding:10px 14px; border-radius:18px; max-width:min(78%, 680px); width:fit-content }
.said pre, .said table { max-width:100%; overflow-x:auto } .said table { display:block }  /* a long code line or a wide table scrolls inside its bubble: the chat never widens */
.duet.ai + .duet.ai { margin-top:4px }
.duet { position:relative } .hov, .htime { display:none }
@media (hover:hover) and (min-width:900px) {
  .duet:hover .hov { display:flex; position:absolute; top:50%; transform:translateY(-50%); gap:2px; padding:3px; border-radius:12px; background:var(--glass); border:1px solid var(--t-rim) }
  .duet:hover .htime { display:block; position:absolute; top:50%; transform:translateY(-50%); color:var(--dim); font-size:13px; white-space:nowrap }
  .duet.ai:hover .hov { left:calc(min(78%, 100%) + 12px) } .duet.ai:hover .htime { left:calc(min(78%, 100%) + 132px) }
  .duet.me:hover .hov { right:calc(78% + 12px) } .duet.me:hover .htime { right:calc(78% + 132px) }
  .hov button { background:none; border:0; color:var(--ink); width:32px; height:30px; border-radius:8px; cursor:pointer; font-size:15px } .hov button:hover { background:var(--t-fill) }
}
.tlink { display:inline-flex; align-items:center; gap:5px; border:0; border-radius:8px; padding:1px 7px; background:var(--t-fill2); color:var(--acc-ink); font:inherit; cursor:pointer; vertical-align:baseline }
.tm { display:inline-grid; place-items:center; width:16px; height:16px; font-size:11px } .tm.work { border:2px solid var(--acc-ink); border-right-color:transparent; border-radius:50%; width:11px; height:11px; animation:spin 1s linear infinite }
.rpick .mwhy { padding:6px 10px; font-size:12px } .rpick [data-copy], .rpick [data-task] { padding:6px 12px; font-size:14px }
@keyframes spin { to { transform:rotate(360deg) } }
/* v16 W4: the usage note over the composer (Duet's phone shot): one gray row, a link and ✕ */
.usage { display:flex; align-items:center; gap:12px; margin:0 auto 8px; max-width:calc(var(--col, 760px) - 32px); padding:10px 14px; border-radius:16px; background:var(--glass); border:1px solid var(--t-rim); color:var(--dim); font-size:15px }
.usage span { flex:1 } .usage .x { background:none; border:0; color:var(--dim); font-size:16px; cursor:pointer } .usage .link { color:var(--acc-ink) }
body:not(.on-chat) #usageBtn { display:none }  /* the usage button lives on Chat only, as in the app */
@media (max-width:1023px) {  /* a phone: with the usage button the right side is 112 px, so the pill under the face gives way (as the app's)
  and the face stays on the middle line (layout.spec): 100vw less both sides at 112 px, the header's 16 px pads and 8 px gaps */
  header:has(#usageBtn:not([hidden])) .ttl .pill { max-width:calc(100vw - 272px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
}
#usagePop { position:fixed; inset:auto; margin:0; width:min(380px, calc(100vw - 32px)); max-height:calc(100dvh - 120px); overflow:auto; padding:14px 18px 6px; border-radius:20px; border:1px solid var(--t-rim); background:var(--card); color:var(--ink); box-shadow:0 14px 36px rgb(0 0 0 / .3) }
#usagePop .phead { display:flex; align-items:center; gap:12px } #usagePop h2 { margin:0; flex:1; font-size:17px; font-weight:600 }
#usageBody section { padding:12px 0; border-top:1px solid var(--line) } #usageBody section:first-child { border-top:0 } #usageBody h3 { margin:0 0 8px; font-size:13px; font-weight:600; color:var(--dim) }
#usageBody .top { display:flex; gap:8px; align-items:baseline; font-weight:600; margin-bottom:6px } #usageBody .top .sp { flex:1 } #usageBody .bars span { font-variant-numeric:tabular-nums }
#usageBody .ustate { font-size:13px; white-space:nowrap; color:var(--dim); font-weight:500 } #usageBody .ustate.uout { color:var(--t-deny); font-weight:600 } #usageBody p { margin:8px 0 0 } .bar.out i { background:var(--t-deny) }
#spage .card[data-acct] .chip { text-transform:none }  /* the app's words: "At its limit", not "At Its Limit" */
#spage .card[data-acct] .chip.t-gray { color:var(--dim) }  /* t-gray text is 2.5:1 on the light card */
#spage .card .ureset { display:block; font-size:12px; margin:2px 0 8px; font-variant-numeric:tabular-nums }
#spage .card .uback { margin:4px 0 8px; color:var(--t-deny); font-weight:600; font-variant-numeric:tabular-nums }
.usage .x { display:grid; place-items:center; width:44px; height:44px; margin:-10px -10px -10px 0 } .usage .x .ic { width:18px; height:18px }
@media (prefers-reduced-motion:no-preference) {  /* one quiet entrance: it drops 4px into place, out of the button */
  #usagePop { opacity:0; transform:translateY(-4px); transition:opacity .16s cubic-bezier(.16,1,.3,1), transform .16s cubic-bezier(.16,1,.3,1), display .16s allow-discrete, overlay .16s allow-discrete }
  #usagePop:popover-open { opacity:1; transform:none } @starting-style { #usagePop:popover-open { opacity:0; transform:translateY(-4px) } } }
/* v16 W8: the shortcuts dialog (Duet's list) */
dialog.keys { width:min(560px, calc(100vw - 32px)) } dialog.keys .top { display:flex; justify-content:space-between; align-items:center }
dialog.keys h3 { margin:16px 0 4px; font-size:15px } dialog.keys table { width:100%; border-collapse:collapse } dialog.keys tr { border-bottom:1px solid var(--t-line) }
dialog.keys td:last-child { text-align:right; white-space:nowrap; color:var(--dim) }
/* v16 W5: Tasks (Duet's phone shots): four tabs, groups with counts, a box per row and a one-line state */
.thead { display:flex; align-items:center; gap:6px } .thead h2 { margin:0; font-size:17px; font-weight:600 } .thead .ic { min-width:36px; padding:6px }
.tsegs { background:none; padding:0; gap:2px; justify-content:flex-start } .tsegs button { flex:none; padding:0 10px; white-space:nowrap } .tsegs { overflow-x:auto; scrollbar-width:none }  /* all four tabs fit, or the row scrolls; a label is never cut */
.tgroup summary { list-style:none; cursor:pointer; color:var(--ink); font-weight:500; margin:14px 0 6px } .tgroup summary::-webkit-details-marker { display:none }
.tgroup summary::after { content:"›"; display:inline-block; margin-left:8px; color:var(--dim); transition:transform .15s } .tgroup[open] > summary::after { transform:rotate(90deg) }  /* a closed group (Scheduled) shows it opens */
.trow { display:flex; align-items:flex-start; gap:14px; padding:10px 4px; cursor:pointer; border-radius:12px } .trow:hover { background:var(--t-fill) }
.trow .tt { flex:1; min-width:0 } .trow b { display:block; font-weight:500; font-size:16px } .trow small { display:block; color:var(--dim); font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.trow small.look, .trow small.need { color:var(--acc-ink) } .trow small.done { color:var(--t-approve) }
.tbox { flex:none; width:22px; height:22px; margin-top:2px; border:1.5px solid var(--dim); border-radius:6px; display:grid; place-items:center; font-size:12px }
.tbox.idea { border-style:dashed; border-radius:50% } .tbox.clock { border:0 } .tbox.work { border-radius:50%; border-color:var(--acc-ink); border-right-color:transparent; animation:spin 1s linear infinite }
.tupd { text-align:right; font-size:13px; margin:-4px 0 0 } #tq { width:100%; margin:6px 0 }
.tsegs { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none } .tsegs button { white-space:nowrap }
@media (max-width:899px) { .thead h2 { visibility:hidden } }  /* the phone's top bar already says Tasks */
/* v16 W6: Sessions (Duet's): New session row, groups, one row each with a dot until opened, Computers, In the cloud */
.snew { display:flex; align-items:center; gap:22px; width:100%; margin:10px 0 18px; padding:14px 20px; border-radius:14px; border:1px solid var(--t-line); background:none; color:var(--ink); font:inherit; font-size:17px; cursor:pointer }
.snew span { font-size:22px; color:var(--dim) }
.sgh { margin:22px 0 6px; font-size:16px; font-weight:500; color:var(--ink) }
.srow { display:flex; align-items:center; gap:14px; padding:10px 4px; list-style:none; cursor:pointer; color:var(--ink); text-decoration:none; width:100%; background:none; border:0; font:inherit; text-align:left }
.srow::-webkit-details-marker { display:none } .srow .tt { flex:1; min-width:0 } .srow b { display:block; font-weight:400; font-size:17px } .srow b.new { font-weight:600 }
.srow small { display:block; color:var(--dim); font-size:14px } .rfr { display:inline-block; font-style:normal; font-size:13px; color:var(--t-approve); background:color-mix(in srgb, var(--t-approve) 18%, transparent); border-radius:8px; padding:1px 8px; margin:2px 0 }
.stile { position:relative; flex:none; width:38px; height:38px; border-radius:10px; display:grid; place-items:center; background:color-mix(in srgb, var(--acc) 30%, var(--t-card)); color:var(--acc-ink); font:600 12px ui-monospace, monospace }
.stile.dot::after { content:""; position:absolute; top:-3px; right:-3px; width:9px; height:9px; border-radius:50%; background:#e2764a }
.stile.mac { background:var(--t-fill) } .stile.mac.on::after { content:""; position:absolute; bottom:2px; right:2px; width:8px; height:8px; border-radius:50%; background:var(--t-approve) }
.sess[open] > .card { margin:4px 0 10px } .sall, .sck { margin:4px 0 } .sprompts { margin-top:18px }
/* v16 W7: Settings (Duet's sections; the app's grouped rows) */
.sset { display:grid; grid-template-columns:220px 1fr; gap:24px; align-items:start } .snav { position:sticky; top:12px; display:flex; flex-direction:column; gap:2px }
.snav h2 { font-size:15px; color:var(--dim); font-weight:500; margin:0 0 8px 12px } .snavb { text-align:left; padding:10px 12px; border-radius:10px; border:0; background:none; color:var(--ink); font:inherit; font-size:16px; cursor:pointer }
.snavb[aria-current=true] { background:var(--t-fill2) } .sbody h3 { font-size:15px; font-weight:600; margin:22px 0 8px }
.sgrp { background:var(--t-card); border-radius:16px; padding:2px 16px; margin:8px 0 } .srowx { display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--t-line); width:100% }
.sgrp > .srowx:last-child { border-bottom:0 } .srowx code.mpath { display:block; margin-top:4px; font-size:13px; overflow-wrap:anywhere; color:var(--ink) } .srowx.mbtns { flex-wrap:wrap; justify-content:flex-end } .srowx.mbtns .btn { max-width:100%; white-space:normal } .srowx > span:first-child, .srowx.rad > span, .srowx b + small { flex:1 } .srowx small { display:block; color:var(--dim); font-size:14px; font-weight:400 } .srowx b { font-weight:500 }
.btnrow { background:none; border:0; border-bottom:1px solid var(--t-line); color:var(--ink); font:inherit; text-align:left; cursor:pointer; justify-content:space-between }
.srowx input[type=text], .srowx input:not([type]), .srowx input[name] { flex:1 } .sseg { width:auto; margin:0; flex-wrap:nowrap } .sseg button { flex:none; padding:0 10px; white-space:nowrap } .rad input { margin:4px 0 0 } .rad { align-items:flex-start } .srowx input[type=radio], .srowx input[type=checkbox]:not([role=switch]) { flex:none; width:auto; min-width:0 }  /* a radio beside short text never grows */
.prow { display:flex; align-items:center; gap:14px; padding:12px 0; border-bottom:1px solid var(--t-line) } .prow .tt { flex:1; min-width:0 } .prow small { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; color:var(--dim) }
.ptile, .rico { flex:none; width:40px; height:40px; border-radius:12px; border:1px solid var(--t-line); display:grid; place-items:center }
.sbody { min-width:0 } .skel .srowx span { display:block; height:14px; width:60%; border-radius:7px; background:var(--t-fill2); animation:skel 1.2s ease-in-out infinite alternate }
@keyframes skel { from { opacity:.45 } to { opacity:1 } } .serr { padding:4px 16px 14px } .qh { display:flex; align-items:center; gap:6px; flex:none } .srowx .sp { flex:1 }
.srowx select { flex:none; max-width:55%; min-height:36px; border-radius:10px; padding:4px 10px; color:var(--ink); font:inherit; font-size:15px }
.srowx input[type=number], .srowx input[type=tel] { flex:none; width:9em; min-height:36px; border-radius:10px; padding:4px 10px; color:var(--ink); font:inherit }
.qh select { max-width:none } #rAdd, #dAdd { flex-wrap:wrap } #rAdd input, #dAdd input { order:-1; flex:1 1 100%; min-width:0; min-height:40px; border-radius:10px; padding:4px 12px; color:var(--ink); font:inherit }
#rAdd select { flex:1; max-width:none } .sgrp p.srowx { margin:0 }
@media (max-width:899px) { .srowx:has(.qh), .srowx:has(> span small):has(> select) { flex-wrap:wrap } .srowx:has(.qh) > span:first-child, .srowx:has(> span small):has(> select) > span:first-child { flex-basis:100% } }
#mText { width:100%; min-height:12em; border-radius:12px; padding:12px; color:var(--ink); font:inherit; font-size:15px }
a.srowx { color:var(--ink); text-decoration:none } .vorg { margin:6px 0; border-radius:12px; background:var(--t-card); padding:4px 12px } .vorg > summary { cursor:pointer; padding:10px 0 } .ptools > summary { list-style:none; cursor:pointer } .ptools > summary::-webkit-details-marker { display:none } .ptlist { padding:0 0 12px } .ptlist h4 { margin:12px 0 4px; font-size:14px; color:var(--dim) }
 .snavb { display:flex; justify-content:space-between; align-items:center } .snavb .chev, .sback { display:none } .sbody > h2 { margin:0 0 4px }
.scrumb { display:flex; align-items:center; gap:6px; color:var(--dim); font-size:15px } .scrumb .link { padding:0 } .scrumb [aria-current] { color:var(--ink) }
/* a phone (M8): the sections are a list page; a section shows a back button to it */
@media (max-width:899px) { .sset { grid-template-columns:1fr } .sset:not(.sroot) .snav, .sset.sroot .sbody { display:none }
  .snav { background:var(--t-card); border-radius:16px; padding:2px 16px; gap:0 } .snav h2 { display:none }
  .snavb { border-radius:0; padding:14px 0; border-bottom:1px solid var(--t-line) } .snavb:last-child { border-bottom:0 } .snavb[aria-current=true] { background:none }
  .snavb .chev { display:inline; color:var(--dim) } .sback { display:inline-block; padding:0; margin:0 0 8px } }
:root.reduce-motion * { animation-duration:.01ms !important; transition-duration:.01ms !important }
input[role=switch] { appearance:none; flex:none; width:51px; height:31px; border-radius:999px; background:var(--t-fill2); position:relative; cursor:pointer; transition:background .2s }
input[role=switch]::after { content:""; position:absolute; top:2px; left:2px; width:27px; height:27px; border-radius:50%; background:#fff; box-shadow:0 2px 4px rgb(0 0 0 / .3); transition:transform .25s var(--spring, ease) }
input[role=switch]:checked { background:var(--acc) } input[role=switch]:checked::after { transform:translateX(20px) }
/* v16 F2-F4 */
.seen { text-align:right; color:var(--dim); font-size:12px; margin:2px 4px 0 } .vcall { background:var(--you) } .vcall summary { cursor:pointer } .vcall p { margin:6px 0 }
.sugcard .top span { font-weight:600 } #sugg .btn { border-radius:999px }
/* Agents' own updates as one digest (Duet's): numbered lines that wrap under their words, a task link, a state dot; under
   the latest one, "Tasks I could help with:" and the stack of open cards (one shows, with the next one's edge) */
.duet.ai .digest p { margin:0 } .duet.ai .digest .dgreet { margin-bottom:2px }
.digest ol { margin:6px 0 2px; padding-left:1.45em; display:grid; gap:9px }
.digest li { padding-left:3px } .digest li::marker { color:var(--dim); font-variant-numeric:tabular-nums }
.digest li .md, .digest li .md p { display:inline; margin:0 }
.dlink { display:inline; border:0; padding:0; background:none; color:var(--acc-ink); font:inherit; cursor:pointer;
  text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; text-align:left }
.dlink svg { vertical-align:-2px; margin-right:5px } .dlink:hover { text-decoration-thickness:2px }
.dlink:focus-visible { outline:2px solid var(--acc-ink); outline-offset:2px; border-radius:4px }
.dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin:0 1px 1px 6px; vertical-align:middle; background:var(--acc-ink) }
.dot.need { background:var(--t-need) } .dot.look { background:var(--t-info) } .dot.done { background:var(--t-approve) }
.dpill { background:var(--t-card); border-radius:18px; padding:8px 14px; width:fit-content; max-width:min(78%, 680px); margin-top:10px }
.stackdock { max-width:calc(var(--col, 760px) - 32px); max-height:40dvh; overflow:auto; margin:0 auto 8px; overscroll-behavior:contain }
.stackdock .cstack { max-width:none; margin-top:0 }
@media (max-width:600px) { .stackdock { max-height:30dvh } }  /* a phone keeps most of the chat in view */
.cstack { max-width:min(100%, 560px); margin-top:10px } .cstack > .card { position:relative; z-index:1; margin-top:10px }
.cstack .sugcard { background:var(--bg); border:1px solid var(--t-line); padding:18px }
.cedge { height:16px; margin:-6px 12px 0; border:1px solid var(--t-line); border-top:0; border-radius:0 0 20px 20px; background:var(--t-card) }  /* the next card's edge */
.sugcard .bulb { width:40px; height:40px; border-radius:12px; background:var(--t-fill); display:grid; place-items:center; color:var(--ink) }
.sugcard .stitle { display:block; margin-top:14px; font-size:18px; line-height:1.3; text-wrap:balance }
.sugcard .text { color:var(--dim); font-size:16px; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:4; line-clamp:4; overflow:hidden } .sugcard .ccbtns { margin-top:16px }
.sugcard .ccbtns .ccgo { background:var(--ink); color:var(--bg) } .sugcard .ccbtns .btn:disabled { opacity:.55; cursor:progress }

/* v16 W-parity: the wide layout as the Mac app draws it. A flat full-height sidebar with its toggle (and the menu) in its
   top corners, no menu over the chat, the top bar's buttons as separate circles, Search on cmd-K only, "Channels" as a heading. */
@media (min-width:1024px) {
  header { z-index:9 } header .ttl { grid-column:2 } header .tools { grid-column:3 }  /* the menu left the grid: keep the face centered */
  #pages.lg { padding-top:72px; left:0; top:0; bottom:0; border-radius:0; box-shadow:none; background:var(--t-fill); -webkit-backdrop-filter:none; backdrop-filter:none }
  #pages.lg::before { display:none }
  #opts { position:fixed; top:18px; left:16px; z-index:70; pointer-events:auto }
  #opts > summary { width:40px; height:40px; font-size:18px; background:var(--t-fill) }
  .sidetoggle { left:calc(var(--side) - 56px) } body.noside .sidetoggle { left:64px }
  header .tools.lg { background:none; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none; gap:10px; padding:0 }
  header .tools.lg::before { display:none }
  header .tools .pbtns { gap:10px }
  header .tools button { width:44px; height:44px; border-radius:50%; background:var(--t-fill) }
  #openSearch { display:none }
  .side h3 { text-transform:none; letter-spacing:0; font-size:15px; font-weight:600; margin:18px 14px 6px }
  .newch[data-new=group_create] { display:none }
}
/* Long Settings lists on a phone (SC5): folded rest, folded pick lists, a routine's prompt in two lines, and the hire form wraps */
.smore > summary, .spick > summary { cursor:pointer; color:var(--acc-ink); padding:10px 0; list-style:none }
.smore > summary::-webkit-details-marker, .spick > summary::-webkit-details-marker { display:none }
.spick > summary { display:flex; justify-content:space-between; color:var(--ink) } .spick[open] > summary .dim { visibility:hidden }
#spage .task.later small.dim { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden }
#spage fieldset { min-width:0 } #spage label.tick { white-space:normal; overflow-wrap:anywhere }
.srowx.rad input[type=radio] { flex:none; width:22px; height:22px; min-height:0; padding:0 }  /* input[name] above grows text fields, never a radio */
@media (max-width:899px) { .srowx:has(> span small):has(> select) > select { max-width:100% } }  /* a picker on its own line: its whole label shows */

/* v17 G3: a draft that carries health, money or an address says so before Send */
.draft .warn { margin: 6px 0; padding-left: 8px; border-left: 3px solid var(--t-deny); font-size: 13px; color: var(--t-ink) }

/* The Sentinel stepping in (the owner's chat only): a quiet line, red when it refused or held something */
.quiet.sentinel.deny, .quiet.sentinel.held { color: var(--t-deny) }
/* Settings rows: every picker the same width, so a row's value lines up with the ones above it */
#spage select { max-width:100% } #spage .srow select, #spage .srowx select { min-width:112px }  /* a row's pickers line up; a long value (a model) still fits; a form's picker never widens the page */
/* The New session sheet fits a phone: its fields and notes wrap inside it, never past its right edge */
#launchDlg { width:min(560px, calc(100vw - 24px)); box-sizing:border-box }
#launchDlg :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { width:100%; max-width:100%; box-sizing:border-box }
#launchDlg label { white-space:normal; overflow-wrap:anywhere }

/* the "N sessions working" pill opens the sessions (desk.js showSessions) */
#statusPill { cursor:pointer }

/* A Settings page inside the app's own sheet (WebPageView, html.inapp): the sheet has its own title and back, so the web's
   tab row, its back link and the repeated heading go (owner's Mac screenshot, 11-18) */
html.inapp .snav, html.inapp .sbody > .link[data-spage], html.inapp .sbody > .link[data-spage] + h2 { display:none !important }
.corb img { width:100%; height:100%; border-radius:50%; object-fit:cover }
.srowx small.pstate { color:var(--ink); font-weight:500 } .pdot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; vertical-align:1px; background:#f97316 } .pdot.ok { background:#22c55e } .pdot.busy { background:#3b82f6 }  /* a test iPhone's state (Settings, Computers) */
.mdetail { margin:0 0 16px 12px; padding-left:12px; border-left:2px solid var(--t-line) } #settings .mdetail h3 { margin-top:12px }  /* a Mac's iPhones and Full control sit under that Mac */
