/* AG Board Book — iPad-first board packet app.
   Type: Atkinson Hyperlegible Next (built for low-vision readers) + Source Serif 4 for titles.
   Signature: agenda sections wear the fiber/telephone color code as binder-divider tabs. */

@font-face { font-family: "Atkinson"; src: url(../fonts/atkinson-hyperlegible-next-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(../fonts/atkinson-hyperlegible-next-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(../fonts/atkinson-hyperlegible-next-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(../fonts/atkinson-hyperlegible-next-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url(../fonts/source-serif-4-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #18231e;
  --ink-2: #4b5852;
  --ink-3: #6d7872;
  --paper: #eef0ec;
  --sheet: #ffffff;
  --sheet-2: #f7f8f5;
  --line: #d6dbd4;
  --line-2: #e6e9e3;
  --spruce: #1d3a2f;
  --spruce-2: #2a4d40;
  --spruce-ink: #e8efe9;
  --spruce-dim: #a9bdb2;
  --action: #1c58a6;
  --action-hover: #164a8d;
  --action-soft: #e5eef9;
  --alert: #b8471b;
  --alert-soft: #fbebe3;
  --ok: #24744a;
  --ok-soft: #e3f2e8;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;

  /* Fiber color code (TIA-598): sections take these */
  --f-blue: #1e5aa8; --f-orange: #e07a1f; --f-green: #2e8b4a; --f-brown: #8a5a2b;
  --f-slate: #66757f; --f-red: #c62d2d; --f-black: #232323; --f-yellow: #d9a90f;
  --f-violet: #7a4fa0; --f-rose: #d0718f; --f-aqua: #2399a8;

  --serif: "Source Serif", Georgia, "Times New Roman", serif;
  --sans: "Atkinson", -apple-system, "Segoe UI", system-ui, sans-serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow-sheet: 0 1px 2px rgba(24, 35, 30, .08), 0 4px 16px rgba(24, 35, 30, .06);
  --tap: 48px;
  --topbar: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
a { color: var(--action); }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
.serif { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
.muted { color: var(--ink-2); }
.small { font-size: 15px; line-height: 1.45; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; border-radius: 4px; }

/* ---------- Buttons & fields ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap); padding: 0 20px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--sheet); color: var(--ink);
  font-weight: 500; font-size: 17px; text-decoration: none; white-space: nowrap;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color .12s, border-color .12s, transform .06s;
}
.btn:hover { background: var(--sheet-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn.primary { background: var(--action); border-color: var(--action); color: #fff; }
.btn.primary:hover { background: var(--action-hover); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: #f0c3be; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(24, 35, 30, .06); }
.btn.lg { min-height: 60px; padding: 0 28px; font-size: 19px; border-radius: 12px; }
.btn.icon { padding: 0; width: var(--tap); }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 15px; }

.field { display: grid; gap: 6px; }
.field > span { font-weight: 500; font-size: 16px; }
.field .hint { font-size: 14px; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; min-height: var(--tap); padding: 10px 14px;
  border: 1px solid #c3cac2; border-radius: var(--r-md); background: var(--sheet);
  font-size: 18px;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%234b5852' d='M5.5 7.5 10 12l4.5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px rgba(28, 88, 166, .2); }
.form-error { color: var(--danger); background: var(--danger-soft); border-radius: var(--r-md); padding: 12px 14px; font-size: 16px; }
.check { display: flex; gap: 12px; align-items: center; min-height: var(--tap); cursor: pointer; }
.check input { width: 24px; height: 24px; accent-color: var(--action); flex: none; }

/* ---------- Pills ---------- */

.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.pill.new { background: var(--action-soft); color: var(--action); }
.pill.updated { background: var(--alert-soft); color: var(--alert); }
.pill.draft { background: #f3ecd4; color: #7a5a06; }
.pill.live { background: var(--ok-soft); color: var(--ok); }
.pill.quiet { background: var(--line-2); color: var(--ink-2); font-weight: 500; }

/* ---------- App shell ---------- */

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  min-height: calc(var(--topbar) + var(--safe-top)); padding: var(--safe-top) 20px 0;
  background: var(--spruce); color: var(--spruce-ink);
}
.topbar .brand { display: flex; flex-direction: column; line-height: 1.15; margin-right: auto; min-width: 0; text-decoration: none; color: inherit; }
.topbar .brand b { font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: -0.01em; }
.topbar .brand span { font-size: 14px; color: var(--spruce-dim); }
.topbar .btn { color: var(--spruce-ink); border-color: transparent; background: transparent; }
.topbar .btn:hover { background: var(--spruce-2); }
.topbar .btn.current { background: var(--spruce-2); }
.topbar nav { display: flex; gap: 4px; }
.offline-flag { display: none; align-items: center; gap: 8px; padding: 0 12px; height: 32px; border-radius: 999px; background: #3a5a4d; font-size: 14px; }
body.is-offline .offline-flag { display: inline-flex; }

.page { max-width: 1040px; margin: 0 auto; padding: 32px 24px calc(64px + var(--safe-bottom)); }
.page-head { display: flex; align-items: end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--serif); font-size: 34px; line-height: 1.15; margin-right: auto; }

/* ---------- Login ---------- */

.login { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(320px, 5fr) 6fr; }
.login .cover {
  background: var(--sheet); color: var(--spruce);
  padding: calc(56px + var(--safe-top)) 56px 56px; display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.login .cover-logo { margin: 0 0 36px; max-width: 420px; }
.login .cover-logo img { display: block; width: 100%; height: auto; }
.login .cover h1 { font-family: var(--serif); font-size: clamp(36px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -0.02em; margin-top: auto; }
.login .cover p { color: var(--ink-2); font-size: 19px; margin-top: 14px; max-width: 28ch; }
.login .cover .org { font-size: 17px; font-weight: 500; color: var(--spruce); }
.login .fibers i.white { box-shadow: inset 0 0 0 1px var(--line); }
.login .fibers { position: absolute; right: 0; top: 0; bottom: 0; width: 12px; display: grid; grid-template-rows: repeat(12, 1fr); }
.login form { align-self: center; justify-self: center; width: min(440px, 100% - 48px); display: grid; gap: 20px; padding: 48px 0; }
.login form h2 { font-family: var(--serif); font-size: 30px; }
.login .password-signin { display: grid; gap: 20px; }
.login .ms-signin { justify-content: center; gap: 12px; text-decoration: none; }
.ms-logo { display: inline-grid; grid-template-columns: 9px 9px; gap: 2px; }
.ms-logo i { width: 9px; height: 9px; display: block; }
.ms-logo i:nth-child(1) { background: #f25022; } .ms-logo i:nth-child(2) { background: #7fba00; }
.ms-logo i:nth-child(3) { background: #00a4ef; } .ms-logo i:nth-child(4) { background: #ffb900; }
.login .or-line { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.login .or-line::before, .login .or-line::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.login .emergency-signin summary { cursor: pointer; color: var(--ink-2); }
.login .emergency-signin[open] { display: grid; gap: 12px; }
.code-input { font-size: 22px; letter-spacing: 0.2em; max-width: 12ch; }
.auth-qr { width: 200px; height: 200px; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.auth-key { font-family: ui-monospace, monospace; font-size: 16px; letter-spacing: 0.08em; background: var(--sheet-2); padding: 8px 10px; border-radius: 6px; display: inline-block; }

@media (max-width: 760px) {
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login .cover { padding: calc(28px + var(--safe-top)) 28px 32px; min-height: 240px; }
  .login .cover-logo { max-width: 240px; margin-bottom: 18px; }
  .login .fibers { top: auto; left: 0; height: 10px; width: auto; grid-template-rows: none; grid-template-columns: repeat(12, 1fr); }
}

/* ---------- Home ---------- */

.next {
  display: grid; grid-template-columns: 200px 1fr; overflow: hidden;
  background: var(--sheet); border-radius: var(--r-lg); box-shadow: var(--shadow-sheet);
}
.next .date {
  background: var(--spruce); color: var(--spruce-ink);
  display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 28px 16px; text-align: center;
}
.next .date .dow { font-size: 17px; color: var(--spruce-dim); }
.next .date .day { font-family: var(--serif); font-size: 88px; line-height: 1; margin: 6px 0 4px; font-weight: 600; }
.next .date .mon { font-size: 20px; font-weight: 500; }
.next .body { padding: 28px 32px; display: grid; gap: 14px; align-content: start; }
.next h2 { font-family: var(--serif); font-size: 30px; line-height: 1.15; }
.next .when { font-size: 19px; color: var(--ink-2); }
.next .message { background: var(--sheet-2); border-left: 4px solid var(--f-orange); padding: 12px 16px; border-radius: 0 var(--r-md) var(--r-md) 0; white-space: pre-line; }
.next .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; align-items: center; }
.next .packet { font-size: 17px; color: var(--ink-2); }
.next .packet strong { color: var(--alert); font-weight: 700; }
.next-label { font-size: 17px; font-weight: 500; color: var(--ink-2); margin: 0 0 10px 2px; }

@media (max-width: 640px) {
  .next { grid-template-columns: 1fr; }
  .next .date { flex-direction: row; gap: 12px; padding: 16px; justify-content: flex-start; }
  .next .date .day { font-size: 44px; margin: 0; }
  .next .body { padding: 22px; }
}

.section-title { font-family: var(--serif); font-size: 24px; margin: 44px 0 12px; }
.rows { background: var(--sheet); border-radius: var(--r-lg); box-shadow: var(--shadow-sheet); overflow: hidden; }
.row {
  display: grid; grid-template-columns: 112px 1fr auto; gap: 16px; align-items: center;
  min-height: 72px; padding: 12px 20px; border-top: 1px solid var(--line-2);
  text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent;
}
.row:first-child { border-top: 0; }
a.row:hover, button.row:hover { background: var(--sheet-2); }
button.row { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; }
.row .d { font-weight: 700; font-variant-numeric: tabular-nums; }
.row .d small { display: block; font-weight: 400; color: var(--ink-2); font-size: 15px; }
.row .t { font-weight: 500; }
.row .t small { display: block; font-weight: 400; color: var(--ink-2); font-size: 15px; }
.row .end { display: flex; gap: 8px; align-items: center; color: var(--ink-3); }
.row .chev { width: 22px; height: 22px; color: var(--ink-3); }

.empty { padding: 48px 24px; text-align: center; color: var(--ink-2); display: grid; gap: 12px; justify-items: center; }
.empty h3 { font-family: var(--serif); font-size: 24px; color: var(--ink); }
.empty p { max-width: 44ch; }

/* ---------- Meeting: agenda + viewer ---------- */

/* The list slides over the page and closes after a choice, unless it's locked open (.pinned),
   which docks it beside the document. */
.meeting { display: grid; grid-template-columns: minmax(0, 1fr); height: 100vh; height: 100dvh; }
.meeting .rail { position: fixed; inset: 0 auto 0 0; width: min(400px, 92vw); z-index: 40; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 8px 0 32px rgba(0,0,0,.18); }
.meeting.rail-open .rail { transform: none; }
.meeting.rail-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 25, 20, .35); z-index: 39; }

.rail { display: flex; flex-direction: column; min-height: 0; background: var(--sheet); border-right: 1px solid var(--line); }
.rail-head { background: var(--spruce); color: var(--spruce-ink); padding: calc(12px + var(--safe-top)) 16px 18px; }
.rail-head .btn { color: var(--spruce-ink); background: transparent; border-color: transparent; padding: 0 12px 0 6px; margin-left: -6px; }
.rail-head .btn:hover { background: var(--spruce-2); }
.rail-head h1 { font-family: var(--serif); font-size: 24px; line-height: 1.2; margin-top: 8px; }
.rail-head .when { color: var(--spruce-dim); font-size: 16px; margin-top: 2px; }
.rail-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; padding-bottom: calc(24px + var(--safe-bottom)); }
.rail-search { padding: 12px 16px 4px; }

/* Binder-divider section tab */
.sec { margin-top: 18px; }
.sec-tab {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 0; background: var(--sheet);
  font-weight: 700; font-size: 15px; color: var(--ink-2);
}
.sec-tab::before {
  content: ""; width: 40px; height: 28px; border-radius: 0 8px 8px 0; background: var(--sec, var(--f-slate)); flex: none;
}
.sec-items { border-left: 6px solid var(--sec, var(--f-slate)); margin-left: 0; }

.item { padding: 10px 14px 12px 16px; border-top: 1px solid var(--line-2); }
.item:first-child { border-top: 0; }
.item-head { display: grid; grid-template-columns: 30px 1fr; gap: 4px 6px; width: 100%; text-align: left; background: none; border: 0; padding: 6px 0; cursor: pointer; border-radius: var(--r-sm); }
.item-head .n { font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.item-head .title { font-weight: 700; font-size: 18px; line-height: 1.3; }
.item-head .meta { grid-column: 2; font-size: 15px; color: var(--ink-2); }
.item.current > .item-head .title { color: var(--action); }
.item .act { display: inline-block; margin: 4px 0 0 36px; font-size: 14px; font-weight: 700; color: var(--ink-2); background: var(--line-2); border-radius: 999px; padding: 2px 10px; }

.docs { display: grid; gap: 2px; margin: 6px 0 0 30px; }
.doc {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center;
  min-height: var(--tap); padding: 6px 10px; border-radius: var(--r-md);
  background: none; border: 0; text-align: left; cursor: pointer; width: 100%;
  -webkit-tap-highlight-color: transparent;
}
.doc:hover { background: var(--sheet-2); }
.doc.current { background: var(--action-soft); }
.doc.current .dt { color: var(--action); font-weight: 700; }
.doc svg { width: 22px; height: 22px; color: var(--ink-3); }
.doc .dt { line-height: 1.3; font-size: 17px; }
.doc .marks { display: flex; gap: 4px; align-items: center; }
.doc .marks svg { width: 18px; height: 18px; color: var(--ink-3); }

.stage { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #d9ddd7; }
.toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: nowrap;
  min-height: calc(var(--topbar) + var(--safe-top)); padding: var(--safe-top) 10px 0;
  background: var(--sheet); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none;
}
.toolbar::-webkit-scrollbar { display: none; }
.toolbar .doc-title { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 80px; flex: 1; padding: 0 6px; }
.toolbar .sep { width: 1px; height: 30px; background: var(--line); margin: 0 4px; flex: none; }
.toolbar .btn { flex: none; }
.toolbar .btn.on { background: var(--action-soft); border-color: #bcd2ee; color: var(--action); }
.toolbar .pageno { font-variant-numeric: tabular-nums; font-size: 15px; color: var(--ink-2); white-space: nowrap; padding: 0 6px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--sheet); box-shadow: 0 0 0 1px var(--line); cursor: pointer; flex: none; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }

.pages { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 20px 16px calc(40px + var(--safe-bottom)); }
.pdf-page { position: relative; margin: 0 auto 38px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18), 0 6px 20px rgba(0,0,0,.08); }
.pdf-page canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pdf-page canvas.ink { pointer-events: none; }
.pages.drawing .pdf-page canvas.ink { pointer-events: auto; cursor: crosshair; }
.pages.drawing.finger-scroll .pdf-page canvas.ink { touch-action: pan-x pan-y pinch-zoom; }
.pages.drawing:not(.finger-scroll) .pdf-page canvas.ink { touch-action: none; }
.pdf-page .pno { position: absolute; bottom: -24px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--ink-3); }

.banner { display: flex; gap: 12px; align-items: center; padding: 10px 16px; font-size: 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.banner.warn { background: var(--alert-soft); color: #6d2a10; }
.banner.info { background: var(--action-soft); color: #173f73; }
.banner .btn { margin-left: auto; }
.banner > svg { width: 20px; height: 20px; flex: none; }

.doc-end { max-width: 640px; margin: 8px auto 0; display: flex; justify-content: center; }

.notes {
  position: absolute; top: calc(var(--topbar) + var(--safe-top)); right: 0; bottom: 0; width: min(380px, 100%);
  background: var(--sheet); border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgba(0,0,0,.08);
  display: flex; flex-direction: column; z-index: 5;
}
.notes header { display: flex; align-items: center; padding: 14px 12px 8px 20px; }
.notes header h2 { font-family: var(--serif); font-size: 22px; margin-right: auto; }
.notes .textarea { flex: 1; border: 0; border-radius: 0; padding: 4px 20px 20px; font-size: 18px; box-shadow: none; resize: none; background: transparent; }
.notes .textarea:focus { box-shadow: none; }
.notes footer { padding: 10px 20px calc(14px + var(--safe-bottom)); font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--line-2); }

.overview { flex: 1; overflow: auto; padding: 40px 32px; }
.overview .sheet { max-width: 720px; margin: 0 auto; background: var(--sheet); border-radius: var(--r-lg); box-shadow: var(--shadow-sheet); padding: 36px 40px; display: grid; gap: 18px; }
.overview h2 { font-family: var(--serif); font-size: 32px; line-height: 1.15; }
.overview .facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; font-size: 18px; }
.overview .facts dt { color: var(--ink-2); }
.overview .facts dd { margin: 0; font-weight: 500; }
.overview .desc { white-space: pre-line; }
.overview .sec-chip { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink-2); font-size: 15px; }
.overview .sec-chip::before { content: ""; width: 14px; height: 14px; border-radius: 3px; background: var(--sec); }

.agenda-toggle { display: inline-flex; }
.scrim { display: none; }

@media (max-width: 600px) {
  .toolbar .hide-narrow { display: none; }
  .overview { padding: 16px; }
  .overview .sheet { padding: 24px; }
}

/* ---------- Toasts & dialogs ---------- */

.toasts { position: fixed; inset: auto auto calc(24px + var(--safe-bottom)) 50%; margin: 0; border: 0; padding: 0; background: transparent; overflow: visible; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: toast-in .2s ease; }
.toast.error { background: var(--danger); }
.toasts:popover-open { display: grid; }
.toasts[popover]:not(:popover-open) { display: grid; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

dialog.modal { border: 0; padding: 0; border-radius: var(--r-lg); width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); box-shadow: 0 24px 64px rgba(0,0,0,.28); color: var(--ink); }
dialog.modal::backdrop { background: rgba(15, 25, 20, .45); }
dialog.modal form { display: grid; gap: 18px; padding: 28px; }
dialog.modal h2 { font-family: var(--serif); font-size: 26px; }
dialog.modal .buttons { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }

.menu { position: absolute; right: 12px; top: calc(var(--topbar) + var(--safe-top) - 4px); background: var(--sheet); color: var(--ink); border-radius: var(--r-md); box-shadow: 0 12px 36px rgba(0,0,0,.2); padding: 8px; min-width: 240px; z-index: 50; display: grid; }
.menu .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.menu .who small { display: block; color: var(--ink-2); }
.menu .btn { justify-content: flex-start; color: var(--ink); border: 0; }
.menu .btn:hover { background: var(--sheet-2); }

/* ---------- Admin ---------- */

.tabs { display: flex; gap: 6px; margin-bottom: 28px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 12px 16px; text-decoration: none; color: var(--ink-2); font-weight: 500; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--spruce); font-weight: 700; }

.panel { background: var(--sheet); border-radius: var(--r-lg); box-shadow: var(--shadow-sheet); padding: 24px; }
.panel + .panel { margin-top: 20px; }
.panel h2 { font-family: var(--serif); font-size: 22px; margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { margin: 0 auto 0 0; }
.form-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 16px; }
.form-grid .wide { grid-column: 1 / -1; }
@media (max-width: 820px) { .form-grid { grid-template-columns: 1fr 1fr; } }

.publish-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 20px; border-radius: var(--r-lg); margin-bottom: 20px; }
.publish-bar.draft { background: #f6efd9; }
.publish-bar.live { background: var(--ok-soft); }
.publish-bar p { margin-right: auto; font-size: 17px; }
.saved-state { font-size: 15px; color: var(--ink-2); min-width: 70px; }

.ed-item { display: grid; grid-template-columns: 8px 1fr; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--sheet); }
.ed-item + .ed-item { margin-top: 12px; }
.ed-item .strip { background: var(--sec, var(--f-slate)); }
.ed-item .inner { padding: 16px 18px; display: grid; gap: 14px; }
.ed-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: start; }
.ed-row .num { font-family: var(--serif); font-size: 26px; color: var(--ink-3); text-align: center; line-height: 48px; }
.ed-fields { display: grid; grid-template-columns: 1fr 200px; gap: 12px; }
.ed-fields .full { grid-column: 1 / -1; }
.ed-fields .trio { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 140px; gap: 12px; }
@media (max-width: 820px) { .ed-fields, .ed-fields .trio { grid-template-columns: 1fr; } }
.ed-moves { display: grid; gap: 6px; }
.ed-docs { display: grid; gap: 6px; margin-left: 56px; }
.ed-doc { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; background: var(--sheet-2); border-radius: var(--r-md); }
.ed-doc svg { width: 20px; height: 20px; color: var(--ink-3); }
.ed-doc .meta { font-size: 14px; color: var(--ink-2); }
.ed-doc .btns { display: flex; gap: 4px; }
.drop {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; border: 2px dashed #bfc7bf; border-radius: var(--r-md); color: var(--ink-2);
  cursor: pointer; font-weight: 500; text-align: center; padding: 8px 12px;
}
.drop:hover, .drop.over { border-color: var(--action); color: var(--action); background: var(--action-soft); }
.drop svg { width: 22px; height: 22px; }
.drop.busy { pointer-events: none; opacity: .7; }
.ed-collapse { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }

.table { width: 100%; border-collapse: collapse; font-size: 16px; }
.table th { text-align: left; font-weight: 500; color: var(--ink-2); padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 15px; }
.table td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

.bar { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; width: 140px; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }

.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--action); animation: spin .8s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 600px) {
  .hide-narrow { display: none !important; }
  .topbar { padding-left: 14px; padding-right: 8px; }
  .topbar .btn { padding: 0 12px; }
  .page { padding: 20px 14px 56px; }
  .row { grid-template-columns: 80px 1fr auto; padding: 12px 14px; }
}

/* ---------- Two-row document bar ---------- */
.stage { container-type: inline-size; }
.toolbar .doc-title { display: flex; flex-direction: column; justify-content: center; line-height: 1.2; }
.toolbar .doc-title small { font-weight: 400; font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.toolbar .doc-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
.toolbar.tools { min-height: 60px; padding-top: 0; background: var(--sheet-2); gap: 6px; }
.toolbar .grow { flex: 1; min-width: 8px; }
.toolbar .btn.tool { padding: 0 14px; gap: 8px; }
.toolbar .btn.tool .lbl { font-size: 16px; }
.toolbar .btn.has { color: var(--action); }
.doc-body { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.doc-body .notes { top: 0; }
@container (max-width: 860px) {
  .toolbar .btn.tool { padding: 0; width: var(--tap); }
  .toolbar .btn.tool .lbl { display: none; }
}
@container (max-width: 560px) {
  .toolbar .hide-narrow { display: none; }
  .toolbar .doc-title small { display: none; }
}
.topbar .brand b, .topbar .brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  .topbar .brand b { font-size: 17px; }
  .topbar .brand span { display: none; }
}

/* ---------- Company meetings in the rail ---------- */
.stage-wrap { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.stage-wrap > .stage { flex: 1; }
.co-head {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 16px; margin-top: 10px; border: 0; text-align: left; cursor: pointer;
  background: var(--spruce-2); color: var(--spruce-ink);
}
.co-head.general { background: var(--sheet-2); color: var(--ink); cursor: default; border-bottom: 1px solid var(--line); }
.co-head:not(.general):hover { background: var(--spruce); }
.co-head.current { box-shadow: inset 6px 0 0 var(--f-orange); }
.co-name { font-family: var(--serif); font-weight: 600; font-size: 18px; line-height: 1.2; flex: 1; min-width: 0; }
.co-status { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.14); white-space: nowrap; }
.co-head[data-status="InSession"] .co-status { background: #e3f2e8; color: var(--ok); }
.co-head[data-status="Recess"] .co-status { background: #fff3c4; color: #6b4e00; }
.co-head[data-status="Adjourned"] .co-status { background: transparent; color: var(--spruce-dim); padding-right: 0; }
.co-block .sec-tab { position: static; }
.co-empty { padding: 10px 16px; color: var(--ink-3); font-size: 15px; }
.co-items { margin: 0; padding-left: 26px; display: grid; gap: 8px; font-size: 18px; }
.co-items li { padding-left: 4px; }
.co-items .vote-chip { margin-left: 10px; }
.linkish { background: none; border: 0; padding: 4px 0; color: var(--action); font: inherit; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Vote chips on agenda items ---------- */
.item-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 0 36px; }
.item-chips .act { margin: 0; }
.vote-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--action-soft); color: var(--action); }
.vote-chip.live { background: var(--action); color: #fff; animation: pulse 1.6s ease-in-out infinite; }
.vote-chip.carried { background: var(--ok-soft); color: var(--ok); }
.vote-chip.failed { background: var(--alert-soft); color: var(--alert); }
@keyframes pulse { 50% { opacity: .65; } }

/* ---------- The vote bar ---------- */
.votebar {
  border-top: 4px solid var(--sec, var(--action));
  background: var(--sheet); box-shadow: 0 -6px 24px rgba(24, 35, 30, .12);
  padding: 14px 18px calc(14px + var(--safe-bottom));
  display: grid; gap: 12px; max-height: 60vh; overflow-y: auto; z-index: 6;
}
.vb-head { display: flex; align-items: flex-start; gap: 12px; }
.vb-live { flex: none; font-size: 13px; font-weight: 700; color: #fff; background: var(--action); border-radius: 999px; padding: 3px 10px; margin-top: 2px; }
.vb-title { display: grid; gap: 2px; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; min-width: 0; }
.vb-title strong { font-size: 18px; }
.vb-title span { color: var(--ink-2); font-size: 16px; }
.vb-vote { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.vb-choices { display: flex; gap: 10px; }
.vb-choice {
  min-width: 128px; min-height: 60px; padding: 0 22px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 20px; font-weight: 700; cursor: pointer; background: var(--sheet); border: 2px solid var(--line);
  -webkit-tap-highlight-color: transparent;
}
.vb-choice svg { width: 22px; height: 22px; }
.vb-choice.yes { color: var(--ok); border-color: #9ccfb0; }
.vb-choice.no { color: var(--danger); border-color: #eab0aa; }
.vb-choice.abstain { color: var(--ink-2); }
.vb-choice.yes.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.vb-choice.no.on { background: var(--danger); border-color: var(--danger); color: #fff; }
.vb-choice.abstain.on { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.vb-note { color: var(--ink-2); font-size: 16px; }
.vb-tally { display: grid; gap: 10px; }
.vb-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.vb-count { border-radius: var(--r-md); padding: 8px 12px; background: var(--sheet-2); display: grid; }
.vb-count b { font-family: var(--serif); font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.vb-count span { font-size: 14px; color: var(--ink-2); }
.vb-count.yes b { color: var(--ok); }
.vb-count.no b { color: var(--danger); }
.vb-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.vb-roll { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 16px; }
.vb-roll li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 16px; }
.vb-roll li b { font-weight: 700; }
.vb-roll li.yes b { color: var(--ok); }
.vb-roll li.no b { color: var(--danger); }
.vb-roll li.waiting b { color: var(--ink-3); font-weight: 400; }
@media (max-width: 600px) {
  .vb-choices { width: 100%; }
  .vb-choice { flex: 1; min-width: 0; padding: 0 8px; }
  .vb-counts { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Votes on item and company pages ---------- */
.votes-section { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 18px; }
.votes-section:empty { display: none; }
.votes-section h3 { font-family: var(--serif); font-size: 22px; }
.motion { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--r-md); background: var(--sheet-2); }
.motion-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.motion-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.session-status { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--r-md); background: var(--sheet-2); border-left: 6px solid var(--ink-3); }
.session-status.InSession { border-left-color: var(--ok); background: var(--ok-soft); }
.session-status.Adjourned { border-left-color: var(--spruce); }
.session-status.Recess { border-left-color: #d9b84a; background: #fff8dc; }
.session-status strong { font-size: 19px; }

/* Admin: agenda builder grouped by company */
.co-builder { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.co-builder + .co-builder { margin-top: 18px; }
.co-builder > header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--spruce-2); color: var(--spruce-ink); flex-wrap: wrap; }
.co-builder.general > header { background: var(--sheet-2); color: var(--ink); border-bottom: 1px solid var(--line); }
.co-builder > header h3 { font-family: var(--serif); font-size: 20px; margin-right: auto; }
.co-builder > header .btn { color: inherit; background: transparent; border-color: rgba(255,255,255,.25); }
.co-builder.general > header .btn { border-color: var(--line); }
.co-builder > .co-body { padding: 14px; display: grid; gap: 12px; }
.co-builder .ed-item + .ed-item { margin-top: 0; }
.vote-toggle { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.vote-toggle input { width: 22px; height: 22px; accent-color: var(--action); }

/* ---------- Agenda column in the familiar Call to Order layout ---------- */
:root {
  --cto-green: #2f9e44;
  --cto-green-ink: #ffffff;
  --cto-band: #f7e04b;
  --cto-band-ink: #2b2600;
  --cto-dark: #2b2f2c;
  --cto-month: #f7e04b;
}
.cto-head {
  display: flex; align-items: center; gap: 4px;
  padding: calc(10px + var(--safe-top)) 8px 10px 16px;
  background: var(--cto-green); color: var(--cto-green-ink);
}
.cto-title { font-weight: 700; font-size: 24px; margin-right: auto; letter-spacing: -0.01em; }
.cto-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 0; border-radius: var(--r-md); background: transparent; color: inherit; cursor: pointer;
}
.cto-icon:hover { background: rgba(0,0,0,.12); }
.cto-icon svg { width: 24px; height: 24px; }
/* Administrators get more buttons here; make room so the title still fits. */
.cto-head:has(> :nth-child(7)) { gap: 0; padding-left: 12px; }
.cto-head:has(> :nth-child(7)) .cto-title { font-size: 19px; }
.cto-head:has(> :nth-child(7)) .cto-icon { width: 36px; }
.cto-head:has(> :nth-child(7)) .cto-icon svg { width: 22px; height: 22px; }
.cto-pick { padding: 8px 10px; background: var(--sheet); border-bottom: 1px solid var(--line); }
.cto-picker {
  width: 100%; min-height: 44px; padding: 6px 36px 6px 12px; font-size: 17px;
  border: 1px solid #c3cac2; border-radius: var(--r-sm); background: var(--sheet); appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%234b5852' d='M5.5 7.5 10 12l4.5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 20px;
}
.cto-picker optgroup { color: #000; font-weight: 700; font-style: normal; }
.cto-picker option { color: var(--ink); font-weight: 400; }
.cto-meeting { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 12px; background: var(--cto-dark); color: var(--cto-month); }
.cto-meeting-name { flex: 1; background: none; border: 0; color: inherit; font: inherit; font-weight: 700; font-size: 22px; text-align: center; cursor: pointer; padding: 10px 0; }
.cto-meeting .cto-icon { color: var(--cto-month); }
.cto-meeting .cto-icon.on { color: #8fe3a5; }
.cto-meeting .cto-icon:hover { background: rgba(255,255,255,.1); }

.cto-list { background: var(--sheet); }
.cto-band {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 14px; border: 0; border-top: 1px solid rgba(0,0,0,.06);
  background: var(--cto-band); color: var(--cto-band-ink);
  font: inherit; font-weight: 700; font-size: 17px; line-height: 1.3; text-align: left; cursor: pointer;
}
.cto-band:hover { filter: brightness(.97); }
.cto-band.ref { font-family: var(--sans); display: flex; align-items: center; justify-content: space-between; gap: 8px; text-decoration: none; background: #2f3b36; color: #fff; font-weight: 700; font-size: 18px; margin-top: 10px; }
.cto-band.ref svg { width: 20px; height: 20px; flex: none; transition: transform .15s; }
.cto-band.ref { cursor: pointer; text-align: left; }
.cto-band.ref .co-name { flex: 1; }
.cto-band.ref .cto-ref-count { font-size: 14px; font-weight: 500; opacity: .8; }
.cto-band.ref svg.open { transform: rotate(90deg); }
.cto-ref-all { display: block; padding: 8px 14px 4px; }
.cto-item-head.ref { cursor: default; }
.cto-band.co { position: sticky; top: 0; z-index: 2; font-size: 18px; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.cto-band.co .co-name { font-family: var(--sans); font-weight: 700; font-size: 18px; }
.cto-band.co.current, .cto-general.current > .cto-band { box-shadow: inset 6px 0 0 var(--cto-green); }
.cto-band .co-status { background: rgba(0,0,0,.08); color: var(--cto-band-ink); }
.cto-band[data-status="InSession"] .co-status { background: var(--ok); color: #fff; }
.cto-band[data-status="Recess"] .co-status { background: #fff3c4; color: #6b4e00; box-shadow: inset 0 0 0 1px #d9b84a; }
.cto-band[data-status="Adjourned"] .co-status { background: transparent; color: #6b5f00; padding-right: 0; }
.cto-company + .cto-company, .cto-general + .cto-company { margin-top: 0; }

.cto-item { border-top: 1px solid var(--line-2); }
.cto-item.current { background: var(--action-soft); }
.cto-item-head { display: grid; gap: 2px; width: 100%; padding: 12px 14px 10px 26px; background: none; border: 0; text-align: left; cursor: pointer; font: inherit; }
.cto-item-title { font-size: 18px; line-height: 1.3; color: var(--ink); }
.cto-item.current .cto-item-title { color: var(--action); font-weight: 700; }
.cto-item-sub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cto-item-sub:empty { display: none; }
.cto-action { font-size: 14px; color: var(--ink-2); }
.vote-chip.plain { display: none; }

.cto-doc {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; width: 100%;
  min-height: 52px; padding: 8px 12px 8px 26px; background: none; border: 0; border-top: 1px solid var(--line-2);
  text-align: left; cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent;
}
.cto-doc.depth-2 { padding-left: 40px; background: var(--sheet-2); }
.cto-doc:hover { background: #eef1ec; }
.cto-doc.current { background: #d9d9d6; }
.cto-doc.current .cto-doc-title { font-weight: 700; }
.cto-doc-title { font-size: 17px; line-height: 1.3; color: var(--ink); }
.cto-marks { display: flex; gap: 6px; align-items: center; color: var(--ink-3); }
.cto-marks svg { width: 18px; height: 18px; }
.cto-marks .cto-pdf { width: 24px; height: 24px; color: var(--ink-2); }
.cto-company .co-empty { padding: 10px 26px; }

/* ---------- Lock the list open ---------- */
.pin-toggle.on { background: rgba(0,0,0,.18); }
.rail-head .cto-icon { color: var(--spruce-ink); }
@media (min-width: 700px) {
  .meeting.pinned { grid-template-columns: 380px minmax(0, 1fr); }
  .meeting.pinned .rail { position: static; transform: none; width: auto; box-shadow: none; z-index: auto; transition: none; }
  .meeting.pinned .scrim { display: none !important; }
  .meeting.pinned .agenda-toggle { display: none; }
}
@media (min-width: 700px) and (max-width: 1023px) { .meeting.pinned { grid-template-columns: 320px minmax(0, 1fr); } }
/* A phone is too narrow to keep both side by side. */
@media (max-width: 699px) { .pin-toggle { display: none; } }
.cto-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 1023px) { .cto-title { font-size: 21px; } .cto-head { gap: 0; padding-left: 12px; } .cto-icon { width: 40px; } }

/* ---------- Roll call ---------- */
.rollcall h3 { font-family: var(--serif); font-size: 22px; margin-right: auto; }
.rc-summary { font-size: 18px; }
.rc-list { list-style: none; margin: 0; padding: 0; display: grid; }
.rc-list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.rc-staff-head { margin: 14px 0 0; display: flex; justify-content: space-between; align-items: center; }
.rc-staff-head h4 { margin: 0; font-size: 16px; }
.rc-name { flex: 1; min-width: 150px; font-weight: 500; font-size: 18px; }
.rc-name small { display: block; font-weight: 400; font-size: 14px; color: var(--ink-2); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.seg-btn { min-height: 44px; min-width: 84px; padding: 0 12px; border: 0; border-left: 1px solid var(--line); background: var(--sheet); font: inherit; font-weight: 500; cursor: pointer; color: var(--ink-2); }
.seg-btn:first-child { border-left: 0; }
.seg-btn.inperson.on { background: var(--ok); color: #fff; }
.seg-btn.remote.on { background: var(--action); color: #fff; }
.seg-btn.absent.on { background: var(--ink-2); color: #fff; }

/* ---------- Recuse ---------- */
.vb-recuse {
  min-height: 48px; padding: 0 16px; border-radius: 10px; border: 1px dashed var(--line); background: transparent;
  font: inherit; font-weight: 500; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.vb-recuse svg { width: 18px; height: 18px; }
.vb-recuse.on { border-style: solid; border-color: #b08a1a; background: #f6efd9; color: #6b5200; }
.vb-counts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.vb-count.recused b { color: #8a6d12; }
.vb-roll li.recused b { color: #8a6d12; }
.vb-roll li.absent b { color: var(--ink-3); font-weight: 400; font-style: italic; }
@media (max-width: 600px) { .vb-counts { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Vote record ---------- */
.record { max-width: 760px; }
.record-tools { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.record-body { display: grid; gap: 8px; }
.record-body h2 { font-family: var(--serif); font-size: 30px; }
.record-body h3 { font-family: var(--serif); font-size: 21px; margin-top: 18px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.record-body h4 { font-size: 18px; margin: 10px 0 0; }
.record-motion { padding: 10px 14px; border-left: 4px solid var(--line); background: var(--sheet-2); border-radius: 0 var(--r-md) var(--r-md) 0; display: grid; gap: 4px; }
.record-motion.carried { border-left-color: var(--ok); }
.record-motion.failed { border-left-color: var(--danger); }
.record-motion.open { border-left-color: var(--action); }
.record-names { font-size: 16px; color: var(--ink-2); }


/* ---------- Phase 2: recording ---------- */
.recstrip { display: flex; align-items: center; gap: 10px; padding: 6px 16px; font-size: 15px; font-weight: 500; color: #fff; background: var(--danger); }
.recstrip.paused { background: var(--ink-2); }
.recstrip[hidden] { display: none; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: currentColor; flex: none; }
.recstrip.recording .rec-dot, .rec-big.on .rec-dot { animation: recpulse 1.6s ease-in-out infinite; }
.recstrip.paused .rec-dot { background: transparent; border: 2px solid currentColor; }
@keyframes recpulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .recstrip .rec-dot, .rec-big .rec-dot { animation: none !important; } }

.session-status.rec { border-left-color: var(--danger); background: var(--danger-soft); }
.session-status.paused { border-left-color: var(--ink-2); }
.recpanel { margin-top: 28px; }
.recpanel .banner { border: 0; border-radius: var(--r-md); margin-bottom: 10px; }
.rec-sources { list-style: none; margin: 16px 0 8px; padding: 0; display: grid; gap: 4px; }
.rec-sources > li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.rec-sources > li > svg { width: 24px; height: 24px; color: var(--ink-2); margin-top: 2px; }
.rec-sources > li > div { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.rec-sources span { color: var(--ink-2); }
.wx-row { display: flex; gap: 8px; width: 100%; max-width: 680px; flex-wrap: wrap; }
.wx-row .input { flex: 1 1 220px; min-width: 0; }
.wx-state { display: grid; gap: 2px; font-weight: 500; color: var(--ink) !important; padding-left: 12px; border-left: 4px solid var(--line); }
.wx-state.inmeeting { border-left-color: var(--ok); }
.wx-state.failed, .wx-state.retrying { border-left-color: var(--alert); }
.wx-state.dialing, .wx-state.joining { border-left-color: var(--action); }
.wx-state small { font-weight: 400; color: var(--ink-2); }

.recorder { max-width: 640px; }
.rec-big { display: flex; align-items: center; gap: 14px; margin: 18px 0 10px; padding: 22px 20px; border-radius: var(--r-lg); font-size: 24px; font-weight: 700; background: var(--sheet-2); color: var(--ink-2); }
.rec-big .rec-dot { width: 20px; height: 20px; }
.rec-big.on { background: var(--danger); color: #fff; }
.rec-big.ready { background: var(--ok-soft); color: var(--ok); }
.rec-big.off .rec-dot { background: transparent; border: 2px solid currentColor; }
.rec-level { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; margin-bottom: 8px; }
.rec-level span { display: block; height: 100%; width: 0; background: var(--ok); transition: width .08s linear; }

.transcript { max-width: 900px; }
.tr-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 14px 0 8px; }
.tr-search { display: flex; align-items: center; gap: 8px; flex: 1 1 260px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 12px; background: var(--sheet); }
.tr-search svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.tr-search .input { border: 0; padding-left: 0; box-shadow: none; outline: none; }
.tr-tools .seg-btn.on { background: var(--spruce); color: #fff; }
.tr-playbar { position: sticky; top: -40px; z-index: 2; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 -40px; padding: 10px 40px; background: var(--sheet); border-bottom: 1px solid var(--line-2); box-shadow: 0 6px 10px -8px rgba(24,35,30,.25); }
@media (max-width: 600px) { .tr-playbar { top: -16px; margin: 0 -24px; padding: 10px 24px; } }
.tr-player { height: 40px; max-width: 100%; }
.tr-parts { margin: 6px 0 14px; color: var(--ink-2); }
.tr-parts summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; }
.tr-parts ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; }
.tr-parts li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.tr-line { display: grid; grid-template-columns: auto auto 1fr; gap: 4px 12px; align-items: baseline; margin: 0; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.tr-time { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 8px 0 4px; border: 0; border-radius: var(--r-sm); background: transparent; font: inherit; font-size: 14px; color: var(--action); cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tr-time:hover { background: var(--action-soft); }
.tr-time svg { width: 14px; height: 14px; fill: currentColor; }
.tr-src { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px; border-radius: 4px; background: var(--line-2); color: var(--ink-2); }
.tr-src.webex { background: var(--action-soft); color: #173f73; }
.tr-line:not(:has(.tr-src)) { grid-template-columns: auto 1fr; }
.tr-text { line-height: 1.5; }
.tr-text mark { background: #fde68a; color: inherit; border-radius: 2px; }
.tr-mark { display: flex; gap: 12px; align-items: baseline; margin: 12px 0 6px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--sheet-2); border-left: 4px solid var(--ink-3); font-weight: 500; }
.tr-mark time { font-size: 14px; color: var(--ink-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.tr-mark.vote-opened, .tr-mark.vote-closed { border-left-color: var(--action); }
.tr-mark.session-called, .tr-mark.session-adjourned { border-left-color: var(--ok); }
.tr-mark.recording-paused { border-left-color: var(--ink); background: var(--line-2); }
@media (max-width: 560px) { .tr-line { grid-template-columns: auto 1fr; } .tr-line .tr-text { grid-column: 1 / -1; } }


/* ---------- Phase 3: drafts, action items, reports ---------- */
.card { background: var(--sheet); border-radius: var(--r-lg); box-shadow: var(--shadow-sheet); padding: 24px; display: grid; gap: 14px; }
.card + .card, .card + div { margin-top: 20px; }
.card h2 { font-family: var(--serif); font-size: 22px; }
.card h3 { font-size: 17px; }
.codeblock { font-family: ui-monospace, Consolas, monospace; font-size: 14px; background: var(--sheet-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; white-space: pre-wrap; }
.ok-text { color: var(--ok); } .warn-text { color: var(--alert); }
.banner.ok { background: var(--ok-soft); color: #14462b; }
.drafts-panel { margin-top: 28px; }
.count-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 6px; border-radius: 11px; background: var(--alert); color: #fff; font-size: 13px; font-weight: 700; }
.draft-list { list-style: none; margin: 8px 0; padding: 0; }
.draft-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); }
.draft-list li:first-child { border-top: 0; }
.dl-name { display: grid; font-weight: 500; }
.dl-name small { font-weight: 400; color: var(--ink-3); font-size: 14px; }
.dl-summary { background: var(--sheet-2); margin: 0 -12px; padding: 10px 12px !important; border-radius: var(--r-sm); }
.dchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.dchip svg { width: 14px; height: 14px; }
.dchip.ready { background: var(--action-soft); color: #173f73; }
.dchip.edited { background: #fff3cf; color: #6b4e00; }
.dchip.final { background: var(--ok-soft); color: var(--ok); }
.dchip.failed { background: var(--danger-soft); color: var(--danger); }
.dchip.busy { background: var(--action-soft); color: #173f73; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin 0.9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }

.draft-sheet { max-width: 860px; grid-template-columns: minmax(0, 1fr); }
.blocks, .blk { min-width: 0; }
.card dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.card dl.facts dd { margin: 0; }
.draft-tools { align-items: center; }
.draft-tools .saved-state { margin-right: auto; }
.draft-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--ink-2); }
.draft-legend .lg { display: inline-flex; align-items: center; gap: 8px; }
.draft-legend .lg::before { content: ""; width: 18px; height: 14px; border-radius: 3px; border-left: 4px solid; }
.lg.s-record::before { border-color: var(--line); background: var(--sheet-2); }
.lg.s-ai::before { border-color: #e0b100; background: #fff6d6; }
.lg.s-placeholder::before { border: 1px dashed var(--ink-3); }
.blocks { display: grid; gap: 4px; }
.blk { position: relative; display: flex; gap: 6px; align-items: flex-start; border-left: 4px solid transparent; border-radius: 4px; padding: 2px 4px 2px 8px; }
.blk.s-record { border-left-color: var(--line); }
.blk.s-ai { border-left-color: #e0b100; background: #fff9e3; }
.blk.s-placeholder { border: 1px dashed var(--ink-3); border-left-width: 4px; }
.blk.s-you { border-left-color: var(--action); }
.blk-text { flex: 1; min-width: 0; border: 0; background: transparent; resize: none; font: inherit; color: var(--ink); line-height: 1.5; padding: 6px 4px; overflow: hidden; border-radius: 4px; }
.blk-text:focus { outline: 2px solid var(--action); outline-offset: 0; background: #fff; }
.blk-text::placeholder { color: var(--ink-3); font-style: italic; }
.blk-text.t-title { font-family: var(--serif); font-size: 26px; font-weight: 700; text-align: center; }
.blk-text.t-subtitle { text-align: center; color: var(--ink-2); }
.blk-text.t-heading { font-weight: 700; font-size: 18px; margin-top: 10px; }
.blk.b-heading { margin-top: 8px; }
.blk-bullet { padding: 6px 0 0 4px; color: var(--ink-2); }
.blk-sig { width: 180px; border-bottom: 1px solid var(--ink-2); height: 30px; flex: none; }
.blk.b-signature { align-items: flex-end; margin-top: 18px; }
.blk-tools { display: none; gap: 2px; align-items: center; position: absolute; right: 4px; top: -34px; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px; box-shadow: var(--shadow-sheet); z-index: 3; }
.blk:focus-within .blk-tools { display: flex; }
.blk-type { font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 4px; padding: 4px; background: var(--sheet); }
.btn.sm.icon { min-width: 34px; min-height: 34px; padding: 0; }
.blk-add { padding: 8px 0 0 12px; }
.draft-print { display: none; }
.blk-sig.signed { width: auto; max-width: 220px; height: 54px; object-fit: contain; object-position: left bottom; border-bottom: 1px solid var(--ink-2); padding: 0 6px; }
.blk.b-rollcall { flex-wrap: wrap; }
.blk-text.t-rollcall { white-space: pre; column-count: 1; }
.blk-hint { flex-basis: 100%; font-size: 13px; color: var(--ink-3); padding: 0 4px 4px; }
.blk:not(:focus-within) .blk-hint { display: none; }

/* My signature */
.sig-pad-wrap { position: relative; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; height: 170px; touch-action: none; }
.sig-pad { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sig-pad-line { position: absolute; left: 34px; right: 18px; bottom: 44px; border-bottom: 1px solid #b8c0bc; pointer-events: none; }
.sig-pad-x { position: absolute; left: 14px; bottom: 42px; color: #9aa39f; font-size: 20px; pointer-events: none; }
.sig-preview { display: block; max-width: 100%; max-height: 90px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 10px; }
.sig-current { display: grid; gap: 4px; }
.sig-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.act-group + .act-group { margin-top: 18px; }
.act-group h3 { margin-bottom: 4px; }
.act-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.act { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; padding: 12px 14px; border-radius: var(--r-md); background: var(--sheet-2); border-left: 4px solid var(--action); }
.act.s-suggested { border-left-color: #e0b100; background: #fff9e3; }
.act.s-done, .act.s-dismissed { border-left-color: var(--line); color: var(--ink-2); }
.act.s-done strong { text-decoration: line-through; text-decoration-color: var(--ink-3); }
.act-main { display: grid; gap: 3px; min-width: 0; }
.act-meta { font-size: 14px; color: var(--ink-2); }
.act-quote { font-size: 14px; color: var(--ink-3); font-style: italic; }
.act-notes { font-size: 14px; }
.act-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) { .act { grid-template-columns: 1fr; } .act-btns { justify-content: flex-start; } .draft-list li { grid-template-columns: 1fr auto; } .draft-list li .dchip { grid-column: 1; justify-self: start; } }

.report-setup { margin-bottom: 20px; }
.file-list { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 6px; }
.file-list li { display: flex; align-items: center; gap: 10px; }
.file-list li svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.file-list li > span { display: grid; flex: 1; }
.file-list small { color: var(--ink-3); }
.meeting-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 16px; }
.check.small { min-height: 36px; font-size: 15px; }
.check.small input { width: 20px; height: 20px; }


/* ---------- Viewing as someone else ---------- */
.viewas-bar { position: fixed; z-index: 95; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--safe-bottom)); display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 999px; background: #3b2a6b; color: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.25); max-width: calc(100vw - 24px); font-size: 15px; }
.viewas-bar svg { width: 20px; height: 20px; flex: none; }
.viewas-bar .btn { background: #fff; color: #3b2a6b; border-color: #fff; }
body.viewing-as .votebar { bottom: 70px; }
@media (max-width: 600px) { .viewas-bar { border-radius: 14px; flex-wrap: wrap; justify-content: center; text-align: center; } }

/* ---------- People: recording permissions ---------- */
.perm-set { border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 14px 10px; margin: 0; display: grid; gap: 2px; }
.perm-set legend { padding: 0 6px; font-weight: 700; font-size: 15px; color: var(--ink-2); }

/* ---------- Recordings library ---------- */
.rec-list { list-style: none; margin: 0; padding: 0; }
.rec-list li { display: grid; grid-template-columns: minmax(200px, 1.3fr) 1fr auto; gap: 8px 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line-2); }
.rec-list li:first-child { border-top: 0; }
.rec-list li.locked { background: #fff8eb; margin: 0 -12px; padding: 14px 12px; border-radius: var(--r-sm); }
.rl-when { display: grid; }
.rl-when span { color: var(--ink-2); font-size: 15px; }
.rl-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; color: var(--ink-2); font-size: 15px; }
.rl-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) { .rec-list li { grid-template-columns: 1fr; } .rl-btns { justify-content: flex-start; } }

/* ---------- Backups ---------- */
.bk-status { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--r-lg); margin-bottom: 20px; border-left: 6px solid var(--ink-3); background: var(--sheet); box-shadow: var(--shadow-sheet); }
.bk-status > div { display: grid; gap: 2px; margin-right: auto; }
.bk-status strong { font-size: 19px; }
.bk-status span { color: var(--ink-2); }
.bk-status.ok { border-left-color: var(--ok); }
.bk-status.failed { border-left-color: var(--danger); background: var(--danger-soft); }
.bk-status.warn { border-left-color: var(--alert); }
.bk-status.running { border-left-color: var(--action); }
.dest-list { display: grid; gap: 4px; }
.check.dest { align-items: flex-start; padding: 8px 0; }
.check.dest input { margin-top: 2px; }
.check.dest span { display: grid; }
.check.dest small { color: var(--ink-2); font-size: 15px; }
.bk-key { display: grid; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line-2); }
.codeblock.key { word-break: break-all; }
.codeblock.test-out.ok { border-color: #b6dcc4; background: var(--ok-soft); }
.codeblock.test-out.bad { border-color: #f0c3be; background: var(--danger-soft); }
.codeblock.log { max-height: 50vh; overflow: auto; font-size: 13px; }
.bk-when { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.seg.days .seg-btn { min-width: 54px; }
.seg.days .seg-btn.on { background: var(--spruce); color: #fff; }
.sticky-save { padding: 16px 0 4px; }
.disk-bar { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; margin: 6px 0 2px; max-width: 420px; }
.disk-bar i { display: block; height: 100%; background: var(--action); }
.facts.space dd { display: grid; }
.facts.space small { color: var(--ink-3); }
.restore-help summary { cursor: pointer; font-weight: 500; min-height: 40px; display: flex; align-items: center; }
.bk-runs td { vertical-align: top; }

/* ---------- Manage → System ---------- */
.subnav { display: flex; gap: 6px; margin: -12px 0 22px; flex-wrap: wrap; }
.subnav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-2); background: var(--line-2); font-weight: 500; }
.subnav a.on { background: var(--spruce); color: var(--spruce-ink); font-weight: 700; }
.health-list { list-style: none; margin: 0; padding: 0; }
.hc { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 4px; border-top: 1px solid var(--line-2); }
.hc:first-child { border-top: 0; }
.hc-dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 5px; background: var(--ink-3); }
.hc.ok .hc-dot { background: var(--ok); } .hc.warn .hc-dot { background: var(--alert); } .hc.fail .hc-dot { background: var(--danger); }
.hc.off .hc-dot { background: transparent; border: 2px solid var(--line); } .hc.info .hc-dot { background: var(--action); }
.hc-main { display: grid; gap: 2px; }
.hc-area { font-size: 14px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.hc.fail .hc-area b { color: var(--danger); } .hc.warn .hc-area b { color: var(--alert); } .hc.ok .hc-area b { color: var(--ok); }
.hc-detail { color: var(--ink-2); font-size: 15px; overflow-wrap: anywhere; }
.hc-fix { font-size: 15px; background: var(--alert-soft); border-radius: var(--r-sm); padding: 6px 10px; margin-top: 4px; }
.hc.ok .hc-fix, .hc.info .hc-fix, .hc.off .hc-fix { background: var(--sheet-2); }
.ret-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.ret-row .select { width: auto; }
.table tr.locked td { background: var(--sheet-2); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }
details.help summary { cursor: pointer; font-weight: 700; }
details.help p { margin: 10px 0 0; }

/* ---------- Calendar ---------- */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; margin-bottom: 20px; }
@media (max-width: 980px) { .cal-layout { grid-template-columns: minmax(0, 1fr); } }
.cal-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.cal-head h2 { margin: 0 8px; min-width: 170px; text-align: center; }
.cal-head .btn.primary { margin-left: auto; }
.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-dow { font-size: 13px; color: var(--ink-3); text-align: center; padding: 6px 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--sheet-2); }
.cal-cell { min-height: 96px; padding: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell.out { background: var(--sheet-2); } .cal-cell.out .cal-num { color: var(--ink-3); }
.cal-num { font-size: 14px; font-weight: 700; padding: 2px 4px; align-self: flex-start; border-radius: 999px; }
.cal-cell.today .cal-num { background: var(--spruce); color: var(--spruce-ink); }
.cal-chip { all: unset; cursor: pointer; display: block; font-size: 12.5px; line-height: 1.3; padding: 2px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--c, var(--ink-3)); background: color-mix(in srgb, var(--c, var(--ink-3)) 12%, transparent); }
.cal-chip:focus-visible { outline: 2px solid var(--action); }
.cal-more { font-size: 12px; color: var(--ink-3); padding-left: 6px; }
.cal-meeting { --c: var(--spruce); } .cal-deadline { --c: var(--alert); } .cal-annual { --c: var(--f-violet); }
.cal-meeting-other { --c: var(--action); } .cal-other { --c: var(--ink-3); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; color: var(--ink-2); }
.cal-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 6px; }
.cal-list { list-style: none; margin: 0; padding: 0; }
.cal-li { all: unset; cursor: pointer; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 10px 6px; border-top: 1px solid var(--line-2); border-left: 4px solid var(--c, var(--ink-3)); padding-left: 10px; }
.cal-li:hover { background: var(--sheet-2); }
.cal-li-date { display: grid; text-align: center; font-size: 13px; color: var(--ink-2); }
.cal-li-date strong { font-size: 15px; color: var(--ink); }
.cal-li-main { display: grid; gap: 2px; min-width: 0; }
@media (max-width: 600px) { .cal-cell { min-height: 64px; } .cal-chip { font-size: 0; padding: 0; height: 6px; border-left: 0; background: var(--c); margin: 0 2px; } .cal-chip b { display: none; } .cal-head h2 { min-width: 0; } }

/* ---------- Room microphone on (any screen) ---------- */
.roombar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-bottom, 0px)); z-index: 60;
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 999px;
  background: #3a0d0a; color: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.25); max-width: calc(100vw - 24px); }
.roombar .rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #f3a29b; flex: none; }
.roombar .rec-dot.live { background: #ff3b30; animation: roompulse 1.4s ease-in-out infinite; }
@keyframes roompulse { 50% { opacity: .35; } }
.roombar-text { min-width: 0; font-size: 15px; }
.roombar-text small { opacity: .8; }
.roombar .btn { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
@media (max-width: 600px) { .roombar { left: 12px; right: 12px; transform: none; border-radius: 14px; } .roombar-text { font-size: 14px; } }
body.has-roombar.viewing-as .roombar { bottom: 64px; }
.tr-parts { background: var(--sheet-2); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 6px 14px 12px; }
.tr-parts summary { font-weight: 700; color: var(--ink); }
.tr-parts li .btn[aria-disabled="true"] { opacity: .4; cursor: default; }
.tr-parts li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.tr-parts li > small { grid-column: 2 / -1; }
@media (max-width: 600px) { .tr-parts li { grid-template-columns: auto minmax(0, 1fr); } .tr-parts li > .pill, .tr-parts li > button.ghost { grid-column: 2; justify-self: start; } }

/* ---------- Search past meetings ---------- */
.search-page { max-width: 900px; }
.search-form { display: flex; gap: 8px; margin: 14px 0 6px; }
.search-form .search-input { flex: 1; min-width: 0; font-size: 18px; }
.search-form .btn svg { width: 18px; height: 18px; }
.sr-count { font-weight: 600; margin: 18px 0 4px; }
.sr-meeting { margin-top: 22px; }
.sr-meeting h2 { font-size: 19px; margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.sr-meeting h2 a { color: inherit; }
.sr-meeting h2 small { font-family: var(--sans); font-size: 14px; font-weight: 400; color: var(--ink-3); }
.sr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sr { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.sr.sr-item { background: var(--sheet-2); }
.sr-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 17px; color: var(--action); text-decoration: none; }
.sr-title:hover span:first-of-type { text-decoration: underline; }
.sr-title svg { width: 20px; height: 20px; flex: none; color: var(--ink-3); }
.sr-open { margin-left: auto; color: var(--ink-3); font-weight: 400; }
.sr-where { font-size: 14px; color: var(--ink-2); margin: 2px 0 0 28px; }
.sr-snip { margin: 6px 0 0 28px; font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.sr mark { background: #fde98a; color: inherit; padding: 0 1px; border-radius: 2px; }
@media (max-width: 600px) { .sr-where, .sr-snip { margin-left: 0; } }

/* ---------- Help ---------- */
.help-page { max-width: 1100px; }
.help-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.help-head h1 { margin: 0; }
.help-head .search-form { flex: 1; min-width: 260px; margin: 0; }
.help-tabs { margin: 16px 0 0; }
.help-count { margin: 10px 0 0; }
.help-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; margin-top: 18px; }
.help-toc { position: sticky; top: 12px; align-self: start; max-height: calc(100vh - 24px); overflow: auto; font-size: 15px; }
.help-toc ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.help-toc li.l3 { padding-left: 14px; font-size: 14px; }
.help-toc a { color: var(--ink-2); text-decoration: none; display: block; padding: 3px 0; }
.help-toc a:hover { color: var(--action); text-decoration: underline; }
.help-body { background: var(--sheet); border-radius: var(--r-lg, 14px); padding: 28px 32px; box-shadow: var(--shadow-sheet); line-height: 1.6; font-size: 17px; }
.help-title { font-size: 28px; margin: 0 0 8px; }
.help-block h2 { font-size: 24px; margin: 34px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.help-block h3 { font-size: 19px; margin: 24px 0 6px; }
.help-block h3 small, .help-block h2 small { display: none; font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--ink-3); margin-left: 8px; }
.help-body.searching .help-block h3 small { display: inline; }
.help-body.searching .help-block h2 { border-top: 0; margin-top: 16px; }
.help-body ol, .help-body ul { padding-left: 24px; }
.help-body li { margin: 4px 0; }
.help-body code { font-size: 15px; background: var(--sheet-2); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
.help-tip { background: var(--action-soft); color: #173f73; border-radius: var(--r-md); padding: 10px 14px; margin: 12px 0; }
.help-fig { margin: 16px 0 20px; }
.help-fig img { display: block; max-width: 100%; max-height: 520px; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.help-fig figcaption { font-size: 14px; color: var(--ink-3); margin-top: 6px; }
.help-body.searching .help-intro { display: none; }
.help-body mark { background: #fde98a; color: inherit; padding: 0 1px; border-radius: 2px; }
@media (max-width: 860px) { .help-layout { grid-template-columns: 1fr; } .help-toc { position: static; max-height: none; } .help-body { padding: 18px; } }

/* ---------- Attendance report ---------- */
.att-page { max-width: 1100px; }
.att-controls { display: grid; gap: 14px; }
.att-dates, .att-rates { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.att-dates .field, .att-rates .field { margin: 0; min-width: 170px; }
.att-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.att-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; }
.att-head h2 { margin: 0; font-size: 21px; }
.att-actions { display: flex; gap: 8px; }
.att-table { width: 100%; border-collapse: collapse; background: var(--sheet); border-radius: var(--r-md); overflow: hidden; margin: 10px 0 18px; font-size: 16px; }
.att-table th, .att-table td { padding: 8px 12px; border-bottom: 1px solid var(--line-2, var(--line)); text-align: left; white-space: nowrap; }
.att-table th { font-size: 14px; color: var(--ink-2); font-weight: 600; background: var(--sheet-2); }
.att-table th small { display: block; font-weight: 400; color: var(--ink-3); }
.att-table .num { text-align: right; }
.att-table tfoot td { font-weight: 700; border-bottom: 0; }
.att-scroll { overflow-x: auto; }
.att-grid td.mk { text-align: center; font-weight: 600; }
.att-grid td.mk.Remote { color: #1c58a6; }
.att-grid td.mk.Absent { color: #9a2c1e; background: #fbecea; }
.att-grid th:not(:first-child) { text-align: center; }
.att-rates { display: grid; gap: 8px; }
.att-rate-table { border-collapse: collapse; width: 100%; max-width: 640px; }
.att-rate-table th { text-align: left; font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 4px 8px 4px 0; }
.att-rate-table td { padding: 4px 8px 4px 0; }
.att-rate-table .input { max-width: 140px; }
.att-rate-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ---------- Committees ---------- */
.cm-page { max-width: 1000px; }
.cm-page .page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cm-list { display: grid; gap: 18px; margin-top: 16px; }
.cm-card h2 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 22px; }
.cm-card h3 { font-size: 16px; margin: 16px 0 6px; }
.cm-card.inactive { opacity: .75; }
.cm-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cm-meetings { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cm-meetings li { display: grid; grid-template-columns: 130px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: var(--r-md); background: var(--sheet-2); }
.cm-when { display: grid; font-size: 15px; }
.cm-when span { color: var(--ink-3); font-size: 13px; }
.cm-what { display: grid; gap: 2px; min-width: 0; }
.cm-btns { display: flex; gap: 4px; }
.cm-members table { width: 100%; border-collapse: collapse; }
.cm-members td { padding: 2px 0; }
.cm-members legend { font-weight: 500; margin-bottom: 4px; }
.cm-chair { text-align: right; }
.cm-att { display: grid; gap: 6px; }
.cm-att-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cm-att-box { display: grid; gap: 8px; }
@media (max-width: 600px) { .cm-meetings li { grid-template-columns: 1fr; } }
.manage-back { margin: 0 0 6px -14px; }
.mb-page { max-width: 900px; }
.mb-pick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.mb-pick .field { margin: 0; min-width: 200px; }
.mb-table td { white-space: normal; }

/* ---------- Import from Call to Order ---------- */
.imp-intro p { margin-top: 0; }
.imp-steps { margin: 8px 0 14px; padding-left: 20px; display: grid; gap: 4px; }
.imp-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.imp-bar { width: 100%; height: 10px; margin: 6px 0; }
.imp-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; position: sticky; top: 64px; z-index: 2; }
.imp-summary p { margin: 0; }
.imp-list { display: grid; gap: 10px; margin-top: 12px; }
.imp-row { padding: 12px 16px; }
.imp-row.done { opacity: .75; }
.imp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.imp-head .check { min-width: 120px; }
.imp-when { width: 240px; max-width: 100%; }
.imp-kind { width: auto; }
.imp-flags { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.imp-date { margin: 4px 0 0 28px; }
.imp-details { margin: 6px 0 0 28px; }
.imp-details summary { cursor: pointer; font-size: .9rem; color: var(--ink-3); }
.imp-items, .imp-skip, .imp-warn { margin: 6px 0; padding-left: 18px; }
.imp-items ul { padding-left: 16px; margin: 2px 0 6px; }
.imp-warn li { color: var(--ink-2); }

/* ---------- Closed meetings ---------- */
.publish-bar.closed { background: var(--sheet-2); border: 1px solid var(--line); }
.publish-bar.closed p { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.publish-bar.closed svg, .closed-note svg { width: 18px; height: 18px; flex: none; }
.closed-lock { border: 0; padding: 0; margin: 0; min-width: 0; }
.closed-lock .panel { opacity: .9; }
.closed-lock [draggable="true"] { pointer-events: none; }
.closed-lock button:disabled, .closed-lock input:disabled, .closed-lock select:disabled, .closed-lock textarea:disabled { cursor: not-allowed; }
.closed-note { display: flex; align-items: center; gap: 8px; color: var(--ink-2); background: var(--sheet-2); padding: 10px 14px; border-radius: 10px; }
.pill svg { width: 12px; height: 12px; vertical-align: -1px; }
.closed-lock .input:disabled, .closed-lock .textarea:disabled, .closed-lock .select:disabled { background: var(--sheet-2); color: var(--ink-2); }

/* ---------- Signing out after a while ---------- */
.session-warn { max-width: 440px; padding: 26px 28px; }
.session-warn h2 { margin-bottom: 8px; }
.session-warn .buttons { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.session-warn .session-count { font-variant-numeric: tabular-nums; }
.signed-out-note { border-radius: 10px; margin: 0; }
.mb-legacy { display: block; border-radius: 10px; border-bottom: 0; margin: 12px 0; }
.mb-legacy p { margin: 0; }
.mb-legacy p + p { margin-top: 6px; }

/* ---------- No printing ----------
   Printed board materials can be left where others see them, so Board Book doesn't print:
   the browser's Print (Ctrl+P, the share menu) produces only this notice. */
@media print {
  html, body { background: #fff !important; }
  body > * { display: none !important; }
  body::before {
    content: "Printing is turned off in Board Book to keep board materials private. Read them on screen.";
    display: block; padding: 48px; font: 18px/1.5 system-ui, sans-serif; color: #000;
  }
  body.printing-on::before { content: "To print a document, use the Print button above it in Board Book. To print the whole packet, use Print the packet on the meeting page."; }
}

/* ---------- Report fact check ---------- */
.fact-check { margin-top: 16px; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--sheet-2); }
.fact-check h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; }
.fact-check h3 svg { width: 18px; height: 18px; }
.fact-check.ok { background: var(--ok-soft); border-color: transparent; }
.fact-check.warn { background: var(--alert-soft); border-color: transparent; }
.fact-check ol { margin: 8px 0; padding-left: 20px; display: grid; gap: 8px; }
.fact-check q { display: block; font-style: italic; }
.fact-check li span { display: block; font-size: 14px; color: var(--ink-2); }

/* ---------- Speakers in the transcript ---------- */
.tr-who { font-weight: 700; margin-right: 6px; white-space: nowrap; }
.tr-who::after { content: ":"; }
.tr-who.unnamed { color: var(--ink-3); font-weight: 600; }
.tr-speakers { margin: 14px 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--sheet-2); }
.tr-speakers summary { cursor: pointer; font-weight: 600; }
.spk-list { margin: 10px 0; padding-left: 0; list-style: none; display: grid; gap: 12px; }
.spk-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spk-pick { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.spk-pick .select { width: auto; min-width: 200px; }
.spk-pick .input { width: 180px; }
.spk-samples { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 15px; color: var(--ink-2); }
.spk-samples li { display: flex; gap: 8px; align-items: baseline; }

/* ---------- Correct the times ---------- */
.tl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 55vh; overflow: auto; }
.tl-steps li { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: center; }
.tl-time { width: 190px; min-width: 190px; }
@media (max-width: 560px) { .tl-steps li { grid-template-columns: auto auto; } .tl-what { grid-column: 1 / -1; } }
.tl-what { display: grid; gap: 2px; font-size: 15px; }
.tl-what span + span { color: var(--ink-3); font-size: 14px; }
.tl-add { border-top: 1px solid var(--line); padding-top: 10px; }
.tl-add h3 { margin: 0 0 4px; font-size: 16px; }
.tl-add-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tl-add-row .select { width: auto; }

/* Report notes */
.rn-group { margin-bottom: 22px; }
.rn-group h3 { margin: 0 0 8px; font-size: 18px; }
.rn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rnote { background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
.rnote.off { opacity: .7; }
.rnote.off .rn-head strong { text-decoration: line-through; text-decoration-color: var(--ink-3); }
.rnote.used { background: var(--line-2); }
.rn-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rn-head .check strong { font-size: 16px; }
.rn-text { margin: 0; white-space: pre-wrap; font-size: 15px; color: var(--ink-2); }
.rn-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rn-files li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rn-files li.off .linkish { color: var(--ink-3); }
.rn-files .linkish { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.rn-files .linkish svg { width: 18px; height: 18px; }
.rn-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.src-notes { border-top: 1px solid var(--line); padding-top: 12px; margin: 6px 0 12px; }
.src-notes h3 { margin: 0 0 8px; font-size: 16px; }
.src-notes .rnote { padding: 10px 12px; }

/* Manage → System → Board features */
.feature-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; background: var(--sheet); }
.feature-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.feature-head > div { display: flex; align-items: center; gap: 10px; }
.feature-head h3 { margin: 0; }
.feature-card p { margin: 4px 0; }
.login .forgot-link { justify-self: start; margin-top: 2px; }

/* Votes entered by the secretary (online voting off) */
.vb-enter { display: grid; gap: 8px; }
.vb-enter-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.vb-roll.vb-enter-list { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); max-height: 38vh; overflow-y: auto; }
.vb-enter-list li { align-items: center; }
.vb-enter-choices { display: inline-flex; gap: 4px; }
.vb-pick { min-height: 36px; min-width: 56px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--sheet); font: inherit; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.vb-pick.on.yes { background: var(--ok); border-color: var(--ok); color: #fff; }
.vb-pick.on.no { background: var(--danger); border-color: var(--danger); color: #fff; }
.vb-pick.on.abstain { background: var(--ink-3); border-color: var(--ink-3); color: #fff; }
.vb-pick.on.recused { background: #8a6d12; border-color: #8a6d12; color: #fff; }
@media (max-width: 600px) { .vb-roll.vb-enter-list { grid-template-columns: 1fr; } .vb-pick { min-width: 0; } }

/* ---------- Library: Current / Superseded ---------- */
.pill.current { background: color-mix(in srgb, var(--f-green) 18%, transparent); color: var(--ink); }
.pill.superseded { background: var(--sheet-2); color: var(--ink-2); border: 1px solid var(--line); }
.ed-doc .standing { display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.ed-doc .standing .check { gap: 4px; }
.ed-doc.is-superseded > div:first-of-type { color: var(--ink-2); }
.superseded-note { margin: 0 0 12px; }
.ed-doc:has(.standing) { grid-template-columns: 24px 1fr auto auto; }
@media (max-width: 760px) { .ed-doc:has(.standing) { grid-template-columns: 24px 1fr; } .ed-doc .standing, .ed-doc:has(.standing) .btns { grid-column: 2; } }
.imp-skipped { margin: 8px 0 0; padding: 6px 12px; background: var(--sheet-2); border-radius: var(--r-md); border-left: 3px solid var(--warn, #b7791f); }
.imp-skipped p { margin: 0; }
