/* Arkleg Watch design system - palette and type from docs/STYLE-GUIDE.md §7-8 */

/* Self-hosted (SIL OFL, licences beside the files): a font CDN would be third-party tracking the
   privacy page says we do not do. Latin subset, variable weight. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.65850a373e25.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/source-serif-4-latin.6a682eb0234e.woff2") format("woff2");
}

:root {
  /* Committee Navy (#092536) mixed toward Paper. 600 is Steel darkened ~12% toward navy so
     secondary text clears WCAG AA (4.5:1) on Paper; brand Steel #667985 itself is 4.27. */
  --navy-900: #092536;
  --navy-800: #2d4552;
  --navy-700: #51646f;
  --navy-600: #5b6e7b;
  --navy-500: #8e999e;
  --navy-400: #adb4b7;
  --navy-300: #cacecd;
  --navy-200: #DDDAD2; /* Rule */
  --navy-100: #ecebe8;
  --navy-50: #f3f2ed;

  /* Editorial Red: [sic], active timeline position, search highlights, selected controls.
     Keep it under ~10% of a screen (IMPROVEMENT-BRIEF item 26). */
  --red: #B4232D;
  --red-dark: #8f1c24;
  --red-100: #fce8e9;

  --text-primary: #172026; /* Ink */
  --text-heading: var(--navy-900);
  --text-secondary: var(--navy-600);
  --text-muted: var(--navy-600);
  --bg-page: #FAF8F3; /* Paper */
  --bg-card: #ffffff;
  --bg-hover: var(--navy-50);
  --bg-active: var(--navy-100);
  --border: var(--navy-200);
  --border-light: var(--navy-100);
  /* Navy hue lifted to 3:1 against Ink, so a link reads as a link without an underline (WCAG 1.4.1). */
  --link: #256f9d;
  --link-hover: var(--navy-900);
  --focus-ring: var(--red);
  --error-bg: #fee2e2;
  --error-border: #fca5a5;
  --success-bg: #d1fae5;
  --success-border: #6ee7b7;
  --success-text: #065f46;
  --error-text: #991b1b;
  --sic: var(--red);
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: var(--navy-100);
    --text-heading: var(--navy-50);
    --text-secondary: var(--navy-300);
    --text-muted: var(--navy-400);
    --bg-page: var(--navy-900);
    --bg-card: #183242;
    --bg-hover: #273f4e;
    --bg-active: #3a515e;
    --border: #475c68;
    --border-light: #273f4e;
    --link: #8cc3e8;
    --link-hover: #ffffff;
    --red: #f0727a;
    --red-dark: #d44850;
    --red-100: #3d1a1c;
    --error-bg: #450a0a;
    --error-border: #7f1d1d;
    --success-bg: #064e3b;
    --success-border: #065f46;
    --success-text: #6ee7b7;
    --error-text: #fca5a5;
  }
}

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  padding: 0 1rem 3rem;
  font: 16px/1.6 var(--sans);
  color: var(--text-primary);
  background: var(--bg-page);
  max-width: 1200px;
  margin-inline: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 { line-height: 1.2; margin: 1.5rem 0 0.75rem; font-weight: 600; color: var(--text-heading); }
h1, h2 { font-family: var(--serif); } /* STYLE-GUIDE §9: H1/H2 serif, H3 down Inter */
h1 { font-size: 2rem; margin-top: 0; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
p { margin: 0.75rem 0; }
a { color: var(--link); text-decoration: none; word-wrap: break-word; overflow-wrap: break-word; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.9em; background: var(--bg-hover); padding: 0.125rem 0.25rem; border-radius: 3px; }
/* Pale-red editorial highlighting for search matches (STYLE-GUIDE §7, IMPROVEMENT-BRIEF item 14) */
mark { background: var(--red-100); color: var(--text-primary); padding: 0 0.125rem; border-bottom: 1px solid var(--red); }
kbd { font-family: inherit; font-size: 0.75rem; border: 1px solid var(--border); border-radius: 3px; padding: 0.125rem 0.375rem; background: var(--bg-card); }

/* Skip link */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 999; padding: 0.5rem 1rem; background: var(--navy-900); color: white; }
.skip-link:focus { left: 0; }

/* Header & nav */
header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 2rem;
  margin: 0 -1rem 2rem; padding: 1rem;
  background: var(--navy-900); color: var(--navy-50);
  border-bottom: 1px solid var(--navy-800);
}
.site-title { font-size: 1.5rem; font-weight: 700; margin: 0; color: inherit; }
.site-title a { color: inherit; text-decoration: none; }
.site-tagline { color: var(--navy-300); font-size: 0.9rem; margin: 0.125rem 0 0; }
.brand { gap: 0.75rem; }
.brand img { flex: none; }
.brand-name { font-family: var(--serif); font-weight: 600; padding-left: 0.75rem; border-left: 1px solid var(--navy-500); }

/* Horizontal mark + tagline (STYLE-GUIDE §6, §25) */
.wordmark-lockup { margin: 0.5rem 0 2rem; }
.wordmark { font-family: var(--serif); font-weight: 600; font-size: clamp(2.25rem, 6vw, 3.5rem); line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
.wordmark .sic { color: var(--sic); }
.wordmark-tagline { margin: 0.5rem 0 0; color: var(--text-secondary); font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; }
nav { display: flex; gap: 0.25rem 1.25rem; flex-wrap: wrap; align-items: center; }
nav a { font-weight: 500; color: var(--navy-100); padding: 0.5rem 0; display: inline-block; min-height: 44px; line-height: 1.5; }
nav a:hover, nav a[aria-current="page"] { color: white; text-decoration: underline; text-underline-offset: 4px; }
nav a[aria-current="page"] { text-decoration-color: var(--red); text-decoration-thickness: 2px; }
nav form { display: inline; margin: 0; }
nav button.small { background: transparent; border: 1px solid var(--navy-500); color: var(--navy-100); }
nav button.small:hover { background: var(--navy-700); }

/* Footer */
footer { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.875rem; }
footer p { margin: 0.5rem 0; }

/* Forms */
label { display: block; font-weight: 500; margin-bottom: 0.25rem; color: var(--text-primary); }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="search"], select, textarea {
  font: inherit;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
  color: var(--text-primary);
  width: 100%;
  min-height: 44px;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="date"]:focus, input[type="search"]:focus, select:focus, textarea:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-color: var(--focus-ring);
}
textarea { min-height: 5rem; resize: vertical; }
button, .btn {
  font: inherit;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  background: var(--navy-700);
  color: white;
  cursor: pointer;
  display: inline-block;
}
button:hover, .btn:hover { background: var(--navy-600); text-decoration: none; }
button:focus-visible, .btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
button.secondary { background: transparent; color: var(--link); border: 1px solid var(--border); }
button.secondary:hover { background: var(--bg-hover); color: var(--link-hover); }
button.danger { background: var(--red); color: var(--bg-page); } /* Paper on red 6.2:1; navy on dark-mode red 5.6:1 */
button.danger:hover { background: var(--red-dark); }
button.small { padding: 0.375rem 0.625rem; font-size: 0.875rem; min-height: 44px; }

.form-grid { display: grid; gap: 1rem; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: end; }
.form-row > * { flex: 1 1 auto; min-width: 10rem; }
.form-help { font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem; }

/* Cards */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 1.25rem; margin: 1rem 0; }
.card-grid { display: grid; gap: 1rem; }

/* Badges */
.badge { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.5rem; border-radius: 3px; background: var(--navy-100); color: var(--navy-700); margin-left: 0.375rem; }
.badge.success { background: var(--success-bg); color: var(--success-text); }
.badge.error { background: var(--error-bg); color: var(--error-text); }
.badge.muted { background: var(--bg-hover); color: var(--text-muted); }
.badge.beta { background: var(--navy-900); color: #fff; vertical-align: middle; text-transform: uppercase; letter-spacing: 0.05em; }

/* Tables */
table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
th, td { text-align: left; padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--border-light); vertical-align: top; }
th { font-weight: 600; color: var(--text-primary); background: var(--bg-hover); }
tr:hover { background: var(--bg-hover); }

/* Search & filters */
.search-hero { margin: 2.5rem 0 2rem; max-width: 52rem; }
.search-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 0.5rem; }
.lede { font-size: 1.125rem; color: var(--text-secondary); margin: 0 0 1.25rem; }
.hero-form { display: flex; gap: 0.5rem; }
.hero-form input { flex: 1; font-size: 1.125rem; padding: 0.75rem 1rem; }
.hero-form button { font-size: 1.05rem; padding: 0.75rem 1.5rem; }
.hero-search-box { display: flex; gap: 0.5rem; flex: 1; }
.hero-tagline { color: var(--text-secondary); margin: 1rem 0 0.5rem; font-style: italic; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.filters { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: end; margin: 1rem 0; }
.filters input[type="search"], .filters input[name="q"] { flex: 1 1 20rem; }
.filters label { margin: 0; }
.filters label input, .filters label select { margin-top: 0.25rem; }
.more-filters { flex: 1 1 100%; }
.more-filters > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--text-secondary); }
.more-filters > summary::before { content: "▸"; margin-right: 0.4rem; }
.more-filters[open] > summary::before { content: "▾"; }
.filter-fields { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; }

.nowrap { white-space: nowrap; }
td.time { width: 11rem; font-size: 0.9rem; color: var(--text-secondary); }
@media (max-width: 600px) {
  /* Phones: every table becomes a stack of cards, one row per card, so no
     column is ever hidden behind a sideways scroll. */
  table, thead, tbody, tr, th, td { display: block; width: auto; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tr { padding: 0.625rem 0.25rem; border-bottom: 1px solid var(--border-light); }
  td, th { padding: 0.125rem 0; border: none; }
  td.time, td.nowrap { display: inline; color: var(--text-secondary); font-size: 0.875rem; }
  td.time::before { content: " · "; }
  td.time:empty { display: none; }
  td:empty { display: none; }
  td a { display: inline-block; padding: 0.25rem 0; }
  td .badge { margin: 0.25rem 0.25rem 0 0; }
}
.pagination a, .pagination .current { min-height: 44px; display: inline-flex; align-items: center; }
.seek { display: inline-block; padding: 0.25rem 0.375rem; margin: -0.25rem 0; }
details.bills > summary { cursor: pointer; padding: 0.5rem 0; min-height: 44px; display: list-item; }
details.bills > summary h3 { display: inline; margin: 0; }
.tab { display: inline-flex; align-items: center; min-height: 44px; }
.copy-link { font-size: 0.7rem; padding: 0.1rem 0.3rem; margin-left: 0.5rem; }
@media (pointer: coarse) { .copy-link { font-size: 0.9rem; padding: 0.4rem 0.6rem; } }
/* Inline padding grows the hit box without moving the line box, so it is
   safe at every width; the 44px floor is what a thumb needs. */
.site-title a { display: inline-flex; align-items: center; min-height: 44px; }
footer a, .hit a, .alert-card-content a, .meta a, .meeting-meta a { padding: 0.75rem 0.125rem; }
/* Search results */
.hit { padding: 1rem; border-bottom: 1px solid var(--border-light); }
.hit:hover { background: var(--bg-hover); }
.hit-meta { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.25rem; }
.hit-snippet { margin-top: 0.5rem; overflow-wrap: anywhere; }

/* Quote-first result cards (IMPROVEMENT-BRIEF item 13) */
.hit.quote-first { padding: 1.5rem 1rem; }
.quote-text { font-size: 1.125rem; line-height: 1.6; color: var(--text-primary); margin-bottom: 0.75rem; font-family: var(--serif); }
.quote-meta { margin: 0.75rem 0; }
.speaker-name { font-size: 1rem; margin-bottom: 0.25rem; }
.meeting-context { font-size: 0.875rem; color: var(--text-muted); }
.separator { margin: 0 0.375rem; }
.quote-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin-top: 0.75rem; }
.play-button { display: inline-flex; align-items: center; gap: 0.375rem; background: var(--navy-700); color: white; padding: 0.5rem 1rem; border-radius: 4px; font-weight: 500; min-height: 44px; }
.play-button:hover { background: var(--navy-600); text-decoration: none; }
.source-count { font-size: 0.75rem; }
.show-context { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); padding: 0.375rem 0.75rem; font-size: 0.875rem; }
.show-context:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Context expansion (IMPROVEMENT-BRIEF item 15) */
.context-expansion { margin-top: 1rem; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; }
.context-expansion .loading { color: var(--text-muted); font-style: italic; }
.context-before, .context-after { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; margin: 0.5rem 0; }
.context-current { font-weight: 600; }
.context-actions { margin-top: 0.75rem; display: flex; gap: 0.5rem; }
/* Example chips */
.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; }
.chip { padding: 0.5rem 1rem; background: var(--bg-hover); border: 1px solid var(--border); border-radius: 16px; font-size: 0.875rem; color: var(--text-primary); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.chip:hover { background: var(--bg-active); text-decoration: none; }
/* Filter chips (IMPROVEMENT-BRIEF item 11) */
.filter-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; padding: 0.75rem; background: var(--bg-hover); border-radius: 6px; }
.filter-label { font-weight: 600; color: var(--text-primary); }
.chip.removable { background: var(--bg-card); border: 1px solid var(--border); padding: 0.5rem 0.75rem; position: relative; padding-right: 2rem; }
.chip.removable a { color: var(--text-muted); font-weight: bold; position: absolute; right: 0.5rem; text-decoration: none; padding: 0.25rem 0.5rem; }
.chip.removable a:hover { color: var(--text-primary); }
.clear-filters { color: var(--link); font-size: 0.875rem; margin-left: auto; }

/* Search tips popover (IMPROVEMENT-BRIEF item 12) */
.search-tips-trigger { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); font-size: 0.875rem; }
.search-tips-trigger:hover { background: var(--bg-hover); color: var(--text-primary); }
.search-tips-dialog { border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; max-width: 32rem; }
.search-tips-dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
.search-tips-dialog h3 { margin-top: 0; }
.search-tips-dialog dl { margin: 1rem 0; }
.search-tips-dialog dt { font-weight: 600; margin-top: 1rem; }
.search-tips-dialog dd { margin: 0.25rem 0 0 0; color: var(--text-secondary); }
.search-tips-dialog form { margin-top: 1.5rem; display: flex; justify-content: flex-end; }



/* Entity lists (People/Meetings groups) */
.entity-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.5rem; margin: 1rem 0; }
.entity-item { padding: 0.75rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; }
.entity-link { font-weight: 600; display: block; margin-bottom: 0.25rem; }
.entity-meta { font-size: 0.875rem; color: var(--text-muted); }
/* Coverage stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; margin: 2rem 0; }
.stat { text-align: center; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--text-primary); display: block; }
.stat-label { font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem; }
.stat-note { font-size: 0.75rem; margin-top: 0.25rem; }
.stats-page .stats { margin: 0.75rem 0 2rem; }

/* Homepage trust bar (brief item 22): one compact line, not a stat grid */
.trust-bar { margin: 1.25rem 0 2rem; color: var(--text-secondary); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.trust-bar strong { color: var(--text-heading); font-weight: 600; }

/* Upcoming meetings grouped by day (brief item 24) */
.day-group { margin: 1.25rem 0; }
.day-group h3 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); margin: 0 0 0.5rem; }
.agenda { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border-light); }
.agenda li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.25rem 1rem; padding: 0.625rem 0; border-bottom: 1px solid var(--border-light); }
.agenda .when { color: var(--text-heading); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 0.9375rem; }
.agenda .what { min-width: 0; }
.agenda .where { display: block; color: var(--text-muted); font-size: 0.875rem; }
@media (max-width: 40rem) { .agenda li { grid-template-columns: 1fr; } }
.committee-chamber { display: block; color: var(--text-muted); font-size: 0.8125rem; }

/* Meeting page */
.meeting-header { margin: 2rem 0 1.5rem; }
.meeting-meta { color: var(--text-muted); font-size: 0.875rem; margin: 0.5rem 0; }
.grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 2rem; margin: 1.5rem 0; }
@media (max-width: 900px) { .grid { grid-template-columns: minmax(0, 1fr); } }

/* Video */
video { width: 100%; max-width: 100%; height: auto; background: #000; border-radius: 4px; }

/* Transcript */
.transcript { max-height: 70vh; overflow-y: auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; padding: 0.5rem; }
.seg { padding: 0.375rem 0.5rem; cursor: pointer; border-radius: 3px; transition: background 150ms; }
.seg:hover { background: var(--bg-hover); }
.seg.now { background: var(--bg-active); box-shadow: inset 3px 0 0 var(--red); } /* active timeline position: red (item 26) */
.seg time { color: var(--link); font-variant-numeric: tabular-nums; margin-right: 0.5rem; font-size: 0.875rem; }
.seg .speaker { color: var(--text-primary); font-weight: 600; }
.seg .speaker.unnamed { color: var(--text-secondary); font-weight: 400; font-style: italic; }

/* Disclaimer box */
.disclaimer { background: var(--error-bg); border: 1px solid var(--error-border); border-radius: 4px; padding: 0.75rem 1rem; margin: 1rem 0; font-size: 0.9rem; }

/* Utility classes */
.meta, .muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Messages (Django messages framework) */
.messages { margin: 1rem 0; }
.message { padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 0.5rem; }
.message.success { background: var(--success-bg); border: 1px solid var(--success-border); color: var(--success-text); }
.message.error { background: var(--error-bg); border: 1px solid var(--error-border); color: var(--error-text); }
.message.info { background: var(--navy-100); border: 1px solid var(--navy-300); color: var(--navy-900); }

/* Pagination */
.pagination { display: flex; gap: 0.5rem; align-items: center; margin: 1.5rem 0; justify-content: center; }
.pagination a, .pagination .current { padding: 0.375rem 0.75rem; border: 1px solid var(--border); border-radius: 4px; }
.pagination a:hover { background: var(--bg-hover); text-decoration: none; }
.pagination .current { background: var(--navy-900); color: white; font-weight: 600; box-shadow: inset 0 -2px 0 var(--red); }

/* Focus visible - ensure keyboard navigation is clear */
*:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Voices page (keep existing layout) */
body.voices { max-width: 1400px; }
.queue { max-height: 80vh; overflow-y: auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; }
.queue a { display: block; padding: 0.5rem 0.75rem; text-decoration: none; color: inherit; border-bottom: 1px solid var(--border-light); }
.queue a:hover { background: var(--bg-hover); }
.queue a.cur { background: var(--bg-active); font-weight: 600; }
.tag { font-size: 0.75rem; padding: 0.125rem 0.5rem; border-radius: 3px; background: var(--navy-100); color: var(--navy-700); }
.tag.corroborated { background: transparent; color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--navy-500); }
.tag.verified { background: var(--success-bg); color: var(--success-text); }
.tag.rejected { background: var(--error-bg); color: var(--error-text); }
.tag.unnamed { background: var(--navy-100); color: var(--navy-600); }
.review { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.75rem 0; }
.review input[name=name] { flex: 1 1 18rem; }

/* Alert cards - responsive layout */
.alert-card-layout { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.alert-card-content { flex: 1; min-width: 0; }
.alert-card-actions { display: flex; flex-direction: column; gap: 0.5rem; flex-shrink: 0; }
@media (max-width: 480px) {
  .alert-card-layout { flex-direction: column; }
  .alert-card-actions { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .alert-card-actions .btn,
  .alert-card-actions button { flex: 1 1 auto; min-width: max-content; }
}

/* Print styles */
@media print {
  @page { margin: 2cm; }
  body { max-width: none; padding: 0; color: black; background: white; }
  header, nav, footer, .skip-link, button, .btn { display: none; }
  a { color: black; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
  .transcript { max-height: none; overflow: visible; border: none; }
  .seg { cursor: default; page-break-inside: avoid; }
  .seg:hover { background: none; }
  .grid { display: block; }
  video { display: none; }
  h1, h2, h3 { page-break-after: avoid; }
}

/* Meeting workspace tabs and layout (IMPROVEMENT-BRIEF items 16-21) */
.meeting-header { margin-bottom: 1.5rem; }
.meeting-meta { display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: baseline; color: var(--text-secondary); margin: 0.5rem 0; }
.meeting-meta .separator { margin: 0 0.25rem; }
.meeting-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }

.meeting-tabs { display: flex; gap: 0.25rem; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.meeting-tab { padding: 0.75rem 1rem; border: none; background: none; color: var(--text-secondary); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color 0.2s, border-color 0.2s; }
.meeting-tab:hover { color: var(--text-primary); text-decoration: none; }
.meeting-tab.active { color: var(--text-primary); border-bottom-color: var(--red); font-weight: 600; }

.meeting-workspace { position: relative; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Video container with sticky/mini player (IMPROVEMENT-BRIEF item 17) */
.video-slot { margin-bottom: 1.5rem; }
.video-container video { width: 100%; border-radius: 4px; background: black; }

.video-container.sticky { position: fixed; bottom: 1rem; right: 1rem; width: 320px; z-index: 1000; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); border-radius: 4px; }
.video-container.sticky video { border-radius: 4px; }
.video-status { margin: 0.25rem 0 0; }
.video-status:empty { display: none; }
.video-container.sticky .video-status { background: var(--bg-card); padding: 0.25rem 0.5rem; }

@media (max-width: 768px) {
  .video-container.sticky { bottom: 0; right: 0; left: 0; width: 100%; border-radius: 0; }
  .video-container.sticky video { border-radius: 0; }
}

/* Machine-generated notice (IMPROVEMENT-BRIEF item 19) */
.machine-notice { background: var(--bg-card); border-left: 3px solid var(--navy-400); padding: 1rem; margin: 1rem 0; }
.machine-notice strong { display: block; margin-bottom: 0.25rem; }
.machine-notice p { margin: 0; color: var(--text-secondary); font-size: 0.875rem; }
.transcript-details { margin-top: 0.75rem; }
.transcript-details summary { cursor: pointer; color: var(--link); font-size: 0.875rem; }
.transcript-details dl { margin: 0.5rem 0 0 0; display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; font-size: 0.875rem; }
.transcript-details dt { font-weight: 600; }
.transcript-details dd { margin: 0; color: var(--text-secondary); }

/* Topic summary with timestamps (IMPROVEMENT-BRIEF item 20) */
.topic-summary { margin-top: 1rem; }
.topic-item { margin-bottom: 1.5rem; }
.topic-item p { margin: 0 0 0.5rem 0; }
.topic-actions { display: flex; gap: 0.75rem; }
.play-link { color: var(--link); text-decoration: none; font-weight: 500; }
.play-link:hover { text-decoration: underline; }

/* Speaker-grouped transcript (IMPROVEMENT-BRIEF item 18) */
.transcript-grouped { margin-top: 1rem; }
.speaker-turn { background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; padding: 1rem; margin-bottom: 1rem; }
.speaker-header { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.speaker-name { font-size: 1rem; color: var(--text-primary); }
.speaker-name.unnamed { color: var(--text-secondary); font-style: italic; }
.speaker-time { color: var(--text-secondary); font-size: 0.875rem; }
.speaker-text { line-height: 1.6; margin-bottom: 0.75rem; }
.speaker-text .seg { cursor: pointer; }
.speaker-text .seg:hover { background: var(--bg-hover); }
.speaker-text .seg.now { background: var(--bg-active); box-shadow: inset 3px 0 0 var(--red); font-weight: 500; }
.speaker-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: baseline; }
.link-btn { background: none; border: 0; padding: 0; color: var(--text-muted); font: inherit; font-size: 0.85em; cursor: pointer; text-decoration: none; }
.link-btn:hover { color: var(--link); text-decoration: underline; }
#report-dialog { max-width: 32rem; width: calc(100% - 2rem); }
#report-dialog label { display: block; margin: 0.75rem 0; }
#report-dialog select, #report-dialog input, #report-dialog textarea { display: block; width: 100%; margin-top: 0.25rem; }
.play-btn { color: var(--link); text-decoration: none; font-weight: 500; cursor: pointer; }
.play-btn:hover { text-decoration: underline; }

/* Agenda chapters (IMPROVEMENT-BRIEF item 21) */
.agenda-chapters { margin-top: 1rem; }
.chapter-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; padding: 1rem; margin-bottom: 1rem; }
.chapter-card h3 { margin: 0 0 0.5rem 0; font-size: 1.125rem; }
.chapter-meta { display: flex; gap: 1rem; align-items: baseline; margin-bottom: 0.75rem; color: var(--text-secondary); font-size: 0.875rem; }
.chapter-time { font-weight: 600; color: var(--text-primary); }
.chapter-actions { display: flex; gap: 0.75rem; }

/* Speakers list */
.speakers-list { margin-top: 1rem; }
.speaker-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; padding: 1rem; margin-bottom: 0.75rem; display: flex; justify-content: space-between; align-items: center; }
.speaker-info { display: flex; gap: 0.5rem; align-items: baseline; }
.speaker-info .unnamed { color: var(--text-secondary); font-style: italic; }
.speaker-stats { color: var(--text-secondary); font-size: 0.875rem; }
