/* San Andreas State Council portal - "Capitol Classic" design system.
   Change the palette by editing the custom properties in :root only. */

@font-face { font-family: "Public Sans"; src: url("/fonts/public-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/fonts/source-serif-4-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }

:root {
  --navy-950: #07142a;
  --navy-900: #0b1f3a;
  --navy-800: #12305a;
  --navy-700: #1b4378;
  --blue-600: #1f5a99;
  --blue-100: #e3ecf7;
  --gold-500: #c9a24b;
  --gold-700: #8a6a1f;
  --gold-100: #f3ead3;
  --paper: #f4f2ee;
  --surface: #ffffff;
  --line: #d9d4ca;
  --line-soft: #e8e3d9;
  --ink: #1b2433;
  --muted: #4a5568;
  --ok: #14532d;
  --ok-bg: #dff1e4;
  --warn: #7a3e00;
  --warn-bg: #fbe9cf;
  --danger: #8b1a1a;
  --danger-bg: #f8e0e0;
  --focus: #1f5a99;
  --font-sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sidebar-w: 264px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-sans); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--navy-900); text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--navy-900); line-height: 1.2; margin: 0; }
h1 { font-size: 30px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 12px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--navy-900); color: #fff; padding: 10px 14px; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }
.ref { font-weight: 600; color: var(--navy-900); white-space: nowrap; }
.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* ---------- buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid var(--navy-900); background: var(--navy-900); color: #fff; font: 600 14px var(--font-sans); letter-spacing: .02em; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--navy-800); color: #fff; text-decoration: none; }
.btn--ghost { background: var(--surface); color: var(--navy-900); }
.btn--ghost:hover { background: var(--blue-100); color: var(--navy-900); }
.btn--gold { background: var(--gold-500); border-color: var(--gold-500); color: var(--navy-950); }
.btn--gold:hover { background: #d8b45f; color: var(--navy-950); }
.btn--danger { background: var(--surface); border-color: var(--danger); color: var(--danger); }
.btn--danger:hover { background: var(--danger-bg); color: var(--danger); }
.btn--sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--blue-600); cursor: pointer; }
.linklike:hover { text-decoration: underline; color: var(--navy-900); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .label { font-weight: 600; font-size: 14px; color: var(--navy-900); }
.field .hint { font-size: 13px; color: var(--muted); }
.field .error { font-size: 13px; color: var(--danger); font-weight: 600; }
input[type=text], input[type=search], input[type=date], input[type=datetime-local], input[type=number], input[type=file], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #b5ad9b; background: #fff; font: inherit; color: var(--ink); border-radius: 0;
}
textarea { min-height: 110px; resize: vertical; }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--danger); background: #fff8f8; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; }
.filters .field { flex: 1 1 150px; }
.filters .field.grow { flex: 2 1 240px; }

/* ---------- badges */
.badge { display: inline-block; padding: 2px 9px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; background: #e9e6df; color: #3b4352; }
.badge--scheduled, .badge--open, .badge--submitted, .badge--under-review, .badge--pending-approval, .badge--council-vote, .badge--public, .badge--direct { background: var(--blue-100); color: #0b3b73; }
.badge--in-progress, .badge--hearing, .badge--committee-review, .badge--internal { background: var(--gold-100); color: #5c4510; }
.badge--completed, .badge--approved, .badge--passed, .badge--adopted, .badge--active, .badge--sent, .badge--yes { background: var(--ok-bg); color: var(--ok); }
.badge--cancelled, .badge--rejected, .badge--failed, .badge--restricted, .badge--no, .badge--suspended { background: var(--danger-bg); color: var(--danger); }
.badge--postponed, .badge--confidential, .badge--deferred { background: var(--warn-bg); color: var(--warn); }
/* Justice Council statuses */
.badge--accepted, .badge--granted, .badge--granted-conditional, .badge--support, .badge--not-guilty, .badge--eligible { background: var(--ok-bg); color: var(--ok); }
.badge--declined, .badge--denied, .badge--dismissed, .badge--oppose, .badge--vacated, .badge--guilty, .badge--plea-guilty { background: var(--danger-bg); color: var(--danger); }
.badge--returned, .badge--partially-granted, .badge--neutral, .badge--sealed, .badge--appealed, .badge--not-yet { background: var(--warn-bg); color: var(--warn); }
.badge--screening, .badge--prosecutor-opinion, .badge--trial-scheduled, .badge--issued, .badge--verdict-issued { background: var(--blue-100); color: #0b3b73; }
.badge--hearing-set { background: var(--gold-100); color: #5c4510; }

/* ---------- cards, tables */
.card { background: var(--surface); border: 1px solid var(--line); }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.card__head h2, .card__head h3 { font-size: 18px; }
.card__body { padding: 16px 18px; }
.card__body > :last-child { margin-bottom: 0; }
.card + .card { margin-top: 20px; }
.grid > .card + .card, .grid > .stack + .stack { margin-top: 0; }
.card__head .stamp { width: 72px; height: 72px; margin: -6px 0; }
.table-wrap { overflow-x: auto; position: relative; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border-bottom: 2px solid var(--navy-900); white-space: nowrap; background: #faf8f4; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #faf8f4; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px 20px; margin: 0; }
.kv dt { font-weight: 600; color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--navy-900); margin-bottom: 6px; }
.empty p { max-width: 460px; margin: 0 auto 14px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 4px; font-size: 14px; color: var(--muted); }
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.stack > * + * { margin-top: 20px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.list > li:last-child { border-bottom: 0; }
.list-title { font-weight: 600; color: var(--navy-900); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--gold-700); text-transform: uppercase; }

/* ---------- tabs, timeline, steps */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 2px solid var(--navy-900); margin-bottom: 18px; }
.tabs a { padding: 10px 16px; font-weight: 600; font-size: 14px; color: var(--muted); background: #ebe8e0; border: 1px solid var(--line); border-bottom: 0; text-decoration: none; }
.tabs a:hover { background: var(--blue-100); color: var(--navy-900); }
.tabs a[aria-current=page] { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; background: var(--navy-900); border: 2px solid var(--surface); border-radius: 50%; }
.timeline .when { font-size: 12px; color: var(--muted); font-weight: 600; }
.stepper { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); background: var(--surface); }
.stepper li { flex: 1 1 110px; list-style: none; padding: 10px 12px; border-right: 1px solid var(--line-soft); font-size: 13px; font-weight: 600; color: var(--muted); }
.stepper li[aria-current=step] { background: var(--navy-900); color: #fff; }
.stepper li.done { background: var(--blue-100); color: var(--navy-900); }
.stepper { padding: 0; margin: 0; }

/* ---------- alerts and toasts */
.notice { padding: 12px 16px; border: 1px solid var(--line); border-left: 4px solid var(--blue-600); background: var(--surface); margin-bottom: 16px; }
.notice--warn { border-left-color: var(--gold-500); background: #fffaf0; }
.notice--danger { border-left-color: var(--danger); background: #fff6f6; }
.toasts { position: fixed; right: 16px; top: 16px; z-index: 60; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--navy-900); color: #fff; border-left: 4px solid var(--gold-500); box-shadow: 0 6px 18px rgba(7, 20, 42, .28); }
.toast--error { background: var(--danger); border-left-color: #f3b4b4; }
.toast button { background: none; border: 0; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; margin-left: auto; }
dialog.confirm { border: 1px solid var(--navy-900); padding: 0; max-width: 440px; width: calc(100vw - 32px); }
dialog.confirm::backdrop { background: rgba(7, 20, 42, .55); }
dialog.confirm .card__body { padding: 20px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 0 20px 20px; }

/* ---------- public site */
.gov-strip { background: var(--navy-950); color: #c9d3e3; font-size: 13px; }
.gov-strip .wrap { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.gov-strip a { color: #fff; }
.gov-strip .on { font-weight: 600; border-bottom: 2px solid var(--gold-500); padding-bottom: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 14px; color: inherit; }
.brand:hover { text-decoration: none; }
.brand img { width: 64px; height: 64px; }
.brand__name { font-family: var(--font-serif); font-weight: 700; font-size: 25px; letter-spacing: .03em; color: var(--navy-900); line-height: 1.1; }
.brand__sub { font-size: 14px; color: var(--muted); margin-top: 3px; }
.site-nav { background: var(--navy-900); }
.site-nav .wrap { display: flex; flex-wrap: wrap; padding: 0 16px; }
.site-nav a { color: #d7dfec; font-size: 12px; font-weight: 600; letter-spacing: .05em; padding: 14px 9px; border-bottom: 3px solid transparent; text-decoration: none; }
.site-nav a:hover { color: #fff; background: var(--navy-800); }
.site-nav a[aria-current=page] { color: #fff; border-bottom-color: var(--gold-500); }
.hero { background: var(--navy-900); border-bottom: 4px solid var(--gold-500); color: #fff; position: relative; overflow: hidden; }
.hero .wrap { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 64px; position: relative; }
.hero__copy { flex: 1 1 460px; min-width: 0; }
.hero h1 { color: #fff; font-size: 52px; font-weight: 700; line-height: 1.08; margin: 12px 0 18px; }
.hero p { color: #d7dfec; font-size: 20px; line-height: 1.55; max-width: 520px; margin-bottom: 28px; }
.hero .eyebrow { color: var(--gold-500); }
.hero__seal { flex: 0 1 340px; display: flex; justify-content: center; position: relative; }
.hero__seal img { width: min(340px, 100%); filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .35)); }
.hero__capitol { position: absolute; right: -30px; bottom: -6px; width: 620px; max-width: 80%; opacity: .5; pointer-events: none; }
.site-main { padding: 36px 0 56px; }
.site-main .wrap > * + * { margin-top: 28px; }
.page-title { padding-top: 28px; padding-bottom: 4px; }
.page-title h1 { font-size: 34px; }
.page-title p { color: var(--muted); margin: 6px 0 0; max-width: 720px; }
.tile { display: block; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--navy-900); color: var(--ink); }
.tile:hover { text-decoration: none; border-top-color: var(--gold-500); background: #fffdf8; }
.tile strong { display: block; font-family: var(--font-serif); font-size: 20px; color: var(--navy-900); margin-bottom: 6px; }
.tile span { color: var(--muted); font-size: 14px; }
.portal-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.portal-split .card { padding: 24px; }
.portal-split .card--public { border-top: 4px solid var(--blue-600); }
.portal-split .card--internal { border-top: 4px solid var(--navy-900); }
.map-band { position: relative; border: 1px solid var(--line); background: #cfe0ee; overflow: hidden; }
.map-band img { display: block; width: 100%; height: 320px; object-fit: cover; object-position: 6% 58%; }
.map-band__cards { position: absolute; inset: auto 0 0 0; display: flex; flex-wrap: wrap; gap: 1px; background: rgba(11, 31, 58, .88); }
.map-band__cards a { flex: 1 1 160px; padding: 14px 16px; color: #fff; font-family: var(--font-serif); font-weight: 600; font-size: 18px; border-right: 1px solid rgba(255, 255, 255, .15); }
.map-band__cards a:hover { background: var(--navy-800); text-decoration: none; }
.map-band__cards small { display: block; font: 400 12px var(--font-sans); color: #c9d3e3; }
.profile-card { display: flex; gap: 16px; align-items: flex-start; }
.avatar { width: 52px; height: 52px; flex: none; border-radius: 50%; background: var(--navy-900); color: var(--gold-500); display: grid; place-items: center; font: 700 17px var(--font-sans); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.site-footer { background: var(--navy-900); border-top: 4px solid var(--gold-500); color: #c9d3e3; font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 56px; padding-top: 36px; padding-bottom: 36px; }
.site-footer a { color: #fff; }
.site-footer h4 { font: 700 12px var(--font-sans); letter-spacing: .12em; color: var(--gold-500); text-transform: uppercase; margin-bottom: 8px; }
.prose { max-width: 760px; font-family: var(--font-serif); font-size: 17px; line-height: 1.7; white-space: pre-line; }
.transcript { white-space: pre-wrap; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.6; background: #faf8f4; border: 1px solid var(--line); padding: 16px; max-height: 560px; overflow: auto; }
.login-box { max-width: 480px; margin: 48px auto; text-align: center; padding: 36px 32px; }
.login-box img { width: 140px; margin-bottom: 14px; }
.stamp { width: 110px; opacity: .92; }
.watermark { position: relative; }
.watermark::after { content: ""; position: absolute; inset: 0; background: url("/img/seal-bw.webp") center 60% / 280px no-repeat; opacity: .04; pointer-events: none; }

/* ---------- internal app shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { flex: 0 0 var(--sidebar-w); width: var(--sidebar-w); background: var(--navy-900); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; align-self: flex-start; height: 100vh; overflow-y: auto; }
.sidebar__brand { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid #1f3a63; color: #fff; }
.sidebar__brand:hover { text-decoration: none; color: #fff; }
.sidebar__brand img { width: 46px; height: 46px; }
.sidebar__brand strong { display: block; font-family: var(--font-serif); font-size: 15px; letter-spacing: .04em; line-height: 1.2; }
.sidebar__brand span { font-size: 11px; letter-spacing: .12em; color: var(--gold-500); font-weight: 600; }
.sidebar nav { padding: 10px 0 20px; }
.sidebar nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 42px; padding: 0 20px; border-left: 4px solid transparent; color: #d7dfec; font-size: 12.5px; font-weight: 600; letter-spacing: .07em; text-decoration: none; }
.sidebar nav a:hover { background: var(--navy-800); color: #fff; }
.sidebar nav a[aria-current=page] { background: var(--navy-800); border-left-color: var(--gold-500); color: #fff; }
.sidebar nav .sep { height: 1px; background: #1f3a63; margin: 8px 20px; }
.count { background: var(--gold-500); color: var(--navy-950); font-size: 11px; font-weight: 700; padding: 1px 7px; min-width: 20px; text-align: center; }
.count[hidden] { display: none; }
.main-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 28px; display: flex; align-items: center; gap: 12px; justify-content: space-between; min-height: 56px; }
.topbar__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.icon-btn.menu-btn { display: none; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--navy-900); font-weight: 600; }
.crumbs .sep { color: #a39b88; }
.topbar__right { display: flex; align-items: center; gap: 12px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; background: var(--surface); border: 1px solid #b5ad9b; color: var(--navy-900); cursor: pointer; }
.icon-btn:hover { background: var(--blue-100); text-decoration: none; }
.icon-btn .count { position: absolute; top: -7px; right: -7px; }
.me { text-align: right; font-size: 13px; line-height: 1.3; }
.me strong { display: block; color: var(--navy-900); }
.content { padding: 26px 28px 48px; max-width: 1480px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 720px; }
.app-footer { margin-top: auto; padding: 14px 28px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); background: var(--surface); }
.stat { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); }
.stat strong { display: block; font: 700 26px var(--font-serif); color: var(--navy-900); }
.stat span { font-size: 13px; color: var(--muted); }
.vote-bar { display: flex; height: 14px; background: #e9e6df; margin: 10px 0; }
.vote-bar i { display: block; height: 100%; }
.vote-bar .y { background: var(--blue-600); } .vote-bar .n { background: #b26b00; } .vote-bar .a { background: #8c8c8c; }
.matrix th, .matrix td { text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix .cat td { background: #f1ede3; font-weight: 700; color: var(--navy-900); text-align: left; }
.matrix input[type=checkbox] { width: 18px; height: 18px; }
.pdf-frame { width: 100%; height: 78vh; border: 1px solid var(--line); background: #fff; }
.json { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--muted); word-break: break-word; }

/* ---------- responsive */
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(7, 20, 42, .55); }
  .icon-btn.menu-btn { display: inline-grid; }
  .topbar, .content, .app-footer { padding-left: 16px; padding-right: 16px; }
  .me { display: none; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .grid--2, .grid--3, .grid--4, .portal-split, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 18px; }
  .brand__name { font-size: 20px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .site-nav a { padding: 12px 11px; }
  h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  .sidebar, .topbar, .app-footer, .toasts, .btn-row, .site-nav, .gov-strip { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; }
}

/* ---------- private messages */
.thread { padding: 18px; max-height: 62vh; overflow-y: auto; }
.msg { max-width: 760px; margin: 0 0 14px; padding: 12px 14px; background: #faf8f4; border: 1px solid var(--line); border-left: 4px solid #b5ad9b; }
.msg--mine { margin-left: auto; background: var(--blue-100); border-left-color: var(--blue-600); }
.msg__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.msg__meta strong { color: var(--navy-900); }
.msg__body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg__actions { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; margin-top: 8px; font-size: 13px; }
.mention { background: var(--gold-100); color: #5c4510; padding: 0 3px; font-weight: 600; }
.quote { margin: 0 0 8px; padding: 6px 10px; border-left: 3px solid var(--gold-500); background: rgba(255, 255, 255, .6); color: var(--muted); font-size: 13.5px; }
.chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; }
.divider { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; color: var(--gold-700); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--gold-500); }

/* ---------- printable verdict */
.print-paper { background: #fff; }
.paper { max-width: 820px; margin: 0 auto; padding: 36px 28px 56px; }
.paper__head { display: flex; align-items: center; gap: 20px; border-bottom: 3px double var(--gold-500); padding-bottom: 16px; margin-bottom: 18px; }
.paper__court { font-family: var(--font-serif); font-weight: 700; font-size: 26px; letter-spacing: .06em; color: var(--navy-900); }
.paper__sub { font-size: 14px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.paper__meta { margin-bottom: 18px; }
.paper h2 { margin: 22px 0 10px; }
.paper__sign { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 48px; gap: 24px; }
.paper__sign .line { width: 260px; border-top: 1px solid var(--ink); margin-bottom: 6px; }
@media print { .noprint { display: none !important; } .paper { padding: 0; } }

/* ---------- larger profile photo */
.avatar--lg { width: 112px; height: 112px; font-size: 32px; }

/* ---------- calendar */
.cal-toolbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.cal { border: 1px solid var(--line); background: var(--surface); }
.cal__head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--navy-900); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.cal__head div { padding: 8px 10px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal__cell { min-height: 118px; padding: 6px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal__cell:nth-child(7n) { border-right: 0; }
.cal__cell.is-out { background: #faf8f4; }
.cal__cell.is-out .cal__d { color: #9b947f; }
.cal__cell.is-today { background: #fffaf0; box-shadow: inset 0 0 0 2px var(--gold-500); }
.cal__num { display: flex; justify-content: space-between; font-weight: 700; color: var(--navy-900); text-decoration: none; }
.cal__label { display: none; }
.cal__more { font-size: 12px; font-weight: 600; }
.cal-ev { display: block; padding: 2px 6px; font-size: 12.5px; line-height: 1.35; border-left: 3px solid var(--blue-600); background: var(--blue-100); color: #0b3b73; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev:hover { text-decoration: none; filter: brightness(.96); color: inherit; }
.cal-ev__time { font-weight: 700; }
.cal-ev--trial { border-left-color: var(--gold-500); background: var(--gold-100); color: #5c4510; }
.cal-ev--council-session { border-left-color: var(--gold-500); background: var(--navy-900); color: #fff; }
.cal-ev--committee-meeting, .cal-ev--regional-meeting { border-left-color: #2e7d4f; background: var(--ok-bg); color: var(--ok); }
.cal-ev--document-deadline, .cal-ev--voting-deadline { border-left-color: #b26b00; background: var(--warn-bg); color: var(--warn); }
@media (max-width: 720px) {
  .cal__head { display: none; }
  .cal__grid { grid-template-columns: minmax(0, 1fr); }
  .cal__cell.is-out, .cal__cell.is-empty { display: none; }
  .cal__cell { min-height: 0; border-right: 0; }
  .cal__label { display: inline; }
  .cal__d { display: none; }
  .cal-ev { white-space: normal; }
}

/* ---------- photo viewer */
a.avatar--link { cursor: zoom-in; text-decoration: none; }
a.avatar--link:hover { box-shadow: 0 0 0 3px var(--gold-500); }
.view-photo { font-size: 13px; font-weight: 600; margin-left: 6px; white-space: nowrap; }
dialog.lightbox { border: 1px solid var(--navy-900); padding: 16px; max-width: min(92vw, 560px); background: var(--surface); }
dialog.lightbox::backdrop { background: rgba(7, 20, 42, .72); }
dialog.lightbox figure { margin: 0 0 12px; }
dialog.lightbox img { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: #faf8f4; }
dialog.lightbox figcaption { margin-top: 8px; text-align: center; font-family: var(--font-serif); font-weight: 600; color: var(--navy-900); }
dialog.lightbox form { text-align: center; }
