/* The agent page: a chat in the manner of Claude Code's own UI, a Solar Hijri calendar, the payments. Hessam's side
   Persian, right to left; omid's English, left to right: every side and edge here is logical (inline-start, end,
   match-parent), so each page is laid out by its own <html dir>, and no rule names a side of its own (left is named
   only for code, which reads left to right in either). Vazirmatn (OFL, from daftar's view asset); light and dark by the
   system's choice. */
@font-face { font-family: Vazirmatn; src: url(/static/fonts/Vazirmatn.woff2) format('woff2'); font-weight: 100 900;
  font-display: swap; }
:root {
  --bg: #faf9f5; --panel: #ffffff; --ink: #1f1e1d; --muted: #6b6a66; --line: #e6e3d9; --soft: #f2f0e8;
  --accent: #c96442; --accent-ink: #ffffff; --bubble: #efece3; --code: #f5f3ec; --ok: #2f7d4f; --err: #b3261e;
  --warn: #9a6b00; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  --c-meeting: #3e6fc4; --c-site-visit: #23855a; --c-milestone: #7c56c9; --c-tender-deadline: #c0392b;
  --c-delivery: #b97c10; --c-other: #74716a;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1f1e1d; --panel: #262624; --ink: #ecebe6; --muted: #a29f97; --line: #3a3935; --soft: #2c2b28;
    --accent: #d97757; --bubble: #33322f; --code: #191918; --ok: #5fbf88; --err: #f08a80; --warn: #e3b341;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    --c-meeting: #7aa2f0; --c-site-visit: #5cc493; --c-milestone: #ab8af0; --c-tender-deadline: #f07a6c;
    --c-delivery: #e6b04a; --c-other: #aaa69c; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.75 Vazirmatn, Tahoma, sans-serif;
  display: flex; flex-direction: column; -webkit-text-size-adjust: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
code, pre, .mono { font-family: var(--mono); font-size: .86em; direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.link { background: none; border: 0; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.link:hover { color: var(--ink); background: var(--soft); }
.icon { background: none; border: 0; width: 36px; height: 36px; border-radius: 10px; font-size: 18px;
  display: inline-grid; place-items: center; color: var(--muted); }
.icon:hover { background: var(--soft); color: var(--ink); }
.msg { color: var(--err); min-height: 1.2em; margin: 4px 2px 0; }
.mark { color: var(--accent); font-size: 1.15em; }
.brand { font-weight: 700; white-space: nowrap; }

/* ---- sign-in ---- */
body.login { display: grid; place-items: center; padding: 16px; }
.login-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 28px; box-shadow: var(--shadow); }
.login-card .brand { font-size: 1.25rem; margin-bottom: 6px; }
.login-card form { display: flex; gap: 8px; margin-top: 14px; }
.login-card input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); }
.login-card button { padding: 10px 18px; border: 0; border-radius: 10px; background: var(--accent);
  color: var(--accent-ink); font-weight: 600; }
/* who: shown only when the page has more than one user (login.js) */
.login-card .who { display: flex; gap: 6px; margin: 10px 0 2px; }
.login-card .who button { flex: 1; padding: 8px 12px; background: var(--soft); color: var(--ink);
  border: 1px solid var(--line); font-weight: 600; }
.login-card .who button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent); }
/* the public listener's sign-in (body[data-public], scis.segalhost.com): the user's id and the one-time code shown, one
   field a row, the office's note hidden; on an office listener the .pub fields are not there to fill */
.login-card .pub { display: none; }
body[data-public] .login-card .pub { display: revert; }
body[data-public] .login-card form { flex-wrap: wrap; }
body[data-public] .login-card form input, body[data-public] .login-card form button { flex: 1 1 100%; }
body[data-public] #note { display: none; }
#note-public span[lang="en"], #msg span { display: block; }
/* a user's one-time code, enrolled on an office listener (code.html) */
.code-card canvas { display: block; margin: 12px auto; width: min(100%, 240px); height: auto; image-rendering: pixelated;
  border-radius: 8px; }
.code-card .secret { display: block; margin: 6px 0 10px; padding: 8px 10px; background: var(--soft); border-radius: 8px;
  word-spacing: .4em; text-align: center; user-select: all; }
.code-card .row { display: flex; gap: 8px; margin-top: 10px; }
.code-card .done { color: var(--ok, var(--accent)); font-weight: 600; }

/* ---- the frame ---- */
.top { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line);
  background: var(--panel); position: sticky; top: 0; z-index: 5; min-height: 52px; }
.tabs { display: flex; gap: 4px; margin-inline-start: 12px; flex: 1; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 6px 12px; border-radius: 9px; color: var(--muted);
  white-space: nowrap; }
.tabs button[aria-selected="true"] { background: var(--soft); color: var(--ink); font-weight: 600; }
.tab { flex: 1; min-height: 0; display: none; }
.tab[data-open="true"] { display: flex; }
.only-narrow { display: none; }

/* ---- chat ---- */
.chat { display: none; }
.chat[data-open="true"] { display: grid; grid-template-columns: 264px 1fr; min-height: 0; height: calc(100vh - 53px);
  height: calc(100dvh - 53px); }
.convs { border-inline-end: 1px solid var(--line); padding: 12px; overflow-y: auto; background: var(--bg); }
.new { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  text-align: start; font-weight: 600; }
.new:hover { border-color: var(--accent); }
.conv-list { list-style: none; margin: 10px 0 0; padding: 0; }
.conv-list li button { width: 100%; text-align: start; background: none; border: 0; padding: 8px 10px;
  border-radius: 9px; display: block; overflow: hidden; }
.conv-list li button:hover { background: var(--soft); }
.conv-list li button[aria-current="true"] { background: var(--bubble); }
.conv-list .t { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-list .d { display: block; font-size: .78rem; color: var(--muted); }
.conv-list .busy::before { content: "● "; color: var(--accent); }
.thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.thread-head { display: flex; align-items: center; gap: 8px; padding: 10px 20px 4px; max-width: 860px; width: 100%;
  margin: 0 auto; }
.conv-title { font-size: 1rem; font-weight: 600; margin: 0; flex: 1; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.files-panel { max-width: 860px; width: calc(100% - 40px); margin: 4px auto; display: grid;
  grid-template-columns: 1fr 1fr; gap: 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px; }
.files-panel h2 { font-size: .9rem; margin: 0 0 4px; }
.files-panel ul { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.files-panel li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.transcript { flex: 1; overflow-y: auto; padding: 8px 20px 24px; scroll-behavior: smooth; }
.transcript > * { max-width: 820px; margin-inline: auto; }
.empty { padding: 12vh 8px 0; text-align: center; }
.hello { font-size: 1.6rem; font-weight: 700; margin: 0 0 6px; }
.turn { margin: 18px auto 6px; }
.you { display: flex; justify-content: flex-start; }
.you .bubble { background: var(--bubble); border-radius: 16px; padding: 8px 14px; max-width: 85%;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.you .files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel);
  border-radius: 999px; padding: 2px 10px; font-size: .82rem; max-width: 100%; }
.chip .x { border: 0; background: none; color: var(--muted); padding: 0 2px; }
.agent { margin-top: 12px; position: relative; padding-inline-start: 22px; }
.agent > .text::before, .step::before { content: "⏺"; position: absolute; inset-inline-start: -20px;
  color: var(--ink); font-size: .7rem; line-height: 2.5; }
.agent > .text { position: relative; overflow-wrap: anywhere; }
.agent > .text p { margin: .3em 0 .6em; }
.agent > .text h1, .agent > .text h2, .agent > .text h3 { font-size: 1.02rem; margin: .8em 0 .3em; }
.agent > .text pre { background: var(--code); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  overflow-x: auto; text-align: left; }
.agent > .text :not(pre) > code { background: var(--code); border-radius: 5px; padding: 1px 5px; }
.agent > .text table { border-collapse: collapse; margin: .5em 0; display: block; overflow-x: auto; }
.agent > .text th, .agent > .text td { border: 1px solid var(--line); padding: 4px 8px; }
.agent > .text ul, .agent > .text ol { padding-inline-start: 1.4em; margin: .3em 0; }
.agent > .text.live::after { content: "▍"; color: var(--accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.step { position: relative; margin: 2px 0; }
.step::before { color: var(--ok); }
.step.running::before { color: var(--accent); animation: blink 1s steps(2) infinite; }
.step.failed::before { color: var(--err); }
.step > button { all: unset; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px;
  width: 100%; box-sizing: border-box; border-radius: 8px; padding: 2px 6px; margin-inline-start: -6px; }
.step > button:hover { background: var(--soft); }
.step .name { font-weight: 600; }
.step .arg { color: var(--muted); font-family: var(--mono); font-size: .84em; direction: ltr; unicode-bidi: isolate;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: min(64ch, 78%); }
.step .sum { flex-basis: 100%; color: var(--muted); font-size: .82rem; padding-inline-start: 1.2em;
  unicode-bidi: plaintext; text-align: match-parent; overflow-wrap: anywhere; }
.step .sum::before { content: "⎿ "; }
.step .body { display: none; margin: 4px 0 8px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.step[data-open="true"] .body { display: block; }
.step .body pre { margin: 0; padding: 8px 12px; background: var(--code); max-height: 420px; overflow: auto;
  white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; }
.step .body pre + pre { border-top: 1px solid var(--line); }
.step .body .lbl { font-size: .75rem; color: var(--muted); padding: 4px 12px 0; background: var(--code);
  direction: ltr; text-align: left; }
.note { color: var(--muted); font-size: .84rem; margin: 6px 0; padding-inline-start: 22px; }
.note.error { color: var(--err); }
.note.sync::before { content: "✓ "; color: var(--ok); }
.working { color: var(--muted); font-size: .9rem; padding-inline-start: 22px; margin-top: 8px; }
.working::before { content: "✳ "; color: var(--accent); display: inline-block; animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.composer { padding: 8px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid transparent; }
.composer > * { max-width: 820px; margin-inline: auto; }
.composer .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.composer .box { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 10px 12px 6px;
  box-shadow: var(--shadow); }
.composer .box:focus-within { border-color: var(--accent); }
.composer textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; max-height: 40vh;
  line-height: 1.7; }
.composer .row { display: flex; align-items: center; gap: 8px; }
.composer .hint { flex: 1; }
.send { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-ink);
  font-size: 18px; font-weight: 700; }
.send:disabled { opacity: .45; cursor: default; }
.attach { cursor: pointer; }

/* ---- calendar ---- */
.calendar, .payments { flex-direction: column; padding: 14px 20px 24px; gap: 12px; overflow-y: auto;
  height: calc(100vh - 53px); height: calc(100dvh - 53px); }
.cal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav h1 { font-size: 1.2rem; margin: 0 6px; min-width: 9em; text-align: center; }
.cal-nav h1 small { display: block; font-size: .78rem; color: var(--muted); font-weight: 400; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: .8rem; color: var(--muted); }
.cal-legend span::before { content: "■ "; color: var(--c); }
.cal-body { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; background: var(--line); gap: 1px; }
.month .dow { background: var(--soft); text-align: center; font-size: .8rem; color: var(--muted); padding: 4px 0; }
.month .day { background: var(--panel); min-height: 104px; padding: 4px 6px; display: flex; flex-direction: column;
  gap: 2px; min-width: 0; }
.month .day.out { background: var(--bg); color: var(--muted); }
.month .day.today .pn { background: var(--accent); color: var(--accent-ink); border-radius: 999px; }
.month .day .nums { display: flex; justify-content: space-between; align-items: baseline; }
.month .day .pn { font-weight: 700; min-width: 1.8em; text-align: center; }
.month .day .gn { font-size: .7rem; color: var(--muted); direction: ltr; }
.month .ev { all: unset; cursor: pointer; font-size: .76rem; line-height: 1.5; border-radius: 6px; padding: 1px 6px;
  background: color-mix(in srgb, var(--c) 14%, transparent); border-inline-start: 3px solid var(--c);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.agenda h2, .owes h2 { font-size: .95rem; margin: 0 0 6px; }
.agenda ol, .owes ol { list-style: none; margin: 0; padding: 0; }
.agenda li { border-top: 1px solid var(--line); padding: 6px 0; }
.agenda li:first-child { border-top: 0; }
.agenda .w { font-size: .8rem; color: var(--muted); }
.agenda button { all: unset; cursor: pointer; display: block; }
.agenda .t::before { content: "● "; color: var(--c); }
.detail { position: fixed; inset: auto 16px 16px auto; width: min(420px, calc(100vw - 32px)); background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; z-index: 10; }
.detail h3 { margin: 0 0 4px; font-size: 1rem; }
.detail dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 8px 0 0; font-size: .88rem; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; }
.detail .close { position: absolute; inset-inline-end: 8px; top: 8px; }

/* ---- payments ---- */
.pay-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.pay-head h1 { font-size: 1.2rem; margin: 0; }
.pay-head input { padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  min-width: min(320px, 100%); }
.cards { display: flex; flex-wrap: wrap; gap: 10px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; min-width: 180px; }
.card .k { font-size: .8rem; color: var(--muted); }
.card .v { font-size: 1.25rem; font-weight: 700; }
.card .s { font-size: .8rem; color: var(--muted); }
.pay-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
table.pay { border-collapse: collapse; width: 100%; font-size: .88rem; }
table.pay th { text-align: start; font-weight: 600; color: var(--muted); background: var(--soft); padding: 6px 10px;
  white-space: nowrap; }
table.pay td { border-top: 1px solid var(--line); padding: 6px 10px; vertical-align: top; }
table.pay .num { text-align: end; white-space: nowrap; }
table.pay .num .toman { display: block; font-size: .78rem; color: var(--muted); }
table.pay .d .g { display: block; font-size: .75rem; color: var(--muted); direction: ltr; text-align: end; }
table.pay .bean { font-size: .72rem; color: var(--muted); }
.owes { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.owes li { border-top: 1px solid var(--line); padding: 6px 0; }
.owes li:first-child { border-top: 0; }
.owes .amt { font-weight: 700; }
.empty-row td { color: var(--muted); text-align: center; padding: 18px; }

/* ---- narrow screens ---- */
@media (max-width: 860px) {
  .only-narrow { display: inline-grid; }
  .chat[data-open="true"] { grid-template-columns: 1fr; }
  .convs { position: fixed; inset: 53px 0 0 auto; width: min(300px, 86vw); z-index: 8; box-shadow: var(--shadow);
    transform: translateX(100%); transition: transform .18s ease; }
  .convs[data-open="true"] { transform: none; }
  .top { gap: 6px; padding: 6px 10px; }
  .top .brand { display: none; }
  .tabs { margin: 0; }
  .transcript { padding: 6px 14px 18px; }
  .composer { padding-inline: 10px; }
  .composer .hint { display: none; }
  .thread-head { padding: 8px 14px 2px; }
  .files-panel { grid-template-columns: 1fr; width: calc(100% - 28px); }
  .calendar, .payments { padding: 10px 12px 18px; }
  .cal-body, .pay-grid { grid-template-columns: 1fr; }
  .month .day { min-height: 64px; padding: 2px 3px; }
  .month .ev { font-size: 0; height: 6px; padding: 0; border-radius: 3px; border: 0; background: var(--c); }
  .month .day .gn { display: none; }
  table.pay thead { display: none; }
  table.pay, table.pay tbody { display: block; }
  table.pay tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 12px;
    border-top: 1px solid var(--line); }
  table.pay tr:first-child { border-top: 0; }
  table.pay td { border: 0; padding: 0; }
  table.pay td.d { grid-column: 1; }
  table.pay td.num { grid-column: 2; grid-row: 1 / span 3; }
  table.pay td.party, table.pay td.through, table.pay td.note-cell { grid-column: 1 / -1; }
  table.pay td[data-label]::before { content: attr(data-label) " "; color: var(--muted); font-size: .8rem; }
  table.pay .empty-row { display: block; }
}

/* the running turn's details: omid's page alone (body.details; users.d `details`, 2026-11-20) */
.details .working.det { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.details .working.det.quiet { color: var(--warn); }
.task { margin: 4px 0 6px; padding: 6px 10px; border: 1px solid var(--line); border-inline-start: 3px solid var(--accent);
  border-radius: 8px; background: var(--panel); font-size: .84rem; }
.task.s-completed { border-inline-start-color: var(--ok); }
.task.s-failed, .task.s-killed, .task.s-stopped, .task.s-ended { border-inline-start-color: var(--err); }
.task-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.task-st { font-weight: 600; text-transform: uppercase; font-size: .72rem; letter-spacing: .03em; color: var(--accent); }
.task.s-completed .task-st { color: var(--ok); }
.task.s-failed .task-st, .task.s-killed .task-st, .task.s-stopped .task-st, .task.s-ended .task-st { color: var(--err); }
.task.s-running .task-st::before { content: "● "; animation: blink 1s steps(2) infinite; }
.task-kind { color: var(--muted); font-size: .78rem; }
.task-desc { flex-basis: 100%; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.task-meta { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; margin-top: 2px; }
.task-warn { color: var(--err); font-size: .8rem; margin-top: 4px; }
.task-rep { margin-top: 4px; }
.task-rep summary { cursor: pointer; color: var(--muted); font-size: .78rem; }
.task-rep pre { margin: 4px 0 0; padding: 8px 10px; background: var(--code); border-radius: 6px; max-height: 360px;
  overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; text-align: start; unicode-bidi: plaintext; }
.task-steps:empty { display: none; }
.task-steps { margin: 6px 0 2px; padding-inline-start: 18px; border-inline-start: 1px dashed var(--line); }
.task-steps .step { font-size: .92em; }
.task-steps .sub-text { color: var(--muted); font-size: .88em; overflow-wrap: anywhere; margin: 2px 0 4px; }
.task-steps .sub-text p { margin: .2em 0; }
.note.det-sum { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.note.det-sum::before { content: "Σ "; color: var(--muted); }
/* the stop button and the context wheel: omid's page alone (2026-11-20) */
.send.stop { width: auto; min-width: 34px; padding: 0 10px; background: var(--ink); color: var(--bg); font-size: 14px; }
.send.stop.sure { background: var(--err); color: #fff; }
.ctx { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .8rem;
  font-variant-numeric: tabular-nums; cursor: default; }
.ctx svg { display: block; }
.ctx-bg { fill: none; stroke: var(--line); stroke-width: 3; }
.ctx-arc { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset .4s ease; }
.ctx.mid .ctx-arc { stroke: var(--warn); }
.ctx.hi .ctx-arc { stroke: var(--err); }
.ctx.mid .ctx-pct { color: var(--warn); }
.ctx.hi .ctx-pct { color: var(--err); }

/* ---- companies: the skeleton, through lenses (companies.js) ---- */
.companies { flex-direction: column; padding: 14px 20px 16px; gap: 8px; height: calc(100vh - 53px);
  height: calc(100dvh - 53px); min-height: 0; }
.co-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.co-head h1 { font-size: 1.2rem; margin: 0; }
.co-lenses { display: inline-flex; background: var(--soft); border-radius: 11px; padding: 3px; gap: 2px; }
.co-lenses button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; color: var(--muted); }
.co-lenses button[aria-pressed="true"] { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.co-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-inline-start: auto; }
.co-tools input[type="search"] { padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel); color: var(--ink); min-width: 10rem; }
.co-from { margin: 0; }
.co-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: 1.4em; }
.co-trail .sep { color: var(--muted); }
.co-trail .here { font-weight: 600; color: var(--ink); }
.co-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 14px; }
.co-stage { position: relative; overflow: auto; border: 1px solid var(--line); border-radius: 14px; min-height: 0;
  background: radial-gradient(circle, var(--line) 1px, transparent 1.2px) 0 0 / 22px 22px, var(--bg);
  perspective: 1600px; perspective-origin: 50% 30%; }
.co-plane { position: absolute; inset-block-start: 0; inset-inline-start: 0; min-width: 100%; padding: 18px;
  box-sizing: border-box; transform-style: preserve-3d; backface-visibility: hidden; }
.co-plane.leaving { pointer-events: none; }
.co-walk { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.co-band { display: flex; flex-direction: column; gap: 6px; }
.co-groups.co-row { flex-wrap: nowrap; }
.co-row .co-group { flex: 1 1 0; min-width: 210px; max-width: 300px; }
.co-band-label { font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.co-groups { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.co-group { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-width: 190px;
  max-width: 340px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.co-cursor-band .co-group { background: none; border: 0; box-shadow: none; padding: 0; }
.co-group-label { font-size: .75rem; color: var(--muted); }
.co-facts { border-collapse: collapse; font-size: .86rem; }
.co-facts th { text-align: start; font-weight: 500; padding: 3px 12px 3px 0; color: var(--muted); }
.co-facts td { padding: 3px 12px 3px 0; }
.co-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.co-sub { padding-inline-start: 14px; margin-block-start: 3px; border-inline-start: 2px solid var(--line); }
.co-being { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; width: 100%; text-align: start;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 9px; padding: 4px 9px;
  cursor: pointer; font: inherit; font-size: .86rem; position: relative; transition: opacity .15s, box-shadow .15s; }
.co-being:hover, .co-being.near { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.co-being .nm { font-weight: 500; }
.co-being .mk { color: var(--muted); font-size: .76rem; }
.co-being .q { margin-inline-start: auto; min-width: 1.4em; text-align: center; font-size: .7rem; font-weight: 700;
  color: var(--accent-ink); background: var(--warn); border-radius: 999px; padding: 0 5px; }
.co-being.card { padding: 8px 12px; font-size: .95rem; border-width: 1.5px; }
.co-being.card .nm { font-weight: 650; }
.co-being.cursor-card { min-width: 240px; width: auto; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent), var(--shadow); }
.co-being.is-cursor { border-color: var(--accent); }
.co-being[data-role="company"] { border-inline-start: 4px solid var(--c-meeting); }
.co-being[data-role="reserve"], .co-being[data-role="unit"] { border-inline-start: 4px dashed var(--c-other); }
.co-being[data-role="brand"] { border-inline-start: 4px solid var(--c-milestone); }
.co-being[data-standing="none"] { border-inline-start-style: dotted; }
.co-being[data-standing="ended"] { text-decoration: line-through; text-decoration-color: var(--err); }
.co-being[data-role="field"], .co-being[data-role="technology"] { border-inline-start: 4px solid var(--c-site-visit); }
.co-being[data-offer="website"] { border-style: dashed; }
.co-being[data-offer="disputed"] { text-decoration: line-through; text-decoration-color: var(--err); }
.co-being.lit { outline: 2px solid var(--warn); outline-offset: 1px; }
.co-being.dim { opacity: .28; }
.co-flow { display: flex; flex-direction: row; align-items: flex-start; gap: 0; }
.co-col { display: flex; flex-direction: column; gap: 8px; min-width: 200px; max-width: 280px; position: relative; z-index: 1; }
.co-col .co-group { max-width: none; }
.co-gap { width: 110px; flex: none; display: flex; justify-content: center; padding-block-start: 2px; color: var(--muted); }
svg.co-links { position: absolute; inset-block-start: 0; inset-inline-start: 0; pointer-events: none; overflow: visible; z-index: 0; }
svg.co-links path { fill: none; stroke: var(--muted); stroke-opacity: .28; stroke-width: 1.2; }
svg.co-links path.k-website { stroke-dasharray: 4 4; }
svg.co-links path.k-inferred { stroke-dasharray: 1 4; stroke-linecap: round; }
svg.co-links path.k-disputed { stroke: var(--err); }
svg.co-links path.k-whole { stroke: var(--c-milestone); stroke-opacity: .5; }
.co-plane.hovering svg.co-links path { stroke-opacity: .08; }
.co-plane.hovering svg.co-links path.hot { stroke: var(--accent); stroke-opacity: .95; stroke-width: 2; }
.co-side { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-inline-end: 2px; }
.co-side h2 { font-size: .95rem; margin: 4px 0 6px; }
.co-side h3 { font-size: .85rem; margin: 12px 0 6px; color: var(--muted); }
.co-sheet { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.co-sheet-top { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.co-sheet-top h2 { margin: 0; font-size: 1.05rem; }
.co-sheet-role { color: var(--muted); font-size: .8rem; margin-block: 2px 6px; }
.co-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 4px 8px; }
.co-sheet-title { margin: 4px 0; font-size: .88rem; }
.co-sheet-sum { margin: 4px 0; font-size: .84rem; color: var(--muted); }
.co-statements { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .8rem; }
.co-statements > li { border-block-start: 1px solid var(--line); padding-block-start: 6px; }
.co-st { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.co-st .verb { background: var(--code); padding: 0 5px; border-radius: 5px; font-weight: 600; }
.co-st .k { color: var(--muted); font-family: var(--mono); font-size: .74rem; }
.co-st .v { overflow-wrap: anywhere; }
.co-known { display: flex; flex-wrap: wrap; gap: 4px; margin-block-start: 3px; }
.kk { font-size: .7rem; border-radius: 999px; padding: 0 7px; border: 1px solid var(--line); color: var(--muted); }
.kk.k-person { color: var(--ok); border-color: var(--ok); }
.kk.k-website { border-style: dashed; }
.kk.k-inferred, .kk.k-unknown { color: var(--warn); border-color: var(--warn); }
.kk.k-disputed { color: var(--err); border-color: var(--err); }
.co-note summary { cursor: pointer; color: var(--muted); list-style: none; overflow-wrap: anywhere; }
.co-note p { margin: 4px 0 0; overflow-wrap: anywhere; }
.co-rules, .co-qsec { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.co-rule { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; border-block-start: 1px solid var(--line);
  padding-block: 6px; font-size: .84rem; }
.co-rule-of { margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  cursor: pointer; }
.co-rule-of.open { display: block; }
.co-cursor-col { min-width: 0; }
.co-rule-state { flex: none; font-size: .72rem; border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.co-rule-state.held { color: var(--ok); border: 1px solid var(--ok); }
.co-rule-state.broken { color: var(--accent-ink); background: var(--warn); }
.co-check { border-block-start: 1px solid var(--line); padding-block: 4px; }
.co-check summary { cursor: pointer; display: flex; justify-content: space-between; gap: 8px; font-size: .86rem; font-weight: 600; padding-block: 3px; }
.co-check summary .n { color: var(--muted); font-weight: 500; }
.co-finding { padding: 5px 8px; border-radius: 8px; cursor: pointer; font-size: .82rem; }
.co-finding:hover { background: var(--soft); }
.co-finding.contra { border-inline-start: 3px solid var(--err); margin-block: 4px; }
.co-finding.open { border-inline-start: 3px solid var(--warn); margin-block: 4px; }
.co-check-name { font-size: .72rem; color: var(--muted); }
.co-say { margin: 0; line-height: 1.6; overflow-wrap: anywhere; }
.co-say .ref, .co-st .ref { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; }
@media (max-width: 900px) {
  .companies { height: auto; min-height: calc(100dvh - 53px); padding: 12px 16px; }
  .co-body { grid-template-columns: minmax(0, 1fr); }
  .co-stage { height: 62vh; }
  .co-tools { margin-inline-start: 0; }
  .co-gap { width: 56px; }
  .co-col { min-width: 170px; }
}
@media (prefers-reduced-motion: reduce) { .co-being { transition: none; } }
.co-cursor-col .co-group { background: none; border: 0; box-shadow: none; padding: 0; }

/* ---- the Companies matrix (matrix.js) ---- */
.co-body[hidden], .co-matrix[hidden] { display: none; }
.co-mx-btn { border: 1px solid var(--accent); color: var(--accent); background: none; border-radius: 9px; padding: 5px 12px; font-weight: 600; }
.co-matrix { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.mx-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mx-head input { padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); }
.mx-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 14px; }
.mx-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); min-height: 0; }
table.mx { border-collapse: separate; border-spacing: 0; font-size: .82rem; width: max-content; min-width: 100%; }
table.mx th, table.mx td { border-block-end: 1px solid var(--line); padding: 5px 8px; text-align: start; }
table.mx tr:first-child th { position: sticky; inset-block-start: 0; background: var(--soft); z-index: 2; font-weight: 600; white-space: nowrap; }
table.mx th.mx-row { position: sticky; inset-inline-start: 0; background: var(--panel); z-index: 1; font-weight: 500; max-width: 260px; }
.mx-sub { color: var(--muted); font-weight: 400; font-size: .74rem; }
.mx-cell { cursor: pointer; min-width: 92px; text-align: center; border-inline-start: 1px solid var(--line); }
.mx-cell:hover { background: var(--soft); }
.mx-cell.now { color: var(--muted); }
.mx-cell.picked { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); color: var(--accent); font-weight: 700; }
.mx-dot { display: inline-flex; gap: 3px; align-items: baseline; margin: 1px 2px; padding: 0 6px; border-radius: 999px; background: var(--soft); font-size: .74rem; }
.mx-dot.gone { text-decoration: line-through; text-decoration-color: var(--err); opacity: .7; }
.mx-new { display: inline-block; margin: 1px 2px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .74rem; }
.mx-src { font-family: var(--mono); font-size: .66rem; color: var(--warn); font-weight: 700; margin-inline-start: 4px; }
.mx-draft { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; overflow-y: auto;
  border-block-start: 3px solid var(--accent); display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.mx-draft h2 { font-size: .95rem; margin: 2px 0; }
.mx-choices { margin: 0; padding-inline-start: 18px; font-size: .82rem; display: flex; flex-direction: column; gap: 3px; }
.mx-choices li span { overflow-wrap: anywhere; }
.mx-choices li button { margin-inline-start: 6px; }
.mx-choices .mx-drop { color: var(--err); }
.mx-record { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 9px 12px; font-weight: 650; }
.mx-record:disabled { opacity: .45; }
.mx-result { font-size: .82rem; overflow-wrap: anywhere; margin: 0; }
@media (max-width: 900px) { .mx-body { grid-template-columns: minmax(0, 1fr); } .mx-wrap { max-height: 60vh; } }
.mx-add { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 8px 10px; border-block-end: 1px solid var(--line);
  background: var(--soft); position: sticky; inset-inline-start: 0; }
.mx-add input, .mx-add select { padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); max-width: 13rem; }
.mx-add button { border: 1px solid var(--accent); color: var(--accent); background: var(--panel); border-radius: 8px; padding: 4px 10px; font-weight: 600; }
.mx-add-why { color: var(--err); font-size: .78rem; }
.mx-retire { border: 0; background: none; color: var(--muted); padding: 0 6px 0 0; margin-inline-end: 4px; cursor: pointer; font-size: .8rem; }
.mx-retire.on { color: var(--accent-ink); background: var(--err); border-radius: 6px; padding: 0 5px; }
tr.mx-fresh th, tr.mx-fresh td { color: var(--accent); }
.mx-choices [class^="mx-retire"], .mx-choices .mx-retire-line, .mx-choices .mx-retire-brand, .mx-choices .mx-retire-company { color: var(--err); }
.mx-range { min-width: 340px; }
.mx-chip { display: inline-block; margin: 1px 3px; padding: 0 7px; border-radius: 999px; background: var(--soft); font-size: .74rem; }
.mx-flag { display: inline-block; margin: 1px 3px; padding: 0 7px; border-radius: 999px; font-size: .72rem; font-weight: 700; color: var(--accent-ink); background: var(--warn); }
.mx-flag.bad { background: var(--err); }
.mx-range select { margin: 3px; max-width: 14rem; }
.mx-open { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 2px 8px; font-size: .76rem; cursor: pointer; }
tr.mx-nest > td { background: color-mix(in srgb, var(--accent) 5%, var(--panel)); padding: 6px 10px 10px; }
tr.mx-nest table.mx { min-width: 0; margin-block-end: 4px; }

/* ---- the language switch: the other language's own name, in its own direction ---- */
.lang-switch { font-weight: 600; white-space: nowrap; }

/* ---- sales and stories: cards of what the garden says, read live (sales.js, stories.js) ---- */
.sales, .stories { flex-direction: column; padding: 14px 20px 16px; gap: 8px; height: calc(100vh - 53px);
  height: calc(100dvh - 53px); min-height: 0; overflow-y: auto; }
.sl-cos { display: flex; flex-wrap: wrap; gap: 6px; }
.sl-co-chip { display: inline-flex; align-items: baseline; gap: 6px; border: 1px solid var(--line); background: var(--panel);
  border-radius: 999px; padding: 3px 12px; color: var(--muted); }
.sl-co-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.sl-co-chip .n { font-size: .78rem; font-variant-numeric: tabular-nums; }
.sl-cards, .st-main { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 12px;
  align-items: start; }
.sl-card, .st-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  box-shadow: var(--shadow); min-width: 0; }
.sl-card-head, .st-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-block-end: 6px; }
.sl-card-head h2, .st-card-head h2 { font-size: 1rem; margin: 0; }
.sl-count, .st-count { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.sl-badge { font-size: .72rem; border-radius: 999px; padding: 0 8px; background: var(--soft); color: var(--muted); }
.sl-badge.st-owned { background: color-mix(in srgb, var(--c-milestone) 18%, transparent); color: var(--c-milestone); }
.sl-badge.st-dealership { background: color-mix(in srgb, var(--c-meeting) 16%, transparent); color: var(--c-meeting); }
.sl-badge.st-ended { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }
.sl-lines, .sl-sub, .sl-offers, .st-needs, .st-list { list-style: none; margin: 0; padding: 0; }
.sl-lines { display: flex; flex-direction: column; gap: 6px; }
.sl-sub { padding-inline-start: 12px; margin-block-start: 4px; border-inline-start: 2px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; }
.sl-line-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.sl-line-head .nm { font-weight: 550; }
.sl-line-head .mk, .sl-whole .mk { color: var(--muted); font-size: .76rem; }
.sl-brand { font-size: .74rem; border-inline-start: 3px solid var(--c-milestone); padding-inline-start: 5px; color: var(--muted); }
.sl-offers { display: flex; flex-direction: column; gap: 2px; margin-block-start: 2px; }
.sl-offer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: .88rem;
  padding-inline-start: 8px; border-inline-start: 3px solid var(--c-meeting); }
.sl-offer .sl-co { font-weight: 600; }
.sl-offer .sl-as { color: var(--ink); }
.sl-offer .sl-known { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.sl-offer.disputed { border-inline-start-color: var(--err); }
.sl-offer.disputed .sl-co, .sl-offer.disputed .sl-as { text-decoration: line-through; color: var(--muted); }
.sl-none { margin: 0; }
.sl-whole { margin-block-end: 6px; }
.sl-more { grid-column: 1 / -1; margin: 0; }
.st-sums { display: flex; flex-wrap: wrap; gap: 8px; }
.st-sum { display: flex; flex-direction: column; min-width: 96px; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--panel); }
.st-sum .n { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }
.st-sum .l { font-size: .76rem; color: var(--muted); }
.st-sum.on-gardener .n { color: var(--accent); }
.st-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 14px; align-items: start; }
.st-needs { display: flex; flex-direction: column; gap: 8px; }
.st-need { border-inline-start: 3px solid var(--line); padding-inline-start: 8px; }
.st-need p { margin: 2px 0; }
.st-need-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.st-class { font-size: .72rem; border-radius: 999px; padding: 0 8px; background: var(--soft); color: var(--muted); }
.st-class.ratified { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); font-weight: 600; }
.st-class.c-E { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }
.st-class.c-G { background: color-mix(in srgb, var(--c-milestone) 16%, transparent); color: var(--c-milestone); }
.st-strength { font-size: .72rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 0 7px; }
.st-for { margin-inline-start: auto; }
.st-for .who { font-weight: 600; }
.st-what { font-weight: 500; overflow-wrap: anywhere; }
.st-note, .st-sub { overflow-wrap: anywhere; }
.st-blocked { color: var(--warn); }
.st-hood summary, .st-handover summary { cursor: pointer; color: var(--muted); }
.st-hood p { overflow-wrap: anywhere; }
.st-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.st-part { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.st-part h2 { font-size: .95rem; margin: 0 0 6px; }
.st-list { display: flex; flex-direction: column; gap: 8px; }
.st-list p { margin: 2px 0; overflow-wrap: anywhere; }
.st-decided { border-inline-start: 3px solid var(--ok); padding-inline-start: 6px; }
.st-handover-body { max-height: 50vh; overflow: auto; font-size: .86rem; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .sales, .stories { height: auto; min-height: calc(100dvh - 53px); padding: 12px 16px; overflow: visible; }
  .st-body { grid-template-columns: minmax(0, 1fr); }
}

/* ---- the generic sheet of any bean, and its one write (sheet.js; design-hsx-views, phase 2a) ---- */
.beings { flex-direction: column; padding: 14px 20px 16px; gap: 8px; overflow: auto; height: calc(100vh - 53px); }
.bx { max-width: 920px; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.bx .co-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bx input[type=search] { flex: 1 1 240px; min-width: 0; }
.bx-list { display: flex; flex-direction: column; gap: 4px; }
.bx-item { text-align: start; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
  color: var(--ink); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.bx-item:hover { border-color: var(--accent); }
.bx-t { font-weight: 600; overflow-wrap: anywhere; }
.sp-wrap { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; }
.sp-wrap[hidden] { display: none; }
.sp-back { position: absolute; inset: 0; background: rgba(0,0,0,.28); }
.sp { position: relative; width: min(640px, 100%); height: 100%; overflow: auto; background: var(--bg); color: var(--ink);
  border-inline-start: 1px solid var(--line); box-shadow: var(--shadow); padding: 14px 16px 40px; display: flex;
  flex-direction: column; gap: 8px; }
.sp-top { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.sp-top h2 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.sp-kind { color: var(--muted); font-size: .82rem; }
.sp-meaning { margin: 0; overflow-wrap: anywhere; }
.sp-sum { margin: 2px 0; }
.sp h3 { font-size: .92rem; margin: 10px 0 4px; }
.sp-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.sp-st { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.sp-st.sp-removing { opacity: .55; text-decoration: line-through; }
.sp-st.sp-changing { border-color: var(--warn); }
.sp-line { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.sp-verb { font-weight: 700; color: var(--accent); }
.sp-roles { display: flex; flex-wrap: wrap; gap: 2px 12px; min-width: 0; }
.sp-role { overflow-wrap: anywhere; min-width: 0; }
.sp-rk { color: var(--muted); font-family: var(--mono); font-size: .8rem; }
.sp-rv.link { padding: 0 2px; color: var(--ink); text-decoration: underline dotted; }
.sp-known { margin-top: 3px; display: flex; flex-wrap: wrap; gap: 2px 10px; }
.sp-key { opacity: .8; }
.sp-acts { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; }
.sp-near { display: flex; flex-direction: column; gap: 6px; }
.sp-ng { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.sp-nh { flex-basis: 100%; }
.sp-nb { cursor: pointer; color: var(--ink); max-width: 100%; overflow-wrap: anywhere; text-align: start; }
.sp-fold summary { cursor: pointer; color: var(--muted); font-size: .86rem; }
.sp-pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--code); border-radius: 8px; padding: 8px; margin: 4px 0;
  max-height: 40vh; overflow: auto; text-align: left; }
.sp-adder, .sp-head-edit, .sp-form { display: flex; flex-direction: column; gap: 6px; background: var(--soft);
  border-radius: 10px; padding: 8px 10px; }
.sp-form { background: var(--panel); border: 1px solid var(--line); }
.sp-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sp-fl { font-size: .82rem; color: var(--muted); }
.sp-req { color: var(--err); }
.sp input, .sp select, .sp textarea { width: 100%; min-width: 0; box-sizing: border-box; font: inherit; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.sp-sibs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.sp-sibs .chip { cursor: pointer; font-family: var(--mono); font-size: .8rem; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.sp-choices { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow: auto; }
.sp-cand { text-align: start; background: none; border: 1px solid transparent; border-radius: 8px; padding: 4px 6px;
  color: var(--ink); display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.sp-cand:hover { border-color: var(--line); background: var(--soft); }
.sp-ct { overflow-wrap: anywhere; }
.sp-cr { flex-basis: 100%; }
.sp-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sp .primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 6px 12px; }
.sp .primary:disabled { opacity: .5; cursor: default; }
.sp-draft { display: flex; flex-direction: column; gap: 6px; position: sticky; bottom: -40px; background: var(--bg);
  padding-block: 6px; border-top: 1px solid var(--line); }
.sp-ops { margin: 0; padding-inline-start: 18px; font-size: .86rem; }
.sp-err { color: var(--err); margin: 2px 0; overflow-wrap: anywhere; }
.sp-ok { color: var(--ok); margin: 2px 0; }
.co-sheet-whole { padding-inline: 0; text-decoration: underline; }
@media (max-width: 900px) { .beings { height: auto; min-height: calc(100dvh - 53px); padding: 12px 16px; } .sp { width: 100%; } }

/* ---- the stock, jobs and techies tabs and their forms (stock.js, jobs.js, techies.js, forms.js, levels.js; phase 2b) ---- */
.sk-main, .jb-main, .tc-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sk-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.sk-tools .chip { cursor: pointer; color: var(--ink); }
.sk-tools .sk-levels { border-color: var(--accent); }
.sk-sec { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.sk-sec h3 { font-size: .95rem; margin: 0 0 6px; }
.sk-sec h4 { font-size: .9rem; margin: 8px 0 4px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.sk-b { padding: 0 2px; color: var(--ink); text-align: start; overflow-wrap: anywhere; }
.sk-tw { overflow-x: auto; max-width: 100%; }
.sk-table { border-collapse: collapse; font-size: .86rem; min-width: 100%; }
.sk-table th, .sk-table td { border: 1px solid var(--line); padding: 4px 8px; text-align: start; vertical-align: top; }
.sk-table td .sk-n { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.sk-acts { display: flex; flex-wrap: wrap; gap: 0 6px; }
.sk-acts .link { padding: 0 2px; font-size: .78rem; }
.sk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sk-mh { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.sk-mt { font-weight: 600; }
.sk-below { list-style: none; margin: 2px 0 6px; padding-inline-start: 14px; border-inline-start: 2px solid var(--line); }
.sk-item { overflow-wrap: anywhere; }
.sk-suggest { border-color: var(--warn); }
.sk-sg { border-top: 1px dashed var(--line); padding-top: 4px; }
.sk-any summary { cursor: pointer; color: var(--muted); font-size: .86rem; }
.jb-grid td { text-align: center; min-width: 2.2em; }
.jb-grid .jb-on { color: var(--ok); }
.jb-grid .jb-ahead { background: var(--soft); color: var(--muted); }
.jb-grid th.jb-ahead { font-style: italic; }
.fm { display: flex; flex-direction: column; gap: 8px; }
.fm-field { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.fm-label { color: var(--ink); font-weight: 600; }
.fm-writes summary { cursor: pointer; }
.fm-writes .sp-verb { font-size: .82rem; }
.fm-tools { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.fm-tools input { flex: 1 1 200px; }
.fm-make { font-size: .8rem; }
.fm-cands[hidden] { display: none; }
.fm-chosen .chip { max-width: 100%; overflow-wrap: anywhere; }
.fm-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: end; border-top: 1px dashed var(--line); padding-top: 4px; }
.fm-row > .sp-field { flex: 2 1 200px; }
.fm-row > .fm-small { flex: 1 1 110px; }
.fm-check { display: flex; flex-direction: column; gap: 2px; }
.fm-ops { max-height: 30vh; overflow: auto; text-align: left; }
.fm-req { margin: 0; padding-inline-start: 18px; }
.fm-said { display: flex; flex-direction: column; gap: 2px; }
.fm-back { align-self: flex-start; padding-inline: 0; }
.sp-backbar { padding-block: 2px; }
.lv-host { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-width: 0; }
.lv-host[hidden] { display: none; }
.lv-stage { position: relative; width: 100%; overflow: hidden; border-radius: 8px; background: var(--bg); }
.lv-stage canvas { display: block; max-width: 100%; outline-offset: -2px; }
.lv-labels { position: absolute; inset: 0 auto auto 0; pointer-events: none; }
.lv-lab, .lv-cap { position: absolute; left: 0; top: 0; pointer-events: auto; white-space: nowrap; max-width: 220px;
  overflow: hidden; text-overflow: ellipsis; font-size: .74rem; line-height: 1.3; border-radius: 6px; padding: 1px 6px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 88%, transparent); color: var(--ink); }
.lv-cap { pointer-events: none; border: 0; background: none; color: var(--muted); font-size: .72rem; max-width: 60vw; }
.lv-cap-top, .lv-cap-below { left: auto; top: auto; inset-inline-start: 10px; white-space: normal; }
.lv-cap-top { top: 8px; }
.lv-cap-below { bottom: 8px; }
.lv-lab.lv-model { font-weight: 700; border-color: var(--accent); font-size: .8rem; }
.lv-lab.lv-lot { border-color: var(--warn); }
.lv-lab.lv-owner { border-color: var(--ok); }
.lv-lab.lv-place { border-style: dashed; color: var(--muted); }
.lv-lab.lv-dim { opacity: .35; }
.lv-lab:focus-visible { outline: 2px solid var(--accent); opacity: 1; z-index: 2; }
.lv-legend { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 4px; }
.lv-lg { display: flex; flex-wrap: wrap; gap: 4px 12px; list-style: none; margin: 0; padding: 0; }
.lv-lg li { display: inline-flex; gap: 4px; align-items: center; }
.lv-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.lv-sw-line { height: 3px; width: 16px; border-radius: 2px; }
.lv-help { margin: 4px 0 0; }
@media (prefers-reduced-motion: reduce) { .lv-lab { transition: none; } }

/* ---- the Projects tab: projects, floors, the floor map (design-techies-floor-map; projects.js, floormap.js, plancal.js,
   photo.js). The map keeps its own frame (never mirrored); its panel stands at the reading end of the page. ---- */
:root { --fm-bg: #eceae3; --fm-lan: #2f6fd6; --fm-voip: #a743c9; --fm-cctv: #c96d12; --fm-electric: #a88a00;
  --fm-zone: #3d8a4f; --fm-pt: #c0392b; --fm-done: #2f7d4f; --fm-sel: #1f1e1d; }
@media (prefers-color-scheme: dark) {
  :root { --fm-bg: #171716; --fm-lan: #6ea2ff; --fm-voip: #d58bf0; --fm-cctv: #f2a35a; --fm-electric: #e2c84a;
    --fm-zone: #6fc086; --fm-pt: #ff7a6b; --fm-done: #6fd39a; --fm-sel: #ffffff; }
}
.pj-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.pj-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: start; padding: 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); cursor: pointer; }
.pj-card:hover, .pj-card:focus-visible { border-color: var(--accent); }
.pj-thumb { width: 100%; height: 140px; object-fit: contain; background: #fff; border-radius: 6px; border: 1px solid var(--line); }
.pj-nothumb { display: flex; align-items: center; justify-content: center; color: var(--muted); background: var(--soft); }
.pj-ok { color: var(--ok); }
/* a project's standards (design-project-cad step 4): one card a service, its slots, the keeper's add and replace */
.pj-standards { margin: 16px 0; }
.pj-standards h3 { font-size: 1rem; margin: 0 0 8px; }
.pj-standard { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 12px; margin-bottom: 12px; }
.pj-std-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin-bottom: 6px; }
.pj-std-slot { border-top: 1px solid var(--line); padding: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.pj-std-name { display: flex; gap: 8px; align-items: baseline; font-weight: 600; }
.pj-std-use { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding-inline-start: 8px; }
.pj-std-tools, .pj-std-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pj-std-tools select, .pj-std-add select { min-height: 36px; max-width: 100%; }
.pj-std-remove[disabled] { opacity: .5; cursor: not-allowed; }
@media (pointer: coarse) { .pj-std-tools select, .pj-std-add select, .pj-std-tools .chip, .pj-std-add .chip { min-height: 48px; } }
.pj-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.pj-bar h2 { margin: 0; font-size: 1.1rem; }
.pj-chips, .pj-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.pj-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--soft); }
.pj-chip[data-layer="lan"][aria-pressed="true"] { border-color: var(--fm-lan); }
.pj-chip[data-layer="voip"][aria-pressed="true"] { border-color: var(--fm-voip); }
.pj-mode { margin: 4px 0; padding: 6px 10px; border-radius: 8px; background: var(--soft); border: 1px dashed var(--accent); }
.pj-main { display: flex; gap: 12px; height: calc(100vh - 210px); min-height: 380px; }
.pj-map { position: relative; flex: 1 1 auto; min-width: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--fm-bg); }
.pj-panel { flex: 0 0 320px; overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.pj-panel h3 { margin: 0 0 4px; }
/* the panel's head (design-project-cad, build step 1): the trail, the floor › what is open, and the × that steps back,
   kept at the panel's top while it scrolls; on a finger's screen each target 48 px */
.pj-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 6px; margin: -12px -12px 8px;
  padding-block: 2px; padding-inline: 12px 2px; background: var(--panel); border-bottom: 1px solid var(--line);
  border-start-start-radius: 10px; border-start-end-radius: 10px; }
.pj-trail { flex: 1 1 auto; min-width: 0; min-height: 40px; }
.pj-trail button.crumb { min-height: 36px; }
.pj-close { flex: none; }
@media (pointer: coarse) { .pj-trail { min-height: 52px; } .pj-trail button.crumb { min-height: 48px; } .pj-close { width: 48px; height: 48px; } }
.pj-where { font-variant-numeric: tabular-nums; }
.pj-line { font-family: var(--mono); font-size: .85em; color: var(--muted); }
.pj-rec { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 8px 0; }
.pj-rec dt { color: var(--muted); }
.pj-rec dd { margin: 0; }
.pj-list { padding-inline-start: 18px; margin: 4px 0; }
.pj-list li { margin: 2px 0; }
.pj-panel .chip { margin: 4px 4px 0 0; }
.pj-record { margin-top: 8px; }
.pj-nogl { overflow: auto; padding: 12px; background: var(--panel); }
.fmap { position: absolute; inset: 0; touch-action: none; }
.fmap-canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.fmap-names { position: absolute; inset: 0; pointer-events: none; }
.fmap-names > button { position: absolute; left: 0; top: 0; pointer-events: auto; white-space: nowrap; }
.fmap-pt { margin: -7px 0 0 -7px; padding: 0; border: 0; background: none; color: var(--ink); display: flex; align-items: center;
  gap: 4px; font: inherit; font-size: .78rem; cursor: pointer; }
.fmap-pt::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--fm-pt);
  border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--fm-pt); }
.fmap-pt.done::before { background: var(--fm-done); box-shadow: 0 0 0 1px var(--fm-done); }
.fmap-pt.outside::before { outline: 2px dashed var(--warn); outline-offset: 2px; }
.fmap-pt.sel::before { box-shadow: 0 0 0 3px var(--fm-sel); }
.fmap-pt-label { padding: 0 4px; border-radius: 4px; background: color-mix(in srgb, var(--panel) 85%, transparent); }
.fmap-pt:focus-visible, .fmap-zone:focus-visible, .fmap-handle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fmap-zone { padding: 1px 6px; border-radius: 4px; border: 1px solid var(--fm-zone); background: var(--panel); color: var(--ink);
  font: inherit; font-size: .75rem; cursor: pointer; }
.fmap-zone[data-tag="lan"] { border-color: var(--fm-lan); }
.fmap-zone[data-tag="voip"] { border-color: var(--fm-voip); }
.fmap-zone[data-tag="cctv"] { border-color: var(--fm-cctv); }
.fmap-zone[data-tag="electric"] { border-color: var(--fm-electric); }
.fmap-zone.sel { box-shadow: 0 0 0 2px var(--fm-sel); }
.fmap-handle { margin: -9px 0 0 -9px; width: 18px; height: 18px; border-radius: 4px; border: 2px solid var(--fm-sel);
  background: var(--panel); cursor: move; touch-action: none; }
.ph-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.ph { position: relative; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.ph img, .pj-photo { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.ph-x { position: absolute; top: 2px; inset-inline-end: 2px; background: var(--panel); border-radius: 50%; }
.ph-take { cursor: pointer; }
.ph-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pc-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); display: flex; align-items: flex-start;
  justify-content: center; overflow: auto; padding: 16px; }
.pc-box { width: min(1100px, 100%); background: var(--panel); color: var(--ink); border-radius: 12px; padding: 16px;
  box-shadow: var(--shadow); }
.pc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pc-top h2 { margin: 0; font-size: 1.1rem; }
.pc-field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.pc-step { font-weight: 600; }
.pc-tools { display: flex; gap: 6px; margin: 6px 0; }
.pc-view { position: relative; max-height: 60vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pc-stage { position: relative; width: max-content; }
.pc-img { display: block; user-select: none; }
.pc-ov { position: absolute; left: 0; top: 0; cursor: crosshair; touch-action: none; }
.pc-loupe { position: absolute; width: 140px; height: 140px; border-radius: 50%; border: 2px solid var(--fm-sel);
  pointer-events: none; z-index: 2; }
.pc-lines { border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; }
@media (max-width: 860px) {
  .pj-main { flex-direction: column; height: auto; }
  .pj-map { height: 62vh; flex: none; }
  .pj-panel { flex: none; max-height: 45vh; }
}

/* the Users tab (users.js, design-techies-access) */
.us-list { list-style: none; padding: 0; margin: 0 0 16px; }
.us-user { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 8px; background: var(--panel); }
.us-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.us-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.us-acts select { min-height: 36px; }
.us-out canvas.us-qr { display: block; margin: 10px 0; width: min(100%, 240px); height: auto; image-rendering: pixelated;
  background: #fff; }
.us-add { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: grid; gap: 8px; max-width: 520px; }
.us-field { display: grid; gap: 2px; }
.us-field input, .us-field select { min-height: 40px; }
.us-ok { color: var(--ok); }
.us-err { color: var(--err); }

/* trail.js — breadcrumbs in one line (design-hsx-page-direction, fault f5): never wrapped; each crumb shrinks with an
   ellipsis before the line would wrap, the line scrolls sideways past that, the current crumb whole */
.trail { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 6px; min-height: 1.4em; max-width: 100%;
  overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: none; }
.trail::-webkit-scrollbar { display: none; }
.trail .crumb { flex: 0 1 auto; min-width: 2.5em; max-width: 16em; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; padding-inline: 0; }
.trail .here { flex: 0 0 auto; max-width: 22em; font-weight: 600; color: var(--ink); }
.trail .sep { flex: none; color: var(--muted); }
.fm-trail, .sp-trail { margin-block: 2px 4px; }

/* picker.js — a picker's candidates (faults f2, f3): their head's close, their list, and the create rows */
.pk-box { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 2px 4px 4px;
  max-height: none; overflow: visible; }
.pk-list { max-height: 240px; overflow: auto; }
.pk-foot:empty { display: none; }
.pk-foot { display: flex; flex-direction: column; gap: 2px; }
.pk-box[hidden] { display: none; }
.pk-head { display: flex; justify-content: flex-end; }
.pk-close { min-width: 32px; min-height: 32px; }
.pk-list { display: flex; flex-direction: column; gap: 2px; }
.pk-create { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding-block: 4px 2px;
  border-top: 1px solid var(--line); }
.pk-create .link { font-size: .85rem; }
.pk-kinds { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pk-kinds .chip { cursor: pointer; font-family: var(--mono); font-size: .8rem; }

/* withdrawn.js — the switch that shows withdrawn beings again (fault f6) */
.wd-switch { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.wd-switch[hidden] { display: none; }
.wd-switch input { width: auto; margin: 0; }

/* ---- the Workspace tab (design-project-cad build step 5; workspace.js, cad/workspace.js, cad/outline.js, cad/props.js,
   floormap.js's shapes): the toolbar above, the outline at the reading end of the page and the properties at the other
   (the direction module says which: .ws-main's data-end), the canvas between them in its own frame, never mirrored, the
   status bar below; light and dark by the system's choice, as the page's. ---- */
:root { --fm-rack: #6b6a66; --fm-cable: #0f7c8c; --fm-cam: #c96d12; --fm-measure: #c2410c; --fm-grid: #8c8a84; }
@media (prefers-color-scheme: dark) {
  :root { --fm-rack: #a29f97; --fm-cable: #4fc3d1; --fm-cam: #f2a35a; --fm-measure: #fb8a5b; --fm-grid: #8c8a84; }
}
/* design-cad-studio kit 7: the toolbar's thirteen tools kept on one row at a desk's width (a second row moved the canvas
   under the floor map's pointer, so clicks landed a metre or more off: shots-cad, found by kit 7): each tool's key chip
   shown from 1680 px, its key always in the button's title */
@media (max-width: 1679px) { .ws-tool .ws-kbd { display: none; } }
/* design-cad-studio kit 7: a room's outline, a wall's body, a ceiling's and a false ceiling's outline, a tray's run */
:root { --fm-room: #7a6f5c; --fm-wall: #3b3a36; --fm-ceiling: #6c7f99; --fm-tray: #8a5a2b; }
@media (prefers-color-scheme: dark) {
  :root { --fm-room: #c2b49a; --fm-wall: #d6d3cb; --fm-ceiling: #9fb4d1; --fm-tray: #d9a066; }
}
/* the scheme scis's nine families, each the colour of its units' marks (cad/symbols.js; design-cad-studio kit 1,
   said-kit1-marks) */
:root { --dom-core: #5560c9; --dom-tech: #1f6fd1; --dom-security: #b85a08; --dom-building: #0f7f74; --dom-energy: #8a6800;
  --dom-automation: #8a3fc0; --dom-media: #b8306f; --dom-services: #2f7d3a; --dom-safety: #c0262d; }
@media (prefers-color-scheme: dark) {
  :root { --dom-core: #9aa2ff; --dom-tech: #6ea8ff; --dom-security: #f2a35a; --dom-building: #4fd1c1; --dom-energy: #e2c84a;
    --dom-automation: #c99af0; --dom-media: #f07ab4; --dom-services: #72d07c; --dom-safety: #ff7a6b; }
}
.tab.workspace { flex-direction: column; padding: 10px 16px 12px; gap: 6px; height: calc(100vh - 53px);
  height: calc(100dvh - 53px); overflow: auto; }
.tab.workspace h2 { margin: 0; font-size: 1.1rem; }
.ws-way { margin: 8px 0; }
.ws-way-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.ws-way-head h3 { margin: 0; font-size: 1rem; }
.ws-bar { margin-bottom: 0; }
.ws-host { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ws { flex: 1; min-height: 520px; display: flex; flex-direction: column; gap: 6px; }
.ws-toolbar { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.ws-tools, .ws-acts, .ws-view { display: flex; flex-wrap: wrap; gap: 4px; }
.ws-tool, .ws-act { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 3px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font-size: .88rem; }
.ws-tool:hover, .ws-act:hover { border-color: var(--accent); }
.ws-tool[aria-pressed="true"], .ws-act[aria-pressed="true"] { border-color: var(--accent); background: var(--soft); font-weight: 600; }
.ws-later { color: var(--muted); border-style: dashed; }
.ws-act:disabled { opacity: .5; cursor: default; }
/* the draft (design-project-cad step 6): what is not yet saved, dashed on the canvas and listed in the outline */
.ws-draftlist { border: 1px dashed var(--accent); border-radius: 8px; padding: 6px 8px; margin-bottom: 8px; }
.ws-draftlist h3 { margin: 0 0 4px; color: var(--accent); }
.ws-draftrow { display: block; text-align: start; padding: 2px 0; font-size: .9em; }
.ws-draftrow.ws-struck { text-decoration: line-through; color: var(--muted); }
.ws-draftact { color: var(--muted); }
.ws-refused { color: var(--err); }
.ws-draft:not(.muted) { color: var(--accent); font-weight: 600; }
.ws-members .ws-memberlist { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.ws-member { display: inline-flex; gap: 4px; align-items: center; }
.ws-addpoints.on { background: var(--accent); color: var(--accent-ink); }
.ws-kbd { font: .72rem/1.4 var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.ws-say { margin: 0; min-height: 1.6em; color: var(--muted); }
.ws-main { flex: 1; min-height: 0; display: grid; gap: 8px; grid-template-columns: 300px minmax(0, 1fr) 280px; }
.ws-main[data-end="left"] { grid-template-columns: 280px minmax(0, 1fr) 300px; }
.ws-main[data-end="left"] .ws-outline { order: 0; }
.ws-main[data-end="left"] .ws-canvas { order: 1; }
.ws-main[data-end="left"] .ws-props { order: 2; }
.ws-outline, .ws-props { min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); padding: 8px 10px; font-size: .88rem; line-height: 1.6; }
.ws-canvas { position: relative; min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: var(--fm-bg); }
.ws-nogl { display: flex; align-items: center; justify-content: center; padding: 16px; }
/* the topics drawer (design-project-cad step 8, cad/topics.js): below the canvas, folded to its head */
.ws-drawer { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 6px 10px;
  font-size: .88rem; line-height: 1.6; max-height: 34vh; overflow: auto; }
.ws-drhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ws-drtitle { margin: 0; }
.ws-drfilters { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
.ws-drchip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ws-drlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ws-drrow { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; padding: 3px 4px; border-radius: 6px; }
.ws-drrow:hover { background: var(--soft); }
.ws-drdraft .ws-drname { font-style: italic; }
.ws-dropen { text-align: start; }
.ws-badge { display: inline-block; border-radius: 999px; padding: 0 8px; font-size: .76rem; border: 1px solid var(--line);
  background: var(--soft); color: var(--ink); }
.ws-st-open { border-color: var(--err); color: var(--err); }
.ws-st-active { border-color: var(--warn); color: var(--warn); }
.ws-st-resolved { border-color: var(--ok); color: var(--ok); }
.ws-st-closed { color: var(--muted); }
.ws-drcard, .ws-drraise { display: grid; gap: 6px; justify-items: start; }
.ws-drcard > section, .ws-drraise > label, .ws-drcard > .ws-drdesc { justify-self: stretch; }
.ws-drh { margin: 0; font-size: 1rem; }
.ws-drdesc { margin: 0; white-space: pre-wrap; }
.ws-drfacts { display: grid; grid-template-columns: max-content max-content; gap: 0 10px; margin: 0; }
.ws-drfacts dt { color: var(--muted); }
.ws-drfacts dd { margin: 0; }
.ws-drmoves { display: flex; flex-wrap: wrap; gap: 4px; }
.ws-drphotos { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.ws-drphotos h5 { flex-basis: 100%; margin: 0; }
.ws-drphoto { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.ws-drcomments h5 { margin: 4px 0; }
.ws-drcomment { border-inline-start: 3px solid var(--line); padding-inline-start: 8px; margin-bottom: 4px; }
.ws-drcomment p { margin: 0; }
.ws-drtext { white-space: pre-wrap; }
.ws-drbox, .ws-drnote-in, .ws-drtitle-in { width: 100%; box-sizing: border-box; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
.ws-drdue-in { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.ws-status { display: flex; flex-wrap: wrap; gap: 2px 18px; align-items: center; border-top: 1px solid var(--line);
  padding: 4px 2px 0; min-height: 30px; }
.ws-snap { background: none; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; color: var(--ink); }
.ws-snap[aria-pressed="false"] { color: var(--muted); }
.ws-scalebar { display: inline-block; height: 7px; border: 2px solid var(--ink); border-top: 0; vertical-align: middle; }
.ws-where .ws-line { font-family: var(--mono); font-size: .8em; color: var(--muted); }
.ws-pos { min-width: 250px; }
/* the outline */
.ol-h { font-size: .78rem; color: var(--muted); margin: 0 0 2px; font-weight: 600; }
.ol-project, .ol-standard { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; }
.ol-standard { padding-inline-start: 12px; }
.ol-sub { color: var(--muted); font-size: .8rem; }
.ol-floor { position: sticky; top: -8px; z-index: 1; display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline;
  width: 100%; text-align: start; margin: 8px 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--ink); }
.ol-floor:hover { border-color: var(--accent); }
.ol-floor.here { border-color: var(--accent); background: var(--soft); font-weight: 600; }
.ol-kind { color: var(--muted); font-size: .76rem; font-weight: 400; }
.ol-bad { color: var(--warn); font-size: .76rem; margin-inline-start: auto; font-weight: 600; }
.ol-lhead { display: flex; align-items: center; gap: 2px; }
.ol-fold { flex: 1; display: flex; gap: 6px; align-items: baseline; background: none; border: 0; border-radius: 6px;
  padding: 3px 4px; text-align: start; font-weight: 600; color: var(--ink); }
.ol-fold:hover, .ol-eye:hover, .ol-lock:hover { background: var(--soft); }
.ol-caret::before { content: "▾"; color: var(--muted); }
.ol-fold[aria-expanded="false"] .ol-caret::before { content: "▸"; }
.ws-outline[dir="rtl"] .ol-fold[aria-expanded="false"] .ol-caret::before { content: "◂"; }
.ol-count { color: var(--muted); font-weight: 400; font-size: .8rem; }
.ol-eye, .ol-lock { width: 30px; height: 30px; border: 0; background: none; border-radius: 6px; color: var(--ink);
  display: inline-grid; place-items: center; font-size: .9rem; }
.ol-eye::before { content: "●"; }
.ol-eye[aria-pressed="false"]::before { content: "○"; color: var(--muted); }
.ol-lock::before { content: "□"; color: var(--muted); }
.ol-lock[aria-pressed="true"]::before { content: "▣"; color: var(--ink); }
.ol-rows { list-style: none; margin: 0 0 6px; padding: 0; }
.ol-row { display: flex; gap: 8px; align-items: baseline; width: 100%; text-align: start; background: none; border: 0;
  border-radius: 6px; padding: 1px 8px; padding-inline-start: 22px; color: var(--ink); }
.ol-row:hover { background: var(--soft); }
.ol-row.sel { background: color-mix(in srgb, var(--accent) 18%, transparent); font-weight: 600; }
.ol-row .ol-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* the properties */
.pp-layer { margin: 0; color: var(--muted); font-size: .76rem; }
.pp-title { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.pp-sub { margin: 0 0 6px; }
.pp-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 10px; margin: 6px 0; }
.pp-facts dt { color: var(--muted); }
.pp-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pp-h { font-size: .84rem; margin: 12px 0 4px; }
.pp-st-list, .pp-prob-list, .pp-lines, .pp-projects, .pp-counts, .pp-mounted { list-style: none; margin: 0; padding: 0; }
.pp-counts { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.pp-st { border-top: 1px solid var(--line); padding: 4px 0; display: flex; flex-direction: column; gap: 1px; }
.pp-key { font-weight: 600; color: var(--ink); }
.pp-roles { display: flex; flex-wrap: wrap; gap: 0 10px; }
.pp-rname { color: var(--muted); font-family: var(--mono); font-size: .76rem; }
.pp-rval { overflow-wrap: anywhere; }
.pp-note { color: var(--muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pp-prob { padding: 3px 0; border-top: 1px solid var(--line); }
.pp-what { font-family: var(--mono); font-size: .74rem; color: var(--warn); }
.pp-link { padding: 0 3px; color: var(--accent); }
.pp-standard { padding-inline-start: 10px; }
/* the canvas's labels and marks (floormap.js setShapes, setOverlay): text no pointer reaches */
.fmap-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.fmap-labels > span { position: absolute; left: 0; top: 0; white-space: nowrap; }
.fmap-dot { margin: -6px 0 0 -6px; display: flex; align-items: center; gap: 3px; color: var(--ink); font-size: .76rem; line-height: 1.2; }
.fmap-dot::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--fm-pt);
  box-shadow: 0 0 0 1px var(--panel); }
.fmap-dot.done::before { background: var(--fm-done); }
.fmap-dot.warn::before { outline: 2px dashed var(--warn); outline-offset: 1px; }
.fmap-dot.draft::before { outline: 2px dashed var(--accent); outline-offset: 2px; }
.fmap-name.draft { outline: 1px dashed var(--accent); outline-offset: 1px; }
.fmap-dot.camera::before { background: var(--fm-cam); border-radius: 2px; }
.fmap-dot.sel::before { box-shadow: 0 0 0 3px var(--fm-sel); }
.fmap-label-text { padding: 0 3px; border-radius: 3px; background: color-mix(in srgb, var(--panel) 80%, transparent); }
.fmap-name { margin: -1.5em 0 0 0; font-size: .74rem; line-height: 1.3; padding: 0 4px; border-radius: 3px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.fmap-name[data-tag="lan"] { border-color: var(--fm-lan); }
.fmap-name[data-tag="voip"] { border-color: var(--fm-voip); }
.fmap-name[data-tag="cctv"] { border-color: var(--fm-cctv); }
.fmap-name.sel { border-color: var(--fm-sel); box-shadow: 0 0 0 1px var(--fm-sel); }
.fmap-mv { margin: -4px 0 0 -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--fm-measure); }
.fmap-snap { margin: -7px 0 0 -7px; width: 14px; height: 14px; border: 2px solid var(--fm-measure); border-radius: 2px; }
.fmap-snap[data-kind="segment"], .fmap-snap[data-kind="wall"] { transform-origin: center; rotate: 45deg; }
.fmap-snap[data-kind="grid"] { border-radius: 50%; }
.fmap-hover { margin: 14px 0 0 14px; font-size: .76rem; padding: 1px 6px; border-radius: 4px; background: var(--ink); color: var(--bg); }
.fmap-mlabel { margin: -24px 0 0 10px; font-size: .8rem; font-weight: 600; padding: 0 6px; border-radius: 4px;
  background: var(--fm-measure); color: #fff; }
@media (max-width: 900px) {
  .tab.workspace { height: auto; min-height: calc(100dvh - 53px); }
  .ws-main, .ws-main[data-end="left"] { grid-template-columns: minmax(0, 1fr); }
  .ws-main .ws-canvas, .ws-main[data-end="left"] .ws-canvas { order: -1; height: 60vh; }
  .ws-outline, .ws-props { max-height: 45vh; }
  .ws-pos { min-width: 0; }
}
/* ---- cad-mends (design-project-cad, omid 2026-12-01): ONE CONTROL SET (one-control-set) — the View menu, chips,
   number fields, selects and handles drawn alike, from the page's own tokens in light and dark; THE CAMERA
   (camera-handles) a symbol turned to where it looks, a disk for a 360° lens, and its target's handle. ---- */
.ws-menu { position: relative; }
.ws-menu > summary { list-style: none; cursor: pointer; }
.ws-menu > summary::-webkit-details-marker { display: none; }
.ws-menu > summary::after { content: "▾"; font-size: .75em; color: var(--muted); }
.ws-menu[open] > summary { border-color: var(--accent); background: var(--soft); }
.ws-menu-body { position: absolute; inset-inline-end: 0; top: calc(100% + 4px); z-index: 20; display: grid; gap: 10px;
  min-width: 260px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  box-shadow: 0 6px 24px rgb(0 0 0 / .14); }
.ws-seg { display: grid; gap: 4px; }
.ws-seg-row { display: flex; flex-wrap: wrap; gap: 4px; }
.ws-chip { min-height: 30px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
  color: var(--ink); font-size: .85rem; cursor: pointer; }
.ws-chip:hover { border-color: var(--accent); }
.ws-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--soft); font-weight: 600; }
.ws-chip:focus-visible, .ws-tool:focus-visible, .ws-act:focus-visible, .ws-num:focus-visible, .ws-fields select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; }
.ws-fields { display: grid; gap: 6px; }
.ws-field { display: grid; grid-template-columns: minmax(7.5em, auto) 1fr auto; align-items: center; gap: 6px; }
.ws-num, .ws-fields select { min-height: 30px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--ink); font: inherit; font-size: .88rem; min-width: 0; }
.ws-num { width: 100%; font-variant-numeric: tabular-nums; }
.ws-field > select { grid-column: 2 / 4; }
/* the camera: its body and lens turned to its target (--rot from floormap.js), a disk for a panorama */
.fmap-dot.camera.aimed { margin: -5px 0 0 -8px; }
.fmap-dot.camera.aimed::before { width: 16px; height: 10px; border-radius: 0; box-shadow: none; transform: rotate(var(--rot, 0deg));
  clip-path: polygon(0 22%, 56% 22%, 100% 0, 100% 100%, 56% 78%, 0 78%); }
.fmap-dot.camera.aimed.fisheye { margin: -6px 0 0 -6px; }
.fmap-dot.camera.aimed.fisheye::before { width: 12px; height: 12px; border-radius: 50%; clip-path: none; transform: none;
  box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--fm-cam); }
.fmap-dot.camera.aimed.sel::before { background: var(--fm-sel); }
.fmap-dot.camera.aimed.draft::before { opacity: .8; }
.fmap-aim { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid var(--fm-cam);
  background: var(--panel); box-shadow: 0 0 0 1px var(--fm-sel); }
/* ---- design-cad-studio kit 1: THE LIBRARY (cad/libpanel.js) in a tab of the outline's column, his two modes, a card a
   model with its mark in its family's colour; THE DEVICE'S MARK on the canvas and in the outline (cad/symbols.js); the
   outline's FAMILIES, DOMAINS and the engineer's FOLDERS; the SEARCH box and its dimming; a unit's PORTS, DOCUMENTS and
   NOTES in the properties. Every colour a token of the page's, light and dark. ---- */
.ws-sidetabs { position: sticky; top: -8px; z-index: 2; display: flex; gap: 4px; margin: -8px -10px 8px; padding: 6px 10px;
  background: var(--panel); border-bottom: 1px solid var(--line); }
.ws-sidetab { flex: 1; min-height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); }
.ws-sidetab[aria-selected="true"] { border-color: var(--accent); background: var(--soft); font-weight: 600; }
.ws-sidetab:focus-visible, .lib-card:focus-visible, .ws-utab:focus-visible, .ol-tool:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lib { display: grid; gap: 6px; }
.lib-modes { display: flex; gap: 4px; }
.lib-q, .ws-search, .ol-rename, .ws-labelinp { min-height: 32px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--ink); min-width: 0; }
.lib-q { width: 100%; }
.lib-facets { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 4px; }
.lib-facet { min-width: 0; min-height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font-size: .82rem; }
.lib-clear { justify-self: start; }
.lib-help, .lib-etim { margin: 0; }
.lib-list { display: grid; gap: 8px; }
.lib-fam { display: grid; gap: 4px; }
.lib-fhead { margin: 4px 0 0; font-size: .84rem; padding-inline-start: 8px; border-inline-start: 3px solid var(--c); }
.lib-dom-group { display: grid; gap: 4px; }
.lib-dhead { margin: 2px 0 0; font-weight: 600; color: var(--muted); }
.lib-under { margin: 4px 0 0; }
.lib-card { display: flex; gap: 8px; align-items: flex-start; width: 100%; text-align: start; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel); color: var(--ink); cursor: grab; }
.lib-card:hover { border-color: var(--accent); }
.lib-card.armed { border-color: var(--accent); background: var(--soft); box-shadow: 0 0 0 1px var(--accent); }
.lib-card.variant { margin-inline-start: 16px; width: calc(100% - 16px); }
.lib-mark, .ol-mark, .ws-unit-mark { color: var(--c); flex: none; line-height: 0; }
.lib-txt { display: grid; gap: 1px; min-width: 0; }
.lib-name { font-weight: 600; font-size: .86rem; line-height: 1.35; }
.lib-name2 { font-size: .8rem; line-height: 1.35; }
.lib-meta { line-height: 1.35; overflow-wrap: anywhere; }
.lib-chips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.lib-chip { padding: 0 6px; border-radius: 999px; background: var(--soft); color: var(--muted); line-height: 1.6; }
.fmap-dot.sym { margin: -11px 0 0 -11px; color: var(--ink); }
.fmap-dot.sym::before { display: none; }
.fmap-dot.sym .sym { color: var(--c); flex: none; }
.fmap-dot.sym.sel .sym { filter: drop-shadow(0 0 0 var(--fm-sel)); outline: 2px solid var(--fm-sel); outline-offset: 1px; border-radius: 50%; }
.fmap-dot.sym.draft .sym { outline: 2px dashed var(--accent); outline-offset: 2px; border-radius: 50%; }
.fmap-dot.sym.warn .sym { outline: 2px dashed var(--warn); outline-offset: 2px; border-radius: 50%; }
.fmap-dot.dim, .fmap-name.dim { opacity: .28; }
.ol-folders, .ol-units { margin-bottom: 6px; }
.ol-fhead { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.ol-group { margin: 0; }
.ol-family > .ol-lhead { border-inline-start: 3px solid var(--c); padding-inline-start: 4px; }
.ol-domain { padding-inline-start: 12px; }
.ol-folder { padding-inline-start: calc(var(--depth, 0) * 12px); border-radius: 6px; }
.ol-folder.over { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ol-tool { width: 26px; height: 26px; border: 0; background: none; border-radius: 6px; color: var(--muted); }
.ol-tool:hover { background: var(--soft); color: var(--ink); }
.ol-mark { align-self: center; }
.ws-unit-head { display: flex; gap: 10px; align-items: flex-start; }
.ws-unit-names { display: grid; gap: 1px; min-width: 0; }
.ws-unit-meta { margin: 0; overflow-wrap: anywhere; }
.ws-label, .ws-folder { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ws-labelinp { width: 9em; font-family: var(--mono); }
.ws-utabs { display: flex; gap: 4px; margin-top: 8px; border-bottom: 1px solid var(--line); }
.ws-utab { min-height: 32px; padding: 2px 10px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0;
  background: none; color: var(--muted); }
.ws-utab[aria-selected="true"] { border-color: var(--line); background: var(--panel); color: var(--ink); font-weight: 600; margin-bottom: -1px; }
.ws-upane { padding: 6px 0; display: grid; gap: 6px; }
.ws-upane p { margin: 0; }
.ws-uports { border-collapse: collapse; width: 100%; }
.ws-uports td { padding: 2px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ws-uports td.num { text-align: end; font-variant-numeric: tabular-nums; }
.ws-udocs { margin: 0; padding-inline-start: 18px; }
.ws-notes { width: 100%; min-height: 6em; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
  color: var(--ink); font: inherit; resize: vertical; }
.ws-keepnotes { justify-self: start; }
/* the search, one box over the canvas (said-small): at its top right, the canvas's own frame */
.ws-find { position: absolute; top: 8px; right: 8px; z-index: 6; display: flex; align-items: center; gap: 6px;
  width: min(300px, calc(100% - 16px)); padding: 4px 6px; border: 1px solid var(--line); border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 92%, transparent); box-shadow: var(--shadow); }
.ws-search { flex: 1; min-width: 0; }
.ws-found { white-space: nowrap; }
/* design-cad-studio kit 2: links — the connect tool's menu, a type's swatch, a link's label on the floor, its card */
.ws-swatch { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 14px; height: 14px;
  border-radius: 3px; background: var(--c, var(--ink)); color: #fff; font-size: .62rem; line-height: 1; vertical-align: -2px; }
.ws-linkmenu { position: absolute; z-index: 8; display: flex; flex-direction: column; gap: 2px; width: min(340px, calc(100% - 8px));
  max-height: calc(100% - 8px); overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.ws-linkmenu-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 6px;
  border-bottom: 1px solid var(--line); font-size: .84rem; }
.ws-linkmenu-x { font-size: 1.1rem; line-height: 1; padding: 0 4px; }
.ws-linkitem { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 6px; border: 0; border-radius: 6px;
  background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.ws-linkitem:hover, .ws-linkitem:focus-visible { background: var(--soft); }
.ws-linkitem:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ws-linkitem[aria-disabled="true"] { cursor: not-allowed; opacity: .55; }
.ws-linkitem.flag .ws-linklabel::after { content: " ⚠"; color: var(--warn); }
.ws-linkwords { display: flex; flex-direction: column; min-width: 0; }
.ws-linklabel { font-size: .86rem; }
.ws-linksub { color: var(--muted); overflow-wrap: anywhere; }
.ws-linkitem.refuse .ws-linksub { color: var(--err); }
.ws-linkitem.flag .ws-linksub { color: var(--warn); }
.fmap-link { margin: -0.7em 0 0 -0.5em; display: flex; align-items: center; gap: 3px; font-size: .72rem; line-height: 1.2; color: var(--ink); }
.fmap-link .fmap-linkmark { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px;
  border-radius: 50%; background: var(--c, var(--ink)); color: #fff; font-size: .6rem; box-shadow: 0 0 0 1px var(--panel); }
.fmap-link .fmap-label-text { border: 1px solid var(--c, var(--line)); }
.fmap-link.sel .fmap-label-text { border-color: var(--fm-sel); box-shadow: 0 0 0 1px var(--fm-sel); }
.fmap-link.dim { opacity: .3; }
.ws-linktype, .ws-linkends { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ws-linkflags { margin: 4px 0; padding-inline-start: 18px; }
.ws-warn { color: var(--warn); }
.ws-linklist { margin: 4px 0; padding: 0; list-style: none; }
.ws-linklist li { padding: 2px 0; }
.ws-linkrow { display: inline-flex; align-items: center; gap: 4px; text-align: start; }
.ol-linktype .ol-swatch { margin-inline: 2px; }
/* design-cad-studio kit 3: the schematic (cad/schemview.js) beside the floor, his two tabs above the toolbar; the diagram
   in its own frame (left to right, never mirrored), its boxes in their families' colours, its lines in their types' */
.ws-panes { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); }
.ws-pane { margin-bottom: -1px; padding: 4px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0;
  background: none; color: var(--muted); font-size: .9rem; }
.ws-pane:hover { color: var(--ink); }
.ws-pane[aria-selected="true"] { border-color: var(--line); background: var(--panel); color: var(--ink); font-weight: 600; }
/* in the floor's own bar (workspace.js), a segmented pair no taller than the bar's title, so the canvas keeps its size */
.ws-paneshost { margin-inline-start: auto; }
.ws-paneshost .ws-panes { gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.ws-paneshost .ws-pane { margin: 0; padding: 0 12px; border: 0; border-radius: 8px; font-size: .84rem; line-height: 1.5; }
.ws-paneshost .ws-pane[aria-selected="true"] { background: var(--panel); box-shadow: var(--shadow); }
.ws-tool:disabled { opacity: .4; cursor: not-allowed; border-style: dashed; }
.ws-schem { position: absolute; inset: 0; z-index: 4; background: var(--bg); }
.sc { position: absolute; inset: 0; }
.sc-svg { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none;
  font-family: Vazirmatn, Tahoma, sans-serif; }
.ws-canvas[data-tool="pan"] .sc-svg { cursor: grab; }
.ws-canvas[data-tool="connect"] .sc-svg { cursor: crosshair; }
.sc-bg { fill: var(--bg); }
.sc-bandbg { fill: transparent; }
.sc-band.odd .sc-bandbg { fill: var(--soft); }
.sc-bandname { font-size: 12px; font-weight: 600; }
.sc-colbg { fill: none; stroke: var(--line); stroke-dasharray: 4 4; }
.sc-col.here .sc-colbg { stroke: var(--accent); stroke-opacity: .6; stroke-dasharray: none; }
.sc-colname { font-size: 13px; font-weight: 700; fill: var(--ink); }
.sc-box { cursor: pointer; }
.sc-frame { fill: var(--panel); stroke: var(--c); stroke-width: 1.5; }
.sc-box.draft .sc-frame { stroke-dasharray: 5 3; }
.sc-mark { color: var(--c); }
.sc-label { font: 700 13px var(--mono); fill: var(--ink); }
.sc-sub { font-size: 10px; fill: var(--muted); text-anchor: middle; }
.sc-warn { font-size: 12px; fill: var(--warn); text-anchor: end; }
.sc-pin { fill: var(--accent); }
.sc-box.lit .sc-frame { stroke-width: 3; }
.sc-box.sel .sc-frame { stroke: var(--fm-sel, #e0303a); stroke-width: 3; }
.sc-box.dim, .sc-link.dim { opacity: .25; }
.sc-line { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; }
.sc-hit { fill: none; stroke: transparent; stroke-width: 12; cursor: pointer; }
.sc-link.dashed .sc-line { stroke-dasharray: 6 4; }
.sc-link.lit .sc-line { stroke-width: 3.5; }
.sc-link.sel .sc-line { stroke-width: 4.5; }
.sc-lmark circle { fill: var(--c); stroke: var(--panel); stroke-width: 1.5; }
.sc-lmark text { font-size: 9px; fill: #fff; text-anchor: middle; }
.sc-tag { cursor: pointer; }
.sc-tag rect { fill: var(--panel); stroke: var(--c); stroke-width: 1.2; }
.sc-tag text { font: 600 10px var(--mono); fill: var(--ink); text-anchor: middle; }
.sc-handle { fill: var(--panel); stroke: var(--accent); stroke-width: 2.5; cursor: move; }
.sc-sketch { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 4 3; pointer-events: none; }
.sc-ghost { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 3; pointer-events: none; }
.sc-legend { position: absolute; bottom: 8px; right: 8px; z-index: 5; max-width: min(330px, calc(100% - 16px));
  max-height: calc(100% - 64px); overflow: auto; padding: 4px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 94%, transparent); box-shadow: var(--shadow); font-size: .84rem; line-height: 1.55; }
.sc-legend > summary { cursor: pointer; font-weight: 600; }
.sc-legbody { display: grid; gap: 4px; padding: 4px 0; }
.sc-lines { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.sc-types { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 0; padding: 0; list-style: none; }
.sc-note, .sc-cuthead { margin: 0; }
.sc-cuts { margin: 0; padding-inline-start: 18px; }
.sc-more > summary { cursor: pointer; color: var(--muted); }
.sc-more[open] { display: grid; gap: 4px; }
.ws-pinline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
/* ---- design-cad-studio kit 4: HIS REPORTS BAR at the end of the status bar, its five buttons opening ONE BOX over the
   canvas (the canvas keeps its size), each report read from the record when opened; a coverage gap drawn on the floor
   in --fm-gap ---- */
:root { --fm-gap: #d8344a; }
@media (prefers-color-scheme: dark) { :root { --fm-gap: #ff6b7d; } }
.ws-reports { display: flex; flex-wrap: wrap; gap: 2px; margin-inline-start: auto; padding: 2px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--soft); }
.ws-report-b { padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit;
  font-size: .8rem; line-height: 1.7; cursor: pointer; }
.ws-report-b:hover { color: var(--ink); }
.ws-report-b[aria-pressed="true"] { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.ws-report { position: absolute; z-index: 6; inset-inline: 8px; bottom: 8px; display: flex; flex-direction: column;
  max-height: min(52%, 460px); border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  box-shadow: var(--shadow); color: var(--ink); }
.ws-report-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-bottom: 1px solid var(--line); }
.ws-report-title { flex: 1; margin: 0; font-size: .95rem; outline: none; }
.ws-report-x { font-size: 1.2rem; line-height: 1; padding: 2px 10px; }
.ws-report-body { overflow: auto; padding: 6px 12px 10px; font-size: .86rem; overscroll-behavior: contain; }
.ws-report-body p { margin: 2px 0 6px; }
.ws-rsec { margin: 8px 0 4px; }
.ws-rsec-head { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: .88rem; }
.ws-rcount { padding: 0 7px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: .76rem; font-weight: 500; }
.ws-rtable-wrap { overflow-x: auto; max-width: 100%; }
.ws-rtable { border-collapse: collapse; width: 100%; font-size: .82rem; }
.ws-rtable th { position: sticky; top: -6px; background: var(--panel); color: var(--muted); font-weight: 500; text-align: start;
  white-space: nowrap; }
.ws-rtable th, .ws-rtable td { padding: 2px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ws-rtable td:first-child, .ws-rtable th:first-child { padding-inline-start: 0; }
.ws-rlink { padding: 0 2px; color: var(--accent); text-align: start; font: inherit; }
.ws-rlink:hover { background: var(--soft); color: var(--ink); }
.ws-runits { display: inline-flex; flex-wrap: wrap; gap: 0 4px; }
.ws-rtype { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ws-rmodel { overflow-wrap: anywhere; }
.ws-sev { display: inline-block; flex: none; padding: 0 6px; border-radius: 6px; font-size: .72rem; line-height: 1.6;
  border: 1px solid currentColor; }
.ws-sev-error { color: var(--err); }
.ws-sev-warn { color: var(--warn); }
/* design-cad-studio kit 9: a value no person said and no body read, marked; the reports bar's compact sixth */
.ws-sev-confirm { color: var(--warn); border-style: dashed; }
.ws-report-b.ws-report-k { padding: 0 8px; color: var(--warn); font-variant-numeric: tabular-nums; }
.ws-klist { gap: 6px; }
.ws-krow { padding: 4px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.ws-krow:last-child { border-bottom: 0; }
.ws-khead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.ws-kval { font-weight: 600; }
.ws-ku { color: var(--muted); font-size: .8rem; }
.ws-kact, .ws-kneed, .ws-kpending { margin: 2px 0 0; }
.ws-kneed { color: var(--warn); }
.ws-kpending { color: var(--ok); }
.ws-kconfirm { margin-top: 4px; }
.ws-kopen { display: block; margin: 0 0 6px; color: var(--warn); }
.pp-st.pp-unsure .pp-key { text-decoration: underline dashed var(--warn); text-underline-offset: 3px; }
.pp-mark { margin-inline-end: 4px; font-size: .68rem; line-height: 1.3; padding: 0 4px; }
.lib-unsure { text-decoration: underline dashed var(--warn); text-underline-offset: 3px; }
.lib-unsure-n { color: var(--warn); border-color: currentColor; }
.ws-ok { color: var(--ok); }
.ws-rsum { font-weight: 600; }
.ws-rlist { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.ws-rprob { display: flex; align-items: baseline; gap: 6px; }
.ws-rprob .ws-rlink { overflow-wrap: anywhere; }
.ws-rbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 2px 0 6px; }
.ws-rcheck { display: inline-flex; align-items: center; gap: 4px; }
.ws-rmore > summary { cursor: pointer; color: var(--muted); }
@media (max-width: 900px) {
  .ws-reports { margin-inline-start: 0; }
  .ws-report { inset-inline: 4px; bottom: 4px; max-height: 80%; }
}

/* design-cad-studio kit 5: alternatives and revisions — the tabs in the floor's own bar (one line, scrolled, so the canvas
   keeps its size), the alternative's menu, a read-only tab, the named history's returns, the comparison over the canvas */
.ws-alts { flex: 1 1 0; min-width: 120px; display: flex; align-items: center; gap: 2px; overflow-x: auto; white-space: nowrap;
  scrollbar-width: thin; padding: 2px; }
.ws-alttab, .ws-altplus, .ws-altmore, .ws-altclose { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 28px; line-height: 1.3;
  padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); color: var(--muted); font: inherit;
  font-size: .84rem; cursor: pointer; }
.ws-alttab:hover, .ws-altplus:hover, .ws-altmore:hover { color: var(--ink); }
.ws-alttab.ws-on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); border-color: var(--accent); }
.ws-alttab[data-kind="rev"] { border-style: dashed; }
.ws-altclose { padding: 0 6px; margin-inline-start: -4px; border-color: transparent; background: transparent; }
.ws-alttitle { max-width: 16em; overflow: hidden; text-overflow: ellipsis; }
.ws-altchip { display: inline-block; padding: 0 6px; border-radius: 999px; font-size: .72rem; font-weight: 500; line-height: 1.5;
  background: var(--bubble); color: var(--ink); }
.ws-st-in-review { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.ws-st-needs-correction { background: color-mix(in srgb, var(--fm-pt) 16%, transparent); color: var(--fm-pt); }
.ws-st-approved { background: color-mix(in srgb, var(--fm-done) 18%, transparent); color: var(--fm-done); }
.ws-chosen { background: var(--accent); color: var(--accent-ink); }
.ws-altmenu { position: absolute; z-index: 30; display: flex; flex-direction: column; gap: 2px; width: min(320px, calc(100vw - 16px));
  max-height: 70vh; overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  color: var(--ink); box-shadow: var(--shadow); }
.ws-altmenu h3 { margin: 6px 4px 2px; font-size: .8rem; color: var(--muted); }
.ws-altmenu p { margin: 0 4px 4px; }
.ws-altitem { display: block; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: inherit;
  font: inherit; text-align: start; cursor: pointer; }
.ws-altitem:hover, .ws-altitem:focus-visible { background: var(--soft); }
.ws-walk { font-weight: 600; }
.ws-altname, .ws-altwhy { width: 100%; box-sizing: border-box; margin: 2px 0 4px; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--bg); color: var(--ink); font: inherit; }
.ws-ro .ws-tool.ws-drafts { opacity: .45; }
.ws-histrow { display: flex; align-items: baseline; gap: 6px; }
.ws-histrow .ws-draftrow { flex: 1; min-width: 0; }
.ws-return { padding: 0 4px; font-size: .8rem; }
.ws-host { position: relative; }
.ws-compare { position: absolute; inset: 0; z-index: 20; overflow: auto; padding: 10px 12px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; }
.ws-cmphead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 8px; }
.ws-cmphead h3 { margin: 0; font-size: 1rem; }
.ws-cmpclose { margin-inline-start: auto; padding: 0 8px; border: 0; background: transparent; color: var(--ink); font-size: 1.3rem; cursor: pointer; }
.ws-cmppics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ws-cmpfig { margin: 0; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.ws-cmpfig figcaption { margin-top: 4px; text-align: center; }
.ws-cmpsvg { display: block; width: 100%; height: auto; max-height: 46vh; }
.ws-cmpframe { fill: none; stroke: var(--line); stroke-width: .05; }
.ws-cmpdot { fill: var(--accent); }
.ws-cmplabel { fill: var(--ink); font-family: inherit; }
.ws-cmpbody { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; margin-top: 10px; }
.ws-cmpsec h4 { margin: 0 0 4px; }
.ws-cmptable tr.ws-diff td { font-weight: 600; }
@media (max-width: 720px) {
  .ws-cmppics { grid-template-columns: 1fr; }
  .ws-alts { flex-basis: 100%; }
}
/* design-cad-studio kit 6: a unit's model from its project's standard (the unit card's model, the standard's screen) */
.ws-assign h3 { margin: 0 0 4px; }
.ws-assign-now { margin: 0 0 6px; overflow-wrap: anywhere; }
.ws-standing { display: inline-block; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; font-size: .78rem; }
.ws-stand-standard { border-color: var(--ok); color: var(--ok); }
.ws-stand-differs { border-color: var(--warn); color: var(--warn); }
.ws-stand-generic, .ws-stand-free { color: var(--muted); }
.ws-modelpick { display: grid; gap: 4px; min-width: 0; }
.ws-modelsel { max-width: 100%; min-width: 0; }
.ws-modelothers { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.ws-assign-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.ws-std-which { max-width: 32em; margin-bottom: 6px; }
.ws-std-table td { vertical-align: middle; }
.ws-std-base { display: flex; align-items: center; gap: 6px; min-width: 9em; }
.ws-std-chosen .ws-modelsel { width: 100%; min-width: 12em; }
.ws-std-differs { color: var(--warn); font-weight: 600; }
.ws-pinall { margin-top: 8px; }
.ws-std-last { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.ws-std-refused { margin: 4px 0 0; padding-inline-start: 1.2em; }
.ws-assign-in { margin: 8px 0 6px; padding: 8px 0 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ws-std-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; }
.ws-std-top .ws-pinall { margin-top: 0; }
.ws-std-which { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.ws-std-which select { min-width: 0; max-width: 22em; }

/* ---- the register of projects (design-cad-studio kit 8: register.js) ---- */
.rg { margin: 0 0 20px; }
.rg-head { justify-content: space-between; }
.rg-new, .rg-new-doc, .rg-new-rev, .rg-move, .rg-send, .rg-reviewed, .rg-open-floor { padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 600; min-height: 36px; }
.rg-new-rev, .rg-open-floor, .rg-reviewed { background: var(--panel); color: var(--accent); }
.rg-search, .rg-why, .rg-find, .rg-form input:not([type=checkbox]), .rg-form select, .rg-form textarea { width: 100%;
  max-width: 34em; min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  color: var(--ink); font: inherit; box-sizing: border-box; }
.rg-states { margin: 8px 0; }
.rg-card { width: 100%; }
.rg-card-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; justify-content: space-between; width: 100%; }
.rg-state { display: inline-block; font-size: .8em; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--soft); white-space: nowrap; }
.rg-state[data-state="under-review"] { border-color: var(--warn); color: var(--warn); }
.rg-state[data-state="in-progress"] { border-color: var(--ok); color: var(--ok); }
.rg-state[data-state="executed-archive"] { border-color: var(--c-milestone); color: var(--c-milestone); }
.rg-state[data-state="dormant-archive"] { color: var(--muted); }
.rg-code { font-family: var(--mono); font-size: .85em; }
.rg-proposed { color: var(--muted); border-bottom: 1px dashed var(--muted); }
.rg-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin: 8px 0 12px; }
.rg-tab { padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted);
  min-height: 40px; font: inherit; }
.rg-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.rg-pane { min-width: 0; }
.rg-ways { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.rg-ways .rg-why { flex: 1 1 14em; }
.rg-item { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 10px 12px; margin: 0 0 10px; }
.rg-item h3 { font-size: 1rem; margin: 0 0 6px; }
.rg-item-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.rg-floor { border-top: 1px solid var(--line); padding: 8px 0 0; margin-top: 8px; }
.rg-astat, .rg-cat, .rg-review, .rg-chosen { font-size: .8em; padding: 1px 8px; border-radius: 999px; background: var(--soft);
  border: 1px solid var(--line); }
.rg-review { border-color: var(--warn); color: var(--warn); }
.rg-chosen { border-color: var(--ok); color: var(--ok); }
.rg-rev, .rg-field, .rg-label { font-family: var(--mono); font-size: .85em; }
.rg-current { color: var(--ok); font-weight: 600; }
.rg-revs li, .rg-moves li { overflow-wrap: anywhere; }
.rg-table-wrap { overflow-x: auto; }
.rg-compare { border-collapse: collapse; min-width: 100%; }
.rg-compare th, .rg-compare td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: start; white-space: nowrap; }
.rg-log { list-style: none; padding: 0; margin: 0; }
.rg-log li { border-bottom: 1px solid var(--line); padding: 6px 0; }
.rg-log-line { overflow-wrap: anywhere; }
.rg-form { border: 1px dashed var(--accent); border-radius: 10px; padding: 12px; margin: 8px 0 12px; background: var(--panel);
  display: flex; flex-direction: column; gap: 8px; }
.rg-field-row { display: flex; flex-direction: column; gap: 2px; }
.rg-field-name { font-size: .85em; color: var(--muted); }
.rg-form-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rg-check { display: inline-flex; align-items: center; gap: 6px; margin-inline-end: 12px; }
.rg-shows { display: flex; flex-wrap: wrap; }
.rg-finder { display: flex; flex-direction: column; gap: 4px; max-width: 34em; }
.rg-hits { display: flex; flex-direction: column; gap: 2px; }
.rg-hit { text-align: start; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  color: var(--ink); min-height: 36px; font: inherit; }
.rg-said { margin: 0 0 8px; }
.rg-new-person, .rg-leave { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--accent); background: var(--panel);
  color: var(--accent); font-weight: 600; min-height: 36px; }
.rg-new-person { background: var(--accent); color: var(--accent-ink); }
.rg-consent { align-items: flex-start; }
.rg-how { display: flex; flex-wrap: wrap; }
.rg-reach { overflow-wrap: anywhere; }
/* design-cad-studio kit 11: a unit's supply card (its supply, draw, heat, checks, and what may feed it) */
.ws-s11 { margin: 2px 0; overflow-wrap: anywhere; }
.ws-s11 .pp-mark { margin-inline-start: 4px; }
.ws-s11-checks { margin: 4px 0; }
.ws-s11-offers { display: grid; gap: 6px; margin-top: 6px; }
.ws-s11-direct, .ws-s11-adapters { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ws-supplybtn, .ws-adapterbtn { max-width: 100%; overflow-wrap: anywhere; }
.ws-s11-circuit .ws-circuitinp { width: 8em; }
