/* llambda.net — brand stylesheet.
   Warm saffron on deep ink (dark) or on warm paper (light). One accent, used
   sparingly; the llama mark is the only illustration. */

:root {
  --bg: #fbf7f0;
  --surface: #ffffff;
  --surface-2: #f3ede2;
  --sidebar: #f4eee3;
  --line: #e2d9c8;
  --text: #211d16;
  --muted: #6d6556;
  --accent: #c2600c;
  --accent-ink: #ffffff;
  --accent-soft: #f9e6d0;
  --good: #1d7a55;
  --warn: #a15c07;
  --warn-soft: #fcefd2;
  --bad: #b3261e;
  --user-bubble: #efe5d3;
  --code-bg: #efe8da;
  --peer: #0f766e;
  --peer-soft: #e3f3f0;
  --peer-line: #b5ddd6;
  --peer-sat: 45%; --peer-bg-l: 90%; --peer-edge-l: 74%; --peer-ink-l: 32%;
  --shadow: 0 1px 2px rgba(60, 40, 10, .08), 0 8px 24px rgba(60, 40, 10, .07);
  --radius: 14px;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, Menlo, monospace;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}

/* Dark applies for a dark system unless light was chosen, and always when dark was chosen. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101218;
    --surface: #171a22;
    --surface-2: #1e222c;
    --sidebar: #0c0e13;
    --line: #272c38;
    --text: #ece8df;
    --muted: #9a9484;
    --accent: #f2a23a;
    --accent-ink: #1a1203;
    --accent-soft: #2e2210;
    --good: #5cc79b;
    --warn: #f2b45a;
    --warn-soft: #2a2110;
    --bad: #ff8a80;
    --user-bubble: #222734;
    --code-bg: #0b0d12;
    --peer: #5fd3c0;
    --peer-soft: #12302c;
    --peer-line: #1f4f48;
    --peer-sat: 42%; --peer-bg-l: 20%; --peer-edge-l: 34%; --peer-ink-l: 72%;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101218;
  --surface: #171a22;
  --surface-2: #1e222c;
  --sidebar: #0c0e13;
  --line: #272c38;
  --text: #ece8df;
  --muted: #9a9484;
  --accent: #f2a23a;
  --accent-ink: #1a1203;
  --accent-soft: #2e2210;
  --good: #5cc79b;
  --warn: #f2b45a;
  --warn-soft: #2a2110;
  --bad: #ff8a80;
  --user-bubble: #222734;
  --code-bg: #0b0d12;
  --peer: #5fd3c0;
  --peer-soft: #12302c;
  --peer-line: #1f4f48;
  --peer-sat: 42%; --peer-bg-l: 20%; --peer-edge-l: 34%; --peer-ink-l: 72%;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 2px; }
code, pre, textarea.mono { font-family: var(--mono); }
code { background: var(--code-bg); border-radius: 5px; padding: .1em .35em; font-size: .9em; }
pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; overflow: auto; margin: .6rem 0; font-size: .86rem; line-height: 1.5; }
pre code { background: none; padding: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; letter-spacing: -.01em; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---- Layout ---- */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); height: 100vh; height: 100dvh; }
.main-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.view { flex: 1; min-height: 0; overflow-y: auto; outline: none; }
.topbar { display: none; align-items: center; gap: .75rem; padding: .6rem .9rem; border-bottom: 1px solid var(--line); background: var(--bg); }
.topbar-title { font-weight: 600; }
.topbar-meta { margin-left: auto; color: var(--muted); font-size: .85rem; }

/* ---- Sidebar ---- */
.sidebar { display: flex; flex-direction: column; gap: .75rem; padding: .9rem .8rem; background: var(--sidebar); border-right: 1px solid var(--line); min-height: 0; overflow-y: auto; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--text); padding: .2rem .3rem; border-radius: 10px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; }
.brand-name { font: 700 1.2rem/1 var(--display); letter-spacing: -.02em; }
.new-chat { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; box-shadow: var(--shadow); }
.new-chat:hover { border-color: var(--accent); }
.new-chat svg { width: 17px; height: 17px; color: var(--accent); }
.side-nav { display: flex; flex-direction: column; gap: 2px; margin-top: .25rem; }
.side-nav a { display: block; padding: .5rem .7rem; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 500; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--text); font-weight: 650; }
.side-spacer { flex: 1; }
.side-foot { display: flex; flex-direction: column; gap: .6rem; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.account-link { display: flex; align-items: center; gap: .55rem; min-width: 0; padding: .35rem .45rem; border-radius: 10px; color: var(--text); text-decoration: none; }
.account-link:hover { background: var(--surface-2); }
.account-link span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .8rem; }
.conn-pill { display: flex; align-items: center; gap: .5rem; padding: .4rem .65rem; border-radius: 999px; background: var(--surface-2); font-size: .82rem; color: var(--muted); }
.conn-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.conn-pill[data-state="ready"] .dot { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); }
.conn-pill[data-state="missing"] .dot { background: var(--warn); }
.conn-pill[data-state="checking"] .dot { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.4rem; line-height: 1; }
.icon-button:hover { background: var(--surface-2); color: var(--text); }
.icon-button svg { width: 18px; height: 18px; }
.sidebar-close, .menu-button { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 20; }

/* ---- Buttons and form bits ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: 600 .92rem var(--sans); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.large { padding: .75rem 1.3rem; font-size: 1rem; border-radius: 12px; }
.link-button { border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.row.small { font-size: .88rem; gap: 1rem; }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.status { min-height: 1.4em; margin: 0; color: var(--muted); font-size: .9rem; }
input[type="email"], input[type="password"], input[type="text"] { width: 100%; padding: .6rem .75rem; margin-top: .25rem; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); font: inherit; }
label { font-weight: 600; font-size: .88rem; }

/* ---- Chat ---- */
.chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; scroll-behavior: smooth; }
.chat-inner { width: min(780px, 100%); margin: 0 auto; padding: 1.4rem 1.2rem 1rem; display: flex; flex-direction: column; gap: 1.1rem; min-height: 100%; }
.chat-inner.empty { justify-content: center; align-items: center; text-align: center; padding-bottom: 5vh; }
.hero-mark { width: 84px; height: 84px; margin-bottom: .6rem; border-radius: 20px; box-shadow: var(--shadow); }
.hero h1 { margin: 0 0 .35rem; font-size: clamp(1.7rem, 4vw, 2.3rem); }
.hero p { margin: 0 auto; max-width: 34rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; margin-top: 1.3rem; }
.chip { padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: 500 .9rem var(--sans); cursor: pointer; }
.chip:hover { border-color: var(--accent); background: var(--accent-soft); }

.setup-card { width: min(560px, 100%); margin-top: 1.4rem; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.setup-card h2 { margin: 0 0 .4rem; font-size: 1.1rem; }
.setup-card p { margin: .4rem 0; }
.cmd { display: flex; align-items: stretch; gap: .4rem; margin: .5rem 0; }
.cmd pre { flex: 1; margin: 0; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmd .btn { padding: .4rem .8rem; }

.msg { display: flex; flex-direction: column; gap: .35rem; max-width: 100%; }
.msg.user { align-self: flex-end; max-width: 85%; }
.msg.user .bubble { background: var(--user-bubble); border-radius: 18px 18px 5px 18px; padding: .65rem 1rem; white-space: pre-wrap; word-break: break-word; }
.msg.assistant { flex-direction: row; gap: .75rem; align-items: flex-start; }
.msg.assistant .body { min-width: 0; flex: 1; word-break: break-word; }
.body > :first-child { margin-top: 0; }
.body > :last-child { margin-bottom: 0; }
.body p { margin: .5em 0; }
.body ul, .body ol { padding-left: 1.4em; margin: .5em 0; }
.body h1, .body h2, .body h3 { margin: 1em 0 .4em; font-size: 1.05rem; }
/* A third participant: an agent on this PC (Claude Code and the like) tasking
   the llambda agent. Left-aligned like the agent, marked with its own colour. */
.msg.peer { align-self: flex-start; max-width: 85%; display: flex; flex-direction: column; gap: .25rem; }
.peer-name { font-size: .78rem; font-weight: 700; color: hsl(var(--peer-hue, 187) var(--peer-sat, 45%) var(--peer-ink-l, 32%)); letter-spacing: .02em; }
.msg.peer .bubble { background: hsl(var(--peer-hue, 187) var(--peer-sat, 45%) var(--peer-bg-l, 90%)); border: 1px solid hsl(var(--peer-hue, 187) var(--peer-sat, 45%) var(--peer-edge-l, 74%)); border-radius: 5px 18px 18px 18px; padding: .65rem 1rem; word-break: break-word; }
.reply-to { font-size: .78rem; font-weight: 700; color: var(--peer); margin-bottom: .2rem; }
.msg.note, .msg.bad { align-self: center; font-size: .88rem; text-align: center; }
.msg.note { color: var(--muted); }
.msg.bad { color: var(--bad); }

.tool { align-self: stretch; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); font-size: .85rem; overflow: hidden; }
.tool summary { cursor: pointer; padding: .45rem .75rem; color: var(--muted); font-family: var(--mono); list-style: none; display: flex; gap: .5rem; align-items: baseline; }
.tool summary::before { content: "\25B8"; color: var(--accent); }
.tool[open] summary::before { content: "\25BE"; }
.tool pre { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; max-height: 14rem; }
.tool.failed summary { color: var(--bad); }
.tool.changed summary { color: var(--text); }
.tool.running summary { color: var(--accent); }
.tool pre.stream { white-space: pre-wrap; word-break: break-word; }

.approval { align-self: stretch; border: 1px solid var(--warn); background: var(--warn-soft); border-radius: var(--radius); padding: .8rem 1rem; }
.approval strong { display: block; margin-bottom: .3rem; }
.approval pre { max-height: 16rem; }
.approval .row { margin-top: .5rem; }
.approval.done { opacity: .65; }
.approval .allow { background: var(--good); border-color: var(--good); color: #fff; }
.approval .refuse { background: transparent; color: var(--bad); border-color: var(--bad); }

.thinking { align-self: flex-start; display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .9rem; }
.thinking canvas { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); }

.composer-wrap { padding: .4rem 1.2rem 1rem; }
.composer { width: min(780px, 100%); margin: 0 auto; display: flex; align-items: flex-end; gap: .5rem; padding: .55rem .6rem .55rem 1rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.composer:focus-within { border-color: var(--accent); }
.composer textarea { flex: 1; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; line-height: 1.5; max-height: 12rem; padding: .35rem 0; }
.composer textarea::placeholder { color: var(--muted); }
.send { flex: none; width: 38px; height: 38px; border: 0; border-radius: 11px; background: var(--accent); color: var(--accent-ink); cursor: pointer; display: grid; place-items: center; }
.send:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.send svg { width: 18px; height: 18px; }
.send.stop { background: var(--text); color: var(--bg); }
.composer-note { width: min(780px, 100%); margin: .45rem auto 0; text-align: center; font-size: .78rem; color: var(--muted); }

/* ---- Content pages (install, docs, access, account) ---- */
.page { width: min(760px, 100%); margin: 0 auto; padding: 2rem 1.4rem 4rem; }
.page h1 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); margin: 0 0 .4rem; }
.page .lede { color: var(--muted); font-size: 1.05rem; margin: 0 0 1.6rem; }
.page h2 { font-size: 1.2rem; margin: 2rem 0 .5rem; }
.page h3 { font-size: 1rem; margin: 1.4rem 0 .3rem; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1.1rem 1.2rem; margin: 1rem 0; }
.card h2 { margin-top: 0; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.steps > li { counter-increment: step; position: relative; padding: 1rem 1.2rem 1rem 3.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.steps > li::before { content: counter(step); position: absolute; left: 1rem; top: 1rem; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .85rem; }
.steps h2 { margin: 0 0 .3rem; font-size: 1.05rem; }
.steps p { margin: .35rem 0; }

/* Install page: a download choice, then the checklist, each its own section. */
.install-section { margin: 1.8rem 0 0; }
.install-section > h2 { font-size: 1.15rem; margin: 0 0 .8rem; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1.1rem 1.2rem; }
.choice-head { display: flex; align-items: center; gap: .6rem; }
.choice h3 { margin: 0; font-size: 1.05rem; }
.choice p { margin: 0; flex: 1; }
.choice-badge { font-size: .75rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: .15rem .55rem; }
.choice-file { font: .78rem var(--mono); color: var(--muted); flex: none !important; }
@media (max-width: 640px) { .choices { grid-template-columns: 1fr; } }

/* Install checklist: one open step at a time, ticked off from the connector's state. */
.setup-banner { margin: 0 0 1rem; color: var(--muted); font-size: .95rem; }
.setup { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.setup-step { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.setup-step.current { border-color: var(--accent); box-shadow: var(--shadow); }
.setup-head { width: 100%; display: flex; align-items: center; gap: .85rem; padding: .9rem 1.1rem; border: 0; background: none; color: var(--text); font: 600 1.02rem var(--sans); text-align: left; cursor: pointer; }
.setup-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.setup-state { font-size: .8rem; font-weight: 600; color: var(--muted); }
.setup-step.current .setup-state { color: var(--accent); }
.setup-marker { flex: none; display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 2px solid var(--line); color: var(--muted); font-size: .85rem; font-weight: 700; }
.setup-marker svg { width: 1rem; height: 1rem; }
.setup-step.current .setup-marker { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.setup-step.done .setup-marker { border-color: var(--good); background: var(--good); color: #fff; }
.setup-step.done .setup-title { font-weight: 500; color: var(--muted); }
.setup-step.todo .setup-title { color: var(--muted); }
.setup-body { padding: 0 1.1rem 1.1rem 3.75rem; }
.setup-body > :first-child { margin-top: 0; }
.setup-body p { margin: .5rem 0; }
.setup-body .row { margin: .9rem 0 .6rem; }
.setup-more { margin-top: 2.4rem; }
.setup-more h2 { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .5rem; }
.setup-more details { border-top: 1px solid var(--line); padding: .2rem 0; }
.setup-more details:last-child { border-bottom: 1px solid var(--line); }
.setup-more summary { cursor: pointer; padding: .7rem 0; font-weight: 600; }
.setup-more details[open] { padding-bottom: .8rem; }
@media (max-width: 820px) { .setup-body { padding-left: 1.1rem; } }

.callout { display: flex; gap: .7rem; padding: .8rem 1rem; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); margin: 1rem 0; }
.callout.warn { border-color: var(--warn); background: var(--warn-soft); }

/* Plan & billing: tier badge and the account's usage numbers. */
.badge-pro { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: .18rem .6rem; vertical-align: middle; }
.stat-row { display: flex; gap: 1.6rem; flex-wrap: wrap; margin: .9rem 0; }
.stat { display: flex; flex-direction: column; }
.stat-value { font: 700 1.15rem var(--mono); }
.stat-label { font-size: .78rem; color: var(--muted); }

.usage-table { width: 100%; border-collapse: collapse; margin: .7rem 0 .2rem; font-size: .86rem; }
.usage-table th { text-align: left; font-size: .76rem; font-weight: 600; color: var(--muted); padding: .3rem .6rem .3rem 0; border-bottom: 1px solid var(--line); }
.usage-table td { padding: .35rem .6rem .35rem 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .83rem; }
.usage-table td:first-child { font-family: var(--sans); }

/* Beveled panes: a raised face with a lit top edge and a soft drop, the
   site's card language pushed further for merchandising surfaces. */
.pane { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1.2rem 1.3rem; box-shadow: var(--shadow), inset 0 1px 0 var(--line); }
.pane-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem; margin: 1rem 0; }
.pane h2, .pane h3 { margin-top: 0; }
.pane .pane-price { font: 700 1.3rem var(--mono); color: var(--accent); margin: .2rem 0 .4rem; }
.pane .pane-note { color: var(--muted); font-size: .88rem; margin: .4rem 0 .8rem; }

/* Billing page hero: gradient face with the plan tiers spelled out. */
.bill-hero { margin: 0 0 1.2rem; padding: 1.4rem 1.5rem; border-radius: var(--radius); border: 1px solid var(--accent); background: linear-gradient(115deg, var(--accent-soft) 0%, var(--surface) 70%); box-shadow: var(--shadow), inset 0 1px 0 var(--line); }
.bill-hero h1 { margin: 0 0 .3rem; }
.bill-hero .lede { margin-bottom: .8rem; }
.bill-hero .tier-line { display: flex; gap: .5rem; flex-wrap: wrap; }
.bill-hero .tier-chip { font-size: .8rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .75rem; background: var(--surface); }

.field-grid { display: grid; gap: .9rem; margin-top: 1rem; }
.field label { display: block; margin-bottom: .25rem; }
.field .cmd pre { white-space: pre-wrap; overflow-wrap: anywhere; }

.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin: 1.2rem 0; }
.tab { text-decoration: none; padding: .5rem .9rem; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 600 .92rem var(--sans); cursor: pointer; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

.report { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); padding: .7rem .9rem; margin: .6rem 0; }
.report.ok { border-left: 4px solid var(--good); }
.report.fail { border-left: 4px solid var(--bad); }
.report pre { max-height: 16rem; }

/* Reference pages rendered inside the app keep their own markup; give it the brand. */
.docs-body table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .9rem; display: block; overflow-x: auto; }
.docs-body th, .docs-body td { border: 1px solid var(--line); padding: .4rem .6rem; text-align: left; vertical-align: top; }
.docs-body th { background: var(--surface-2); }
.docs-body .command-row { display: flex; gap: .4rem; margin: .5rem 0; }
.docs-body .command-text { flex: 1; font: .86rem/1.5 var(--mono); background: var(--code-bg); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: .6rem .8rem; resize: vertical; min-height: 3rem; }
.docs-body .copy-button { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 9px; padding: 0 .9rem; cursor: pointer; font-weight: 600; }
.docs-body .lede { color: var(--muted); }

/* ---- Modal ---- */
.modal { width: min(420px, calc(100% - 2rem)); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); padding: 1.5rem; box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(0, 0, 0, .55); }
.modal h2 { margin: 0 0 .3rem; font-size: 1.25rem; }
.modal-close-form { position: absolute; top: .6rem; right: .6rem; margin: 0; }

.noscript { padding: 1rem; margin: 1rem; border: 1px solid var(--warn); border-radius: 10px; }

/* ---- Small screens ---- */
@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .topbar { display: flex; }
  .menu-button, .sidebar-close { display: inline-grid; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); z-index: 30; transform: translateX(-102%); transition: transform .2s ease; }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .msg.user { max-width: 92%; }
  .chat-inner { padding: 1rem .9rem; }
  .composer-wrap { padding: .3rem .7rem .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Pool consent (billing pane) */
.pool-consent { margin: 1rem 0; padding-top: .8rem; border-top: 1px solid var(--line); }
.pool-consent h3 { margin: .2rem 0 .3rem; font-size: .95rem; }
.pool-consent .check { display: flex; gap: .5rem; align-items: baseline; font-weight: 500; margin: .45rem 0; cursor: pointer; }
.pool-consent .check input { accent-color: var(--accent); }
