/* Arih Web – munkafelület. Metafora: műhelyasztal + munkanapló. Papír alap, sötét tinta, egy akcentus (lime) a „most
   történik” jelekre; a lépések egy függőleges naplócsíkon sorakoznak (az aláírás-pillanat). Inter + JetBrains Mono. */
:root {
  --ink: oklch(0.22 0.02 255);
  --ink-2: oklch(0.45 0.02 255);
  --ink-3: oklch(0.62 0.015 255);
  --paper: oklch(0.982 0.006 95);
  --paper-2: oklch(0.955 0.008 95);
  --card: oklch(1 0 0);
  --line: oklch(0.89 0.01 95);
  --accent: oklch(0.9 0.21 128);
  --accent-ink: oklch(0.38 0.11 132);
  --bad: oklch(0.55 0.19 27);
  --bad-bg: oklch(0.96 0.03 27);
  --warn: oklch(0.72 0.15 70);
  --warn-bg: oklch(0.96 0.05 85);
  --ok: oklch(0.55 0.13 150);
  --ok-bg: oklch(0.96 0.04 150);
  --add-bg: oklch(0.95 0.05 150);
  --del-bg: oklch(0.95 0.04 27);
  --code-bg: oklch(0.2 0.015 255);
  --code-ink: oklch(0.93 0.01 95);
  --r: 10px; --r-s: 6px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 40px;
  --side: 296px;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: oklch(0.93 0.01 95); --ink-2: oklch(0.74 0.015 95); --ink-3: oklch(0.58 0.015 95);
    --paper: oklch(0.18 0.012 255); --paper-2: oklch(0.22 0.014 255); --card: oklch(0.235 0.014 255);
    --line: oklch(0.32 0.014 255); --accent-ink: oklch(0.86 0.17 128);
    --bad-bg: oklch(0.28 0.06 27); --warn-bg: oklch(0.3 0.05 80); --ok-bg: oklch(0.28 0.05 150);
    --add-bg: oklch(0.3 0.06 150); --del-bg: oklch(0.3 0.06 27); --code-bg: oklch(0.14 0.01 255);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { overflow: hidden; }
a { color: inherit; }
h1 { font-size: 1.45rem; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 var(--s1); text-wrap: balance; }
h2 { font-size: 1.02rem; margin: 0 0 var(--s2); }
h3 { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); margin: var(--s5) 0 var(--s2); font-weight: 600; }
p { text-wrap: pretty; }
.muted { color: var(--ink-2); }
.small { font-size: 0.85rem; }
.mono, code, pre { font-family: var(--mono); font-size: 0.84em; }
.bad { color: var(--bad); }
.ok { color: var(--ok); }
.clip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; border-radius: 4px; }
.boot { padding: var(--s6); color: var(--ink-2); }

/* ─── gombok, mezők ─────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: var(--s2); min-height: 36px; padding: 0 var(--s4); border: 1px solid var(--line);
  border-radius: var(--r-s); background: var(--card); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s, transform .06s; }
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.bad, .btn.stop { color: var(--bad); border-color: color-mix(in oklch, var(--bad) 45%, var(--line)); }
.btn.small { min-height: 28px; padding: 0 var(--s3); font-size: 0.85rem; }
.actions { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
input, textarea, select { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-s);
  padding: var(--s2) var(--s3); min-height: 38px; width: 100%; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--ink-2); outline: none; box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 45%, transparent); }
.form { display: grid; gap: var(--s3); max-width: 520px; }
.form label, .keybox label { display: grid; gap: var(--s1); font-size: 0.9rem; font-weight: 500; }
.form .btn { justify-self: start; }
label.inline { display: flex; gap: var(--s2); align-items: center; max-width: 420px; margin-bottom: var(--s4); }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 600; letter-spacing: .01em; padding: 2px 8px;
  border-radius: 999px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.run { color: var(--accent-ink); background: color-mix(in oklch, var(--accent) 28%, var(--card)); }
.pill.run i { animation: pulse 1.2s ease-in-out infinite; }
.pill.wait { color: oklch(0.45 0.12 70); background: var(--warn-bg); }
.pill.done { color: var(--ok); background: var(--ok-bg); }
.pill.bad { color: var(--bad); background: var(--bad-bg); }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.wait { background: var(--warn); }

/* ─── keret ─────────────────────────────────────────────────────────── */
.frame { display: grid; grid-template-columns: var(--side) 1fr; height: 100dvh; }
.side { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); background: var(--paper-2); border-right: 1px solid var(--line);
  overflow: hidden; min-height: 0; }
.brand { display: flex; align-items: center; gap: var(--s2); font-weight: 700; letter-spacing: -0.01em; text-decoration: none; }
.brand .mark { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); box-shadow: inset -6px -6px 0 var(--ink); }
.brand.big { font-size: 1.4rem; }
.search { min-height: 34px; font-size: 0.9rem; }
.plist { flex: 1; overflow-y: auto; margin: 0 calc(var(--s2) * -1); padding: 0 var(--s2); overscroll-behavior: contain; }
.proj { border-radius: var(--r-s); margin-bottom: var(--s1); }
.proj > summary { list-style: none; cursor: pointer; }
.proj > summary::-webkit-details-marker { display: none; }
.proj > summary a { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: 6px var(--s2); border-radius: var(--r-s);
  text-decoration: none; font-weight: 600; }
.proj > summary a::before { content: "▸"; color: var(--ink-3); font-size: .7rem; margin-right: 2px; transition: transform .15s; }
.proj[open] > summary a::before { transform: rotate(90deg); }
.pname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj ul { list-style: none; margin: 0 0 var(--s1); padding: 0 0 0 14px; border-left: 1px solid var(--line); margin-left: 12px; }
.proj li a { display: grid; gap: 2px; padding: 6px var(--s2); border-radius: var(--r-s); text-decoration: none; font-size: 0.88rem; }
.ctitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmeta { display: flex; gap: var(--s2); align-items: center; color: var(--ink-3); font-size: 0.74rem; }
.side a.on, .side a:hover { background: var(--card); }
.side a.on { box-shadow: inset 2px 0 0 var(--accent-ink); }
.proj.archived { opacity: .55; }
.newchat { display: block; margin: 2px 0 var(--s2) 26px; font-size: 0.82rem; color: var(--accent-ink); text-decoration: none; padding: 4px var(--s2); border-radius: var(--r-s); }
.side footer { display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: var(--s3); }
.side footer a { padding: 6px var(--s2); border-radius: var(--r-s); text-decoration: none; font-size: 0.9rem; }
.side footer small { padding: 0 var(--s2); }
.menu, .scrim { display: none; }

.main { overflow-y: auto; overflow-x: hidden; padding: var(--s5) clamp(var(--s4), 4vw, var(--s6)) var(--s6); min-width: 0; scroll-behavior: smooth; }
.main:focus { outline: none; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.notice { background: var(--warn-bg); border-radius: var(--r); padding: var(--s3) var(--s4); margin-bottom: var(--s4); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--s3); }
.card { display: grid; gap: var(--s1); padding: var(--s4); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none;
  transition: border-color .12s, transform .12s; }
.card:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.card .meta { font-size: 0.82rem; color: var(--ink-2); display: flex; gap: var(--s2); flex-wrap: wrap; }
.card.archived { opacity: .6; }
.panel { margin-top: var(--s5); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3) var(--s4); background: var(--card); }
.panel > summary { cursor: pointer; font-weight: 600; }
.panel[open] > summary { margin-bottom: var(--s3); }
.panel.danger > summary { color: var(--bad); }
.start { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); }
.sessions { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.sessions a { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s3); padding: var(--s3) var(--s4); background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); text-decoration: none; }
.sessions a:hover { border-color: var(--ink-3); }
.stitle { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sessions .small { grid-column: 1 / -1; }

/* ─── munkamenet ────────────────────────────────────────────────────── */
.main.chat { display: flex; flex-direction: column; padding-bottom: 0; }
.chatbar { position: sticky; top: calc(var(--s5) * -1); z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap;
  margin: calc(var(--s5) * -1) calc(clamp(var(--s4), 4vw, var(--s6)) * -1) var(--s4); padding: var(--s3) clamp(var(--s4), 4vw, var(--s6));
  background: color-mix(in oklch, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.chatbar h1 { font-size: 1.1rem; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; }
.chatbar .ctitle a { text-decoration: none; }
.chatgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 280px); gap: var(--s5); flex: 1; align-items: start; }
.thread { min-width: 0; }
.rail { position: sticky; top: 72px; display: grid; gap: var(--s3); }
.log { display: grid; gap: var(--s3); padding: 0 0 var(--s5) 22px; position: relative; }
.log::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 0; width: 2px; background: var(--line); border-radius: 2px; }
.log > * { min-width: 0; }
.msg { position: relative; max-width: min(74ch, 100%); }
.msg.user { justify-self: end; background: var(--ink); color: var(--paper); border-radius: var(--r) var(--r) 2px var(--r); padding: var(--s3) var(--s4); }
.msg.user .md code { background: color-mix(in oklch, var(--paper) 18%, transparent); }
.msg.ai::before, .step::before, .line::before, .approve::before { content: ""; position: absolute; left: -19px; top: 9px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink-3); }
.msg.ai::before { border-color: var(--ink); background: var(--ink); }
.msg.live::before { background: var(--accent); border-color: var(--accent-ink); animation: pulse 1.2s ease-in-out infinite; }
.msg.user .imgs { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s2); }
.msg.user img { max-width: 160px; max-height: 120px; border-radius: var(--r-s); display: block; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md blockquote { margin: 0 0 var(--s2); }
.md ul, .md ol { padding-left: 1.3em; }
.md li.task { list-style: none; margin-left: -1.3em; display: flex; gap: var(--s2); }
.md h3, .md h4, .md h5, .md h6 { font-size: 0.98rem; text-transform: none; letter-spacing: 0; color: inherit; margin: var(--s3) 0 var(--s1); }
.md code { background: var(--paper-2); padding: 1px 5px; border-radius: 4px; }
.md blockquote { border-left: 3px solid var(--line); padding-left: var(--s3); color: var(--ink-2); }
.md a { color: var(--accent-ink); }
.codewrap { position: relative; margin: var(--s2) 0; }
.codewrap .lang { position: absolute; left: var(--s3); top: 6px; font: 600 0.7rem var(--mono); color: oklch(0.7 0.02 255); text-transform: uppercase; letter-spacing: .06em; }
.codewrap .copy { position: absolute; right: 6px; top: 6px; font: 500 0.72rem inherit; border: 0; border-radius: 4px; padding: 3px 8px; cursor: pointer;
  background: oklch(0.32 0.02 255); color: var(--code-ink); }
pre.code { background: var(--code-bg); color: var(--code-ink); padding: 28px var(--s4) var(--s3); border-radius: var(--r-s); overflow-x: auto; margin: 0; line-height: 1.5; }
pre.code code { background: none; padding: 0; }

.step { position: relative; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--card); font-size: 0.88rem; max-width: min(74ch, 100%); }
.step > summary { display: flex; align-items: center; gap: var(--s2); padding: 6px var(--s3); cursor: pointer; list-style: none; min-height: 34px; }
.step > summary::-webkit-details-marker { display: none; }
.step.flat > summary { cursor: default; }
.step .kind { font: 600 0.68rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); background: var(--paper-2);
  padding: 2px 6px; border-radius: 4px; flex: none; }
.step .stext { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step .sstate { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent-ink); animation: spin .8s linear infinite; flex: none; }
.step.s-ok .sstate { animation: none; border: 0; background: var(--ok); mask: none; }
.step.s-ok .sstate::after { content: "✓"; display: block; color: var(--card); font-size: 10px; line-height: 14px; text-align: center; font-weight: 700; }
.step.s-err .sstate { animation: none; border: 0; background: var(--bad); }
.step.s-ok::before { border-color: var(--ok); }
.step.s-err::before { border-color: var(--bad); }
.step.k-write .kind { color: var(--accent-ink); background: color-mix(in oklch, var(--accent) 25%, var(--card)); }
.step.k-command .kind { color: var(--card); background: var(--ink-2); }
.step .sbody { padding: 0 var(--s3) var(--s3); display: grid; gap: var(--s2); }
.step pre.out { margin: 0; max-height: 240px; overflow: auto; background: var(--paper-2); padding: var(--s2) var(--s3); border-radius: 4px; white-space: pre-wrap; }
@keyframes spin { to { transform: rotate(360deg); } }
pre.diff { margin: 0; overflow-x: auto; background: var(--paper-2); border-radius: 4px; padding: var(--s2) 0; font-size: 0.8rem; line-height: 1.45; max-height: 60vh; }
pre.diff span { display: block; padding: 0 var(--s3); white-space: pre; }
pre.diff .add { background: var(--add-bg); }
pre.diff .del { background: var(--del-bg); }
pre.diff .hunk { color: var(--accent-ink); }
pre.diff .meta { color: var(--ink-3); }
.change { display: grid; gap: 2px; }
.line { position: relative; font-size: 0.82rem; color: var(--ink-2); }
.line.bad { color: var(--bad); } .line.ok { color: var(--ok); }
.line.bad::before { border-color: var(--bad); } .line.ok::before { border-color: var(--ok); }
.approve { position: relative; border: 1px solid var(--warn); background: var(--warn-bg); border-radius: var(--r); padding: var(--s3) var(--s4); max-width: 74ch; }
.approve::before { border-color: var(--warn); background: var(--warn); }
.approve p { margin: var(--s2) 0; word-break: break-word; }
.approve.done { opacity: .55; border-color: var(--line); background: var(--card); }
.approve.done .actions { display: none; }

.todo, .files { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3) var(--s4); }
.todo h3, .files h3 { margin-top: 0; }
.todo ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 0.88rem; }
.todo li { display: flex; gap: var(--s2); align-items: baseline; }
.todo .check { width: 12px; height: 12px; border: 2px solid var(--ink-3); border-radius: 3px; flex: none; transform: translateY(1px); }
.todo .t-in_progress { font-weight: 600; }
.todo .t-in_progress .check { border-color: var(--accent-ink); background: var(--accent); }
.todo .t-completed { color: var(--ink-3); text-decoration: line-through; }
.todo .t-completed .check { background: var(--ok); border-color: var(--ok); }
.files ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.file { display: flex; justify-content: space-between; gap: var(--s2); width: 100%; text-align: left; background: none; border: 0; padding: 6px var(--s2);
  border-radius: 4px; cursor: pointer; color: inherit; font: inherit; font-size: 0.82rem; }
.file:hover { background: var(--paper-2); }
.file .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: left; }
.nums { display: flex; gap: 6px; font: 600 0.74rem var(--mono); flex: none; }
.nums .add { color: var(--ok); } .nums .del { color: var(--bad); } .nums .new { color: var(--accent-ink); }

.composer { position: sticky; bottom: 0; z-index: 2; margin: 0 calc(clamp(var(--s4), 4vw, var(--s6)) * -1); padding: var(--s3) clamp(var(--s4), 4vw, var(--s6))
  calc(var(--s3) + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--paper) 70%, transparent); }
.start .composer { position: static; margin: 0; padding: 0; background: none; }
.composer .row { display: grid; grid-template-columns: 1fr auto; gap: var(--s2); align-items: end; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: var(--s2); box-shadow: 0 8px 24px -16px oklch(0.2 0.02 255 / .35); }
.composer textarea { border: 0; min-height: 44px; max-height: 40vh; box-shadow: none; padding: var(--s2); }
.composer.running .row { border-color: var(--accent-ink); }
.thumbs { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s2); }
.thumbs:empty { display: none; }
.thumbs figure { position: relative; margin: 0; }
.thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-s); border: 1px solid var(--line); display: block; }
.thumbs button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper); cursor: pointer; }

/* ─── táblák, admin ─────────────────────────────────────────────────── */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
th, td { text-align: left; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 600; background: var(--paper-2); }
tr:last-child td { border-bottom: 0; }
td .clip { max-width: 320px; }
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); margin-bottom: var(--s5); overflow-x: auto; }
.tabs a { padding: var(--s2) var(--s3); text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.settings { display: grid; gap: var(--s4); max-width: 720px; }
.keybox { display: grid; gap: var(--s3); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); }
.keybox h2 { margin: 0; }
.keybox p { margin: 0; }
.keybox label > span { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.state { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.chain { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); align-items: baseline; padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--ok-bg); }
.chain.bad { background: var(--bad-bg); color: var(--bad); }
.login { max-width: 400px; margin: 12vh auto; padding: var(--s5); display: grid; gap: var(--s3); }

.modal { position: fixed; inset: 0; z-index: 20; background: oklch(0.15 0.02 255 / .45); display: grid; place-items: center; padding: var(--s4); }
.sheet { background: var(--card); border-radius: var(--r); width: min(960px, 100%); max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; }
.sheet header { display: flex; justify-content: space-between; gap: var(--s3); align-items: center; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.sheet header strong { font: 600 0.85rem var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { overflow: auto; padding: var(--s3) var(--s4); }
.sheet-body pre.diff { max-height: none; }

#toast { position: fixed; left: 50%; bottom: calc(var(--s5) + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 30;
  background: var(--ink); color: var(--paper); padding: var(--s2) var(--s4); border-radius: var(--r-s); transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); color: #fff; }

/* ─── mobil ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .chatgrid { grid-template-columns: 1fr; }
  .rail { position: static; order: -1; }
  .files ul { max-height: 160px; overflow-y: auto; }
}
@media (max-width: 760px) {
  .frame { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(86vw, 320px); z-index: 10; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 0 0 40px oklch(0 0 0 / .25); }
  body.nav-open .side { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 9; background: oklch(0 0 0 / .35); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .menu { display: grid; gap: 4px; place-content: center; position: fixed; top: 10px; left: 10px; z-index: 8; width: 40px; height: 40px; border-radius: var(--r-s);
    border: 1px solid var(--line); background: var(--card); cursor: pointer; }
  .menu span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
  .main { padding: 60px var(--s4) var(--s5); }
  .main.chat { padding-top: 52px; }
  .chatbar { top: -52px; margin: -52px calc(var(--s4) * -1) var(--s3); padding: 10px var(--s4) 10px 60px; }
  .chatbar h1 { max-width: 60vw; }
  .chatbar .actions { width: 100%; }
  .composer { margin: 0 calc(var(--s4) * -1); padding-left: var(--s4); padding-right: var(--s4); }
  .composer .row { grid-template-columns: 1fr; }
  .composer .actions { justify-content: flex-end; }
  .log { padding-left: 18px; }
  .msg.user { max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
