/* Ciserex — app.css · design system from docs/BRAND.md
   Parchment, ink, gold. Hairlines instead of boxes. Fraunces for display, Inter for UI,
   JetBrains Mono for timecodes and ids. Light + dark (system or manual). */

:root {
  --ink: #0B1F3A; --ink-2: #1E3A5F; --parchment: #F6F1E7; --paper: #FFFFFF; --line: #D9D2C3;
  --gold: #C9A227; --yay: #1F8A5B; --nay: #B3261E; --abstain: #E3A008; --absent: #9AA3AD; --muted: #6B7280;
  --ink-soft: rgba(11, 31, 58, .06); --ink-softer: rgba(11, 31, 58, .035); --gold-soft: rgba(201, 162, 39, .14);
  --shadow: 0 1px 2px rgba(11,31,58,.06), 0 12px 32px -12px rgba(11,31,58,.18);
  --shadow-lg: 0 -8px 40px -8px rgba(11,31,58,.28);
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 10px; --r-sm: 6px; --ease: cubic-bezier(.2, .7, .2, 1);
  --topbar: 60px; --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --ink: #E8E4DA; --ink-2: #C9C3B5; --parchment: #0E1726; --paper: #16213A; --line: #2A3550; --muted: #98A2B3; --absent: #5B6573;
  --ink-soft: rgba(232, 228, 218, .08); --ink-softer: rgba(232, 228, 218, .05); --gold-soft: rgba(201, 162, 39, .18);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.6); --shadow-lg: 0 -8px 40px -8px rgba(0,0,0,.7);
} }
:root[data-theme="dark"] {
  --ink: #E8E4DA; --ink-2: #C9C3B5; --parchment: #0E1726; --paper: #16213A; --line: #2A3550; --muted: #98A2B3; --absent: #5B6573;
  --ink-soft: rgba(232, 228, 218, .08); --ink-softer: rgba(232, 228, 218, .05); --gold-soft: rgba(201, 162, 39, .18);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.6); --shadow-lg: 0 -8px 40px -8px rgba(0,0,0,.7);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--parchment); color: var(--ink);
  font: 15px/1.5 var(--ui); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
  position: relative;
}
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background-image: var(--grain); opacity: .5; mix-blend-mode: multiply; z-index: 0; }
:root[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: .25; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::before { mix-blend-mode: screen; opacity: .25; } }
body > * { position: relative; z-index: 1; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; margin: 0; font-variation-settings: "opsz" 48; }
h1 { font-size: 34px; line-height: 1.15; } h2 { font-size: 24px; line-height: 1.2; } h3 { font-size: 18px; line-height: 1.3; } h4 { font-size: 15px; font-family: var(--ui); font-weight: 600; }
p { margin: 0 0 .75em; } a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
.mono, code, kbd, .tc { font-family: var(--mono); font-size: .86em; letter-spacing: 0; }
.muted { color: var(--muted); } .small { font-size: 13px; } .caps { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 600; color: var(--muted); }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -4px; }
.mark { display: block; color: var(--ink); }
.hair { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ── controls ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 500; font-size: 14px; white-space: nowrap;
  transition: background .15s var(--ease), border-color .15s, transform .12s, box-shadow .15s;
}
.btn:hover:not(:disabled) { border-color: var(--ink); } .btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: var(--parchment); border-color: var(--ink); }
.btn.primary:hover:not(:disabled) { background: var(--ink-2); border-color: var(--ink-2); }
:root[data-theme="dark"] .btn.primary { color: #0E1726; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0E1726; } }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #0B1F3A; }
.btn.ghost { background: transparent; border-color: transparent; } .btn.ghost:hover:not(:disabled) { background: var(--ink-soft); border-color: transparent; }
.btn.danger { color: var(--nay); border-color: var(--nay); } .btn.danger:hover:not(:disabled) { background: rgba(179,38,30,.08); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; } .btn.lg { height: 48px; padding: 0 24px; font-size: 16px; }
.btn.block { width: 100%; justify-content: center; }
.iconbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink); transition: background .15s; }
.iconbtn:hover { background: var(--ink-soft); } .iconbtn .ic { width: 20px; height: 20px; }
.iconbtn.active { background: var(--gold-soft); color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .01em; border: 1px solid var(--line); background: var(--paper); color: var(--ink); white-space: nowrap; }
.pill .ic { width: 13px; height: 13px; }
.pill.ok { color: var(--yay); border-color: color-mix(in srgb, var(--yay) 40%, transparent); background: color-mix(in srgb, var(--yay) 10%, var(--paper)); }
.pill.bad { color: var(--nay); border-color: color-mix(in srgb, var(--nay) 40%, transparent); background: color-mix(in srgb, var(--nay) 10%, var(--paper)); }
.pill.warn { color: #9A6B00; border-color: color-mix(in srgb, var(--abstain) 50%, transparent); background: color-mix(in srgb, var(--abstain) 14%, var(--paper)); }
.pill.gold { color: #7A5E10; border-color: var(--gold); background: var(--gold-soft); }
.pill.muted { color: var(--muted); }
.pill.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .field > .lbl { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
input[type="text"], input[type="email"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="url"], input[type="search"], input[type="password"], input[type="color"], select, textarea {
  font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 12px; width: 100%; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
input[type="color"] { width: 48px; height: 38px; padding: 3px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.end { justify-content: flex-end; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; } @media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.card.flat { box-shadow: none; }
.empty { text-align: center; color: var(--muted); padding: 48px 20px; font-family: var(--display); font-size: 18px; font-weight: 500; }
.empty .mark { margin: 0 auto 16px; opacity: .5; }
.seg-ctl { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--paper); gap: 2px; }
.seg-ctl button { height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.seg-ctl button.active { background: var(--ink); color: var(--parchment); }
.seg-ctl button .ic { width: 15px; height: 15px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--ink-2); color: var(--parchment); display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; object-fit: cover; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
kbd { display: inline-block; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 11px; line-height: 16px; background: var(--paper); }

/* ── shell ────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 24px; background: color-mix(in srgb, var(--parchment) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .word { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; }
.brand .tenant-name { font-size: 13px; color: var(--muted); padding-left: 12px; border-left: 1px solid var(--line); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs { display: flex; gap: 4px; height: var(--topbar); }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; font-weight: 500; font-size: 14px; color: var(--muted); position: relative; transition: color .15s; }
.tab:hover { color: var(--ink); } .tab[aria-selected="true"] { color: var(--ink); }
.tab::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .2s var(--ease); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }
.tab .badge { min-width: 18px; height: 18px; border-radius: 9px; background: var(--gold); color: #0B1F3A; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; padding: 0 5px; }
.tools { display: flex; align-items: center; justify-content: flex-end; gap: 4px; position: relative; }
.lang { font-family: var(--mono); font-size: 12px; font-weight: 600; width: auto; padding: 0 10px; border-radius: 999px; height: 30px; letter-spacing: .06em; }
.menu { position: absolute; top: 44px; right: 0; min-width: 240px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 8px; z-index: 40; }
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu .who b { display: block; } .menu .who span { font-size: 12px; color: var(--muted); }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; font-size: 14px; text-align: left; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--ink-soft); } .menu button.on { color: var(--gold); font-weight: 600; }
.menu .sect { padding: 8px 10px 4px; }
main { max-width: 1400px; margin: 0 auto; padding: 28px 24px 120px; min-height: calc(100vh - var(--topbar)); }
main.wide { max-width: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.netbar { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 50; background: linear-gradient(90deg, transparent, var(--gold), transparent); background-size: 40% 100%; animation: slide 1.1s linear infinite; opacity: 0; transition: opacity .2s; pointer-events: none; }
.netbar.on { opacity: 1; } @keyframes slide { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* ── login ────────────────────────────────────────────────────────────── */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.login .lhs { padding: 8vh 8vw; display: flex; flex-direction: column; justify-content: space-between; background: var(--ink); color: var(--parchment); position: relative; overflow: hidden; }
.login .lhs .mark { color: var(--parchment); }
.login .lhs .big { font-family: var(--display); font-weight: 500; font-size: clamp(28px, 4vw, 52px); line-height: 1.1; letter-spacing: -0.015em; max-width: 14em; font-variation-settings: "opsz" 72; }
.login .lhs .big em { font-style: italic; color: var(--gold); }
.login .lhs .hemi { position: absolute; right: -12%; bottom: -30%; width: 70%; opacity: .12; color: var(--parchment); }
.login .lhs .hemi .seat { fill: none; stroke: currentColor; stroke-width: 2; }
.login .lhs .hemi .rostrum { fill: var(--gold); }
.login .rhs { display: grid; place-items: center; padding: 6vh 6vw; }
.login .box { width: min(400px, 100%); }
.login .box h2 { margin-bottom: 6px; } .login .box .lead { color: var(--muted); margin-bottom: 28px; }
.login .box .btn { margin-bottom: 12px; }
.login .box .small a { color: var(--muted); }
.login .foot { display: flex; gap: 16px; font-size: 12px; opacity: .7; } .login .foot a { color: inherit; text-decoration: none; }
@media (max-width: 860px) { .login { grid-template-columns: 1fr; } .login .lhs { min-height: 42vh; padding: 32px 24px; } .login .lhs .hemi { display: none; } }
.g-ic { width: 18px; height: 18px; }

/* ── calendar ─────────────────────────────────────────────────────────── */
.calendar { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
@media (max-width: 1000px) { .calendar { grid-template-columns: 1fr; } }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-nav h2 { text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-wd { padding: 8px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: right; }
.cal-day { min-height: 104px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; position: relative; transition: background .15s; display: flex; flex-direction: column; gap: 4px; }
.cal-day:hover { background: var(--ink-softer); } .cal-day.other { color: var(--absent); background: repeating-linear-gradient(135deg, transparent 0 6px, var(--ink-softer) 6px 7px); }
.cal-day .d { font-family: var(--display); font-size: 15px; font-weight: 500; align-self: flex-end; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.today .d { background: var(--gold); color: #0B1F3A; font-weight: 700; }
.cal-ev { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 7px; border-radius: 4px; border-left: 3px solid var(--ink-2); background: var(--paper); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; width: 100%; transition: transform .12s; }
.cal-ev:hover { transform: translateX(2px); }
.cal-ev.live { border-left-color: var(--yay); background: color-mix(in srgb, var(--yay) 10%, var(--paper)); } .cal-ev.closed { border-left-color: var(--absent); color: var(--muted); }
.cal-ev.rollcall, .cal-ev.recess { border-left-color: var(--gold); }
.cal-ev .t { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.cal-more { font-size: 11px; color: var(--muted); padding-left: 6px; }
@media (max-width: 640px) { .cal-day { min-height: 64px; padding: 4px; } .cal-ev { font-size: 0; padding: 0; height: 6px; border-left: 0; background: var(--ink-2); border-radius: 3px; } .cal-ev.live { background: var(--yay); } .cal-ev.closed { background: var(--absent); } .cal-ev * { display: none; } }
.upcoming h3 { margin-bottom: 12px; }
.ev-card { display: block; width: 100%; text-align: left; padding: 14px 16px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); margin-bottom: 10px; transition: border-color .15s, transform .12s; }
.ev-card:hover { border-color: var(--ink); transform: translateY(-1px); }
.ev-card .when { font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 4px; }
.ev-card .name { font-family: var(--display); font-size: 17px; font-weight: 600; }
.ev-card .meta { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.legend-status { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 14px; flex-wrap: wrap; }
.legend-status i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; background: var(--ink-2); }
.legend-status i.live { background: var(--yay); } .legend-status i.closed { background: var(--absent); }

/* ── agenda ───────────────────────────────────────────────────────────── */
.agenda-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.agenda-head .title { flex: 1 1 260px; min-width: 0; }
.agenda-head .title h1 { font-size: clamp(22px, 2.4vw, 30px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-head .title .sub { color: var(--muted); font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; padding: 0 16px; border-left: 1px solid var(--line); }
.stat .v { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .v.mono { font-family: var(--mono); font-size: 22px; font-weight: 500; }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 4px; }
.stat.ok .v { color: var(--yay); } .stat.bad .v { color: var(--nay); }
.stage-ctl { display: flex; gap: 8px; flex-wrap: wrap; }
.agenda { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .9fr); gap: 32px; align-items: start; }
@media (max-width: 960px) { .agenda { grid-template-columns: 1fr; } }
.items { list-style: none; margin: 0; padding: 0; counter-reset: it; }
.item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; padding: 14px 12px; border-bottom: 1px solid var(--line); position: relative; transition: background .2s; border-radius: 6px; }
.item:hover { background: var(--ink-softer); }
.item.current { background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--gold); box-shadow: var(--shadow); margin: 6px -4px; padding-left: 14px; }
.item.done { opacity: .72; } .item.withdrawn { opacity: .45; text-decoration: line-through; }
.item .glyph { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; background: var(--paper); color: var(--ink); }
.item.current .glyph { border-color: var(--gold); background: var(--gold-soft); }
.item .glyph.decision { color: var(--ink); } .item .glyph.recess { color: #9A6B00; } .item .glyph.remote { color: var(--ink-2); }
.item .n { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.item .name { font-family: var(--display); font-size: 17px; font-weight: 600; line-height: 1.3; }
.item .name.editable:hover { text-decoration: underline dotted var(--gold); cursor: text; }
.item .detail { color: var(--muted); font-size: 13.5px; margin-top: 4px; white-space: pre-wrap; }
.item .meta { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.item .result { margin-top: 10px; display: flex; gap: 14px; font-size: 13px; align-items: center; flex-wrap: wrap; }
.item .result b { font-family: var(--mono); font-weight: 500; }
.item .result .yay-t { color: var(--yay); } .item .result .nay-t { color: var(--nay); } .item .result .abst-t { color: #9A6B00; }
.item .ctl { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.item .ctl .row { justify-content: flex-end; }
.floor-q { margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 6px; font-size: 13px; }
.floor-q .now { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.floor-q .now .tc { color: var(--gold); font-size: 14px; }
.floor-q .queue { color: var(--muted); margin-top: 6px; }
.recess-count { font-family: var(--mono); font-size: 40px; font-weight: 500; text-align: center; padding: 12px; color: #9A6B00; }
.camera-panel { margin-top: 10px; aspect-ratio: 16/9; background: var(--ink); border-radius: 8px; display: grid; place-items: center; color: var(--parchment); font-size: 13px; position: relative; overflow: hidden; }
.camera-panel video, .camera-panel iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.camera-panel .cams { position: absolute; bottom: 10px; left: 10px; display: flex; gap: 6px; }
.camera-panel .cams button { background: rgba(255,255,255,.14); color: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; } .camera-panel .cams button.on { background: var(--gold); color: #0B1F3A; }
.add-item { margin-top: 12px; }
.side { position: sticky; top: calc(var(--topbar) + 20px); }
.side-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.side-tabs button { padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--muted); position: relative; }
.side-tabs button.active { color: var(--ink); } .side-tabs button.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--gold); }
.transcript { max-height: calc(100vh - var(--topbar) - 200px); overflow: auto; padding-right: 6px; scroll-behavior: smooth; }
.seg { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 8px 6px; border-radius: 6px; font-size: 14px; line-height: 1.5; transition: background .15s; text-align: left; width: 100%; }
.seg:hover { background: var(--ink-softer); } .seg.new { animation: fadein .4s var(--ease); }
.seg .tc { color: var(--muted); font-size: 12px; padding-top: 3px; }
.seg .spk { font-weight: 600; font-size: 12px; color: var(--ink-2); display: block; margin-bottom: 2px; letter-spacing: .02em; }
.seg .txt { color: var(--ink); }
.seg .low { opacity: .6; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.rec-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.rec-ctl .rec-dot { color: var(--nay); animation: pulse 1.2s infinite; }
.dossier { font-size: 14px; line-height: 1.6; } .dossier h1, .dossier h2, .dossier h3 { margin: 14px 0 6px; } .dossier ul { padding-left: 20px; }

/* ── overlays ─────────────────────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; background: rgba(11,31,58,.35); backdrop-filter: blur(2px); z-index: 60; animation: fadein .2s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; height: 72vh; z-index: 70; background: var(--paper); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-lg); transform: translateY(100%); animation: sheet-up .28s ease-out forwards; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden;
}
.sheet.closing { animation: sheet-down .22s ease-in forwards; }
@keyframes sheet-up { to { transform: translateY(0); } } @keyframes sheet-down { from { transform: translateY(0); } to { transform: translateY(100%); } }
.sheet .grab { width: 44px; height: 4px; border-radius: 2px; background: var(--line); margin: 10px auto 0; }
.sheet-head { display: flex; align-items: center; gap: 16px; padding: 10px 28px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sheet-head .q { flex: 1 1 300px; min-width: 0; }
.sheet-head .q .caps { margin-bottom: 2px; }
.sheet-head h2 { font-size: clamp(18px, 2vw, 26px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr); gap: 24px; padding: 20px 28px; min-height: 0; }
@media (max-width: 860px) { .sheet { height: 88vh; } .sheet-body { grid-template-columns: 1fr; overflow: auto; } .sheet-head { padding: 8px 16px 10px; } .sheet-body { padding: 14px 16px; } }
.viz-wrap { min-height: 0; display: grid; place-items: center; overflow: hidden; }
.viz-wrap svg { width: 100%; max-height: 100%; height: auto; }
.sheet-side { display: flex; flex-direction: column; gap: 16px; min-height: 0; overflow: auto; }
.sheet-side h4 { margin-bottom: 8px; }
.ballot { display: grid; gap: 10px; }
.ballot .btn { height: 52px; font-size: 16px; justify-content: flex-start; gap: 12px; border-width: 1.5px; }
.ballot .btn .ic { width: 22px; height: 22px; }
.ballot .btn.yay { border-color: var(--yay); color: var(--yay); } .ballot .btn.nay { border-color: var(--nay); color: var(--nay); } .ballot .btn.abstain { border-color: var(--abstain); color: #9A6B00; }
.ballot .btn.on.yay { background: var(--yay); color: #fff; } .ballot .btn.on.nay { background: var(--nay); color: #fff; } .ballot .btn.on.abstain { background: var(--abstain); color: #0B1F3A; }
.ballot .btn.opt { border-color: var(--ink-2); } .ballot .btn.on.opt { background: var(--ink); color: var(--parchment); }
.ballot .note { font-size: 12px; color: var(--muted); }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 28px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sheet-foot .kbd { font-size: 12px; color: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.legend li { display: flex; align-items: center; gap: 10px; } .legend b { font-family: var(--mono); font-weight: 500; margin-left: auto; } .legend .pct { color: var(--muted); font-size: 12px; min-width: 44px; text-align: right; }
.legend .sw { width: 14px; height: 14px; border-radius: 50%; flex: none; } .legend .sw.hollow { background: none; border: 2px solid var(--ink); }
.verdict { padding: 14px 16px; border-radius: 8px; font-family: var(--display); font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.verdict.passed { background: color-mix(in srgb, var(--yay) 12%, var(--paper)); color: var(--yay); } .verdict.failed { background: color-mix(in srgb, var(--nay) 12%, var(--paper)); color: var(--nay); }
.verdict.open { background: var(--gold-soft); color: var(--ink); }
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; pointer-events: none; }
.modal .box { pointer-events: auto; width: min(560px, 100%); max-height: 92vh; overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 24px 28px; animation: pop .22s var(--ease); }
.modal .box.wide { width: min(820px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal .box h2 { margin-bottom: 4px; } .modal .box .lead { color: var(--muted); margin-bottom: 20px; font-size: 14px; }
.modal .close { position: absolute; top: 12px; right: 12px; }
.modal .box { position: relative; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.opt-list { display: flex; flex-direction: column; gap: 6px; } .opt-list .row input { flex: 1; }
.pick-list { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.pick-list button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.pick-list button:last-child { border-bottom: 0; } .pick-list button:hover { background: var(--ink-softer); }
.pick-list button .muted { margin-left: auto; font-size: 12px; }

/* ── secretary drawer ─────────────────────────────────────────────────── */
.fab { position: fixed; right: 24px; bottom: 24px; z-index: 55; height: 48px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--ink); color: var(--parchment); display: inline-flex; align-items: center; gap: 10px; font-weight: 600; box-shadow: var(--shadow); transition: transform .15s; }
:root[data-theme="dark"] .fab { color: #0E1726; } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fab { color: #0E1726; } }
.fab:hover { transform: translateY(-2px); } .fab .ic { color: var(--gold); width: 20px; height: 20px; }
.drawer { position: fixed; right: 24px; bottom: 24px; width: min(440px, calc(100vw - 32px)); height: min(620px, calc(100vh - 100px)); z-index: 56; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: pop .22s var(--ease); overflow: hidden; }
@media (max-width: 640px) { .drawer { right: 8px; left: 8px; bottom: 8px; width: auto; height: min(70vh, calc(100vh - 80px)); } .fab { right: 14px; bottom: 14px; } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.drawer-head .ic { color: var(--gold); } .drawer-head b { font-family: var(--display); font-size: 16px; }
.drawer-head .muted { font-size: 12px; flex: 1; }
.chat { overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--ink); color: var(--parchment); border-bottom-right-radius: 4px; }
:root[data-theme="dark"] .msg.user { color: #0E1726; } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .msg.user { color: #0E1726; } }
.msg.assistant { align-self: flex-start; background: var(--parchment); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.error { border-color: var(--nay); color: var(--nay); }
.msg .acts { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.msg .acts li { list-style: none; } .msg .acts .ic { width: 12px; height: 12px; color: var(--yay); }
.thinking { display: inline-flex; gap: 4px; } .thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: pulse 1s infinite; } .thinking i:nth-child(2) { animation-delay: .2s; } .thinking i:nth-child(3) { animation-delay: .4s; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form textarea { min-height: 42px; max-height: 120px; resize: none; padding: 10px 12px; }
.chat .hint { font-size: 12px; color: var(--muted); text-align: center; padding: 20px 10px; }
.chat .hint .ex { display: inline-block; margin: 4px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; }

/* ── toasts ───────────────────────────────────────────────────────────── */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--parchment); font-size: 14px; box-shadow: var(--shadow); animation: pop .2s var(--ease); display: flex; gap: 8px; align-items: center; max-width: min(560px, calc(100vw - 32px)); }
:root[data-theme="dark"] .toast { color: #0E1726; } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { color: #0E1726; } }
.toast.error { background: var(--nay); color: #fff; } .toast.ok .ic { color: var(--gold); }

/* ── viz (svg) ────────────────────────────────────────────────────────── */
.viz { display: block; }
.viz .seat { fill: transparent; stroke: var(--ink); stroke-width: 2.4; transition: fill .2s ease, stroke .2s ease, opacity .2s; }
.viz .seat.absent { stroke: var(--absent); stroke-dasharray: 3 3; opacity: .7; }
.viz .seat.present { stroke: var(--ink); }
.viz .seat.yay { fill: var(--yay); stroke: var(--yay); } .viz .seat.nay { fill: var(--nay); stroke: var(--nay); } .viz .seat.abstain { fill: var(--abstain); stroke: var(--abstain); }
.viz .seat.opt { fill: var(--seat, var(--ink-2)); stroke: var(--seat, var(--ink-2)); }
.viz .seat:hover { stroke-width: 4; }
.viz .rostrum { fill: var(--gold); }
.viz .centre .n { font-family: var(--display); font-weight: 600; font-size: 64px; fill: var(--ink); }
.viz .centre .lbl, .viz .lbl { font-family: var(--ui); font-size: 22px; fill: var(--muted); }
.viz .yay-t { fill: var(--yay); } .viz .nay-t { fill: var(--nay); } .viz .abst-t { fill: var(--abstain); }
.viz .glyph { font-family: var(--ui); font-size: 34px; font-weight: 700; fill: #fff; pointer-events: none; }
.viz.grid .seat.abstain + .glyph { fill: #0B1F3A; }
.viz .name { font-family: var(--ui); font-size: 13px; fill: var(--muted); }
.viz .track { fill: var(--ink-soft); } .viz .bar { transition: width .3s var(--ease), x .3s var(--ease); }
.viz .bar.yay { fill: var(--yay); } .viz .bar.nay { fill: var(--nay); } .viz .bar.abstain { fill: var(--abstain); }
.viz .n { font-family: var(--mono); font-size: 26px; fill: var(--ink); } .viz .n .pct { font-size: 18px; fill: var(--muted); }
.viz .threshold { stroke: var(--gold); stroke-width: 3; stroke-dasharray: 6 6; } .viz .thr { font-family: var(--ui); font-size: 18px; fill: var(--gold); font-weight: 600; }
.viz .axis { stroke: var(--line); stroke-width: 2; }
.viz-empty { color: var(--muted); text-align: center; padding: 40px; }
.viz-mini { width: 100%; max-width: 420px; } .viz-mini .n { font-size: 30px; }

/* ── roster ───────────────────────────────────────────────────────────── */
.roster-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.roster-tools .search { position: relative; flex: 1 1 220px; max-width: 360px; } .roster-tools .search .ic { position: absolute; left: 10px; top: 10px; color: var(--muted); } .roster-tools .search input { padding-left: 34px; }
.roster-stats { display: flex; gap: 0; margin-bottom: 18px; flex-wrap: wrap; } .roster-stats .stat { padding: 0 20px 0 0; margin-right: 20px; border-left: 0; border-right: 1px solid var(--line); } .roster-stats .stat:last-child { border-right: 0; }
.bloc { margin-bottom: 22px; } .bloc h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 15px; } .bloc h3 .count { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 400; }
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.member { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); transition: border-color .15s; }
.member:hover { border-color: var(--ink); }
.member .who .name { font-weight: 600; font-size: 14px; display: flex; gap: 6px; align-items: center; } .member .who .sub { font-size: 12px; color: var(--muted); }
.member .who .name .ic { width: 14px; height: 14px; color: var(--gold); }
.member .acts { display: flex; gap: 2px; }
.member.present { border-left: 3px solid var(--yay); } .member.pending { border-left: 3px solid var(--abstain); } .member.absent { border-left: 3px solid var(--absent); } .member.remote { border-left: 3px solid var(--ink-2); }
.qr-stage { display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 800px) { .qr-stage { grid-template-columns: 1fr; } }
.qr-box { background: #fff; border-radius: 16px; padding: 24px; box-shadow: var(--shadow); display: grid; place-items: center; }
.qr-box svg, .qr-box img { width: 100%; height: auto; }
.qr-link { font-family: var(--mono); font-size: 13px; word-break: break-all; margin-top: 12px; text-align: center; color: var(--muted); }
.joiners { list-style: none; margin: 0; padding: 0; } .joiners li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); animation: fadein .3s; font-size: 15px; }
.joiners li .tc { margin-left: auto; color: var(--muted); }

/* ── archive ──────────────────────────────────────────────────────────── */
.archive { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 960px) { .archive { grid-template-columns: 1fr; } }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; } .filters .field { margin: 0; }
.arch-list .ev-card.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }
.artifacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 14px 0 20px; }
.artifact { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); text-align: left; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s; }
.artifact:hover { border-color: var(--ink); } .artifact.on { border-color: var(--gold); }
.artifact .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; } .artifact .nm { font-weight: 600; font-size: 14px; }
.artifact .acts { display: flex; gap: 4px; margin-top: 4px; }
.doc { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 32px 40px; font-size: 15px; line-height: 1.65; max-width: 820px; }
.doc h1, .doc h2, .doc h3 { margin: 22px 0 8px; } .doc h1 { font-size: 28px; } .doc h2 { font-size: 21px; } .doc h3 { font-size: 17px; } .doc h1:first-child { margin-top: 0; }
.doc table { border-collapse: collapse; width: 100%; margin: 12px 0; } .doc td, .doc th { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; } .doc blockquote { margin: 12px 0; padding-left: 14px; border-left: 3px solid var(--gold); color: var(--muted); }
.doc pre { background: var(--ink-softer); padding: 12px; border-radius: 6px; overflow: auto; }
@media (max-width: 640px) { .doc { padding: 20px; } }
.seal { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--gold); border-radius: 999px; color: #7A5E10; font-size: 12px; font-weight: 600; background: var(--gold-soft); }
.dim-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.dim-pick label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; background: var(--paper); }
.dim-pick label:has(input:checked) { border-color: var(--ink); background: var(--ink-soft); } .dim-pick input { margin: 0; accent-color: var(--ink); }

/* ── configuration ────────────────────────────────────────────────────── */
.config { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 860px) { .config { grid-template-columns: 1fr; gap: 20px; } }
.cfg-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--topbar) + 20px); }
@media (max-width: 860px) { .cfg-nav { flex-direction: row; overflow: auto; position: static; } }
.cfg-nav button { text-align: left; padding: 9px 12px; border-radius: 6px; font-size: 14px; color: var(--muted); display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.cfg-nav button:hover { background: var(--ink-soft); color: var(--ink); } .cfg-nav button.active { color: var(--ink); background: var(--paper); border: 1px solid var(--line); font-weight: 600; }
.cfg-nav .sect { padding: 14px 12px 4px; }
.cfg { max-width: 760px; } .cfg h2 { margin-bottom: 4px; } .cfg .lead { color: var(--muted); margin-bottom: 24px; }
.cfg section { padding: 20px 0; border-top: 1px solid var(--line); } .cfg section:first-of-type { border-top: 0; padding-top: 0; }
.cfg section h3 { margin-bottom: 12px; }
.logo-prev { width: 96px; height: 96px; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; background: var(--paper); overflow: hidden; } .logo-prev img { max-width: 80%; max-height: 80%; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); display: inline-block; vertical-align: middle; }
.list-edit { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; } .list-edit .li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; } .list-edit .li:last-child { border-bottom: 0; } .list-edit .li .grow { flex: 1; min-width: 0; } .list-edit .li .grow .muted { font-size: 12px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.plan { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); display: flex; flex-direction: column; gap: 6px; }
.plan.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); } .plan .price { font-family: var(--display); font-size: 26px; font-weight: 600; } .plan .price small { font-family: var(--ui); font-size: 12px; color: var(--muted); font-weight: 400; }
.plan ul { margin: 6px 0; padding-left: 16px; font-size: 12px; color: var(--muted); }
.json-ed textarea { font-family: var(--mono); font-size: 12px; min-height: 140px; }
.proposal { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; background: var(--paper); }
.proposal .files { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 6px 0; } .proposal .files li { list-style: none; }
.proposal pre { max-height: 240px; overflow: auto; background: var(--ink-softer); padding: 10px; border-radius: 6px; font-size: 11px; }

/* ── onboarding ───────────────────────────────────────────────────────── */
.onboard { max-width: 520px; margin: 8vh auto; }
.onboard .mark { margin-bottom: 20px; }

/* ── telegram mini app ────────────────────────────────────────────────── */
body.tg { background: var(--tg-theme-bg-color, var(--parchment)); color: var(--tg-theme-text-color, var(--ink)); }
body.tg::before { display: none; }
.tg-app { max-width: 560px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.tg-app .head { display: flex; align-items: center; gap: 10px; } .tg-app .head b { font-family: var(--display); font-size: 18px; }
.tg-app .card { padding: 14px 16px; }
.tg-app video { width: 100%; aspect-ratio: 4/3; background: #000; border-radius: 12px; object-fit: cover; transform: scaleX(-1); }
.tg-app .ballot .btn { height: 56px; }
.tg-app .status { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }

@media (max-width: 640px) {
  .topbar { padding: 0 12px; grid-template-columns: auto 1fr auto; }
  .brand .word, .brand .tenant-name { display: none; }
  .tab { padding: 0 10px; } .tab span.lbl { display: none; }
  main { padding: 16px 12px 120px; }
  .stat { padding: 0 10px; } .stat .v { font-size: 20px; }
  .item { grid-template-columns: 32px minmax(0, 1fr); } .item .ctl { grid-column: 1 / -1; align-items: flex-start; }
  h1 { font-size: 26px; }
}
/* ── the web member: presence, the floor queue, the speaker's own device ──── */
.presence-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.agenda-head .presence-ctl { grid-column: 1 / -1; margin-top: 4px; }
.presence-ctl .btn.on { box-shadow: inset 0 0 0 1px var(--gold); }

.floor-queue { margin-top: 8px; }
.floor-queue .caps { color: var(--muted); }
.floor-queue .count { color: var(--gold); font-weight: 700; }
.floor-queue ol { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.floor-queue li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid var(--line); }
.floor-queue li:first-child { border-top: 0; }
.floor-queue .who { font-weight: 600; }
.floor-queue .note { color: var(--muted); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40%; }
.floor-queue .tc { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 12px; }

.floor-stream { margin: 14px 0 0; padding: 14px 16px; border: 1px solid var(--gold); border-radius: var(--r); background: var(--gold-soft); }
.floor-stream .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.floor-stream video { width: 100%; max-width: 320px; border-radius: 8px; margin-top: 10px; background: #000; }
.floor-stream .rec-dot { color: var(--nay); animation: pulse 1.2s infinite; }
.floor-stream .tc { font-family: var(--mono); }
.floor-stream p { margin: 6px 0; }

.join-screen .card { text-align: left; }
.join-screen .caps { color: var(--muted); }
.join-screen .btn.block { width: 100%; justify-content: center; }
.join-screen .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print { .topbar, .fab, .drawer, .toasts, .side, .stage-ctl { display: none !important; } main { padding: 0; } }

/* ══ the external monitor ═══════════════════════════════════════════════════════════════
   views/monitor.js. A display, not a page: one fixed viewport, no scrollbars ever, every
   size in vmin so the same markup is legible at 3 m and at 30 m, from 4:3 to 21:9. Dark by
   default — a lit projector in a dark chamber — with the light palette one setting away.
   The palette is redeclared on .mon itself rather than on the document, so the monitor's
   theme is the tenant's choice and never disturbs the window it was opened from.
   ═══════════════════════════════════════════════════════════════════════════════════════ */
html.mon-on, html.mon-on body { overflow: hidden; height: 100%; overscroll-behavior: none; }
html.mon-on .netbar, html.mon-on .toasts, html.mon-on #drawer-root, html.mon-on #overlay-root { display: none !important; }

.mon {
  position: fixed; inset: 0; z-index: 5; display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: var(--parchment); color: var(--ink); overflow: hidden;
  font-size: clamp(13px, 1.5vmin, 34px); line-height: 1.4;
  padding: clamp(14px, 2.4vmin, 54px); gap: clamp(10px, 2vmin, 40px);
  -webkit-font-smoothing: antialiased; user-select: none;
}
.mon.cursor-idle { cursor: none; }
.mon.theme-dark {
  color-scheme: dark;
  --ink: #E8E4DA; --ink-2: #C9C3B5; --parchment: #0E1726; --paper: #16213A; --line: #2A3550;
  --muted: #98A2B3; --absent: #5B6573; --ink-soft: rgba(232, 228, 218, .08); --gold-soft: rgba(201, 162, 39, .18);
}
.mon.theme-light {
  color-scheme: light;
  --ink: #0B1F3A; --ink-2: #1E3A5F; --parchment: #F6F1E7; --paper: #FFFFFF; --line: #D9D2C3;
  --muted: #6B7280; --absent: #9AA3AD; --ink-soft: rgba(11, 31, 58, .06); --gold-soft: rgba(201, 162, 39, .14);
}
.mon *, .mon *::before, .mon *::after { box-sizing: border-box; }
.mon h1 { font-family: var(--display); font-weight: 600; letter-spacing: -0.012em; margin: 0; }
.mon ul, .mon ol { margin: 0; padding: 0; list-style: none; }

/* head: the organisation, the session, the hour. Present on every frame but the posters. */
.mon-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(10px, 2vmin, 40px); color: var(--muted); }
.mon-org { display: flex; align-items: center; gap: .7em; font-weight: 600; color: var(--ink); font-size: clamp(12px, 1.5vmin, 30px); min-width: 0; }
.mon-org .mark, .mon-org .mon-logo { height: clamp(22px, 3vmin, 64px) !important; width: auto; flex: none; }
.mon-org span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-session { font-family: var(--display); font-size: clamp(14px, 2vmin, 42px); color: var(--ink); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-clock { font-size: clamp(14px, 2vmin, 42px); color: var(--ink); font-variant-numeric: tabular-nums; }

/* posters: idle, recess, closed — one centred column, nothing else on screen. The idle
   poster carries no head, so it takes both rows of the frame rather than the first. */
.mon > .mon-poster:first-child { grid-row: 1 / -1; }
.mon-poster { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: clamp(8px, 1.6vmin, 32px); min-height: 0; overflow: hidden; }
.mon-poster .mark { height: clamp(56px, 13vmin, 260px); width: auto; }
.mon-org-name { font-size: clamp(14px, 2vmin, 40px); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.mon-h1 { font-size: clamp(26px, 5.4vmin, 120px); line-height: 1.06; max-width: 22ch; }
.mon-when { font-size: clamp(15px, 2.6vmin, 54px); color: var(--ink-2); }
.mon-place { font-size: clamp(13px, 1.9vmin, 38px); color: var(--muted); }
.mon-lead { font-size: clamp(15px, 2.8vmin, 58px); color: var(--muted); font-family: var(--display); }
.mon-dot { opacity: .45; margin: 0 .5em; }
.mon-kicker { font-size: clamp(11px, 1.5vmin, 30px); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.mon-kicker.second { margin-top: clamp(8px, 1.6vmin, 32px); }

/* the big number: 84 / 128 */
.mon-count { display: flex; align-items: baseline; gap: .12em; font-family: var(--display); font-weight: 600; line-height: 1; }
.mon-count .n { font-size: clamp(56px, 15vmin, 300px); font-variant-numeric: tabular-nums; }
.mon-count .sep { font-size: clamp(30px, 8vmin, 160px); color: var(--muted); }
.mon-count .d { font-size: clamp(30px, 8vmin, 160px); color: var(--muted); font-variant-numeric: tabular-nums; }
.mon-quorum { font-size: clamp(15px, 2.6vmin, 54px); font-weight: 600; }
.mon-quorum.ok { color: var(--yay); } .mon-quorum.bad { color: var(--nay); }
.mon-req { font-size: clamp(12px, 1.7vmin, 34px); color: var(--muted); }

/* roll call: the count on one side, the chamber filling on the other. */
.mon-rollcall { display: grid; grid-template-columns: minmax(0, 30%) minmax(0, 1fr); gap: clamp(14px, 3vmin, 60px); align-items: center; min-height: 0; overflow: hidden; }
.mon-side { display: flex; flex-direction: column; gap: clamp(6px, 1.2vmin, 24px); min-width: 0; }
.mon-viz { min-height: 0; min-width: 0; height: 100%; display: grid; place-items: center; overflow: hidden; }
.mon-viz svg, .mon-viz .viz { width: 100%; height: 100%; max-height: 100%; display: block; }
/* A seat that has answered is filled, not merely outlined: the room reads the fill from the back. */
.mon[data-frame="rollcall"] .viz .seat.present, .mon-rollcall .viz .seat.present { fill: var(--ink); stroke: var(--ink); }
.mon .viz .seat.absent { stroke: var(--absent); }
.mon .viz .lbl, .mon .viz .centre .lbl { fill: var(--muted); }

/* ad hoc roll call: the projected code, and the names as they arrive. */
.mon-adhoc { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: clamp(16px, 3.4vmin, 68px); align-items: center; min-height: 0; overflow: hidden; }
.mon-qr { display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 1.4vmin, 28px); min-height: 0; }
.mon-qr .qr-box { background: #fff; border-radius: clamp(8px, 1.4vmin, 28px); padding: clamp(10px, 1.8vmin, 36px); width: min(100%, 62vmin); aspect-ratio: 1; }
.mon-qr .qr-box svg { width: 100%; height: 100%; }
.mon-qr-cap { font-size: clamp(15px, 2.4vmin, 48px); font-family: var(--display); font-weight: 600; text-align: center; }
.mon-qr-link { font-size: clamp(10px, 1.2vmin, 24px); color: var(--muted); word-break: break-all; text-align: center; max-width: 100%; }
.mon-joiners { display: flex; flex-direction: column; gap: clamp(4px, .8vmin, 16px); min-height: 0; overflow: hidden; }
.mon-names { display: flex; flex-wrap: wrap; gap: .4em .9em; font-size: clamp(13px, 2vmin, 40px); overflow: hidden; align-content: flex-start; min-height: 0; }
.mon-names li { border-bottom: 1px solid var(--line); padding-bottom: .1em; }
.mon-names li.muted { border: 0; color: var(--muted); }

/* the item in discussion, with the floor beside it — or the camera feed, captioned. */
.mon-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30%); gap: clamp(14px, 3vmin, 60px); align-items: center; min-height: 0; overflow: hidden; }
.mon-item-main { display: flex; flex-direction: column; gap: clamp(8px, 1.6vmin, 32px); min-width: 0; }
.mon-num { font-size: clamp(12px, 1.7vmin, 34px); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; display: flex; align-items: center; flex-wrap: wrap; }
.mon-detail { font-size: clamp(13px, 2vmin, 40px); color: var(--ink-2); line-height: 1.45; max-height: 42vmin; overflow: hidden; }
.mon-floor { display: flex; flex-direction: column; gap: clamp(5px, 1vmin, 20px); border-left: 1px solid var(--line); padding-left: clamp(10px, 2vmin, 40px); min-width: 0; align-self: stretch; justify-content: center; overflow: hidden; }
.mon-speaker { display: flex; align-items: center; gap: .5em; font-size: clamp(16px, 2.8vmin, 58px); font-family: var(--display); font-weight: 600; flex-wrap: wrap; }
.mon-speaker .ic { width: 1em; height: 1em; color: var(--gold); }
.mon-speaker.none { color: var(--muted); font-size: clamp(13px, 2vmin, 40px); font-weight: 400; }
.mon-cd { font-variant-numeric: tabular-nums; color: var(--gold); font-family: var(--mono); }
.mon-queue { display: flex; flex-direction: column; gap: .25em; font-size: clamp(12px, 1.9vmin, 38px); color: var(--ink-2); counter-reset: q; overflow: hidden; }
.mon-queue li::before { counter-increment: q; content: counter(q) ". "; color: var(--muted); }
.mon-feed-wrap { position: relative; min-width: 0; min-height: 0; height: 100%; display: grid; place-items: center; overflow: hidden; border-radius: clamp(6px, 1vmin, 20px); background: #000; }
.mon-feed { width: 100%; height: 100%; object-fit: contain; border: 0; display: block; }
.mon-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(8px, 1.6vmin, 32px); background: linear-gradient(to top, rgba(0,0,0,.78), transparent); color: #F6F1E7; }
.mon-cap-title { font-family: var(--display); font-weight: 600; font-size: clamp(16px, 2.6vmin, 54px); line-height: 1.1; }
.mon-item.with-feed { grid-template-columns: minmax(0, 1fr) minmax(0, 26%); }

/* the vote: the money shot. The visualization takes whatever the frame does not need. */
.mon-vote { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: clamp(8px, 1.6vmin, 32px); min-height: 0; overflow: hidden; }
.mon-q { min-width: 0; }
.mon-live { color: var(--yay); display: inline-flex; align-items: center; gap: .4em; margin-left: 1em; }
.mon-live::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
.mon-q .mon-cd { margin-left: auto; }
.mon-q .mon-num { justify-content: flex-start; gap: 0; }
.mon-tally { display: flex; gap: clamp(12px, 3vmin, 60px); align-items: baseline; justify-content: center; flex-wrap: wrap; }
.mon-t { display: flex; align-items: baseline; gap: .35em; }
.mon-t .n { font-family: var(--display); font-weight: 600; font-size: clamp(30px, 7vmin, 140px); line-height: 1; font-variant-numeric: tabular-nums; }
.mon-t .k { font-size: clamp(12px, 1.8vmin, 36px); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.mon-t.yay .n { color: var(--yay); } .mon-t.nay .n { color: var(--nay); } .mon-t.abstain .n { color: var(--abstain); }
.mon-t.present .n { color: var(--muted); }
.mon-thr { text-align: center; font-size: clamp(12px, 1.8vmin, 36px); color: var(--gold); font-weight: 600; }

/* the result, held for the configured dwell. */
.mon-result { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: clamp(10px, 2.4vmin, 48px); min-height: 0; overflow: hidden; }
.mon-verdict { display: inline-flex; align-items: center; gap: .4em; font-size: clamp(18px, 3.4vmin, 72px); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.mon-verdict .ic { width: 1.1em; height: 1.1em; stroke-width: 2.4; }
.mon-result.carried .mon-verdict { color: var(--yay); }
.mon-result.not-carried .mon-verdict { color: var(--nay); }
.mon-sentence { font-size: clamp(20px, 4.2vmin, 92px); line-height: 1.15; max-width: 26ch; }

.mon-countdown { font-family: var(--display); font-weight: 600; font-size: clamp(64px, 24vmin, 460px); line-height: 1; font-variant-numeric: tabular-nums; }
.mon-totals { font-size: clamp(13px, 2vmin, 40px); color: var(--muted); }
.mon-results { display: flex; flex-direction: column; gap: .3em; width: min(100%, 120ch); font-size: clamp(12px, 1.8vmin, 36px); overflow: hidden; }
.mon-results li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: .7em; align-items: center; text-align: left; border-bottom: 1px solid var(--line); padding: .25em 0; }
.mon-results .ic { width: 1em; height: 1em; }
.mon-results li.carried { color: var(--yay); } .mon-results li.not-carried { color: var(--nay); }
.mon-results .nm { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-results .ord { color: var(--muted); font-variant-numeric: tabular-nums; }

/* the honest indicator: the screen says it is stale, and never why in a stack trace. */
.mon-net { position: absolute; right: clamp(10px, 1.8vmin, 36px); bottom: clamp(10px, 1.8vmin, 36px); display: flex; gap: .6em; pointer-events: none; }
.mon-note { font-size: clamp(10px, 1.3vmin, 26px); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .25em 1em; background: var(--paper); }
.mon-note.stale { color: var(--abstain); border-color: color-mix(in srgb, var(--abstain) 50%, transparent); }
.mon .viz-empty { color: var(--muted); font-size: clamp(13px, 2vmin, 40px); }
/* the control that opens it, in the Agenda header and the Roster head */
.mon-btn.on { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }

/* 4:3 and taller: the side-by-side frames stack, the visualization keeps the room. */
@media (max-aspect-ratio: 5 / 4) {
  .mon-rollcall, .mon-adhoc, .mon-item, .mon-item.with-feed { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .mon-floor { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: clamp(8px, 1.6vmin, 32px); }
  .mon-rollcall .mon-side, .mon-adhoc .mon-joiners { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: .8em; }
}
/* 21:9 and wider: keep the poster columns from running to the edges. */
@media (min-aspect-ratio: 2 / 1) {
  .mon-poster > * { max-width: 70vw; }
  .mon-sentence, .mon-h1 { max-width: 30ch; }
}
@media (prefers-reduced-motion: reduce) {
  .mon *, .mon *::before, .mon *::after { animation: none !important; transition: none !important; }
}

/* ── procedure: the machine, the rules, the revisions, the log ─────────── */
.proc-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 1200px) { .proc-layout { grid-template-columns: 240px minmax(0, 1fr); } .proc-insp { grid-column: 1 / -1; } }
@media (max-width: 820px) { .proc-layout { grid-template-columns: 1fr; } }

.proc-rail { display: flex; flex-direction: column; gap: 12px; }
.proc-rail .inforce { display: flex; flex-direction: column; gap: 2px; }
.proc-rail .inforce b { font-family: var(--mono); font-size: 14px; }
.proc-rail .warn { color: var(--nay); }
.proc-list { display: flex; flex-direction: column; gap: 2px; }
.proc-item { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: var(--r-sm); text-decoration: none; color: inherit; border: 1px solid transparent; }
.proc-item:hover { background: var(--ink-softer); }
.proc-item.on { background: var(--gold-soft); border-color: var(--line); }
.proc-item b { font-size: 14px; font-weight: 600; }

.proc-main { min-width: 0; }
.ptabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.ptab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 12px; font: inherit; font-weight: 500; color: var(--muted); cursor: pointer; }
.ptab:hover { color: var(--ink); }
.ptab.on { color: var(--ink); border-bottom-color: var(--gold); }
.ppanel { min-height: 320px; }

/* The canvas. Height is fixed rather than fluid: a diagram that reflows while you drag a box is
   a diagram that fights you. */
.mch-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.mch-head code { font-family: var(--mono); font-size: 13px; }
.mch-wrap { position: relative; border: 1px solid var(--line); border-radius: var(--r); background: var(--parchment); overflow: hidden; }
.mch-canvas { height: 460px; width: 100%; }
.mch-canvas .joint-paper { background: transparent !important; }
.mch-margin { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.mch-margin .chip { appearance: none; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 3px 10px; font: 500 12px/1.4 var(--mono); color: var(--ink); cursor: pointer; }
.mch-margin .chip:hover { border-color: var(--gold); }
.mch-margin .chip i { font-style: normal; color: var(--muted); }

.rules-pane textarea { width: 100%; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--ink); padding: 12px; font: 12.5px/1.6 var(--mono); resize: vertical; }
.rules-pane textarea:focus { outline: 2px solid var(--gold-soft); border-color: var(--gold); }
.card.flat.warn { border-color: var(--nay); }
.card.flat.warn b { color: var(--nay); }
.card.flat ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }

.revs { display: flex; flex-direction: column; gap: 10px; }
.rev { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--paper); display: flex; flex-direction: column; gap: 6px; }
.rev.on { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.rev .why { font-size: 14px; }
.rev .row { gap: 12px; flex-wrap: wrap; }
.hash { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.diff .dgroup { margin-top: 8px; }
.dline { display: flex; gap: 10px; align-items: baseline; font-size: 13px; padding: 2px 0; flex-wrap: wrap; }
.dline code { font-family: var(--mono); font-size: 12px; }
.dline.chg code { color: var(--ink); } .dline.add code { color: var(--yay); } .dline.rem code { color: var(--nay); }

.log-pane .acts { display: flex; flex-direction: column; gap: 1px; margin-top: 10px; max-height: 380px; overflow: auto; }
.act-row { display: grid; grid-template-columns: 44px minmax(120px, 1fr) minmax(80px, 1fr) minmax(80px, 1fr) auto; gap: 10px; align-items: baseline; text-align: left; appearance: none; background: none; border: 0; border-bottom: 1px solid var(--ink-softer); padding: 7px 6px; font: inherit; color: inherit; cursor: pointer; }
.act-row:hover { background: var(--ink-softer); }
.act-row.on { background: var(--gold-soft); }
.act-row .seq { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.act-row .kind { font-family: var(--mono); font-size: 12.5px; }
.act-row .sub, .act-row .who { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-row .when { font-size: 12px; color: var(--muted); }
.why-card .kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; margin: 8px 0; }
.why-card .kv span:nth-child(odd) { color: var(--muted); }
.why-card .derivation { border-left: 3px solid var(--gold); padding: 6px 0 6px 12px; margin: 10px 0; font-size: 13.5px; }
.why-card pre { background: var(--ink-softer); border-radius: var(--r-sm); padding: 8px 10px; overflow: auto; }
.why-card .machine-note { margin-top: 10px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }

.insp { display: flex; flex-direction: column; gap: 6px; }
.insp h3 { margin: 0 0 4px; font-size: 16px; }
.insp h3 code, .insp code { font-family: var(--mono); }
.insp .caps { margin-top: 12px; }
.cite { font-family: var(--mono); font-size: 11.5px; color: var(--gold); }
.cite.big { font-size: 13px; }
.rules { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rules li { border-left: 2px solid var(--line); padding-left: 10px; font-size: 13px; }
.rules li.ok { border-left-color: var(--yay); }
.rules li.bad { border-left-color: var(--nay); }
.rules pre { margin: 4px 0 0; font-size: 11.5px; color: var(--muted); white-space: pre-wrap; word-break: break-word; }
.act-line { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; width: 100%; text-align: left; appearance: none; background: none; border: 0; border-bottom: 1px solid var(--ink-softer); padding: 5px 0; font: inherit; color: inherit; cursor: pointer; }
.act-line:hover { color: var(--gold); }
.act-line code { font-family: var(--mono); font-size: 12.5px; }

/* ── change control: the register and one row ─────────────────────────── */
.chg-pane { display: flex; flex-direction: column; gap: 12px; }
.chg-list { display: flex; flex-direction: column; gap: 1px; max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); }
.chg-row { display: grid; grid-template-columns: 70px minmax(120px, 1fr) 110px 100px; gap: 10px; align-items: baseline; text-align: left; appearance: none; background: none; border: 0; border-bottom: 1px solid var(--ink-softer); padding: 8px 10px; font: inherit; color: inherit; cursor: pointer; }
.chg-row:last-child { border-bottom: 0; }
.chg-row:hover { background: var(--ink-softer); }
.chg-row.on { background: var(--gold-soft); }
.chg-row .code { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.chg-row .ttl { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chg-row .ty, .chg-row .st { font-size: 12px; color: var(--muted); }
.chg-row.s-closed .st { color: var(--yay); }
.chg-row.s-rejected .st, .chg-row.s-reverted .st { color: var(--nay); }
.chg-detail { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; background: var(--paper); display: flex; flex-direction: column; gap: 6px; }
.chg-detail h3 { margin: 0; font-size: 16px; }
.chg-detail .why { margin: 2px 0 6px; font-size: 14px; }
.chg-detail .kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 13px; }
.chg-detail .kv span:nth-child(odd) { color: var(--muted); }
.chg-detail .caps { margin-top: 10px; }
.chg-detail pre { background: var(--ink-softer); border-radius: var(--r-sm); padding: 8px 10px; overflow: auto; margin: 4px 0 0; }
.chg-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
