/* ChloeDev IDE: the screens. Dark by default as the mock; light under
   prefers-color-scheme or the toggle (data-theme on <html>). */
:root {
  --bg: #0f1115; --panel: #13161c; --card: #171a21; --raised: #1b1f27; --hover: #1b2029; --sel: #1f2836;
  --line: #262a33; --line2: #2f3542; --soft: #20242c;
  --fg: #e6e8ee; --fg2: #c9cfdb; --muted: #a3acbb; --faint: #7d8696;
  --blue: #8ab8ff; --blue-bg: #1f2c46; --blue-fg: #b5d1ff; --blue-line: #3b5a8a; --primary: #2563eb;
  --green: #5fd38d; --green-bg: #1d3a2a; --green-fg: #9be3b9; --green-row: #15241c;
  --orange: #f2a65a; --orange-bg: #3a2a14; --orange-fg: #f8cf9f; --orange-row: #221b12; --orange-line: #7a4b1c;
  --red-strong: #c2505f; --red: #f4a7b0; --red-bg: #3a1d22; --red-fg: #f4c6cc; --red-row: #2a1a1e; --red-line: #c2505f;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f7f9; --panel: #ffffff; --card: #ffffff; --raised: #f3f4f7; --hover: #eef1f6; --sel: #e6edf8;
    --line: #e2e5eb; --line2: #d3d8e1; --soft: #eceef2;
    --fg: #161a22; --fg2: #2d3442; --muted: #5d6676; --faint: #7a8392;
    --blue: #2f6fd6; --blue-bg: #e3edfd; --blue-fg: #1d4f9e; --blue-line: #8db1ea; --primary: #2563eb;
    --green: #1f9d55; --green-bg: #dcf3e5; --green-fg: #146c3a; --green-row: #eefaf2;
    --orange: #d27a1f; --orange-bg: #fdebd5; --orange-fg: #8a4b0c; --orange-row: #fff6ea; --orange-line: #e7b27a;
    --red-strong: #c93545; --red: #c93545; --red-bg: #fbe1e4; --red-fg: #8f1f2c; --red-row: #fdf0f2; --red-line: #e08591;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f6f7f9; --panel: #ffffff; --card: #ffffff; --raised: #f3f4f7; --hover: #eef1f6; --sel: #e6edf8;
  --line: #e2e5eb; --line2: #d3d8e1; --soft: #eceef2;
  --fg: #161a22; --fg2: #2d3442; --muted: #5d6676; --faint: #7a8392;
  --blue: #2f6fd6; --blue-bg: #e3edfd; --blue-fg: #1d4f9e; --blue-line: #8db1ea; --primary: #2563eb;
  --green: #1f9d55; --green-bg: #dcf3e5; --green-fg: #146c3a; --green-row: #eefaf2;
  --orange: #d27a1f; --orange-bg: #fdebd5; --orange-fg: #8a4b0c; --orange-row: #fff6ea; --orange-line: #e7b27a;
  --red-strong: #c93545; --red: #c93545; --red-bg: #fbe1e4; --red-fg: #8f1f2c; --red-row: #fdf0f2; --red-line: #e08591;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font: 13px/1.4 var(--sans); min-height: 100vh; overflow-x: hidden; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; left: -9999px; }

/* ---- frame */
.top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.logo { font-weight: 700; font-size: 15px; margin-right: 6px; }
.logo span { color: var(--blue); }
.sp { flex: 1; }
.frame { display: flex; align-items: stretch; min-height: calc(100vh - 47px); }
.rail { width: 76px; flex: none; display: flex; flex-direction: column; gap: 4px; padding: 10px 6px; border-right: 1px solid var(--line); background: var(--panel); }
.rail a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 2px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 500; min-height: 44px; }
.rail a:hover { background: var(--hover); color: var(--fg); }
.rail a.on { background: var(--sel); color: var(--fg); }
.rail svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rail .badge { position: absolute; top: 4px; right: 10px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--orange); color: #111; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.main { flex: 1 1 560px; min-width: 0; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.claude { flex: 0 0 360px; width: 360px; border-left: 1px solid var(--line); background: var(--panel); padding: 14px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; height: calc(100vh - 47px); align-self: flex-start; }
@media (max-width: 1100px) { .claude { flex-basis: 320px; width: 320px; } }
@media (max-width: 860px) {
  .frame { flex-direction: column; }
  .rail { width: 100%; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 6px; }
  .rail a { flex: 0 0 68px; }
  .rail a { flex: 1 0 56px; font-size: 10.5px; padding: 7px 2px; }
  .main { padding: 12px 16px 96px; }
  /* The Claude box becomes a sheet at the bottom: the input always there,
     the conversation opened by a new card or the toggle. */
  .claude { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 5; width: auto; height: auto; max-height: 64vh; padding: 10px 16px; border-left: 0; border-top: 1px solid var(--line2); box-shadow: 0 -8px 24px rgba(0, 0, 0, .35); gap: 8px; }
  .claude:not(.open) .convo, .claude:not(.open) .chips { display: none; }
  .claude .convo { max-height: 40vh; overflow-y: auto; }
  .claude .h .faint { display: none; }
  .claude .h .sheet { display: inline-flex; }
}
.claude .h .sheet { display: none; }

/* ---- type and bits */
h1 { font-size: 20px; margin: 0; font-weight: 700; }
.sub { color: var(--muted); margin: 4px 0 0; max-width: 820px; line-height: 1.5; }
.h { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin: 0 0 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.h .sp { flex: 1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.grid2.lr { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.grid2.rl { grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); }
@media (max-width: 1000px) { .grid2, .grid3, .grid2.lr, .grid2.rl { grid-template-columns: minmax(0, 1fr); } .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.hint { font-size: 11.5px; color: var(--faint); line-height: 1.45; }
.hint.warn { color: var(--red); }
.small { font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--raised); color: var(--fg); white-space: nowrap; border: 0; cursor: default; text-decoration: none; }
a.pill, button.pill { cursor: pointer; }
.pill.warn { background: var(--orange-bg); color: var(--orange-fg); }
.pill.bad { background: var(--red-bg); color: var(--red-fg); }
.pill.ok { background: var(--green-bg); color: var(--green-fg); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); display: inline-block; flex: none; }
.dot.ok { background: var(--green); } .dot.run { background: var(--blue); } .dot.warn { background: var(--orange); } .dot.bad { background: var(--red); }
.dot.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 600; background: var(--raised); color: var(--fg2); white-space: nowrap; vertical-align: middle; }
.tag.door { background: var(--red-bg); color: var(--red-fg); }
.tag.red { background: var(--red-strong); color: #fff; }
.tag.locked { background: var(--orange-bg); color: var(--orange-fg); }
.tag.ok { background: var(--green-bg); color: var(--green-fg); }
.tag.blue { background: var(--blue-bg); color: var(--blue-fg); }
.tag.warn { background: var(--orange-bg); color: var(--orange-fg); }
.tag.prop { background: transparent; color: var(--orange-fg); outline: 1.5px dashed var(--orange); outline-offset: -1.5px; }
.tag.local { background: transparent; color: var(--muted); border: 1px solid var(--line2); }
.empty { padding: 14px; border: 1px dashed var(--line2); border-radius: 8px; color: var(--muted); font-size: 12.5px; text-align: center; }

.btn { font: 600 13px var(--sans); padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line2); background: var(--raised); color: var(--fg); min-height: 34px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--blue-line); }
.btn.p { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.danger { background: var(--red-bg); border-color: var(--red-line); color: var(--red-fg); }
.btn.s { padding: 3px 9px; min-height: 28px; font-size: 12px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.p:disabled { background: var(--raised); border-color: var(--line2); color: var(--muted); opacity: 1; }
.why { font-size: 11.5px; color: var(--orange-fg); }
input.in, select.in, textarea.in { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg); color: var(--fg); min-height: 34px; min-width: 0; }
textarea.in { resize: vertical; min-height: 60px; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.x { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 0 2px; font-size: 14px; line-height: 1; }
.x:hover { color: var(--red); }

/* ---- the one banner */
.banner { position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; border: 1px solid var(--blue-line); border-radius: 10px; background: var(--card); }
.banner.notlive { border-color: var(--orange-line); background: var(--orange-row); }
.banner.ok { border-color: var(--green); }
.banner.err { border-color: var(--red-line); background: var(--red-row); }
.banner .text { flex: 1 1 260px; min-width: 0; line-height: 1.45; }
.banner.dismissable { padding-right: 30px; }
.banner > .x { position: absolute; top: 8px; right: 8px; }

/* ---- the 4-way level control */
.seg4 { display: inline-flex; border: 1px solid var(--line2); border-radius: 7px; overflow: hidden; flex: none; }
.seg4 button { font: 600 11.5px var(--sans); padding: 5px 8px; border: 0; border-right: 1px solid var(--line2); background: var(--raised); color: var(--faint); cursor: pointer; min-height: 30px; white-space: nowrap; position: relative; }
.seg4 button:last-child { border-right: 0; }
.seg4 button:hover { color: var(--fg); }
.seg4 button.on { background: var(--blue-bg); color: var(--fg); }
.seg4 button.on.do { background: var(--green-bg); color: var(--green-fg); }
.seg4 button.on.ask { background: var(--orange-bg); color: var(--orange-fg); }
.seg4 button.on.never { background: var(--red-bg); color: var(--red-fg); }
.seg4 button.inh { opacity: .55; }
.seg4 button.prop { outline: 2px dashed var(--orange); outline-offset: -3px; color: var(--orange-fg); }
.seg4 button:disabled { cursor: not-allowed; }
.seg4 button.floor:not(.on) { opacity: .35; }

/* ---- Autonomy */
.presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.presets button { text-align: left; padding: 10px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--fg); cursor: pointer; min-height: 76px; display: flex; flex-direction: column; gap: 3px; }
.presets button:last-child { border-right: 0; }
.presets button:hover { background: var(--hover); }
.presets button.on { background: var(--sel); box-shadow: inset 0 -3px 0 var(--blue); }
.presets b { font-size: 12.5px; }
.presets small { color: var(--faint); font-size: 11.5px; line-height: 1.35; }
.presets .delta { margin-top: auto; font-size: 11px; color: var(--muted); }
@media (max-width: 1000px) { .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); } .presets button { border-bottom: 1px solid var(--line); } }
.scopes { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.scopes button { font: 600 12px var(--sans); padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line2); background: var(--raised); color: var(--muted); min-height: 30px; cursor: pointer; }
.scopes button.on { background: var(--sel); color: var(--fg); border-color: var(--blue-line); }
.scopes select { min-height: 30px; padding: 3px 8px; border-radius: 99px; }
.arow { display: grid; grid-template-columns: minmax(170px, 1.1fr) auto minmax(150px, 1fr); gap: 12px; align-items: center; padding: 7px 8px; border-bottom: 1px solid var(--soft); }
.arow.ahead { font-size: 12px; color: var(--muted); font-weight: 600; padding-top: 0; }
.arow.prop { background: var(--orange-row); box-shadow: inset 3px 0 0 var(--orange); }
.arow.redrow { box-shadow: inset 3px 0 0 var(--red); }
.arow.redrow.prop { box-shadow: inset 3px 0 0 var(--red), inset 6px 0 0 var(--orange); }
.arow.sel { background: var(--sel); }
.arow .name { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.arow .name button { all: unset; cursor: pointer; font-weight: 500; }
.arow .name button:hover { color: var(--blue); }
.arow .name button:focus-visible { outline: 2px solid var(--blue); }
.arow .marks { display: flex; gap: 4px; flex-wrap: wrap; }
.arow .changed { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); min-width: 0; }
.ovr { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .arow { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .arow.ahead { display: none; }
}
.drawer { margin: 4px 0 10px; padding: 12px; border: 1px solid var(--blue-line); border-radius: 10px; background: var(--card); display: flex; flex-direction: column; gap: 10px; }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 10px; font-size: 12.5px; align-items: start; }
.kv > span:nth-child(odd) { padding-top: 3px; }
.kv > span:nth-child(odd) { color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 7px; overflow: hidden; max-width: 100%; }
.kv.stack { grid-template-columns: minmax(0, 1fr); gap: 3px; }
.kv.stack > span:nth-child(odd) { padding-top: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.seg button { white-space: nowrap; font: 600 11.5px var(--sans); padding: 5px 9px; border: 0; border-right: 1px solid var(--line2); background: var(--raised); color: var(--faint); cursor: pointer; min-height: 30px; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--blue-bg); color: var(--fg); }
.seg button.on.red, .seg button.on.door { background: var(--red-bg); color: var(--red-fg); }
.seg button.on.locked { background: var(--orange-bg); color: var(--orange-fg); }
.seg button.prop { outline: 2px dashed var(--orange); outline-offset: -3px; color: var(--orange-fg); }
.toggles { display: flex; gap: 4px; flex-wrap: wrap; }
.toggles button { font: 600 11.5px var(--sans); padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line2); background: var(--raised); color: var(--faint); cursor: pointer; min-height: 28px; }
.toggles button.on { background: var(--blue-bg); color: var(--fg); border-color: var(--blue-line); }

/* the week strip of a time window */
.week { display: grid; grid-template-columns: 28px repeat(24, minmax(0, 1fr)); gap: 1px; font-size: 9.5px; color: var(--faint); }
.week i { height: 9px; background: var(--soft); border-radius: 1px; }
.week i.never { background: var(--red); opacity: .8; }
.week i.ask { background: var(--orange); opacity: .8; }
.week i.tell { background: var(--blue); opacity: .7; }
.week i.prop { background: transparent; outline: 1px dashed var(--orange); outline-offset: -1px; }
.week i.now { box-shadow: 0 0 0 1.5px var(--fg); }
.wrow { padding: 8px 0; border-bottom: 1px solid var(--soft); display: flex; flex-direction: column; gap: 6px; }

/* ---- Parts */
.layer { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px dashed var(--soft); }
.layer > .lname { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; padding-top: 8px; }
.parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.part { text-align: left; background: var(--raised); border: 1px solid var(--line2); border-radius: 8px; padding: 9px 10px; display: flex; flex-direction: column; gap: 5px; cursor: grab; min-width: 0; color: var(--fg); font: inherit; }
.part:hover { border-color: var(--blue-line); }
.part.sel { border-color: var(--blue); box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 25%, transparent); }
.part.door, .part.red { border-color: var(--red-line); }
.part.prop { border-style: dashed; border-color: var(--orange); border-width: 1.5px; }
.part b { font-size: 13px; }
.part .paths { font-family: var(--mono); font-size: 10.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owners { display: flex; gap: 4px; flex-wrap: wrap; }
.av { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px 1px 2px; border-radius: 99px; background: var(--card); border: 1px solid var(--line2); font-size: 11px; }
.av i { width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; font-size: 9px; font-weight: 700; color: #0f1115; background: var(--blue); }
.av.person i { background: var(--green); }
.dock { display: flex; gap: 8px; flex-wrap: wrap; }
.drop { flex: 1 1 150px; min-width: 0; border: 1.5px dashed var(--line2); border-radius: 10px; padding: 9px 10px; display: flex; flex-direction: column; gap: 4px; background: var(--card); }
.drop.over { border-color: var(--blue); background: var(--sel); }
@media (max-width: 760px) { .layer { grid-template-columns: minmax(0, 1fr); } .layer > .lname { padding-top: 0; } .parts { grid-template-columns: minmax(0, 1fr); } }

/* ---- tables that become lists */
.list { display: flex; flex-direction: column; }
.li { display: grid; gap: 10px; align-items: center; padding: 8px; border-bottom: 1px solid var(--soft); }
.li:last-child { border-bottom: 0; }
.li.click { cursor: pointer; border-radius: 6px; }
.li.click:hover { background: var(--hover); }
.li.sel { background: var(--sel); border-radius: 6px; }
.agents-li { grid-template-columns: minmax(110px, .8fr) minmax(0, 2fr) auto; }
@media (max-width: 760px) { .agents-li { grid-template-columns: minmax(0, 1fr) auto; } .agents-li .act { grid-column: 1 / -1; } }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-decoration: none; color: var(--fg); display: flex; flex-direction: column; gap: 4px; }
.tile:hover { border-color: var(--blue-line); }
.tile .n { font-size: 22px; font-weight: 700; }
.tile.warn { border-color: var(--orange-line); }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.inbox-it { background: var(--raised); border: 1px solid var(--line2); border-radius: 8px; padding: 9px 10px; display: flex; flex-direction: column; gap: 6px; line-height: 1.4; }
.inbox-it.ask { border-color: var(--orange-line); }
.inbox-it.done { opacity: .6; }

/* ---- Agents */
.agents-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1000px) {
  .agents-layout { grid-template-columns: minmax(0, 1fr); }
  /* On a narrow screen: the list, then the selected agent, then Start. */
  .agents-layout > .agl { display: contents; }
  .agents-layout > .agl > section { order: 1; }
  .agents-layout > :not(.agl) { order: 2; }
  .agents-layout [data-panel="start"] { order: 3; }
}
.agent-card { text-align: left; width: 100%; background: var(--raised); border: 1px solid var(--line2); border-radius: 8px; padding: 9px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; color: var(--fg); font: inherit; }
.agent-card.sel { border-color: var(--blue); background: var(--sel); }
.agent-card.drop-ok { border-style: dashed; border-color: var(--blue); }
.term { background: #0b0d11; border: 1px solid var(--line); border-radius: 8px; padding: 6px; height: 440px; min-width: 0; overflow: hidden; }
.term .xterm { height: 100%; }
@media (max-width: 760px) { .term { height: 320px; } }

/* ---- Proposals */
.prop-li { grid-template-columns: 56px minmax(0, 1fr) auto; }
.gate { display: flex; flex-direction: column; gap: 6px; }
.need { padding: 7px 9px; border-radius: 6px; background: var(--orange-row); border-left: 3px solid var(--orange); font-size: 12.5px; }
.need.door { background: var(--red-row); border-left-color: var(--red); }
.chg { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--soft); font-size: 12.5px; align-items: center; }
@media (max-width: 760px) { .chg { grid-template-columns: minmax(0, 1fr); gap: 3px; } }

/* ---- Accounts */
.acct { display: flex; flex-direction: column; gap: 8px; }

/* ---- the Claude box */
.claude .h { margin-bottom: 0; }
.convo { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1 1 auto; min-height: 120px; padding-right: 2px; }
@media (max-width: 860px) { .convo { max-height: none; overflow: visible; } }
.you { background: var(--raised); border-radius: 10px; padding: 8px 11px; line-height: 1.5; align-self: flex-end; max-width: 92%; overflow-wrap: anywhere; }
.msg { line-height: 1.5; overflow-wrap: anywhere; }
.rcard { background: var(--card); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.rcard.closed { opacity: .75; }
.rcard .status { font-size: 12px; font-weight: 600; }
.rcard .status.ok { color: var(--green); } .rcard .status.prop { color: var(--orange); } .rcard .status.off { color: var(--faint); }
.rbs { display: flex; flex-direction: column; gap: 5px; }
.rb { font-size: 12.5px; line-height: 1.4; padding: 5px 8px; border-radius: 6px; background: var(--raised); border-left: 3px solid var(--blue-line); }
.rb.tighten { border-left-color: var(--green); }
.rb.loosen { border-left-color: var(--orange); background: var(--orange-row); }
.rb.danger { border-left-color: var(--red); background: var(--red-row); color: var(--red-fg); }
.rb.same { border-left-color: var(--line2); color: var(--muted); }
.rb.unused { border-left-color: var(--faint); color: var(--fg2); font-style: italic; }
.rb .needs { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; font-style: normal; }
.rb.danger .needs { color: var(--red-fg); opacity: .85; }
.rbh { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 500 12px var(--sans); background: var(--raised); border: 1px solid var(--line2); color: var(--fg2); border-radius: 99px; padding: 5px 11px; cursor: pointer; text-align: left; min-height: 30px; line-height: 1.35; }
.chip:hover { border-color: var(--blue); color: var(--fg); }
.ask { display: flex; gap: 8px; }
.ask input { flex: 1; min-width: 0; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg); color: var(--fg); }
.ask input:focus { outline: none; border-color: var(--blue); }
body[data-busy] .ask .btn.p { opacity: .6; }
.choice { display: flex; flex-direction: column; gap: 6px; }

/* the terminal dialog for signing in */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); display: grid; place-items: center; z-index: 10; padding: 16px; }
.modal > div { background: var(--card); border: 1px solid var(--line2); border-radius: 12px; padding: 14px; width: min(760px, 100%); display: flex; flex-direction: column; gap: 10px; }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--red-bg); color: var(--red-fg); border: 1px solid var(--red-line); padding: 8px 14px; border-radius: 8px; z-index: 20; max-width: calc(100vw - 32px); }
