:root {
  color-scheme: light;
  --ink: #1f2a32;
  --muted: #62717d;
  --line: #d9e1e7;
  --panel: #f7f9fa;
  --accent: #b3261e;
  --accent-dark: #861b16;
  --teal: #0f6b6f;
  --gold: #b68018;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f5f7f8;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 22px 36px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 1 280px;
}

.topnav a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #ffffff;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.topnav a:hover {
  background: var(--panel);
  color: var(--accent-dark);
}

.brandmark {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  object-position: center 26%;
  background: #ffffff;
}

.brand-block {
  flex: 1 1 auto;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.beta-label {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 8px;
  padding: 1px 7px;
  border: 1px solid #d8b96d;
  border-radius: 999px;
  color: #6f4b08;
  background: #fff8ea;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: 0;
}

.dek {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

h2 {
  margin-bottom: 14px;
  font-size: 17px;
  letter-spacing: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 8px;
  flex-wrap: wrap;
}

.stats span {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
}

.stats strong {
  display: block;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.05;
}

.operations-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  width: max-content;
  padding: 0 10px;
  border: 1px solid #b9d8d6;
  border-radius: 999px;
  background: #eef8f7;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.operations-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.operations-status.has-issues {
  border-color: #ebd39a;
  background: #fff8e7;
  color: #7a4a00;
}

.operations-status.has-issues::before {
  background: var(--gold);
}

.operations-status:hover {
  background: #e2f2f1;
}

.operations-status.has-issues:hover {
  background: #fff1cc;
}

main {
  max-width: 1360px;
  margin: 0 auto;
  padding: 22px 24px 48px;
}

.intro-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 11px 14px;
  border: 1px solid #c8dde0;
  border-radius: 8px;
  background: #eef6f6;
  color: var(--ink);
}

.intro-strip strong {
  flex: 0 0 auto;
  color: var(--teal);
  font-size: 13px;
  text-transform: uppercase;
}

.intro-strip span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.search-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(28, 45, 55, 0.05);
}

.policy-panel {
  max-width: 780px;
}

.landing-panel {
  max-width: 980px;
}

.policy-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.landing-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.landing-lede {
  max-width: 780px;
  font-size: 17px;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0;
}

.landing-block {
  min-width: 0;
}

.landing-block h2 {
  margin-bottom: 8px;
}

.landing-block ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.landing-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.landing-record-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.landing-record-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.landing-record-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.3;
}

.landing-record-card a {
  color: var(--accent-dark);
  text-decoration: none;
}

.landing-record-card a:hover {
  text-decoration: underline;
}

.landing-record-card p {
  margin-bottom: 8px;
  font-size: 14px;
}

.landing-record-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.source-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.source-stat-grid span {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
}

.source-stat-grid strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.search-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.search-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #c8dde0;
  border-radius: 8px;
  background: #f4f9f9;
}

.search-hero h2 {
  max-width: 620px;
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.mode-strip {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mode-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #ffffff;
  font-size: 13px;
}

.mode-button:hover {
  background: var(--panel);
}

.mode-button.active {
  border-color: var(--teal);
  color: #ffffff;
  background: var(--teal);
}

.view-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.tab-button,
.watchlist-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #ffffff;
  font-size: 13px;
}

.tab-button:hover,
.watchlist-button:hover {
  background: var(--panel);
}

.tab-button.active,
.watchlist-button.active {
  color: #ffffff;
  border-color: var(--teal);
  background: var(--teal);
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(150px, 190px) minmax(130px, 165px) auto auto auto;
  align-items: end;
  gap: 8px;
}

.control-field {
  min-width: 0;
}

input,
select {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #b9c5ce;
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
}

select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 14px center / 7px 7px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) right 9px center / 7px 7px no-repeat,
    #ffffff;
  padding-right: 34px;
}

select:disabled {
  color: var(--muted);
  background-color: var(--panel);
}

button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.secondary-button {
  color: var(--ink);
  background: #e7eef2;
}

.secondary-button:hover {
  background: #d5e0e7;
}

.status-line {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.watchlist-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  flex-wrap: nowrap;
  margin-top: 10px;
  padding-bottom: 3px;
  scrollbar-width: thin;
}

.watchlist-strip .watchlist-button {
  flex: 0 0 auto;
}

.civic-lens {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.civic-lens-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.civic-lens-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  flex: 1 1 auto;
  min-width: 0;
  padding-bottom: 3px;
  scrollbar-width: thin;
}

.civic-lens-strip .watchlist-button {
  flex: 0 0 auto;
}

.saved-searches,
.browse-drawer {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.saved-search-list,
.saved-search-pill {
  display: flex;
  align-items: center;
}

.saved-search-list {
  gap: 7px;
  overflow-x: auto;
  margin-top: 8px;
  padding-bottom: 2px;
}

.saved-search-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
}

.saved-search-button,
.saved-search-remove {
  border-radius: 0;
  background: #ffffff;
  color: var(--ink);
}

.saved-search-button {
  min-height: 30px;
  max-width: 240px;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.saved-search-remove {
  width: 28px;
  min-height: 30px;
  padding: 0;
  border-left: 1px solid var(--line);
  color: var(--muted);
}

.saved-search-button:hover,
.saved-search-remove:hover {
  background: var(--panel);
  color: var(--accent-dark);
}

.checkbox-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.checkbox-control input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--teal);
}

.filter-bar {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.advanced-checkbox {
  margin-top: 10px;
  margin-bottom: 10px;
}

.filter-bar-title,
.filter-summary,
.active-filters,
.facet-button {
  display: flex;
  align-items: center;
}

.filter-summary {
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  cursor: pointer;
  list-style: none;
}

.filter-summary::-webkit-details-marker {
  display: none;
}

.filter-summary strong {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--muted);
}

.filter-summary span {
  color: var(--muted);
  font-size: 12px;
}

.filter-bar-title {
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
}

.text-button {
  min-height: 28px;
  padding: 0;
  color: var(--accent-dark);
  background: transparent;
  font-size: 13px;
}

.text-button:hover {
  background: transparent;
  text-decoration: underline;
}

.active-filters {
  min-height: 28px;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.active-filters span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  background: #eef6f6;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
}

.facet-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.8fr;
  gap: 12px;
}

.facet-grid h3 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.facet-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-content: start;
}

.facet-button {
  max-width: 100%;
  min-height: 30px;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.facet-button:hover {
  background: var(--panel);
}

.facet-button.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.facet-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.facet-button strong {
  color: var(--muted);
  font-size: 11px;
}

.facet-button.active strong {
  color: #ffffff;
}

.facet-empty {
  color: var(--muted);
  font-size: 12px;
}

.signal-dashboard {
  padding: 16px 0 0;
}

.accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  text-align: left;
}

.accordion-toggle:hover {
  background: #eef3f6;
}

.accordion-toggle strong {
  display: block;
  font-size: 17px;
}

.accordion-toggle .eyebrow {
  display: block;
}

.accordion-content {
  padding-top: 18px;
  padding-bottom: 4px;
}

.report-actions {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.signal-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.signal-card {
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.signal-card strong,
.signal-card span,
.signal-card small {
  display: block;
}

.signal-card strong {
  color: var(--ink);
  font-size: 25px;
  line-height: 1.05;
}

.signal-card span {
  margin-top: 6px;
  font-weight: 750;
}

.signal-card small {
  margin-top: 2px;
  color: var(--muted);
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
}

.report-block {
  min-width: 0;
}

.report-block h3,
.report-block h4 {
  margin: 0 0 10px;
  letter-spacing: 0;
}

.report-block h3 {
  font-size: 16px;
}

.report-block h4 {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
}

.report-summary {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.report-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.compact-list,
.issue-list {
  display: grid;
  gap: 8px;
}

.compact-record,
.issue-card {
  display: grid;
  gap: 5px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.compact-record strong,
.issue-card strong {
  font-size: 14px;
  line-height: 1.3;
}

.compact-record span,
.issue-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.issue-card small {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.compact-link {
  width: max-content;
  min-height: 30px;
  padding: 0 10px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  padding-top: 16px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

#result-count {
  color: var(--muted);
  font-size: 14px;
}

.dataset-list,
.event-list,
.run-list {
  display: grid;
  gap: 7px;
}

.dataset-card,
.source-card,
.event-card,
.run-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px;
  background: #ffffff;
}

.dataset-card {
  display: grid;
  gap: 7px;
}

.meeting-bundle-card {
  border-color: #c7ddd7;
  background: #fbfefd;
}

.meeting-bundle-kind {
  background: #2f6d62;
}

.meeting-bundle-summary {
  -webkit-line-clamp: 2;
}

.meeting-bundle-meta span {
  background: #eef7f4;
  color: #315f56;
}

.meeting-bundle-actions {
  padding-top: 2px;
}

.meeting-workspace,
.source-freshness-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(28, 45, 55, 0.04);
}

.meeting-workspace {
  display: grid;
  gap: 12px;
  border-color: #b9d5cf;
}

.meeting-workspace-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  gap: 12px;
  align-items: start;
}

.meeting-workspace h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.meeting-switcher {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.meeting-workspace-stats,
.freshness-grid,
.source-freshness-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.meeting-workspace-stats span,
.freshness-grid span,
.freshness-summary-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 9px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.meeting-workspace-stats strong,
.freshness-grid strong,
.freshness-summary-card strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
}

.meeting-workspace-context,
.source-action-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.meeting-document-list {
  display: grid;
  gap: 6px;
}

.meeting-document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.meeting-document-row strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
}

.meeting-document-row > span {
  color: var(--muted);
  font-size: 12px;
}

.meeting-document-row .action-row {
  grid-column: 1 / -1;
}

.meeting-workspace-summary {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.freshness-card {
  display: grid;
  gap: 8px;
}

.freshness-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dataset-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.record-kind,
.record-date {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 750;
}

.record-kind {
  padding: 2px 7px;
  color: #ffffff;
  background: var(--teal);
}

.record-date {
  color: var(--muted);
}

.dataset-card h3,
.source-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: 0;
}

.dataset-card p,
.source-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.42;
}

.summary-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  font-size: 13px;
}

.meta-row,
.tag-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.meta-row span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.tag-row span {
  background: #fff8ea;
  color: #6f4b08;
}

.tag-row .warning-chip,
.meta-row .warning-chip {
  background: #fff1f0;
  color: var(--accent-dark);
}

.action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 0;
}

.compact-button {
  min-height: 31px;
  padding: 0 10px;
  font-size: 12px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent-dark);
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.link-button:hover {
  background: var(--panel);
}

.primary-link {
  border-color: var(--accent);
  color: #ffffff;
  background: var(--accent);
}

.primary-link:hover {
  background: var(--accent-dark);
}

aside {
  position: sticky;
  top: 14px;
  align-self: start;
  max-height: calc(100vh - 28px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.change-panel {
  background: #fbfcfd;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.site-footer nav,
.policy-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

aside h2 {
  margin-bottom: 10px;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--muted);
}

.event-card {
  padding: 9px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: 12px;
}

.event-card strong,
.run-card strong {
  display: block;
  margin-bottom: 3px;
}

.event-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.3;
}

.run-card {
  padding: 10px;
  font-size: 12px;
}

.run-card span,
.run-card small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.run-ok {
  border-left: 4px solid var(--teal);
}

.run-error {
  border-left: 4px solid var(--accent);
}

.aside-heading {
  margin-top: 18px;
}

.empty {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
}

.compact-empty {
  padding: 12px;
  font-size: 13px;
}

.detail-panel {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 25, 32, 0.46);
  z-index: 10;
}

.detail-panel[hidden] {
  display: none;
}

.detail-dialog {
  position: relative;
  width: min(860px, 100%);
  max-height: min(780px, calc(100vh - 48px));
  overflow: auto;
  padding: 24px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 60px rgba(18, 32, 39, 0.22);
}

.detail-dialog h2 {
  margin-right: 44px;
  font-size: 24px;
}

.detail-dialog h3 {
  margin: 22px 0 12px;
  font-size: 15px;
}

#detail-description {
  max-height: 220px;
  overflow: auto;
  padding-right: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.detail-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.rights-note {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #c8dde0;
  border-radius: 8px;
  background: #eef6f6;
}

.rights-note strong {
  color: var(--teal);
  font-size: 13px;
}

.rights-note p,
.rights-note small {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.rights-note small {
  font-size: 12px;
}

.status-page {
  margin-bottom: 32px;
}

.status-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.status-metric {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 750;
}

.status-metric strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1;
}

.status-breakdown {
  margin-top: 16px;
}

.status-definition-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.status-definition-list div {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.status-definition-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.status-definition-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-definition-list dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.warning-pill {
  background: #fff3d7;
  color: #7a4a00;
}

.icon-button {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  background: #e7eef2;
  color: var(--ink);
}

.icon-button:hover {
  background: #d5e0e7;
}

@media (max-width: 820px) {
  .topbar,
  .intro-strip,
  .content-grid,
  .landing-grid,
  .source-stat-grid,
  .report-actions,
  .report-grid,
  .report-columns,
  .meeting-workspace-header {
    display: block;
  }

  .topbar {
    padding: 22px 20px;
  }

  .brandmark {
    float: left;
    width: 54px;
    height: 54px;
    margin-right: 12px;
    margin-bottom: 8px;
  }

  .stats {
    clear: both;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
  }

  .search-panel {
    padding: 14px;
  }

  .search-panel-header {
    display: block;
  }

  .search-panel-header .checkbox-control {
    margin-top: 12px;
  }

  .search-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .search-field,
  #search-button {
    grid-column: 1 / -1;
  }

  .search-row button {
    width: 100%;
  }

  #refresh-button,
  #export-csv {
    min-height: 38px;
    font-size: 13px;
  }

  .signal-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meeting-switcher {
    margin-top: 12px;
  }

  .meeting-workspace-stats,
  .freshness-grid,
  .source-freshness-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facet-grid {
    display: block;
  }

  .facet-grid > div + div {
    margin-top: 12px;
  }

  .facet-list .facet-button:nth-of-type(n+4) {
    display: none;
  }

  .saved-searches-header {
    align-items: flex-start;
  }

  .filter-summary span {
    display: none;
  }

  .site-footer {
    display: block;
  }

  .site-footer a {
    display: inline-block;
    margin-top: 8px;
  }

  .site-footer nav {
    margin-top: 6px;
  }

  .report-block + .report-block,
  .report-columns > div + div {
    margin-top: 18px;
  }

  .report-actions button {
    margin-top: 12px;
  }

  aside {
    position: static;
    max-height: none;
    margin-top: 28px;
    padding-left: 0;
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
    padding: 14px;
  }
}

/* Minimal public search surface */
body {
  background: #ffffff;
}

.topbar {
  gap: 16px;
  padding: 18px 32px;
  border-bottom: 0;
}

.brandmark {
  width: 44px;
  height: 44px;
  border-radius: 7px;
}

.eyebrow {
  margin-bottom: 2px;
  font-size: 11px;
  letter-spacing: 0.02em;
}

h1 {
  margin-bottom: 0;
  font-size: 23px;
}

.dek {
  max-width: 720px;
  font-size: 13px;
}

.stats {
  display: flex;
  gap: 18px;
}

.stats span {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  white-space: nowrap;
}

.stats strong {
  display: inline;
  margin-right: 4px;
  font-size: 16px;
}

main {
  max-width: 1040px;
  padding-top: 8px;
}

.intro-strip,
.change-panel,
#ingest-status:empty {
  display: none;
}

.search-panel {
  padding: 0 0 18px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.search-panel-header {
  margin-bottom: 12px;
}

.search-hero {
  padding: 16px 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.search-hero h2 {
  font-size: 24px;
}

.mode-button {
  min-height: 30px;
  border-radius: 999px;
  font-size: 12px;
}

.mode-button.active {
  border-color: var(--ink);
  background: var(--ink);
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 12px;
}

.workflow-card {
  display: block;
  min-height: 74px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
}

.workflow-card:hover {
  border-color: #aebbc4;
  background: #f7f9fa;
}

.workflow-card strong,
.workflow-card span {
  display: block;
}

.workflow-card strong {
  margin-bottom: 5px;
  font-size: 13px;
}

.workflow-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.view-tabs {
  gap: 6px;
}

.tab-button,
.watchlist-button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.tab-button.active,
.watchlist-button.active {
  border-color: var(--ink);
  background: var(--ink);
}

.search-row {
  grid-template-columns: minmax(360px, 1fr) minmax(120px, 160px) minmax(120px, 150px) auto auto;
  gap: 8px;
}

label {
  color: #7b8790;
  font-size: 11px;
}

input,
select,
button,
.link-button {
  border-radius: 7px;
}

input,
select {
  min-height: 44px;
  border-color: #cfd7de;
}

#search {
  font-size: 16px;
}

#refresh-button {
  display: none;
}

.secondary-button {
  background: #f0f3f5;
}

.watchlist-strip {
  margin-top: 12px;
  padding-bottom: 8px;
}

.browse-drawer,
.saved-searches {
  margin-top: 8px;
  padding-top: 8px;
}

.filter-bar {
  margin-top: 6px;
  padding-top: 10px;
}

.filter-summary {
  justify-content: flex-start;
  min-height: 28px;
  gap: 8px;
}

.filter-summary strong {
  color: var(--accent-dark);
  font-size: 12px;
}

.filter-summary span {
  display: none;
}

.content-grid {
  display: block;
  padding-top: 14px;
}

.brief-workspace {
  margin: 12px 0 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.brief-workspace.is-empty {
  background: #ffffff;
}

.brief-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brief-header h2 {
  margin-bottom: 0;
  font-size: 16px;
}

.brief-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.brief-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.brief-item,
.related-record {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.brief-item strong,
.related-record strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brief-item span,
.related-record span {
  color: var(--muted);
  font-size: 12px;
}

.section-heading {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.section-heading h2 {
  margin-bottom: 8px;
  font-size: 16px;
}

.dataset-list {
  gap: 0;
}

.dataset-card,
.source-card {
  padding: 12px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.dataset-card:first-child,
.source-card:first-child {
  border-top: 0;
}

.dataset-card {
  gap: 7px;
}

.dataset-card-top {
  justify-content: flex-start;
}

.record-kind {
  min-height: 22px;
  padding: 2px 7px;
  color: var(--teal);
  background: #eef6f6;
}

.record-date,
.record-signal {
  min-height: 22px;
  color: #7b8790;
}

.record-signal {
  padding: 2px 7px;
  border-radius: 999px;
  color: #73510b;
  background: #fff7df;
  font-size: 11px;
  font-weight: 800;
}

.dataset-card h3,
.source-card h3 {
  max-width: 860px;
  font-size: 16px;
}

.summary-text {
  max-width: 860px;
  -webkit-line-clamp: 1;
}

.meta-row,
.tag-row {
  gap: 6px;
}

.dataset-card .tag-row {
  display: none;
}

.meta-row span,
.tag-row span {
  min-height: 20px;
  padding: 1px 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.tag-row span {
  background: #fff9ef;
  color: #7a560e;
}

.action-row {
  gap: 8px;
}

.compact-button,
.link-button {
  min-height: 30px;
}

.detail-dialog {
  width: min(780px, 100%);
}

.related-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

@media (max-width: 820px) {
  .topbar {
    display: flex;
    align-items: flex-start;
    padding: 16px 18px;
  }

  .brandmark {
    float: none;
    margin: 0;
  }

  .stats {
    display: none;
  }

  .topnav {
    flex-basis: 100%;
    justify-content: flex-start;
  }

  main {
    padding: 8px 18px 40px;
  }

  .search-hero {
    display: block;
  }

  .mode-strip {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .search-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .workflow-strip,
  .brief-list {
    grid-template-columns: 1fr;
  }

  .workflow-card {
    min-height: 58px;
  }

  .search-field,
  #search-button,
  #export-csv {
    grid-column: auto;
  }

  .view-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .tab-button {
    flex: 0 0 auto;
  }

  .civic-lens {
    display: block;
  }

  .civic-lens-strip {
    margin-top: 6px;
  }

  .filter-bar {
    margin-top: 8px;
  }
}

/* Usability pass: search-led research workspace */
body {
  background: #f6f7f8;
}

.topbar {
  display: grid;
  grid-template-columns: 44px minmax(360px, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 18px 28px 14px;
  border-bottom: 1px solid #e4e8eb;
}

.brand-home-link {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: inline-flex;
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.brand-home-link:hover {
  box-shadow: 0 0 0 3px rgba(15, 107, 111, 0.12);
}

.brand-home-link:focus-visible {
  outline: 3px solid rgba(15, 107, 111, 0.24);
  outline-offset: 2px;
}

.brandmark {
  width: 40px;
  height: 40px;
}

.brand-block {
  grid-column: 2;
  min-width: 0;
}

h1 {
  font-size: 22px;
}

.dek {
  max-width: 680px;
  font-size: 13px;
}

.stats {
  grid-column: 3;
  margin-left: auto;
  padding-top: 4px;
}

.operations-status {
  grid-column: 3;
  justify-self: end;
}

.topnav {
  grid-column: 2 / 4;
  justify-content: flex-start;
  gap: 6px;
  padding-left: 0;
}

.topnav a {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.topnav a:hover {
  background: #eef2f4;
}

main {
  max-width: 1220px;
  padding: 16px 24px 52px;
}

.search-panel {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid #dde4e8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(31, 42, 50, 0.05);
}

.search-panel-header {
  margin: 0 0 12px;
}

.view-tabs {
  gap: 7px;
}

.tab-button,
.watchlist-button,
.mode-button {
  min-height: 32px;
  border-radius: 6px;
}

.tab-button.active,
.watchlist-button.active,
.mode-button.active {
  border-color: var(--teal);
  background: var(--teal);
}

.search-hero {
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
  padding: 0;
}

.search-hero h2 {
  margin-bottom: 4px;
  font-size: 25px;
}

.search-help {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.mode-strip {
  flex: 0 0 auto;
  padding-top: 2px;
}

.workflow-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
}

.workflow-card {
  min-height: 66px;
  border-color: #dfe6ea;
  background: #fbfcfc;
}

.workflow-card:focus-visible,
.tab-button:focus-visible,
.watchlist-button:focus-visible,
.mode-button:focus-visible,
.link-button:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(15, 107, 111, 0.24);
  outline-offset: 2px;
}

.search-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.search-field {
  grid-column: auto;
}

#search {
  min-height: 48px;
  font-size: 17px;
}

#search-button {
  min-height: 48px;
  min-width: 112px;
}

.search-options {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.search-options-grid {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(160px, 220px) auto;
  align-items: end;
  gap: 10px;
  margin-top: 10px;
}

.browse-drawer,
.saved-searches,
.filter-bar {
  margin-top: 8px;
  padding-top: 9px;
}

.filter-summary {
  color: var(--muted);
}

.filter-summary strong {
  color: var(--ink);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
  padding-top: 4px;
}

.results-column {
  min-width: 0;
}

.section-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 10px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 248, 0.96);
  backdrop-filter: blur(8px);
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
}

#result-count {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.dataset-list {
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.loading-state {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #ffffff;
}

.dataset-card,
.source-card {
  padding: 14px;
  border: 1px solid #e0e6ea;
  border-radius: 8px;
  background: #ffffff;
}

.dataset-card:first-child,
.source-card:first-child {
  border-top: 1px solid #e0e6ea;
}

.dataset-card:hover,
.source-card:hover {
  border-color: #c8d3d9;
}

.dataset-card-top {
  align-items: center;
  gap: 7px;
  margin-bottom: 2px;
}

.record-kind {
  color: #0b5960;
  background: #eaf4f4;
}

.record-date {
  margin-left: auto;
  font-size: 12px;
}

.dataset-card h3,
.source-card h3 {
  max-width: 100%;
  margin-bottom: 5px;
  font-size: 17px;
  line-height: 1.32;
}

.summary-text {
  max-width: 100%;
  margin-bottom: 7px;
  color: #51616d;
  -webkit-line-clamp: 2;
}

.dataset-card .tag-row {
  display: flex;
}

.meta-row span,
.tag-row span {
  border-radius: 5px;
  background: #f4f6f7;
}

.tag-row span {
  background: #fff8e9;
}

.action-row {
  margin-top: 2px;
  gap: 7px;
}

.compact-button,
.link-button {
  min-height: 32px;
  padding: 0 10px;
}

.brief-save-button {
  color: #0b5960;
  background: #eaf4f4;
}

.side-rail {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.brief-workspace,
.signal-dashboard,
.change-panel {
  display: block;
  margin: 0;
  padding: 13px;
  border: 1px solid #e0e6ea;
  border-radius: 8px;
  background: #ffffff;
}

.brief-workspace.is-empty {
  background: #ffffff;
}

.brief-header {
  align-items: flex-start;
}

.brief-header h2,
.change-panel h2 {
  font-size: 15px;
}

.brief-list {
  grid-template-columns: 1fr;
}

.brief-item strong,
.related-record strong {
  white-space: normal;
}

.signal-dashboard {
  padding: 0;
  overflow: hidden;
}

.accordion-toggle {
  border-radius: 0;
  background: #ffffff;
}

.accordion-toggle:hover {
  background: #f5f7f8;
}

.accordion-content {
  padding: 0 13px 13px;
}

.signal-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-grid,
.report-columns {
  grid-template-columns: 1fr;
}

.change-panel {
  max-height: 460px;
  overflow: auto;
}

.event-card {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.event-card:last-child {
  border-bottom: 0;
}

.detail-dialog {
  width: min(820px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
}

@media (max-width: 980px) {
  .stats {
    display: none;
  }

  .operations-status {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .topnav {
    grid-column: 2;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .side-rail,
  .section-heading {
    position: static;
  }
}

@media (max-width: 820px) {
  .topbar {
    padding: 14px 16px;
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .topnav {
    grid-column: 1 / -1;
  }

  main {
    padding: 10px 14px 42px;
  }

  .search-panel {
    padding: 14px;
  }

  .search-row,
  .search-options-grid,
  .workflow-strip {
    grid-template-columns: 1fr;
  }

  #search-button,
  #export-csv {
    width: 100%;
  }

  .mode-strip {
    justify-content: flex-start;
  }

  .section-heading {
    display: block;
  }

  #result-count {
    display: block;
    margin-top: 4px;
  }

  .record-date {
    margin-left: 0;
  }

  .dataset-card-top {
    flex-wrap: wrap;
  }
}
