/* ==========================================================================
   Board Meeting Minutes — stylesheet
   Brand colours live in the :root block below; change them there only.
   ========================================================================== */

:root {
  --brand:        #0f172a;
  --brand-soft:   #1e293b;
  --accent:       #1d4ed8;
  --accent-soft:  #eff6ff;
  --accent-line:  #bfdbfe;

  --ink:          #0f172a;
  --ink-2:        #334155;
  --ink-3:        #64748b;
  --ink-4:        #94a3b8;

  --bg:           #eef1f6;
  --surface:      #ffffff;
  --surface-2:    #f8fafc;
  --surface-3:    #f1f5f9;
  --line:         #e2e8f0;
  --line-2:       #cbd5e1;

  --ok:           #047857;
  --ok-soft:      #ecfdf5;
  --warn:         #b45309;
  --warn-soft:    #fffbeb;
  --danger:       #b91c1c;
  --danger-soft:  #fef2f2;

  --r-sm: 6px;
  --r:    9px;
  --r-lg: 14px;

  --shadow-1: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-2: 0 4px 14px rgba(15, 23, 42, .09);
  --shadow-3: 0 18px 48px rgba(15, 23, 42, .22);

  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --doc: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body, #root { height: 100%; }

body {
  margin: 0;
  font-family: var(--ui);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Primitives
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 13px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); color: var(--ink-2);
  font-size: 13px; font-weight: 550; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s, transform .06s;
}
.btn:hover:not(:disabled) { background: var(--surface-3); border-color: var(--ink-4); color: var(--ink); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #1e293b; border-color: #1e293b; color: #fff; }

.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover:not(:disabled) { background: #1e40af; border-color: #1e40af; color: #fff; }

.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-3); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); border-color: transparent; color: var(--ink); }

.btn-danger { color: var(--danger); border-color: #fecaca; background: var(--danger-soft); }
.btn-danger:hover:not(:disabled) { background: #fee2e2; border-color: #fca5a5; color: var(--danger); }

.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: var(--r-sm); gap: 5px; }
.btn-lg { padding: 12px 20px; font-size: 15px; border-radius: var(--r); }
.btn-block { width: 100%; }

.input, .select, .textarea {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); font-size: 14px;
  transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29, 78, 216, .13);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.textarea { resize: vertical; min-height: 74px; line-height: 1.55; }
.select { appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.input-sm { padding: 6px 9px; font-size: 13px; }

.field { display: block; margin-bottom: 12px; }
.field > .label {
  display: block; margin-bottom: 5px;
  font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
.card-pad { padding: 16px; }

.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.card-title { font-size: 13px; font-weight: 650; letter-spacing: .02em; }
.card-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 650; letter-spacing: .03em;
  background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--line);
}
.pill-ok { background: var(--ok-soft); color: var(--ok); border-color: #a7f3d0; }
.pill-warn { background: var(--warn-soft); color: var(--warn); border-color: #fde68a; }
.pill-danger { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }
.pill-live { background: var(--ok-soft); color: var(--ok); border-color: #a7f3d0; }
.pill-live .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .3 } }

.muted { color: var(--ink-3); }
.tiny { font-size: 11.5px; }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-4 { gap: 4px } .gap-6 { gap: 6px } .gap-8 { gap: 8px } .gap-10 { gap: 10px } .gap-12 { gap: 12px } .gap-16 { gap: 16px }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.right { margin-left: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr { height: 1px; background: var(--line); border: 0; margin: 14px 0; }

/* --------------------------------------------------------------------------
   App shell
   -------------------------------------------------------------------------- */

.app { display: flex; flex-direction: column; height: 100%; overflow: hidden; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 0 14px; height: 54px; flex-shrink: 0;
  background: var(--brand); color: #fff;
}
.topbar-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.topbar-mark {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
  background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.16);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; letter-spacing: .02em;
}
.topbar-name { font-size: 13.5px; font-weight: 620; line-height: 1.15; }
.topbar-tag { font-size: 11px; color: #94a3b8; line-height: 1.15; }
.topbar-sep { width: 1px; height: 24px; background: rgba(255,255,255,.14); }

.topbar .assoc-select {
  appearance: none; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  color: #fff; border-radius: var(--r-sm); padding: 7px 30px 7px 11px;
  font-size: 13px; font-weight: 550; max-width: 320px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' stroke='%23cbd5e1' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  text-overflow: ellipsis;
}
.topbar .assoc-select:disabled { opacity: .75; cursor: default; }
.topbar .assoc-select option { color: #0f172a; }

.topbar-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  color: #e2e8f0; font-size: 12.5px; font-weight: 550;
}
.topbar-btn:hover { background: rgba(255,255,255,.15); color: #fff; }
.topbar-btn.is-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.topbar-btn.is-primary:hover { background: #1e40af; }

.status-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 999px; font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
}
.status-DRAFT      { background: rgba(251,191,36,.16); color: #fcd34d; }
.status-IN_SESSION { background: rgba(16,185,129,.18); color: #6ee7b7; }
.status-ADJOURNED  { background: rgba(148,163,184,.2); color: #cbd5e1; }
.status-FINALIZED  { background: rgba(59,130,246,.2); color: #93c5fd; }
.status-IN_SESSION .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2s ease-in-out infinite; }

/* --------------------------------------------------------------------------
   Split workspace
   -------------------------------------------------------------------------- */

.split { flex: 1; display: flex; min-height: 0; }
.pane-doc { flex: 1 1 52%; min-width: 0; display: flex; flex-direction: column; background: #dfe4ec; }
.pane-ctrl {
  flex: 1 1 48%; min-width: 0; display: flex; flex-direction: column;
  background: var(--surface-2); border-left: 1px solid var(--line-2);
}
.pane-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }

.pane-bar {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding: 9px 14px; min-height: 48px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}

.tabs { display: inline-flex; padding: 2px; background: var(--surface-3); border-radius: var(--r-sm); border: 1px solid var(--line); }
.tabs button {
  padding: 5px 12px; border: 0; border-radius: 5px; background: transparent;
  font-size: 12.5px; font-weight: 600; color: var(--ink-3);
}
.tabs button[aria-pressed='true'] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* --------------------------------------------------------------------------
   The minutes document
   -------------------------------------------------------------------------- */

.doc-scroll { padding: 20px 20px 60px; display: flex; justify-content: center; }

.sheet {
  width: 100%; max-width: 680px;
  background: #fff; color: #0f172a;
  border: 1px solid #c9d2e0;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(15,23,42,.1), 0 12px 32px rgba(15,23,42,.09);
  padding: 46px 52px 40px;
  font-family: var(--doc);
  font-size: 14.5px;
  line-height: 1.62;
}

.sheet-brand {
  font-family: var(--ui); font-size: 9.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-4);
  margin-bottom: 10px;
}
.sheet h1 {
  font-size: 25px; font-weight: 700; line-height: 1.2; letter-spacing: -.012em;
  margin-bottom: 4px;
}
.sheet-type { font-size: 15px; color: var(--ink-2); }
.sheet-date {
  font-family: var(--ui); font-size: 13px; font-weight: 650; margin-top: 8px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.sheet-rule { height: 2px; background: #334155; margin: 14px 0 0; }

.draft-badge {
  font-family: var(--ui); font-size: 9.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--warn); background: var(--warn-soft);
  border: 1px solid #fde68a; border-radius: 4px; padding: 3px 8px;
}

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  font-family: var(--ui); padding: 14px 0 16px; border-bottom: 1px solid var(--line);
}
.facts dt { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); }
.facts dd { margin: 3px 0 0; font-size: 12.5px; font-weight: 550; color: var(--ink); overflow-wrap: anywhere; }

.sheet-section { margin-top: 22px; }
.sheet-section > h2 {
  font-family: var(--ui); font-size: 11px; font-weight: 750;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2);
  padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 11px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.sheet-section > h2 .count { font-size: 10px; letter-spacing: .04em; color: var(--ink-4); font-weight: 600; }

.roll-line { display: grid; grid-template-columns: 108px 1fr; gap: 10px; margin-bottom: 6px; }
.roll-line dt { font-family: var(--ui); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.roll-line dd { margin: 0; }
.quorum-note { font-style: italic; color: var(--ink-2); margin-top: 8px; font-size: 13.5px; }
.quorum-note.is-bad { color: var(--danger); font-style: normal; font-weight: 600; }

.entry {
  position: relative; padding: 9px 0 9px 0; margin-left: -8px; padding-left: 8px;
  border-radius: var(--r-sm);
}
.entry + .entry { border-top: 1px solid #f1f5f9; }
.entry:hover { background: #fafbfd; }
.entry.is-new { animation: land 1.1s ease-out; }
@keyframes land {
  0%   { background: #fef9c3; transform: translateY(-3px); }
  100% { background: transparent; transform: none; }
}

.entry-head { display: flex; align-items: baseline; gap: 9px; }
.entry-no {
  font-family: var(--ui); font-size: 10.5px; font-weight: 700; color: var(--ink-4);
  min-width: 26px; padding-top: 1px; font-variant-numeric: tabular-nums;
}
.entry-title { font-family: var(--ui); font-size: 13.5px; font-weight: 650; flex: 1; min-width: 0; }
.entry-time { font-family: var(--ui); font-size: 11px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.entry-body { margin: 3px 0 0 35px; }
.entry-body p + p { margin-top: 7px; }
.entry-motion { }
.entry-vote { font-weight: 650; }
.entry-vote.is-failed { color: var(--danger); }
.entry-vote.is-carried { color: var(--ok); }

.entry-actions-list { margin: 7px 0 0; padding: 0 0 0 11px; border-left: 2px solid #fbbf24; list-style: none; }
.entry-actions-list li { font-family: var(--ui); font-size: 12px; color: var(--ink-2); }
.entry-actions-list .who { color: var(--ink-3); }

.entry-tools {
  position: absolute; top: 6px; right: 0; display: flex; gap: 2px;
  opacity: 0; transition: opacity .12s;
}
.entry:hover .entry-tools, .entry:focus-within .entry-tools { opacity: 1; }
.icon-btn {
  display: grid; place-items: center; width: 26px; height: 26px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink-4);
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink-2); border-color: var(--line); }
.icon-btn.is-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }

.entry-edit { margin: 6px 0 4px 35px; font-family: var(--ui); }
.entry-edit .textarea, .entry-edit .input { font-family: var(--ui); font-size: 13px; }

.doc-empty {
  border: 1px dashed var(--line-2); border-radius: var(--r);
  padding: 26px 20px; text-align: center; background: var(--surface-2);
  font-family: var(--ui);
}
.doc-empty .title { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.doc-empty .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; max-width: 34ch; margin-inline: auto; }

.signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 30px; font-family: var(--ui); }
.sig-line { border-top: 1px solid var(--ink-4); padding-top: 7px; }
.sig-name { font-family: var(--doc); font-size: 14px; font-weight: 700; min-height: 20px; }
.sig-role { font-size: 11px; color: var(--ink-3); }
.sig-date { font-size: 11px; color: var(--ink-4); margin-top: 9px; }

.sheet-foot {
  margin-top: 26px; padding-top: 12px; border-top: 1px solid var(--line);
  font-family: var(--ui); font-size: 11px; color: var(--ink-4);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Control pane
   -------------------------------------------------------------------------- */

.ctrl-scroll { padding: 14px; display: flex; flex-direction: column; gap: 12px; }

.agenda-list { list-style: none; margin: 0; padding: 0; }
.agenda-item {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 11px; border-radius: var(--r-sm); border: 1px solid transparent;
  text-align: left; width: 100%; background: transparent;
}
.agenda-item:hover { background: var(--surface-3); }
.agenda-item.is-active { background: var(--accent-soft); border-color: var(--accent-line); }
.agenda-item.is-done { color: var(--ink-3); }
.agenda-item.is-done .agenda-title { text-decoration: line-through; text-decoration-color: var(--ink-4); }
.agenda-mark {
  width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--line-2);
  flex-shrink: 0; margin-top: 1px; display: grid; place-items: center; color: #fff; font-size: 10px;
}
.agenda-item.is-active .agenda-mark { border-color: var(--accent); background: var(--accent); }
.agenda-item.is-done .agenda-mark { border-color: var(--ok); background: var(--ok); }
.agenda-title { font-size: 13px; font-weight: 550; line-height: 1.35; }
.agenda-sec { font-size: 10.5px; color: var(--ink-4); letter-spacing: .03em; text-transform: uppercase; font-weight: 650; margin-top: 2px; }
.agenda-group-label {
  font-size: 10px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-4); padding: 10px 11px 4px;
}

.roster { display: grid; gap: 6px; }
.roster-row {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
}
.roster-name { font-size: 13px; font-weight: 570; line-height: 1.25; }
.roster-role { font-size: 11px; color: var(--ink-3); }
.att-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.att-toggle button {
  border: 0; background: var(--surface); padding: 4px 8px; font-size: 11px; font-weight: 650; color: var(--ink-3);
  border-left: 1px solid var(--line);
}
.att-toggle button:first-child { border-left: 0; }
.att-toggle button:hover { background: var(--surface-3); }
.att-toggle button[aria-pressed='true'] { background: var(--brand); color: #fff; }
.att-toggle button.is-absent[aria-pressed='true'] { background: var(--ink-4); }

.quorum-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r); font-size: 12.5px; font-weight: 550;
}
.quorum-bar.is-ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #a7f3d0; }
.quorum-bar.is-bad { background: var(--warn-soft); color: var(--warn); border: 1px solid #fde68a; }

.action-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.action-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 11px 12px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  transition: border-color .12s, background .12s, transform .06s;
}
.action-btn:hover:not(:disabled) { border-color: var(--accent-line); background: var(--accent-soft); }
.action-btn:active:not(:disabled) { transform: translateY(1px); }
.action-btn:disabled { opacity: .45; cursor: not-allowed; }
.action-btn .t { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 620; }
.action-btn .d { font-size: 11.5px; color: var(--ink-3); line-height: 1.35; }

.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 7px; }
.member-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); text-align: left;
}
.member-chip:hover { border-color: var(--ink-4); }
.member-chip .n { font-size: 12.5px; font-weight: 580; line-height: 1.2; }
.member-chip .r { font-size: 10.5px; color: var(--ink-4); }
.member-chip.is-mover { background: #1e3a8a; border-color: #1e3a8a; color: #fff; }
.member-chip.is-mover .r { color: #bfdbfe; }
.member-chip.is-seconder { background: #065f46; border-color: #065f46; color: #fff; }
.member-chip.is-seconder .r { color: #a7f3d0; }
.member-chip .tag { font-size: 9.5px; font-weight: 750; letter-spacing: .04em; padding: 2px 5px; border-radius: 4px; background: rgba(255,255,255,.22); }

.pick-slots { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.pick-slot {
  display: flex; align-items: center; gap: 7px; padding: 6px 10px;
  border: 1px dashed var(--line-2); border-radius: var(--r-sm);
  font-size: 12px; color: var(--ink-4); background: var(--surface);
}
.pick-slot.is-set { border-style: solid; color: var(--ink); font-weight: 550; }
.pick-slot .k { font-size: 9.5px; font-weight: 750; letter-spacing: .05em; padding: 2px 5px; border-radius: 4px; }
.pick-slot.slot-1 .k { background: #dbeafe; color: #1e40af; }
.pick-slot.slot-2 .k { background: #d1fae5; color: #065f46; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  padding: 7px 11px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); font-size: 12.5px; font-weight: 570; color: var(--ink-2);
}
.seg button:hover { border-color: var(--ink-4); }
.seg button[aria-pressed='true'] { background: var(--brand); border-color: var(--brand); color: #fff; }

.ballot-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  border-top: 1px solid var(--line);
}
.ballot-row:first-child { border-top: 0; }
.ballot-opts { display: inline-flex; margin-left: auto; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.ballot-opts button { border: 0; border-left: 1px solid var(--line); background: var(--surface); padding: 4px 9px; font-size: 11px; font-weight: 650; color: var(--ink-3); }
.ballot-opts button:first-child { border-left: 0; }
.ballot-opts button[aria-pressed='true'].aye { background: var(--ok); color: #fff; }
.ballot-opts button[aria-pressed='true'].nay { background: var(--danger); color: #fff; }
.ballot-opts button[aria-pressed='true'].abs { background: var(--ink-4); color: #fff; }

.tally { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tally label { display: block; }
.tally .k { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }

.notepad-wrap { position: relative; }
.notepad-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.chip {
  border: 1px solid var(--line); background: var(--surface-3); color: var(--ink-2);
  padding: 4px 9px; border-radius: 999px; font-size: 11.5px;
}
.chip:hover { background: var(--surface); border-color: var(--ink-4); }

.callout { border-radius: var(--r); padding: 12px 14px; font-size: 13px; line-height: 1.5; }
.callout-info { background: var(--accent-soft); border: 1px solid var(--accent-line); color: #1e3a8a; }
.callout-warn { background: var(--warn-soft); border: 1px solid #fde68a; color: var(--warn); }
.callout-ok { background: var(--ok-soft); border: 1px solid #a7f3d0; color: var(--ok); }
.callout-danger { background: var(--danger-soft); border: 1px solid #fecaca; color: var(--danger); }

.start-card { text-align: center; padding: 26px 22px; }
.big-clock {
  font-family: var(--mono); font-size: 34px; font-weight: 600; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.start-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; text-align: left; }
.start-tile { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; background: var(--surface-2); }
.start-tile .k { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-4); }
.start-tile .v { font-size: 13.5px; font-weight: 600; margin-top: 3px; }

.timer { font-family: var(--mono); font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Modals & drawers
   -------------------------------------------------------------------------- */

.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
  animation: fade .14s ease-out;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

.modal {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-3);
  width: 100%; max-width: 620px; max-height: min(88vh, 880px);
  display: flex; flex-direction: column; overflow: hidden;
  animation: rise .16s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
.modal-lg { max-width: 900px; }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 17px 20px; border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-size: 16px; font-weight: 650; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-foot {
  display: flex; align-items: center; gap: 9px; justify-content: flex-end;
  padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2);
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Sign-in
   -------------------------------------------------------------------------- */

.signin { min-height: 100%; display: grid; place-items: center; padding: 24px; background: var(--brand); }
.signin-card {
  width: 100%; max-width: 390px; background: var(--surface);
  border-radius: var(--r-lg); box-shadow: var(--shadow-3); padding: 30px 30px 26px;
}
.signin-mark {
  width: 42px; height: 42px; border-radius: 11px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 14px; margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Settings & archive
   -------------------------------------------------------------------------- */

.settings-layout { display: grid; grid-template-columns: 210px 1fr; gap: 0; height: 100%; min-height: 0; }
.settings-nav { border-right: 1px solid var(--line); padding: 14px 10px; background: var(--surface-2); overflow-y: auto; }
.settings-nav button {
  display: block; width: 100%; text-align: left; padding: 8px 11px; border: 0; border-radius: var(--r-sm);
  background: transparent; font-size: 13px; font-weight: 550; color: var(--ink-2); margin-bottom: 2px;
}
.settings-nav button:hover { background: var(--surface-3); }
.settings-nav button[aria-current='true'] { background: var(--brand); color: #fff; }
.settings-body { padding: 20px 22px; overflow-y: auto; }
.settings-section-title { font-size: 15px; font-weight: 650; margin-bottom: 3px; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3); padding: 7px 9px; border-bottom: 1px solid var(--line);
}
.table td { padding: 8px 9px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

.list-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
}
.list-row + .list-row { margin-top: 7px; }
.list-row:hover { border-color: var(--line-2); }

.toast-stack { position: fixed; bottom: 66px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  /* Never intercept clicks - a toast must not block the controls beneath it. */
  pointer-events: none; display: flex; align-items: center; gap: 9px;
  background: var(--brand); color: #fff; padding: 10px 15px; border-radius: var(--r);
  box-shadow: var(--shadow-2); font-size: 13px; font-weight: 500; max-width: 460px;
  animation: rise .16s ease-out;
}
.toast.is-error { background: var(--danger); }
.toast.is-ok { background: var(--ok); }

.save-state { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-4); }
.save-state.is-error { color: var(--danger); font-weight: 600; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

.mobile-only { display: none; }

@media (max-width: 1080px) {
  .sheet { padding: 34px 32px 30px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .mobile-only { display: inline-flex; }
  .desktop-only { display: none !important; }
  .split { display: block; position: relative; height: 100%; }
  .pane-doc, .pane-ctrl { position: absolute; inset: 0; border-left: 0; }
  .pane-doc[data-hidden='true'], .pane-ctrl[data-hidden='true'] { display: none; }
  .doc-scroll { padding: 12px 10px 60px; }
  .sheet { padding: 26px 22px 24px; font-size: 14px; }
  .sheet h1 { font-size: 21px; }
  .topbar { padding: 0 10px; gap: 8px; }
  .topbar .assoc-select { max-width: 170px; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 6px; overflow-x: auto; padding: 9px; }
  .settings-nav button { width: auto; white-space: nowrap; }
  .action-grid { grid-template-columns: 1fr; }
  .start-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .signatures { grid-template-columns: 1fr; gap: 22px; }
  .tally { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Print — the sheet is the page
   -------------------------------------------------------------------------- */

@media print {
  @page { size: letter; margin: 0.75in; }
  body { background: #fff; }
  .topbar, .pane-ctrl, .pane-bar, .entry-tools, .toast-stack, .no-print { display: none !important; }
  .app, .split, .pane-doc, .pane-scroll { display: block; height: auto; overflow: visible; }
  .doc-scroll { padding: 0; display: block; }
  .sheet {
    max-width: none; width: auto; border: 0; box-shadow: none; padding: 0;
    font-size: 11pt; line-height: 1.5;
  }
  .sheet h1 { font-size: 19pt; }
  .entry { break-inside: avoid; page-break-inside: avoid; }
  .sheet-section > h2 { break-after: avoid; page-break-after: avoid; }
  .signatures { break-inside: avoid; page-break-inside: avoid; }
  .entry:hover { background: none; }
  a { color: inherit; text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* MinutesApp: controls left, document right. */
.pane-ctrl{order:0;border-left:0;border-right:1px solid #cbd5e1}.pane-doc{order:1}.minutes-logo{display:inline-flex;align-items:center;justify-content:center;background:#1d4ed8;color:white;padding:8px 10px;margin-right:12px;font:700 19px Georgia;border-radius:4px;letter-spacing:0}.pane-ctrl .small,.pane-ctrl .label{font-size:14px}

.meeting-toolbox{position:sticky;top:0;z-index:5;box-shadow:0 3px 12px #0f172a12}.toolbox-icons{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;padding:12px}.toolbox-icons button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:78px;border:1px solid #cbd5e1;border-radius:10px;background:#eff6ff;color:#1e40af;font-size:13px;font-weight:600;cursor:pointer}.toolbox-icons button:hover{background:#dbeafe}.toolbox-icons button:disabled{opacity:.45;cursor:default}.motion-steps{display:flex;list-style:none;padding:12px;gap:5px;flex-wrap:wrap;margin:0;border-bottom:1px solid #e2e8f0}.motion-steps li{font-size:13px;padding:7px;border-radius:6px;color:#64748b}.motion-steps .current{background:#1d4ed8;color:white}.motion-steps .done{background:#dcfce7;color:#166534}.motion-wizard fieldset{border:1px solid #cbd5e1;padding:12px;border-radius:8px}.motion-wizard .ballot-opts button[aria-pressed=true]{background:#1d4ed8;color:white}.motion-wizard .field{font-size:14px}.motion-wizard h3{margin:0;font-size:20px}@media(max-width:560px){.toolbox-icons{grid-template-columns:repeat(3,1fr)}.meeting-toolbox{position:static}}

/* --------------------------------------------------------------------------
   Review pass (2026-09): accessibility, roll-call state, mobile polish.
   Brand tokens above are untouched; these only refine contrast and states.
   -------------------------------------------------------------------------- */

/* Body-size text at #94a3b8 on white is ~2.9:1; use the mid grey for readable labels in the document. */
.entry-time, .entry-no, .facts dt, .sheet-brand { color: var(--ink-3); }

/* A director whose attendance has not been recorded yet is visibly "open". */
.roster-row.is-unmarked { border-style: dashed; border-color: var(--warn); background: var(--warn-soft); }

/* The recess toggle shows its state, not just its label. */
.toolbox-icons button[aria-pressed='true'] { background: #dbeafe; border-color: #1d4ed8; }

/* Entry tools must be reachable without a mouse: keep them visible while focused and on touch devices. */
@media (hover: none) { .entry-tools { opacity: 1; } }
.entry-tools .icon-btn:focus-visible { opacity: 1; }

@media (max-width: 900px) {
  .pane-ctrl { border-right: 0; }
  .split { min-height: 0; }
  .toolbox-icons button { min-height: 66px; font-size: 12px; }
}

/* Links that are temporarily unavailable (export while a save is pending). */
a.btn[aria-disabled='true'] { opacity: .55; cursor: progress; }

/* Phone-width top bar: the community select must shrink instead of overlapping the brand mark,
   and the action buttons must stay on screen. */
@media (max-width: 900px) {
  .topbar .assoc-select { flex: 1 1 60px; min-width: 60px; max-width: 170px; }
  .topbar .row.right { flex-shrink: 0; gap: 6px; }
  .topbar-btn { padding: 7px 8px; }
}
@media (max-width: 420px) {
  .topbar .tabs button { padding: 5px 8px; }
  .status-chip { display: none; }
}

/* ==========================================================================
   Recording & live draft minutes
   ========================================================================== */

.live-panel { padding: 0 0 10px; overflow: hidden; }
.live-panel > .callout { margin: 8px 12px 0; }
.live-sub { padding: 10px 14px 4px; align-items: center; }
.live-disclaimer { padding: 0 14px 6px; margin: 0; }
.draft-list { padding: 0 12px; }

.rec-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.rec-bar.rec-recording { background: var(--danger-soft); border-bottom-color: #fecaca; }
.rec-bar.rec-off { border-radius: var(--r); border: 1px dashed var(--line-2); }
.rec-dot { display: inline-flex; align-items: center; gap: 6px; font-weight: 750; font-size: 12px; letter-spacing: .08em; color: var(--danger); }
.rec-dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: rec-pulse 1.2s ease-in-out infinite; }
@keyframes rec-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .rec-dot::before { animation: none; } }
.rec-paused-tag { font-weight: 700; font-size: 12px; letter-spacing: .06em; color: var(--warn); }
.rec-idle-tag { font-weight: 600; font-size: 12.5px; color: var(--ink-3); }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 13px; }
.rec-meta { min-width: 0; }
.rec-bar .right { margin-left: auto; }

.live-transcript { padding: 4px 12px 0; }
.transcript-lines { list-style: none; margin: 6px 0; padding: 0; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tline { display: grid; grid-template-columns: 42px 132px 1fr; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--surface-3); font-size: 13px; line-height: 1.45; }
.tline:last-of-type { border-bottom: 0; }
.tstamp { color: var(--ink-4); font-variant-numeric: tabular-nums; font-size: 12px; }
.tspk { color: var(--ink-3); font-weight: 600; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.ttext { color: var(--ink); }
.tline-partial .ttext { color: var(--ink-3); font-style: italic; }
.tline-gap { background: var(--warn-soft); }
.tline-gap .ttext { color: var(--warn); }
.tline-manual { background: var(--accent-soft); }
.tactions { display: inline-flex; gap: 2px; margin-left: 6px; opacity: 0; transition: opacity .15s; }
.tline:hover .tactions, .tline:focus-within .tactions { opacity: 1; }
.tedit { display: flex; flex-direction: column; gap: 6px; }
.speaker-assign, .speaker-confirmed { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0; }
.chip-ok { background: var(--ok-soft); border-color: #a7f3d0; color: var(--ok); }
.chip-x { border: 0; background: none; padding: 0 0 0 4px; cursor: pointer; color: inherit; }
.select-sm { padding: 5px 8px; font-size: 13px; }
.manual-line { margin: 6px 0 4px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; }

.draft-card { border: 1px dashed var(--warn); background: var(--warn-soft); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.draft-card.draft-confirmed { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.draft-card.draft-discarded { opacity: .6; background: var(--surface-2); border-color: var(--line-2); }
.draft-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--warn); border: 1px solid var(--warn); border-radius: 4px; padding: 1px 5px; }
.draft-text { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.draft-people { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; }
.draft-people dt { color: var(--ink-3); }
.draft-people dd { margin: 0; }
.draft-flags { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--warn); }
.draft-flags li { display: flex; gap: 6px; align-items: baseline; }

.prefill-note ul { margin: 6px 0 0; padding-left: 18px; }

.consent-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.consent-table th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.consent-table td { padding: 6px; border-bottom: 1px solid var(--surface-3); }

.seg-toggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.seg-toggle button { border: 0; background: var(--surface); padding: 4px 9px; font-size: 12px; cursor: pointer; color: var(--ink-3); }
.seg-toggle button.on { background: var(--brand); color: #fff; }
.draft-pending { margin: 8px 14px 0; padding: 7px 10px; font-size: 12.5px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); border: 1px dashed var(--warn); }
.pdf-preview { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 10px 14px; }
.pdf-preview iframe { flex: 1; width: 100%; min-height: 480px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.pdf-preview-note { margin-top: 4px; }
.consent-banner { display: flex; gap: 10px; align-items: flex-start; margin: 8px 12px 0; padding: 10px 12px; border-radius: var(--r); background: var(--danger-soft); color: var(--danger); border: 1px solid #fecaca; }
.consent-banner .small { color: var(--ink-2); margin-top: 2px; }
.consent-banner-compact { margin: 8px 14px 0; padding: 7px 10px; font-size: 12.5px; }
.consent-panel { padding-bottom: 4px; }
.consent-live { margin: 0 12px; width: calc(100% - 24px); }
.consent-no { color: var(--danger); font-weight: 600; }
.withdraw-form { margin: 8px 12px 0; }

.board-welcome h1 { margin: 16px 0 8px; font-size: 1.65rem; line-height: 1.15 }
.board-welcome h2 { margin: 24px 0 5px; font-size: 1.06rem }
.board-welcome p { color: var(--ink-3); line-height: 1.5; margin: 0 0 14px }
.board-home { font-weight: 700; color: var(--ink-2) }
.board-links { display:flex; flex-wrap:wrap; align-items:center; gap:6px 18px; padding:4px clamp(10px,3vw,28px); background:#fff; border-bottom:1px solid #dbe2ea; font-size:.8rem }
.board-links a { display:inline-flex; align-items:center; min-height:30px; color:#234965; font-weight:600 }
