[hidden] { display: none !important; }
/* Colors follow Tinfoil Chat's design tokens (tinfoilsh/tinfoil-webapp, src/styles/tailwind.css),
   so Discreto looks like the Tinfoil chat it runs beside. */
:root {
  color-scheme: light dark;
  --canvas: hsl(40 20% 97%); --raised: hsl(0 0% 100%); --surface: hsl(180 15.4% 94.9%);
  --fg: hsl(221 39.3% 11%); --fg2: hsl(221 20% 20%); --muted: hsl(221 14% 34%);
  --line: hsl(220 13% 91%); --accent: hsl(34.84 55.36% 78.04%); --accent-fg: hsl(193 80.4% 10%);
  --link: hsl(180 100% 13.3%); --bg: var(--canvas);
  --ok: #1a7f37; --bad: #b42318; --badge-bg: hsl(214 60% 92%); --badge-fg: hsl(214 60% 35%);
  --grid: hsl(221 14% 34% / .05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: hsl(0 0% 7.1%); --raised: hsl(240 3.4% 11.4%); --surface: hsl(240 2.2% 17.6%);
    --fg: hsl(0 0% 98%); --fg2: hsl(218 10.6% 85%); --muted: hsl(218 10.6% 72%);
    --line: hsl(240 3.7% 26%); --link: hsl(257 32% 70%);
    --ok: #4ac26b; --bad: #f47067; --badge-bg: hsl(214 40% 22%); --badge-fg: hsl(214 80% 80%);
    --grid: hsl(0 0% 100% / .035);
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; color: var(--fg); background: var(--canvas); padding: calc(env(safe-area-inset-top) + 12px) 12px 12px; }
header { display: flex; justify-content: flex-end; gap: 8px; align-items: center; padding: 8px 0; }
.badge { font-size: 13px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); }
.badge.ok { color: var(--ok); border-color: var(--ok); }
.badge.bad { color: var(--bad); border-color: var(--bad); }
button, input, textarea { font: inherit; color: inherit; background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
button { cursor: pointer; }
button.danger { color: var(--bad); border-color: var(--bad); }
form { display: flex; gap: 6px; flex-wrap: wrap; }
textarea, input[type=password], input[type=search] { flex: 1; min-width: 0; width: 100%; }
ul { list-style: none; padding: 0; margin: 8px 0; }
li { border-bottom: 1px solid var(--line); padding: 10px 0; }
li .meta { color: var(--muted); font-size: 13px; }
li .actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
pre { white-space: pre-wrap; font-size: 12px; }

.md p, .md ul, .md ol, .md pre, .md h3, .md h4, .md h5, .md h6 { margin: 6px 0; }
.md ul { list-style: disc; padding-left: 20px; }
.md ol { list-style: decimal; padding-left: 20px; }
.md li { border: 0; padding: 2px 0; }
.md code { font-size: 0.9em; border: 1px solid var(--line); border-radius: 4px; padding: 0 3px; }
.md pre code { border: 0; padding: 0; }
.md .host { color: var(--muted); font-size: 0.85em; }
.md a { color: inherit; }
.table-wrap { overflow-x: auto; margin: 6px 0; }
.md table { border-collapse: collapse; font-size: 14px; }
.md th, .md td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; vertical-align: top; }
.md th { font-weight: 600; }

main.doc { max-width: 42rem; margin: 2rem auto; padding: 0 1rem; line-height: 1.5; }
main.doc h2 { margin-top: 1.5rem; }
#idle-note { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
#idle-note:empty { display: none; }
#start-form { display: flex; gap: 8px; flex-wrap: wrap; }
#start-form input { flex: 1; min-width: 220px; }

table.usage { border-collapse: collapse; font-size: 13px; }
table.usage th, table.usage td { border: 1px solid var(--line, #ddd); padding: 3px 8px; text-align: right; }
table.usage th:first-child, table.usage td:first-child,
table.usage th:nth-child(2), table.usage td:nth-child(2) { text-align: left; }
#log-usage { margin: 8px 0 14px; }

/* Approval cards */
:is(#approvals, .plan-cards) > li.summary { border: 0; padding: 4px 0; }
:is(#approvals, .plan-cards) > li.group-head { border: 0; padding: 14px 0 4px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
:is(#approvals, .plan-cards) > li.card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 8px 0; }
.card-top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.card-title { font-size: 17px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 0; }
.chip { font-size: 13px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.chip.c-strong { font-weight: 600; border-color: var(--fg); }
.chip.c-ok { color: var(--ok); border-color: var(--ok); }
.chip.c-bad { color: var(--bad); border-color: var(--bad); }
.chip.c-warn { color: #b26a00; border-color: #b26a00; }
@media (prefers-color-scheme: dark) { .chip.c-warn { color: #f0a640; border-color: #f0a640; } }
.chip.kind { font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
.chip.k-label { color: #1d4ed8; border-color: #1d4ed8; }
.chip.k-filter { color: #7c3aed; border-color: #7c3aed; }
.chip.k-archive { color: var(--muted); }
.chip.k-danger { color: var(--bad); border-color: var(--bad); }
@media (prefers-color-scheme: dark) { .chip.k-label { color: #7aa2ff; border-color: #7aa2ff; } .chip.k-filter { color: #b794f6; border-color: #b794f6; } }
.items { margin-top: 10px; }
.items-head { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
ul.item-list { margin: 0; border: 1px solid var(--line); border-radius: 8px; }
ul.item-list > li { padding: 6px 10px; border-bottom: 1px solid var(--line); }
ul.item-list > li:last-child { border-bottom: 0; }
.sender { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; }
.f-match { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-word; }
ul.item-list .chips { margin-top: 4px; }
button.link { border: 0; padding: 6px 0; text-decoration: underline; font-size: 14px; }
button.primary { font-weight: 600; background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
:is(#approvals, .plan-cards) details { margin-top: 8px; font-size: 13px; }
:is(#approvals, .plan-cards) details summary { cursor: pointer; color: var(--muted); }
:is(#approvals, .plan-cards) .reason { margin-top: 4px; color: var(--muted); }

/* Header, badges, banner */
nav button { position: relative; }
.count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; font-size: 12px; line-height: 18px; text-align: center; background: var(--bad); color: #fff; font-weight: 600; }
.count.dot { min-width: 8px; width: 8px; height: 8px; padding: 0; line-height: 8px; vertical-align: middle; background: #3b82f6; }
.count.info { background: #3b82f6; }
.banner { border: 1px solid #b26a00; color: #b26a00; border-radius: 8px; padding: 8px 10px; margin: 0 0 8px; font-size: 14px; }
@media (prefers-color-scheme: dark) { .banner { color: #f0a640; border-color: #f0a640; } }
.tab-error { color: var(--bad); font-size: 14px; }
.intro { font-size: 14px; margin: 4px 0 10px; }
button:disabled { opacity: .45; cursor: default; }

/* Approvals: working and done states, approve all */
:is(#approvals, .plan-cards) > li.card.working { opacity: .7; }
:is(#approvals, .plan-cards) > li.card.done { border-color: var(--ok); }
:is(#approvals, .plan-cards) > li.card.failed { border-color: var(--bad); }
.step-status { font-size: 14px; margin-top: 8px; }
.step-status.ok { color: var(--ok); font-weight: 600; }
.step-status.bad { color: var(--bad); }
:is(#approvals, .plan-cards) > li.group-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
:is(#approvals, .plan-cards) > li.group-head button { text-transform: none; letter-spacing: 0; font-size: 13px; padding: 4px 10px; }

/* Log */
.log-head { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
#log li .line { font-size: 15px; }
#log li.bad .line { color: var(--bad); }
#log-runs table { border-collapse: collapse; font-size: 13px; }
#log-runs th, #log-runs td { border: 1px solid var(--line); padding: 3px 8px; text-align: left; }
#log-runs td.now { color: var(--ok); font-weight: 600; }
#log-history { margin-bottom: 16px; }
ul.history { list-style: none; padding: 0; margin: 8px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.h-row { display: grid; grid-template-columns: 9.5em 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); }
.h-row:first-child { border-top: 0; }
.h-row > .chip { justify-self: start; }
.h-main { min-width: 0; cursor: pointer; }
.h-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-row.open .h-title, .h-row.open .h-meta { white-space: normal; }
.h-side { justify-self: end; }
.h-note { font-size: 13px; color: var(--muted); white-space: nowrap; }
.h-note.ok, .h-detail .ok { color: var(--ok); }
.h-note.bad, .h-detail .bad { color: var(--bad); }
.h-detail { grid-column: 2 / -1; font-size: 14px; display: grid; gap: 4px; }
button.small { padding: 3px 10px; font-size: 13px; }
@media (max-width: 560px) { .h-row { grid-template-columns: 1fr auto; } .h-row > .chip { grid-column: 1 / -1; } .h-detail { grid-column: 1 / -1; } }
.gmail-link { display: inline-block; margin: 6px 0 2px; font-size: 0.95em; }
.item-list .gmail-link { margin: 4px 0 0; font-size: 0.85em; }

/* The plan: waiting on you, and what Discreto is working through */
.plan { border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; }
.plan h3 { font-size: 0.95rem; margin: 6px 0 4px; }
.plan-sec + .plan-sec { margin-top: 10px; }
.plan-list { margin: 0; padding-left: 1.2rem; }
ul.plan-list { list-style: none; padding-left: 0; }
.plan-item { padding: 3px 0; line-height: 1.35; }
.plan-item label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.plan-item input { margin-top: 3px; flex: none; }
.plan-item.done span { text-decoration: line-through; opacity: 0.6; }
.plan-done summary { cursor: pointer; font-size: 0.85rem; opacity: 0.7; margin-top: 4px; }
.plan-item input[type=checkbox] { padding: 0; width: auto; }

/* App shell: an icon rail on the left, as in Tinfoil Chat */
#app:not([hidden]) { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; min-height: calc(100dvh - 24px); }
.content { min-width: 0; max-width: 60rem; width: 100%; margin: 0 auto; }
.rail { position: sticky; top: 12px; align-self: start; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px; border: 1px solid var(--line); border-radius: 18px; background: var(--raised); height: calc(100dvh - 24px); }
.rail-grow { flex: 1; }
.rail button.rail-verify { margin: 0 0 10px; color: var(--muted); }
.rail-verify svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.rail button.rail-verify.ok { color: var(--ok); }
.rail button.rail-verify.bad { color: var(--bad); }
.rail-dot { position: absolute; right: 6px; bottom: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); border: 2px solid var(--raised); }
.rail-verify.ok .rail-dot { background: var(--ok); }
.rail-verify.bad .rail-dot { background: var(--bad); }
.rail button.rail-pause .ico-play { display: none; }
.rail button.rail-pause:hover { color: var(--bad); }
.rail button.rail-pause.on { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.rail button.rail-pause.on .ico-pause { display: none; }
.rail button.rail-pause.on .ico-play { display: block; }
.rail button { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; color: var(--muted); }
.rail button:hover { background: var(--surface); color: var(--fg); }
.rail button.active { background: var(--surface); color: var(--fg); }
.rail-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rail .count { position: absolute; top: 2px; right: 0; margin: 0; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@media (max-width: 640px) {
  #app:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
  .rail { position: sticky; top: 0; z-index: 20; flex-direction: row; justify-content: space-around; height: auto; padding: 4px; border-radius: 14px; }
  .rail-grow { display: none; }
  .rail button.rail-verify { margin: 0; }
}

/* Chat, after Tinfoil Chat */
#tab-chat { display: flex; flex-direction: column; min-height: calc(100dvh - 24px); padding: 0 12px; }
/* The grid covers the whole window behind the chat, whatever its size. */
#tab-chat:not([hidden])::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px; }
#tab-chat[hidden] { display: none; }
.chat-empty { display: none; flex-direction: column; align-items: center; gap: 0; padding-top: 6vh; }
#tab-chat.is-empty .chat-empty { display: flex; }
#tab-chat.is-empty { justify-content: flex-start; }
#tab-chat.is-empty .composer-wrap { position: static; margin-top: 28px; }
#tab-chat:not(.is-empty) .suggestions { display: none; }
.private-pill { font-size: 14px; color: var(--fg2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; background: var(--canvas); }
.greeting { font-size: clamp(28px, 4.5vw, 40px); font-weight: 500; letter-spacing: -0.02em; margin: 16vh 0 0; text-align: center; }
.messages { width: 100%; max-width: 48rem; margin: 0 auto; padding-top: 16px; flex: 1; }
.msg { margin: 18px 0; }
.msg.user { text-align: right; }
.msg.user .bubble { display: inline-block; max-width: 85%; text-align: left; white-space: pre-wrap; background: var(--surface); border-radius: 18px; padding: 10px 16px; }
.msg.assistant { line-height: 1.6; }
.msg.error { color: var(--bad); }
.msg .when { color: var(--muted); font-size: 12px; margin-top: 4px; }
.msg.user .when { text-align: right; }
.msg .usage { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }
details.thought { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
details.thought summary { cursor: pointer; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
details.thought summary::before { content: "\25B8"; font-size: 11px; transition: transform .15s; }
details.thought[open] summary::before { transform: rotate(90deg); }
.thought-body { white-space: pre-wrap; margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface); font-size: 13px; max-height: 320px; overflow: auto; }
.thinking { color: var(--muted); font-size: 14px; width: 100%; max-width: 48rem; margin: 8px auto; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--fg); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }

.composer-wrap { position: sticky; bottom: 0; width: 100%; max-width: 48rem; margin: 0 auto; padding: 10px 0 12px; background: linear-gradient(transparent, var(--canvas) 30%); }
.composer { display: flex; flex-direction: column; gap: 6px; flex-wrap: nowrap; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 14px 10px 18px; }
.composer textarea { flex: none; border: 0; padding: 4px 0; resize: none; outline: none; font-size: 17px; line-height: 1.45; background: transparent; min-height: 30px; max-height: 240px; }
.composer textarea::placeholder { color: var(--muted); }
.composer-bar { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; color: var(--fg2); }
.icon-btn:hover { background: var(--canvas); }
.send-btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-fg); }
.send-btn .ico { width: 22px; height: 22px; stroke-width: 2; }
.send-btn:disabled { opacity: .5; }
.suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0 0; }
.chip-btn { font-size: 15px; border-radius: 12px; padding: 7px 14px; background: var(--canvas); color: var(--fg2); }
.chip-btn:hover { background: var(--surface); }

/* Model picker */
.model-pick { position: relative; }
.model-trigger { display: inline-flex; align-items: center; gap: 4px; border: 0; padding: 6px 8px; font-size: 14px; color: var(--fg2); border-radius: 10px; }
.model-trigger:hover { background: var(--canvas); }
.model-trigger .chev { width: 14px; height: 14px; transition: transform .15s; }
.model-trigger[aria-expanded="false"] .chev { transform: rotate(180deg); }
.model-menu { position: absolute; right: -60px; top: calc(100% + 10px); z-index: 50; width: 320px; max-height: min(70vh, 640px); overflow-y: auto;
  padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 12px 32px rgb(0 0 0 / .25);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; color: var(--fg2); }
.model-menu.up { top: auto; bottom: calc(100% + 10px); }
#tab-chat.is-empty .messages { flex: 0 0 auto; padding: 0; }
@media (max-width: 560px) { .model-menu { right: -50px; width: min(320px, 92vw); } }
.m-row { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; border: 0; border-radius: 10px; padding: 10px 12px; font: inherit; color: inherit; }
.m-row:hover { background: hsl(0 0% 50% / .1); }
.m-row.selected { background: hsl(34.84 55.36% 78.04% / .2); color: var(--fg); }
.m-row > .ico { margin-top: 1px; }
.m-row.selected > .ico:last-child { color: var(--accent); }
.m-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.m-label { font-weight: 500; }
.m-desc, .m-meta, .m-muted { font-size: 12px; color: var(--muted); }
.m-meta { opacity: .9; }
.m-badge.m-warn, .msg .caveat { background: none; color: #b26a00; border: 1px solid #b26a00; }
.msg .caveat { margin-top: 6px; font-size: 12px; padding: 2px 8px; border-radius: 6px; width: fit-content; max-width: 100%; }
@media (prefers-color-scheme: dark) { .m-badge.m-warn, .msg .caveat { color: #f0a640; border-color: #f0a640; } }
.m-badge { align-self: flex-start; margin-top: 4px; font-size: 12px; padding: 1px 8px; border-radius: 6px; background: var(--badge-bg); color: var(--badge-fg); }
.m-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 12px; font-weight: 700; color: #fff; flex: none; background: hsl(200 50% 40%); }
.m-icon[data-hue="1"] { background: hsl(230 70% 60%); } .m-icon[data-hue="2"] { background: hsl(160 45% 38%); }
.m-icon[data-hue="3"] { background: hsl(20 70% 50%); } .m-icon[data-hue="4"] { background: hsl(280 40% 50%); }
.m-icon[data-hue="5"] { background: hsl(0 0% 35%); }
.m-div { border-top: 1px solid var(--line); margin: 6px 12px; }
.m-side { display: inline-flex; align-items: center; gap: 4px; }
.m-side .ico { width: 16px; height: 16px; color: var(--muted); }
.m-effort-list { padding: 0 0 4px 12px; }
.m-note { font-size: 12px; color: var(--muted); margin: 6px 12px 4px; line-height: 1.45; font-family: system-ui, sans-serif; }
.m-intel { padding: 6px 12px 4px; }
.m-intel-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
.stepper { position: relative; display: flex; justify-content: space-between; align-items: center; height: 36px; border-radius: 999px; padding: 0 6px;
  background: linear-gradient(90deg, var(--accent) var(--fill, 50%), hsl(0 0% 50% / .25) var(--fill, 50%)); outline-offset: 2px; }
.stepper .stop { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; }
.stepper .stop::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.stepper .stop.under::after { background: var(--accent-fg); opacity: .6; }
.stepper .stop.on { background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .3); }
.stepper .stop.on::after { display: none; }
a { color: var(--link); }

/* Decisions in chat */
.decisions { width: 100%; max-width: 48rem; margin: 8px auto; }
#tab-chat.is-empty .decisions { order: 5; margin-top: 28px; }
#tab-chat.is-empty .composer-wrap { order: 4; }
.dec-head { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.decision { background: var(--raised); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 0 0 12px; }
.dec-q { font-weight: 500; margin-bottom: 4px; }
.dec-note { font-size: 13px; color: var(--muted); }
.dec-note.bad, .dec-status.bad { color: var(--bad); }
.dec-opts { display: grid; gap: 10px; margin-top: 10px; }
.dec-opt { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: 12px; align-items: start; }
.dec-btn { border-radius: 12px; padding: 7px 14px; background: var(--surface); text-align: left; }
.dec-btn:hover:not(:disabled) { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.dec-what { font-size: 13px; color: var(--fg2); display: grid; gap: 2px; padding-top: 4px; }
.dec-what .gmail-link { margin: 0; font-size: 12px; }
.dec-status { font-size: 13px; margin-top: 10px; color: var(--muted); }
@media (max-width: 560px) { .dec-opt { grid-template-columns: 1fr; gap: 4px; } }

/* What the shield vouches for */
.verify-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--raised); color: var(--fg); }
.verify-dialog::backdrop { background: rgb(0 0 0 / .45); }
.vd-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.vd-head h2 { margin: 0; font-size: 20px; }
.vd-lead { color: var(--fg2); font-size: 14px; }
ul.vd-steps { margin: 10px 0; }
li.vd-step { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.vd-mark { width: 20px; flex: none; text-align: center; font-weight: 700; color: var(--muted); }
li.vd-step.success .vd-mark { color: var(--ok); }
li.vd-step.failed .vd-mark { color: var(--bad); }
.vd-title { font-weight: 600; font-size: 15px; }
dl.vd-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; font-size: 13px; margin: 12px 0; }
dl.vd-facts dt { color: var(--muted); }
dl.vd-facts dd { margin: 0; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
dl.vd-facts a { color: var(--link); }
.vd-raw summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.vd-raw pre { max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }

/* Plan items that carry steps: the steps open under the item */
.plan-steps { margin: 4px 0 6px 26px; font-size: 14px; }
.plan-steps > summary { cursor: pointer; color: var(--accent, inherit); font-weight: 600; }
ul.plan-cards { list-style: none; margin: 4px 0 0; padding: 0; }
.plan-item label input:disabled { opacity: .8; }

/* Saved conversations: the menu next to New chat, the title bar over a conversation, and the
   Ask about this button on decision cards. */
.chats-pick { position: relative; }
.chats-menu { right: auto; left: -8px; font-family: inherit; }
@media (max-width: 560px) { .chats-menu { right: auto; left: -50px; } }
.m-head { font-size: 12px; color: var(--muted); padding: 6px 12px 4px; }
.m-empty { font-size: 13px; color: var(--muted); padding: 8px 12px; }
.m-name { color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-row { display: flex; align-items: center; gap: 2px; }
.c-row .m-row { flex: 1; min-width: 0; }
.c-del { flex: none; opacity: .55; }
.c-del:hover, .c-del:focus-visible { opacity: 1; }
.c-del.armed { width: auto; padding: 0 10px; opacity: 1; color: var(--bad); font-size: 13px; }
.chat-head { width: 100%; max-width: 48rem; margin: 0 auto; padding: 10px 0 0; display: flex; gap: 8px;
  align-items: baseline; font-size: 13px; color: var(--muted); }
.chat-head[hidden] { display: none; }
.chat-head-t { color: var(--fg2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#tab-chat.is-empty .chat-head { order: 3; justify-content: center; }
.dec-top { display: flex; align-items: flex-start; gap: 12px; }
.dec-top .dec-q { flex: 1; }
.dec-ask { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; border-radius: 10px;
  padding: 4px 10px; background: transparent; color: var(--fg2); }
.dec-ask:hover { background: var(--surface); color: var(--fg); }
.dec-ask .ico { width: 15px; height: 15px; }
.msg.note { opacity: .9; }

/* Face ID or Touch ID first: one big button, the manual ways behind a link. */
.unlock { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 48px 0 32px; text-align: center; }
button.big { font-size: 17px; padding: 14px 28px; min-width: 240px; border-radius: 12px; }
details.more summary { cursor: pointer; font-size: 14px; color: var(--muted, inherit); margin: 8px 0; }
