/* UI roles map to brand tokens in brand/brand.css. Change the brand there, not here. */
:root {
  --bg: #f5f6f8; --panel: #ffffff; --ink: #1d2433; --muted: #5f6b7d; --line: #e1e5eb;
  --accent: var(--brand-primary); --accent-ink: var(--brand-primary-ink); --accent-soft: var(--brand-primary-soft);
  --warn: #9a5b00; --warn-soft: #fff3df; --bad: #b42318; --bad-soft: #fde8e7; --good: #1f7a3a; --good-soft: #e5f4ea;
  --side: var(--brand-side); --side-ink: var(--brand-side-ink); --side-active: var(--brand-side-active);
  font-family: var(--brand-font); font-size: 15px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #11151c; --panel: #1a2029; --ink: #e6e9ee; --muted: #9aa5b4; --line: #2c3440;
    --warn: #f0b45a; --warn-soft: #3a2c15; --bad: #ff8a80; --bad-soft: #3d1d1b; --good: #6fd08c; --good-soft: #1b3324; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); display: flex; min-height: 100vh; }
#sidebar { width: 230px; background: var(--side); color: var(--side-ink); padding: 18px 12px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); }
h1, h2, h3, .topnav a, button, .btn { font-family: var(--brand-font); }
h1 { font-weight: 600; letter-spacing: -.01em; }
.brand { display: block; padding: 0 8px 16px; }
.brand img { display: block; max-width: 100%; height: auto; }
.app-footer { padding: 16px 24px; font-size: 12px; color: var(--muted); }
.stepper { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.step { flex: 1; min-width: 90px; font-size: 12px; padding: 6px 8px; border-radius: 6px; background: var(--bg); color: var(--muted); display: flex; gap: 6px; align-items: center; }
.step span { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--line); font-size: 11px; flex-shrink: 0; }
.step.done { color: var(--good); } .step.done span { background: var(--good); color: #fff; }
.step.current { background: var(--accent-soft); color: var(--ink); font-weight: 600; } .step.current span { background: var(--accent); color: var(--accent-ink); }
.email { max-width: 720px; border: 1px solid var(--line); border-radius: var(--brand-radius); overflow: hidden; background: var(--panel); }
.email-head { background: var(--bg); padding: 10px 16px; font-size: 13px; border-bottom: 1px solid var(--line); line-height: 1.6; }
.email-body { padding: 18px 22px; line-height: 1.5; }
.consent { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; color: var(--ink); font-size: 14px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.consent:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.consent input { margin-top: 3px; }
.consent.static { cursor: default; }
.req { font-size: 11px; color: var(--bad); text-transform: uppercase; letter-spacing: .04em; }
#nav a { display: block; color: var(--side-ink); text-decoration: none; padding: 8px 10px; border-radius: 6px; margin-bottom: 2px; }
#nav a:hover { background: var(--side-active); }
#nav a.active { background: var(--side-active); color: var(--brand-side-active-ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand-green); }
#nav .sep { border-top: 1px solid var(--line); margin: 10px 4px; }
#nav .locked { opacity: .35; pointer-events: none; }
.disclaimer { font-size: 11px; line-height: 1.4; color: #8792a3; padding: 16px 8px 0; }
#shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#topbar { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topnav { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.topnav a { padding: 12px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; white-space: nowrap; }
.topnav a:hover { color: var(--ink); }
.topnav a.active { color: var(--accent); border-bottom-color: var(--brand-green); }
.topbar-row { display: flex; align-items: center; gap: 12px; padding: 8px 24px; flex-wrap: wrap; }
.nav-head { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8792a3; padding: 14px 10px 6px; }
.sigpad { width: 100%; height: 160px; border: 1px dashed var(--muted); border-radius: 6px; background: #fff; touch-action: none; cursor: crosshair; margin-top: 8px; display: block; }
.sigtyped { font: italic 2rem 'Brush Script MT', 'Segoe Script', cursive; margin: .3em 0; min-height: 1.2em; }
/* Calendar */
.cal-head { margin-bottom: 10px; } .cal-month { font-size: 17px; min-width: 150px; text-align: center; }
.seg { display: inline-flex; } .seg button { border-radius: 0; } .seg button:first-child { border-radius: 6px 0 0 6px; } .seg button:last-child { border-radius: 0 6px 6px 0; margin-left: -1px; }
.cal-filters { margin-bottom: 12px; }
.chip { flex-direction: row; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; color: var(--ink); cursor: pointer; background: var(--panel); }
.chip input { display: none; } .chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--evc); opacity: .35; }
.chip.on::before { opacity: 1; } .chip:not(.on) { color: var(--muted); }
.ev-gm { --evc: #2a7d5a; --evbg: #e3f3ea; } .ev-council { --evc: #3b6fb6; --evbg: #e6eefa; } .ev-todo { --evc: #8a5a00; --evbg: #fdf1dc; }
.ev-rm { --evc: #8a3fb0; --evbg: #f3e8fa; } .ev-deadline { --evc: #b42318; --evbg: #fdecea; }
@media (prefers-color-scheme: dark) { .ev-gm { --evbg: #17332a; --evc: #7fd6ac; } .ev-council { --evbg: #1b2a40; --evc: #8fb6ec; } .ev-todo { --evbg: #3a2c15; --evc: #f0c46a; } .ev-rm { --evbg: #2f2140; --evc: #cf9ef0; } .ev-deadline { --evbg: #3d1d1b; --evc: #ff9a90; } }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--brand-radius); overflow: hidden; background: var(--line); gap: 1px; }
.cal-dow { background: var(--bg); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 8px; font-weight: 600; }
.cal-cell { background: var(--panel); min-height: 104px; padding: 4px 5px 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell.other { background: var(--bg); } .cal-cell.other .cal-dnum { color: var(--muted); opacity: .6; }
.cal-cell.today .cal-dnum { background: var(--brand-green); color: #fff; }
.cal-cell.sel { box-shadow: inset 0 0 0 2px var(--accent); } .cal-cell.drop { background: var(--accent-soft); }
.cal-dnum { align-self: flex-start; border: 0; background: none; padding: 2px 6px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink); cursor: pointer; }
.cal-dnum:hover { background: var(--bg); }
.ev { display: block; font-size: 12px; line-height: 1.3; padding: 2px 6px; border-radius: 4px; background: var(--evbg); color: var(--evc); border-left: 3px solid var(--evc); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .t { font-weight: 700; margin-right: 4px; } .ev.done { opacity: .5; text-decoration: line-through; } .ev.overdue { outline: 1.5px solid var(--bad); }
.ev[draggable=true] { cursor: grab; }
.cal-more { border: 0; background: none; font-size: 11px; color: var(--muted); text-align: left; padding: 0 6px; cursor: pointer; }
.cal-rows { display: flex; flex-direction: column; gap: 2px; }
.cal-row { display: flex; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 6px; text-decoration: none; color: var(--ink); }
.cal-row:hover { background: var(--bg); }
.cal-row .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--evc); flex-shrink: 0; }
.cal-row .when { width: 58px; font-size: 13px; color: var(--muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.cal-row .what { flex: 1; min-width: 0; } .cal-row .what small { display: block; color: var(--muted); }
.cal-day.today { border-color: var(--brand-green); }
@media (max-width: 700px) { .cal-cell { min-height: 64px; } .ev { font-size: 10px; padding: 1px 3px; } .ev .t { display: none; } }
table.pxt th.c, table.pxt td.c { text-align: center; width: 70px; }
table.pxt td small { display: block; color: var(--muted); }
table.pxt input[type=radio] { width: 20px; height: 20px; accent-color: var(--accent); }
#topbar .corp { font-weight: 600; flex: 1; }
#topbar .corp small { color: var(--muted); font-weight: 400; margin-left: 6px; }
main { padding: 24px; max-width: 1200px; width: 100%; }
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 24px 0 10px; }
h3 { font-size: 15px; margin: 18px 0 8px; }
.sub { color: var(--muted); margin: 0 0 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.stat b { display: block; font-size: 22px; margin-top: 4px; }
.stat span { color: var(--muted); font-size: 13px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; }
textarea { min-height: 60px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
button, .btn { font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 7px 13px; border-radius: 6px; cursor: pointer; text-decoration: none; display: inline-block; white-space: nowrap; }
button:hover, .btn:hover { border-color: var(--accent); }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.small, .btn.small { padding: 3px 8px; font-size: 12px; }
button.danger { color: var(--bad); }
button:disabled { opacity: .5; cursor: not-allowed; }
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 700; border-top: 2px solid var(--ink); }
tr.subtotal td { font-weight: 600; background: var(--bg); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.tablewrap table { border: 0; }
.badge { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.notice { padding: 10px 14px; border-radius: 8px; background: var(--accent-soft); margin: 10px 0; font-size: 14px; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.good { background: var(--good-soft); color: var(--good); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.choice { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: row; gap: 10px; align-items: flex-start; color: var(--ink); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice b { display: block; font-size: 14px; }
.choice small { color: var(--muted); display: block; margin-top: 2px; line-height: 1.35; }
.choice em { font-style: normal; font-size: 11px; color: var(--accent); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 12px 0 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--ink); border-color: var(--accent); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.agenda-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--panel); }
.agenda-item .head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.agenda-item .head .num { font-weight: 700; width: 22px; }
.agenda-item .head input.title { flex: 1; min-width: 220px; font-weight: 600; }
.agenda-item .minutes { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); display: grid; gap: 8px; }
.agenda-item.cat-standing { border-left: 4px solid var(--muted); }
.agenda-item.cat-business, .agenda-item.cat-resolution { border-left: 4px solid var(--accent); }
.agenda-item.cat-report { border-left: 4px solid #6c8ebf; }
.agenda-item.cat-incamera { border-left: 4px solid var(--warn); }
.doc { background: #fff; color: #111; border: 1px solid var(--line); border-radius: 6px; padding: 40px 48px; max-width: 820px; font-family: var(--brand-font-document); line-height: 1.5; }
.doc::after { content: "Prepared with AutoStrata"; display: block; margin-top: 28px; font: 11px var(--brand-font); color: #888; text-align: right; }
.doc h1 { font-size: 20px; text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.doc h2 { font-size: 16px; margin-top: 20px; }
.doc .center { text-align: center; }
.doc ol > li { margin-bottom: 10px; }
.doc .res { margin: 6px 0 6px 18px; padding: 8px 12px; border-left: 3px solid #999; background: #f6f6f6; }
.doc .motion { margin: 4px 0 4px 18px; }
.doc table { background: transparent; }
.doc th, .doc td { border-color: #ddd; color: #111; }
#toast { position: fixed; bottom: 20px; right: 20px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; }
#toast.show { opacity: 1; }
details summary { cursor: pointer; color: var(--accent); margin: 6px 0; }
@media (max-width: 760px) {
  body { flex-direction: column; }
  #sidebar { width: 100%; height: auto; position: static; }
  #nav { display: flex; flex-wrap: wrap; gap: 4px; }
  #nav .sep, .disclaimer { display: none; }
  main { padding: 16px; }
  .doc { padding: 20px; }
}
@media print {
  .no-print, #sidebar, #topbar, .tabs { display: none !important; }
  body { background: #fff; display: block; }
  main { padding: 0; max-width: none; }
  .doc { border: 0; padding: 0; max-width: none; }
}
