:root {
  --bg: #f5f6f8; --panel: #ffffff; --ink: #1d2433; --muted: #5d6677; --line: #dfe3ea;
  --accent: #1d2433; --accent-ink: #ffffff; --gold: #8a6a1f; --agent: #eef3ff; --mine: #1d2433; --mine-ink: #ffffff;
  --notice: #fff6dc; --danger: #b3261e; --radius: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #11151d; --panel: #181e29; --ink: #e8ecf4; --muted: #9aa3b5; --line: #2a3242; --accent: #c9a24b; --accent-ink: #11151d;
    --gold: #c9a24b; --agent: #1f2840; --mine: #c9a24b; --mine-ink: #11151d; --notice: #3a3218; --danger: #ff8a80; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body { overflow: hidden; }
/* Placed on what is visible: iOS pans the page when the keyboard comes up, and the app follows. */
#root { position: fixed; left: 0; right: 0; top: var(--app-top, 0px); height: var(--app-height, 100dvh); }
button { font: inherit; border: 0; border-radius: 999px; padding: .55em 1.1em; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
button.secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
button.link { background: none; color: var(--gold); padding: .2em .4em; border-radius: 6px; }
button.link.danger { color: var(--danger); }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
input[type=text], input[type=password], textarea { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .6em .8em; width: 100%; }
.loading { padding: 2rem; color: var(--muted); }
.fine { color: var(--muted); font-size: .85rem; }
/* Welcome styles stay inside the signed-out screen. */
.welcome {
  --welcome-bg: #f7f6f2; --welcome-panel: #fffefa; --welcome-line: #deddd5; --welcome-soft: #efede5;
  height: 100%; overflow-y: auto; background: var(--welcome-bg); scroll-behavior: smooth;
  line-height: 1.6; color: var(--ink);
}
.welcome-shell { max-width: 1280px; margin: auto; padding: 0 48px; }
.welcome a { color: inherit; text-decoration: none; }
.welcome a:focus-visible, .welcome button:focus-visible, .welcome input:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.welcome a:hover { text-decoration: underline; text-underline-offset: 5px; }
.welcome-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--welcome-line); }
.welcome-brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 650; letter-spacing: -.5px; font-size: 19px; }
.welcome-mark { display: grid; grid-template-columns: repeat(2, 7px); gap: 4px; border: 1px solid var(--gold); border-radius: 9px; padding: 9px; transform: rotate(-8deg); }
.welcome-mark span { width: 7px; height: 7px; background: var(--gold); border-radius: 2px; }
.welcome-header nav { display: flex; gap: 28px; font-size: 13px; color: var(--muted); }
.welcome-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 76px 0 58px; }
.welcome-eyebrow { margin: 0 0 20px; color: var(--gold); font-size: 11px; font-weight: 650; letter-spacing: 1.6px; text-transform: uppercase; }
.welcome h1 { margin: 0 0 25px; font: 400 clamp(42px, 4.8vw, 66px)/1.08 Georgia, 'Times New Roman', serif; letter-spacing: -2.8px; }
.welcome h1 span { color: var(--gold); }
.welcome-lead { max-width: 440px; font-size: 16px; line-height: 1.8; color: var(--muted); margin: 0 0 19px; }
.welcome-room-rule { font-size: 12px; margin: 0 0 31px; }
.welcome-room-rule > span { color: var(--gold); margin-right: 6px; }
.welcome-start { max-width: 440px; }
.welcome-start label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 9px; }
.welcome-name-row { display: flex; gap: 8px; }
.welcome-name-row input { min-width: 0; background: var(--welcome-panel); border-color: var(--welcome-line); border-radius: 7px; padding: 13px 14px; font-size: 14px; }
.welcome-name-row button { border-radius: 7px; min-width: 92px; font-size: 14px; font-weight: 600; }
.welcome-name-row button:hover { filter: brightness(1.15); }
.welcome-key-note { max-width: 425px; font-size: 11px; line-height: 1.7; color: var(--muted); margin: 13px 0 0; }
.welcome-key-note strong { color: var(--ink); font-weight: 550; }
.welcome-preview { margin: 0; min-width: 0; position: relative; }
.welcome-preview::before { content: ''; position: absolute; inset: 20px -24px -4px; background-image: radial-gradient(var(--welcome-line) 1px, transparent 1px); background-size: 12px 12px; pointer-events: none; }
.welcome-preview figcaption { display: flex; justify-content: space-between; position: relative; margin: 0 0 13px; font-size: 10px; color: var(--muted); }
.welcome-preview figcaption span:first-child { text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }
.welcome-room { position: relative; background: #1d2433; color: #eef0f5; border: 1px solid #343e51; border-radius: 13px; box-shadow: 0 18px 40px -18px #1d243350; overflow: hidden; }
.welcome-room-header { display: flex; align-items: center; gap: 11px; padding: 18px 20px; border-bottom: 1px solid #394151; }
.welcome-room-icon { color: #d9bb79; background: #323442; border: 1px solid #63573d; border-radius: 8px; width: 36px; height: 36px; display: grid; place-items: center; font: 20px Georgia, serif; }
.welcome-room-header h2 { font-size: 13px; font-weight: 600; margin: 0; }
.welcome-room-header p { font-size: 10px; margin: 2px 0 0; color: #b5bdcd; }
.welcome-sealed { margin-left: auto; font-size: 9px; color: #d9bb79; white-space: nowrap; }
.welcome-transcript { display: grid; gap: 23px; padding: 24px 20px; }
.welcome-message { display: flex; gap: 11px; }
.welcome-avatar { display: grid; place-items: center; flex: 0 0 29px; height: 29px; border-radius: 50%; background: #e2ddce; color: #273040; font-size: 11px; font-weight: 650; }
.welcome-claude .welcome-avatar { border-radius: 8px; color: #edc3a9; background: #4a3c38; }
.welcome-codex .welcome-avatar { border-radius: 8px; color: #b6d5cf; background: #2b4445; }
.welcome-message-body { min-width: 0; flex: 1; }
.welcome-message-who { display: flex; align-items: baseline; gap: 9px; font-size: 11px; }
.welcome-message-who strong { font-weight: 600; }
.welcome-message-who span { font-size: 9px; color: #b5bdcd; }
.welcome-message p { font-size: 12px; line-height: 1.7; margin: 5px 0 0; color: #dce0e9; }
.welcome-file { display: flex; align-items: center; gap: 11px; padding: 10px 12px; margin-top: 11px; border: 1px solid #465064; background: #252e3e; border-radius: 6px; }
.welcome-file-icon { border: 1px solid #738097; border-radius: 3px; color: #d9bb79; width: 24px; height: 29px; display: grid; place-items: center; }
.welcome-file strong { display: block; font-size: 11px; font-weight: 500; }
.welcome-file div > span { display: block; font-size: 9px; color: #b5bdcd; margin-top: 1px; }
.welcome-preview-result { display: inline-block; font-size: 9px; color: #e2c687; margin-top: 9px; padding: 3px 8px; border: 1px solid #675b40; border-radius: 4px; background: #34322d; }
.welcome-preview-control { background: #18202e; padding: 15px 20px 18px; border-top: 1px solid #394151; }
.welcome-control-heading { display: flex; justify-content: space-between; font-size: 10px; color: #c4cbd8; margin-bottom: 10px; }
.welcome-control-heading span:last-child { color: #d9bb79; }
.welcome-preview-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: #121925; border: 1px solid #394151; padding: 4px; border-radius: 6px; }
.welcome-preview-modes button { color: #bcc5d5; background: transparent; border-radius: 3px; font-size: 11px; padding: 7px; }
.welcome-preview-modes button[aria-pressed=true] { background: #d6b76f; color: #1d2433; font-weight: 650; }
.welcome-mode-description { font-size: 10px; color: #bcc5d5; margin: 10px 0 0; min-height: 1.6em; }
.welcome-preview-caption { position: relative; text-align: center; font-size: 10px; color: var(--muted); margin: 17px 0 0; }
.welcome-preview-caption span { color: var(--gold); margin-right: 5px; }
.welcome-engines { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 25px 0; border-top: 1px solid var(--welcome-line); border-bottom: 1px solid var(--welcome-line); }
.welcome-engines p { margin: 0; color: var(--muted); font-size: 11px; }
.welcome-engines ul { display: flex; flex-wrap: wrap; gap: 30px; list-style: none; padding: 0; margin: 0; font-size: 13px; font-weight: 600; }
.welcome-engines li:last-child { font-weight: 400; color: var(--muted); }
.welcome-principles { padding: 65px 0 55px; scroll-margin-top: 24px; }
.welcome-section-heading .welcome-eyebrow, .welcome-setup .welcome-eyebrow { margin-bottom: 12px; }
.welcome h2 { letter-spacing: -.5px; }
.welcome-section-heading h2, .welcome-setup h2 { font: 400 32px/1.2 Georgia, 'Times New Roman', serif; margin: 0; letter-spacing: -.8px; }
.welcome-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 34px; }
.welcome-feature-grid article { border-top: 1px solid var(--welcome-line); padding-top: 17px; }
.welcome-feature-number { font: 11px ui-monospace, monospace; color: var(--gold); }
.welcome-feature-grid h3 { font-size: 15px; font-weight: 600; margin: 11px 0 8px; letter-spacing: -.2px; }
.welcome-feature-grid p, .welcome-setup > div > p:not(.welcome-eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 0; }
.welcome-setup { display: grid; grid-template-columns: 1fr 1.15fr; gap: 45px; align-items: center; padding: 32px; border: 1px solid var(--welcome-line); background: var(--welcome-soft); border-radius: 10px; scroll-margin-top: 24px; }
.welcome-setup h2 { font-size: 29px; margin-bottom: 13px; }
.welcome-terminal { min-width: 0; }
.welcome-terminal-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.welcome-platforms { display: flex; gap: 12px; }
.welcome-platforms button, .welcome-copy { background: transparent; color: var(--muted); border-radius: 3px; padding: 3px 0; font-size: 10px; }
.welcome-platforms button[aria-pressed=true] { color: var(--ink); box-shadow: 0 1px var(--gold); }
.welcome-copy { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.welcome-terminal pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--welcome-panel); border: 1px solid var(--welcome-line); border-radius: 5px; padding: 16px; font-size: 11px; margin: 12px 0; user-select: all; }
.welcome-terminal > p { font-size: 10px; line-height: 1.7; color: var(--muted); margin: 0; }
.welcome-footer { display: flex; justify-content: space-between; gap: 16px; padding: 29px 0; margin-top: 30px; font-size: 10px; color: var(--muted); }
.welcome-footer span:first-child { color: var(--ink); font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .welcome { --welcome-bg: #11151d; --welcome-panel: #1b2230; --welcome-line: #303744; --welcome-soft: #181e29; }
}
@media (max-width: 1050px) {
  .welcome-shell { padding: 0 32px; }
  .welcome-hero { gap: 32px; padding-top: 55px; }
  .welcome h1 { font-size: 51px; }
  .welcome-engines ul { gap: 20px; }
  .welcome-sealed { display: none; }
}
@media (max-width: 760px) {
  .welcome-shell { padding: 0 24px; }
  .welcome-header { padding: 21px 0; }
  .welcome-header nav { gap: 14px; font-size: 11px; }
  .welcome-brand { font-size: 16px; }
  .welcome-mark { padding: 6px; }
  .welcome-hero { grid-template-columns: 1fr; padding: 44px 0 30px; gap: 36px; }
  .welcome h1 { font-size: clamp(44px, 8vw, 62px); letter-spacing: -2px; }
  .welcome-lead, .welcome-start, .welcome-key-note { max-width: none; }
  .welcome-preview { max-width: 520px; width: 100%; justify-self: center; }
  .welcome-preview::before { inset-inline: -12px; }
  .welcome-engines { flex-direction: column; align-items: flex-start; gap: 12px; padding: 22px 0; }
  .welcome-engines ul { gap: 10px 22px; font-size: 12px; }
  .welcome-principles { padding: 40px 0; }
  .welcome-section-heading h2 { font-size: 29px; }
  .welcome-feature-grid { grid-template-columns: 1fr; gap: 22px; margin-top: 25px; }
  .welcome-feature-grid article { position: relative; padding-left: 32px; }
  .welcome-feature-number { position: absolute; top: 28px; left: 0; }
  .welcome-feature-grid h3 { margin-top: 5px; }
  .welcome-setup { grid-template-columns: 1fr; padding: 23px; gap: 24px; }
  .welcome-footer { margin-top: 12px; }
}
@media (max-width: 440px) {
  .welcome-shell { padding: 0 20px; }
  .welcome-header nav a:first-child { display: none; }
  .welcome-header { gap: 12px; }
  .welcome-eyebrow { font-size: 10px; letter-spacing: 1.2px; }
  .welcome-lead { font-size: 15px; }
  .welcome-room-rule { font-size: 11px; }
  .welcome-room-header, .welcome-transcript, .welcome-preview-control { padding-left: 15px; padding-right: 15px; }
  .welcome-message-who { gap: 7px; }
  .welcome-footer { flex-direction: column; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .welcome { scroll-behavior: auto; }
}

.layout { display: grid; grid-template-columns: 300px 1fr; height: 100%; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.sidebar header { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.sidebar .actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sidebar .actions button { font-size: .85rem; padding: .45em .9em; }
.threads { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.threads button { width: 100%; text-align: left; background: none; color: var(--ink); border-radius: 10px; display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: .6em .8em; }
.threads li.current button { background: var(--bg); }
.threads .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.threads .kind { grid-column: 1; color: var(--muted); font-size: .8rem; }
.threads .badge { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.badge { background: var(--gold); color: var(--badge-ink, #fff); border-radius: 999px; font-size: .75rem; padding: .1em .55em; margin-left: .4em; }

.main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.main > .back { display: none; }
.thread, .approvals, .empty { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.empty, .approvals { padding: 24px; overflow-y: auto; }
.thread > header { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 4px; min-height: 56px; padding: 4px 8px; border-bottom: 1px solid var(--line); background: var(--panel); }
.thread h2 { margin: 0; font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.members { margin: .2em 0 0; color: var(--muted); font-size: .85rem; }
.modes { display: inline-flex; background: var(--bg); border-radius: 999px; padding: 3px; }
.modes button { background: none; color: var(--muted); padding: .35em .9em; font-size: .85rem; }
.modes button.on { background: var(--accent); color: var(--accent-ink); }
.tools { display: flex; flex-wrap: wrap; gap: 4px; }
.entries { list-style: none; margin: 0; padding: 16px 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.entry { max-width: min(42rem, 85%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .55em .8em; }
.entry.agent { background: var(--agent); }
.entry.mine { align-self: flex-end; background: var(--mine); color: var(--mine-ink); border-color: transparent; }
.entry.notice { align-self: center; background: var(--notice); font-size: .85rem; }
.entry .who { font-size: .78rem; font-weight: 600; display: flex; gap: .5em; align-items: center; margin-bottom: .2em; }
.entry .who time { font-weight: 400; opacity: .7; }
.tag { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--gold); }
.entry .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.composer { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: end; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--panel); flex: none; }
.composer textarea { resize: none; min-height: 44px; max-height: 132px; line-height: 1.35; padding: .6em .9em; border-radius: 22px; overflow-y: auto; }
/* The keyboard is up: the bar sits on it, without the room kept for the Home indicator. */
.keyboard .composer { padding-bottom: 8px; }

.approvals ul { list-style: none; padding: 0; display: grid; gap: 12px; }
.approval { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.approval .who { font-weight: 600; display: flex; justify-content: space-between; }
.approval pre, .approval blockquote { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); padding: .6em .8em; border-radius: 8px; margin: .5em 0; font-size: .9rem; max-height: 20rem; overflow: auto; }
.approval pre.full { max-height: 60vh; resize: vertical; }
.approval .buttons, .dialog .buttons { display: flex; gap: 8px; margin-top: .6em; }
.approval.granted, .approval.denied { opacity: .7; }
.reason { color: var(--muted); }

.dialog { background: var(--panel); color: var(--ink); border: 0; border-radius: 16px; padding: 0; width: min(30rem, calc(100% - 32px)); max-width: none;
  max-height: calc(var(--app-height, 100dvh) - 32px); overflow: hidden; }
.dialog[open] { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
.dialog > header { padding: 16px 20px 8px; gap: 12px; }
.dialog-body { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px; padding: 8px 20px 20px; overflow-y: auto; min-height: 0; overscroll-behavior: contain; overflow-wrap: anywhere; }
.dialog-body > * { min-width: 0; }
/* A form's main button, at the sheet's foot below what scrolls. */
.sheet-actions { display: grid; padding: 10px 20px 16px; background: var(--panel); border-top: 1px solid var(--line); }
.sheet-actions button { font-weight: 600; padding: .8em 1.2em; }
.dialog::backdrop { background: rgb(0 0 0 / .45); }
.dialog > * { min-width: 0; }
.dialog header { display: flex; justify-content: space-between; align-items: center; }
.dialog h2 { margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.dialog form { display: grid; gap: 12px; }
.dialog label { display: grid; gap: .4rem; }
.dialog fieldset { border: 1px solid var(--line); border-radius: 10px; display: grid; gap: .4rem; }
.dialog label.check { display: flex; gap: .5em; align-items: center; }
.qr { width: min(16rem, 100%); justify-self: center; image-rendering: pixelated; border-radius: 8px; }
.words { font-size: 1.1rem; font-weight: 600; line-height: 1.6; word-spacing: .3em; }
.error { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + var(--keyboard, 0px)); background: #b3261e; color: #fff; padding: .6em 1em; border-radius: 10px; max-width: calc(100% - 32px); z-index: 20; }
.error button { color: #fff; }

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .layout.open .sidebar { display: none; }
  .layout.home .main { display: none; }
  .main > .back { display: block; align-self: flex-start; margin: 8px 12px 0; }
  .entries { padding-left: 12px; padding-right: 12px; }
  .entry { max-width: 92%; }
}

/* Attachments */
.hidden { display: none; }
.entry .file { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; max-width: 100%; }
.entry .file .name { font-weight: 600; overflow-wrap: anywhere; }
.entry .file .size { color: inherit; opacity: .8; font-size: 0.85em; }
.entry .file img { flex-basis: 100%; max-width: 100%; max-height: 360px; object-fit: contain; border-radius: 8px; }
a.button { display: inline-block; text-decoration: none; padding: .55em 1.1em; border-radius: 999px; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.entry .file button.secondary, .entry .file a.button { color: inherit; box-shadow: inset 0 0 0 1px currentColor; padding: .35em .9em; }

/* Members of an invitation-only Boardroom, and the way in for someone not yet one. */
.members-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.members-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.members-list li:last-child { border-bottom: 0; }
.empty .setup-code { margin-top: 24px; }
.setup-code form { display: grid; gap: 10px; max-width: 24rem; margin-top: 10px; }
.outside { margin: 0; padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .9rem; }

/* Guides: adopting an agent, inviting someone, the way in, getting started. The homepage's language: a gold
   eyebrow, a serif headline, numbered steps on a thin gold rail, commands in a dark terminal. */
:root { --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace; --term: #141a26; --term-ink: #e9edf5; --term-line: #2c3547; }
.eyebrow { margin: 0; color: var(--gold); font-size: 11px; font-weight: 650; letter-spacing: 1.6px; text-transform: uppercase; }
.lead { margin: 0; color: var(--muted); line-height: 1.6; }
.dialog h2, .guide h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; letter-spacing: -.4px; }
.dialog h2 { font-size: 1.45rem; }
.dialog code, .guide code { font-family: var(--mono); font-size: .85em; background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: .05em .35em; }
button.primary { padding: .8em 1.4em; font-weight: 600; justify-self: start; }

.steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; position: relative; padding-bottom: 18px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ''; position: absolute; left: 16px; top: 34px; bottom: 4px; width: 1px; background: linear-gradient(var(--gold), transparent); opacity: .55; }
.step:last-child::before { display: none; }
.step-node { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 600 11px var(--mono); color: var(--gold);
  border: 1px solid var(--gold); background: var(--panel); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 12%, transparent); }
.step-body { display: grid; gap: 8px; min-width: 0; padding-top: 6px; }
.step-body h3 { margin: 0; font-size: .98rem; font-weight: 650; }
.step-body p { margin: 0; line-height: 1.55; }

.terminal { background: var(--term); color: var(--term-ink); border: 1px solid var(--term-line); border-radius: 12px; overflow: hidden;
  background-image: radial-gradient(#ffffff0d 1px, transparent 1px); background-size: 10px 10px; }
.terminal-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-bottom: 1px solid var(--term-line); }
.terminal-tabs { display: flex; gap: 2px; }
.terminal-tabs button { background: none; color: #8f9ab0; font-size: 12px; padding: .35em .75em; }
.terminal-tabs button[aria-pressed=true] { background: #ffffff14; color: var(--term-ink); }
.terminal-copy { background: #c9a24b; color: #141a26; font-size: 12px; font-weight: 650; padding: .4em .95em; }
.terminal pre { margin: 0; padding: 14px; font: 12.5px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.terminal pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.terminal-prompt { color: #c9a24b; user-select: none; }

.capsule { display: grid; gap: 8px; }
.capsule input { font-family: var(--mono); font-size: 12.5px; text-overflow: ellipsis; border-radius: 999px; padding: .7em 1em; background: var(--bg); }
.capsule-actions { display: flex; gap: 8px; }
.capsule-actions button { flex: 1; font-weight: 600; }
.qr-details summary { color: var(--gold); cursor: pointer; font-size: .9rem; }
.qr-details .qr { display: block; margin: 12px auto 0; width: min(13rem, 100%); }

.guide { gap: 16px; max-width: 34rem; }
.guide h2 { margin: 0; font-size: clamp(1.8rem, 6vw, 2.4rem); line-height: 1.1; }
.guide .setup-code { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 16px; }
.setup-code summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.start-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.start-card { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; align-items: center; text-align: left;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; transition: border-color .15s, transform .15s; }
.start-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.start-card strong { display: block; font-weight: 650; }
.start-card span span { display: block; color: var(--muted); font-size: .88rem; margin-top: 2px; }
.start-card .arrow { color: var(--gold); font-size: 1.1rem; }
@media (prefers-reduced-motion: reduce) { .start-card { transition: none; } .start-card:hover { transform: none; } }

@media (max-width: 760px) {
  /* Home with nothing in it yet: the guide below the header, the page scrolls as one. */
  .layout.guided { grid-template-rows: auto auto; overflow-y: auto; align-content: start; }
  .layout.guided .main { display: flex; }
  .layout.guided .sidebar { border-right: 0; }
  /* The guide stands in for the actions; the conversations stay, if there are any (someone removed can still read). */
  .layout.guided .sidebar .actions, .layout.guided.unlisted .threads, .layout.guided .main > .back { display: none; }
  .layout.guided .threads { flex: none; overflow: visible; }
  .layout.guided .empty { padding: 28px 20px 40px; overflow: visible; }
  /* A sheet from the bottom, lifted above the keyboard when it is up, and never taller than what is visible. */
  .dialog { width: calc(100% - 20px); margin: auto auto calc(10px + var(--keyboard, 0px)); border-radius: 20px 20px 16px 16px;
    max-height: calc(var(--app-height, 100dvh) - 20px - env(safe-area-inset-top)); }
  .dialog > header { padding: 16px 18px 6px; }
  .dialog-body { padding: 6px 18px calc(18px + env(safe-area-inset-bottom)); }
  .keyboard .dialog-body { padding-bottom: 18px; }
  .sheet-actions { padding: 10px 18px calc(14px + env(safe-area-inset-bottom)); }
  .dialog:has(.sheet-actions) .dialog-body { padding-bottom: 14px; }
  .keyboard .sheet-actions { padding-bottom: 14px; }
}
/* Inside a dialog the error is part of it, under what was done, not floating over it. */
.dialog > .error { position: static; transform: none; max-width: none; margin: 0 20px 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* Contrast: on the dark theme's gold, dark text. */
@media (prefers-color-scheme: dark) { :root { --badge-ink: #11151d; } }
.threads li.closed .name { font-weight: 500; color: var(--muted); }
.sidebar .hint { margin: 0; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.entry .unsent { font-weight: 600; font-size: .72rem; opacity: .85; }

/* Phones: every control at least 44 px to tap, and fields at 16 px so iOS does not zoom into them. */
@media (pointer: coarse) {
  button, .button, summary, input[type=checkbox] { min-height: 44px; }
  button.link { padding: .55em .6em; }
  input[type=checkbox] { min-width: 24px; }
  input, textarea, .welcome-name-row input { font-size: 16px; }
  .welcome-key-note, .welcome-terminal > p, .welcome-copy, .welcome-platforms button { font-size: 13px; }
}
.welcome-invited { margin: 0 0 16px; padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--welcome-panel, var(--panel)); }
.welcome-iphone { display: grid; gap: 12px; max-width: 440px; padding: 16px; border: 1px solid var(--gold); border-radius: 12px; background: var(--welcome-panel, var(--panel)); }
.welcome-iphone p { margin: 0; line-height: 1.6; }

/* The Home Screen app draws under the iPhone's status bar: keep clear of it. */
#root { padding-top: env(safe-area-inset-top); box-sizing: border-box; }
.sidebar header { flex-wrap: wrap; gap: 4px; }

/* Adopting by code: the code field, the computer's card, and the setup-code field for whoever runs the Boardroom. */
.code-form { display: flex; gap: 8px; align-items: center; }
.code-form input { font-size: 20px; letter-spacing: .12em; font-variant-numeric: tabular-nums; text-align: center; min-width: 0; }
.agent-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--agent); margin: 0; }
.agent-card strong { font-size: 17px; overflow-wrap: anywhere; }
.agent-card span { color: var(--muted); font-size: 13px; }
.dialog form label { display: flex; flex-direction: column; gap: 4px; margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.dialog form label.check { flex-direction: row; align-items: center; min-height: 44px; color: var(--ink); font-size: 1rem; }
.warning { background: var(--notice); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.founding { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; max-width: 420px; }
.founding h3 { margin: 0; font-size: 15px; }
.founding p { margin: 0; }
.founding input { font-size: 16px; }

/* A conversation's bar: back (on a phone), the name with one line of status, and details. */
.thread > header .back { display: none; }
.icon { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: 50%; font-size: 20px; line-height: 1; flex: none; }
.bar .icon { background: none; color: var(--gold); }
.bar .back { font-size: 30px; padding-bottom: 3px; }
.bar .info span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font: italic 600 15px Georgia, serif; box-shadow: inset 0 0 0 1.5px var(--gold); }
.bar-title { grid-column: 2; display: grid; gap: 1px; min-width: 0; text-align: left; background: none; color: var(--ink); padding: 4px 8px; border-radius: 10px; }
.bar-status { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; border-radius: 0; background: var(--notice); color: var(--ink); text-align: left; padding: 10px 16px; font-size: 14px; flex: none; }
.attach { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-size: 24px; }
.send { font-size: 20px; font-weight: 700; }
.send:disabled { opacity: .35; cursor: default; }
.staged { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-top: 1px solid var(--line); background: var(--panel); flex: none; font-size: 14px; }
.staged .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.staged .size { color: var(--muted); flex: none; }
.staged .link { margin-left: auto; }
.entries .quiet { margin: auto; text-align: center; display: grid; gap: 4px; color: var(--muted); padding: 24px; }
.entries .quiet strong { color: var(--ink); font-weight: 600; }
.entry.notice { align-self: stretch; max-width: none; border-color: transparent; }
.entry .technical summary { cursor: pointer; font-size: .82rem; color: var(--muted); margin-top: 6px; }
.entry .technical pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.5 var(--mono); margin: 6px 0 0; padding: 8px; background: var(--bg); border-radius: 8px; max-height: 12rem; overflow: auto; }

/* A conversation's details. */
.detail { display: grid; gap: 8px; }
.detail h3 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.detail p { margin: 0; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.people li { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.people span { color: var(--muted); font-size: 13px; }
.choices { display: grid; gap: 6px; }
.choice { display: grid; gap: 2px; text-align: left; background: var(--bg); color: var(--ink); border-radius: 12px; padding: 10px 14px; box-shadow: inset 0 0 0 1px var(--line); }
.choice span { color: var(--muted); font-size: 13px; }
.choice.on { box-shadow: inset 0 0 0 2px var(--gold); }
.choice.on strong::after { content: ' ✓'; color: var(--gold); }
.rows { gap: 0; border-top: 1px solid var(--line); }
.row { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; background: none; color: var(--ink); border-radius: 0; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.row span { color: var(--muted); font-size: 20px; }
.row.danger { color: var(--danger); }
.rows .fine { padding-top: 8px; }
.help summary { cursor: pointer; color: var(--gold); font-weight: 600; }
.help[open] { display: grid; gap: 10px; }
.help p { margin: 0; }

@media (max-width: 760px) {
  .thread > header .back { display: grid; }
  .thread > header { grid-template-columns: 44px minmax(0, 1fr) 44px; }
}
@media (min-width: 761px) {
  .thread > header { grid-template-columns: 0 minmax(0, 1fr) 44px; padding-left: 12px; }
}
.rows + .rows { border-top: 0; margin-top: -12px; }
.strip-region { flex: none; }

/* Status, decisions and recovery stay readable at phone widths and at browser zoom. */
:where(a, summary, [tabindex]):focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
button:disabled { cursor: default; }
.connection-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px;
  padding: 8px 16px; background: var(--notice); color: var(--ink); font-size: .85rem; }
.connection-notice .link { color: inherit; text-decoration: underline; }
.strip { line-height: 1.45; }
.entry { flex: none; min-width: 0; }
.entry .who { flex-wrap: wrap; }
.delivery { font-size: .72rem; }
.delivery-help { margin: 6px 0; font-size: .85rem; line-height: 1.5; }
.delivery-help summary { cursor: pointer; }
.entry.mine .delivery-help button { color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
.latest { align-self: center; flex: none; margin: 4px; font-size: .85rem; }
.latest[hidden] { display: none; }
.approval { overflow-wrap: anywhere; min-width: 0; }
.approval h3 { margin: 0 0 8px; font-size: 1.1rem; }
.approval .who { flex-wrap: wrap; gap: 8px; }
.approval .who time { font-weight: 400; color: var(--muted); }
.approval-audience { padding: 10px 12px; border-left: 3px solid var(--gold); background: var(--bg); line-height: 1.6; }
.approval-count { color: var(--muted); margin-top: 0; }
.approval .buttons { flex-wrap: wrap; }
.approval .buttons button { min-height: 44px; flex: 1; }
.approval.granted, .approval.denied { opacity: 1; }
.approval .status { color: var(--muted); line-height: 1.55; }
.recovery ol { margin: 0; padding-left: 22px; display: grid; gap: 10px; line-height: 1.6; }
.trusted-install { display: grid; gap: 12px; min-width: 0; }
.trusted-install > p { margin: 0; line-height: 1.6; }
.trusted-install label { display: grid; gap: 6px; font-size: .9rem; }
.trusted-install input { font-family: var(--mono); font-size: 16px; }
.install-command { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.install-command code { border: 0; padding: 0; }
.platform-choice { display: flex; gap: 8px; flex-wrap: wrap; }
.platform-choice button[aria-pressed=true] { box-shadow: inset 0 0 0 2px var(--gold); }
.staged img { width: 48px; height: 48px; object-fit: contain; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) {
  button, .button, summary { min-height: 44px; }
  summary { padding-block: 10px; }
  .approvals { padding: 16px 12px calc(20px + env(safe-area-inset-bottom)); }
  .approval pre.full { max-height: 40vh; }
  .strip { font-size: 13px; padding: 8px 12px; }
  .bar-status { font-size: 12px; }
  .trusted-install input, .composer textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Requests, handoffs and local history share the conversation's readable layout. */
.tasks-pane, .search-pane { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 24px; overflow-y: auto; gap: 12px; }
.tasks-pane h2, .search-pane h2 { margin: 0; }
.filter-tabs, .search-filters, .task-followups { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-tabs button[aria-pressed=true] { box-shadow: inset 0 0 0 2px var(--gold); }
.task-list, .search-results, .task-results { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.task-card { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 16px; overflow-wrap: anywhere; }
.task-card h3 { font-size: 1rem; margin: 12px 0; white-space: pre-wrap; }
.task-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.task-status { color: var(--muted); font-size: .85rem; }
.task-card.failed, .task-card.stopped { border-left: 4px solid var(--danger); }
.task-card.awaiting-approval { border-left: 4px solid var(--gold); }
.task-card.computer h3 { margin: 0; }
.computer-agents { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; }
.computer-agent { border-top: 1px solid var(--line); padding-top: 12px; }
.computer-agent p { margin: 4px 0; }
.task-status.danger, .offline-summary { color: var(--danger); }
.offline-summary { margin: 0; font-weight: 600; }
.badge.alert { background: var(--danger); }
.offline-choice select { margin-left: .3em; font: inherit; }
.task-request { margin: 0; background: var(--bg); padding: 12px; border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 35vh; overflow-y: auto; }
.task-steps { padding-left: 24px; line-height: 1.6; }
.task-results { white-space: pre-wrap; overflow-wrap: anywhere; }
.task-results .file { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.task-results img { max-width: 100%; max-height: 240px; object-fit: contain; }
.task-composer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 4px 12px; flex: none; border-top: 1px solid var(--line); background: var(--panel); }
select, input[type=search] { color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; min-width: 0; max-width: 100%; }
select:focus-visible, input[type=search]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.task-composer select { width: 100%; font-size: .85rem; }
.entry.mine .task-link { color: inherit; text-decoration: underline; }
.task-link { font-size: .8rem; text-align: left; }
.search-result { display: grid; text-align: left; width: 100%; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--panel); color: var(--ink); overflow-wrap: anywhere; }
.search-result span, .search-result small { color: var(--muted); white-space: pre-wrap; }
.search-filters label.check { display: flex; gap: 8px; align-items: center; }
.dialog .task-results .file img { flex-basis: 100%; }
@media (max-width: 760px) {
  .tasks-pane, .search-pane { padding: 16px 12px calc(20px + env(safe-area-inset-bottom)); }
  select, input[type=search], .task-composer select { font-size: 16px; min-height: 44px; }
  .task-followups button { width: 100%; }
}

/* ---- Polish, 12 November 2026: the phone first. ---- */
:root { --ok: #2e8b57; --busy: #c9a24b; --off: #9aa3b5; --attention: #d9822b; --face: #e9e4d6; --face-ink: #3a3322; --face-agent: #1d2433; --face-agent-ink: #e2c687; }
@media (prefers-color-scheme: dark) { :root { --face: #2a3242; --face-ink: #e8ecf4; --face-agent: #33302a; --face-agent-ink: #e2c687; --ok: #5cc28a; } }

/* The home bar: the Boardroom's mark, whose it is, Settings and New. */
.sidebar header.home-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 6px; align-items: center; padding: 14px 14px 10px 18px; border-bottom: 0; flex-wrap: nowrap; }
.home-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.home-title > div { display: grid; min-width: 0; }
.home-title strong { font: 400 24px/1.1 Georgia, 'Times New Roman', serif; letter-spacing: -.5px; }
.home-title > div > span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mark { display: grid; grid-template-columns: repeat(2, 6px); gap: 3px; border: 1px solid var(--gold); border-radius: 8px; padding: 7px; transform: rotate(-8deg); flex: none; }
.mark span { width: 6px; height: 6px; background: var(--gold); border-radius: 2px; }
.icon.ghost { background: none; color: var(--muted); font-size: 22px; position: relative; }
.icon.new { background: var(--accent); color: var(--accent-ink); font-size: 26px; font-weight: 300; box-shadow: 0 6px 16px -8px rgb(0 0 0 / .5); }
.icon.ghost .dot { position: absolute; top: 9px; right: 9px; }

/* Overviews as a row of chips that scrolls sideways on a narrow phone. */
.quick { display: flex; gap: 8px; padding: 2px 16px 12px; overflow-x: auto; scrollbar-width: none; flex: none; }
.quick::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; padding: .45em .95em; }
.chip.on { box-shadow: inset 0 0 0 1.5px var(--gold); background: color-mix(in srgb, var(--gold) 10%, var(--panel)); }
.chip .count { color: var(--muted); font-size: 12px; }
.chip .badge { margin-left: 0; }
.sidebar h2.section { margin: 4px 0 0; padding: 8px 20px 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* A conversation in the list: its face, name, when, the last thing said. */
.threads { padding: 0 8px 12px; }
.threads button.thread-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 1px 12px; align-items: center; padding: 10px 10px; border-radius: 14px; }
.thread-row .face { grid-row: 1 / span 2; }
.thread-row .name { grid-column: 2; font-size: 16px; }
.thread-row .when { grid-column: 3; grid-row: 1; color: var(--muted); font-size: 12px; justify-self: end; }
.thread-row .kind { grid-column: 2; grid-row: 2; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-row .kind.off { color: var(--muted); } .thread-row .kind.attention { color: var(--attention); } .thread-row .kind.busy { color: var(--gold); }
.thread-row .badge { grid-column: 3; grid-row: 2; justify-self: end; margin: 0; }
.threads li + li { border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.threads li.current + li, .threads li + li.current { border-top-color: transparent; }
.face { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 15px; letter-spacing: .02em; background: var(--face); color: var(--face-ink); }
.face.agent { border-radius: 14px; background: var(--face-agent); color: var(--face-agent-ink); font-family: Georgia, serif; font-weight: 400; font-size: 17px; }
.face.group { border-radius: 14px; background: color-mix(in srgb, var(--gold) 18%, var(--panel)); color: var(--gold); box-shadow: 3px -3px 0 -1px var(--panel), 3px -3px 0 0 var(--line); }
.face.big { width: 52px; height: 52px; font-size: 20px; flex: none; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: block; box-shadow: 0 0 0 2px var(--panel); }
.face .dot { position: absolute; right: -2px; bottom: -2px; }
.dot.ok { background: var(--ok); } .dot.busy { background: var(--busy); } .dot.off { background: var(--off); } .dot.attention, .dot.gold { background: var(--attention); }

/* Sheets of choices: a row says what it does in a line. */
.action-row { gap: 12px; padding: 14px 4px; }
.action-row > span:first-child { display: grid; gap: 2px; }
.action-row strong { font-weight: 600; font-size: 16px; }
.action-row small { color: var(--muted); font-size: 13px; }
.action-row > span:last-child { color: var(--muted); font-size: 22px; }

/* Messages: the words first; who above only where it is not obvious; when, delivery and progress below. */
.entries { gap: 8px; padding-top: 18px; }
.entry { border-radius: 18px; padding: .6em .95em .45em; line-height: 1.42; }
.entry.mine { border-bottom-right-radius: 6px; }
.entry.agent, .entry.person:not(.mine) { border-bottom-left-radius: 6px; }
.entry .who { font-size: .8rem; margin-bottom: .15em; }
.entry .meta { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 8px; margin-top: .25em; font-size: .72rem; opacity: .75; }
.entry .meta time { font-weight: 400; }
.entry.notice .meta { justify-content: flex-start; }
.entry .delivery.sent { opacity: .9; }
button.task-link { display: inline-flex; align-items: center; gap: 5px; min-height: 0; padding: .15em .6em; font-size: .72rem; font-weight: 600; background: color-mix(in srgb, currentColor 12%, transparent); color: inherit; border-radius: 999px; }
.pip { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); display: inline-block; flex: none; }
.task-link.queued .pip { background: var(--off); } .task-link.working .pip { background: var(--busy); } .task-link.completed .pip { background: var(--ok); }
.task-link.failed .pip, .task-link.stopped .pip { background: var(--danger); } .task-link.awaiting-approval .pip { background: var(--attention); }
.entry.notice { border-radius: 14px; border-left: 3px solid var(--attention); }
.entry .technical summary { min-height: 0; padding-block: 4px; }

/* A file: what it is in one line, what to do with it in the next. */
.entry .file { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 6px 10px; align-items: center; padding: 10px; border-radius: 12px; border-color: color-mix(in srgb, currentColor 22%, transparent); }
.file-icon { width: 38px; height: 44px; border-radius: 6px; display: grid; place-items: center; font: 600 9px var(--mono); letter-spacing: .04em; color: var(--gold); border: 1px solid color-mix(in srgb, currentColor 30%, transparent); }
.file-what { display: grid; min-width: 0; }
.file-what .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry .file > button, .entry .file > a.button { grid-column: 1 / -1; justify-self: start; min-height: 36px; font-size: .85rem; }
.entry .file > a.button + button { grid-column: auto; }
.entry .file img { grid-column: 1 / -1; }

/* Tracking a request: a small switch above the message bar, not a second bar. */
.task-composer { display: flex; align-items: center; gap: 6px; padding: 6px 14px 0; background: var(--panel); border-top: 1px solid var(--line); flex: none; font-size: 13px; color: var(--muted); }
.task-composer select { font: inherit; font-size: 13px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: .35em 2em .35em .8em; min-height: 32px; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.task-composer.on select { border-color: var(--gold); }
.task-composer.on .pip { background: var(--busy); }
.task-composer + .composer { border-top: 0; }
.composer { padding-top: 8px; }

/* Adopting: where you are in two steps, the computer that matched, names a tap away. */
.progress { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; counter-reset: step; }
.progress li { counter-increment: step; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.progress li::before { content: counter(step); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 650; box-shadow: inset 0 0 0 1px var(--line); }
.progress li + li::after { content: none; }
.progress li + li { padding-left: 6px; border-left: 1px solid var(--line); }
.progress li.on { color: var(--ink); font-weight: 600; } .progress li.on::before { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.progress li.done::before { content: '✓'; background: var(--ok); color: #fff; box-shadow: none; }
.code-form input { font-size: 26px; padding: .55em .5em; border-radius: 14px; letter-spacing: .18em; }
.agent-card { flex-direction: row; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; }
.agent-card > div { display: grid; gap: 1px; min-width: 0; }
.agent-card strong { font-size: 19px; }
.agent-card .matched { color: var(--ok); font-weight: 600; font-size: 12px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 8px; }
.suggestions .chip { font-size: 13px; min-height: 34px; padding: .3em .8em; }
.help.inner { margin-top: 4px; }
.help summary { padding-block: 6px; }

@media (max-width: 760px) {
  .sidebar { border-right: 0; }
  .threads button.thread-row { padding: 10px 8px; }
  .entry { max-width: 86%; }
  .entry.notice { max-width: none; }
}
@media (min-width: 761px) {
  .sidebar header.home-bar { padding-top: 18px; }
}
.entry.mine .task-link, .task-link { text-decoration: none; }
.task-composer { flex-wrap: nowrap; }
.task-composer select { width: auto; max-width: calc(100% - 20px); }
.file-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.entry .file .file-actions button, .entry .file .file-actions a.button { min-height: 36px; font-size: .85rem; padding: .35em 1em; }
.entry.mine .file-icon { color: inherit; }

/* Kept last, so nothing above undoes them. */
/* A newer app is ready: a quiet bar at the top, clear of the message bar. */
.update { position: fixed; left: 50%; transform: translateX(-50%); top: calc(8px + env(safe-area-inset-top)); margin: 0; background: var(--ink); color: var(--panel); padding: .5em 1em; border-radius: 999px; max-width: calc(100% - 32px); z-index: 20; display: flex; gap: .6em; align-items: center; font-size: 14px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.update button { color: var(--gold); font-weight: 600; }
.crashed { text-align: center; padding: 48px 20px; }
.crashed p { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 760px) {
  /* iOS zooms the page when a field with text under 16px takes focus. */
  input, textarea, select, .capsule input, .task-composer select, .offline-choice select { font-size: 16px; }
  /* An error sits under the header, not over the message bar and Send. */
  #root > .error { bottom: auto; top: calc(56px + env(safe-area-inset-top)); width: max-content; }
}

.backup-code { font: 600 18px/1.5 var(--mono); letter-spacing: .04em; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; user-select: all; overflow-wrap: anywhere; }
.backup h3 { margin: 16px 0 6px; font-size: 15px; }
.welcome-restore { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
/* The desktop sidebar is narrow: the title gives way before the three buttons beside it do. */
.home-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 761px) {
  .layout { grid-template-columns: 340px 1fr; }
  .sidebar header.home-bar { gap: 2px; }
  .sidebar header.home-bar .icon.ghost { width: 38px; }
}
