/* Layout for the two operational views. */
.civic-view {
  --civic-navy: #142844;
  --civic-blue: #23598f;
  --civic-muted: #526379;
  --civic-border: #d9e2eb;
  --civic-tint: #f2f5f8;
  --civic-yellow: #f7eac1;
  --civic-yellow-ink: #684a08;
  color: var(--civic-navy);
  font-size: 14px;
}

.civic-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.civic-actions .btn, .civic-project-blank .btn, .civic-pagination .btn { min-height: 37px; border-radius: 5px; white-space: nowrap; }
.civic-actions .primary { background: #17385d; border-color: #17385d; }
.civic-actions .primary:hover { background: #24598e; border-color: #24598e; }

.civic-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 18px;
}
.civic-section-head h2, .civic-results-head h2 {
  margin: 0;
  color: var(--civic-navy);
  font: 800 19px/1.3 Manrope, system-ui, sans-serif;
  letter-spacing: -.028em;
}
.civic-section-head p, .civic-results-head p { margin: 4px 0 0; color: var(--civic-muted); font-size: 13px; line-height: 1.42; }
.civic-link { color: #1e568b; font-size: 13px; font-weight: 700; text-decoration: none; padding: 0; line-height: 1.4; text-align: left; }
.civic-link:hover, .civic-title-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.civic-title-link { color: var(--civic-navy); padding: 0; text-align: left; line-height: 1.42; font-weight: 700; font-size: inherit; overflow-wrap: anywhere; }
.civic-indicator dt { color: #455a72; line-height: 1.45; font-weight: 650; }
.civic-indicator dd { margin: 0; }
.civic-indicator .civic-indicator-number {
  margin-block: 5px 2px;
  font: 800 clamp(27px, 2.85vw, 36px)/1.16 Manrope, system-ui, sans-serif;
  color: #183b61;
  letter-spacing: -.055em;
  font-variant-numeric: tabular-nums;
}
.civic-indicator .civic-indicator-detail { color: #40556d; font-size: 13px; min-height: 36px; line-height: 1.4; }
.civic-indicator .civic-indicator-source { color: var(--civic-muted); font-size: 12px; }
.civic-indicator-source a, .civic-chart-foot a { color: #2b5a86; text-underline-offset: 2px; }

.civic-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 17px; }
.civic-panel { background: white; border: 1px solid var(--civic-border); border-radius: 5px; min-width: 0; }
.civic-panel > .civic-section-head { padding: 16px 17px 13px; }
.civic-trends #chart-slot { padding: 0 17px 13px; }
.civic-chart-foot { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .78rem; }
.measure-chart { --bar-blue: #2867a2; margin-top: 16px; }
.measure-chart ul { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 16px; }
.measure-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--ink); font-size: .91rem; }
.measure-label strong { font-variant-numeric: tabular-nums; color: var(--blue); }
.measure-track { position: relative; height: 10px; margin-top: 7px; background: #edf2f8; border-radius: 6px; }
.measure-track i { position: absolute; inset-block: 0; border-radius: inherit; }
.measure-track .primary-bar { background: linear-gradient(90deg, #224d80, var(--bar-blue)); }
.measure-track .secondary-bar { background: #7d9fc6; }
.measure-track .negative { background: #d7b463; }
.measure-track b { position: absolute; inset-block: -3px; width: 1px; background: #63758c; }
.civic-agenda { display: flex; flex-direction: column; }
.civic-agenda-list, .agenda-notices { list-style: none; padding: 0; margin: 0; }
.civic-agenda-list { padding: 0 18px 12px; }
.agenda-day + .agenda-day { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.agenda-day-heading { display: flex; align-items: center; gap: 12px; }
.agenda-calendar { display: inline-grid; min-width: 46px; text-align: center; border: 1px solid #cddbea; border-radius: 8px; overflow: hidden; background: white; }
.agenda-calendar span { background: #e7eef8; color: #355779; padding: 3px 6px 2px; font: 700 .7rem/1.2 system-ui,sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.agenda-calendar strong { padding: 3px 6px 5px; font: 650 1.4rem/1.1 Manrope,system-ui,sans-serif; font-variant-numeric: tabular-nums; color: var(--blue); }
.card .agenda-day-heading h3 { margin: 0 0 2px; font-size: .94rem; }
.agenda-day-heading h3::first-letter { text-transform: uppercase; }
.agenda-distance { color: var(--muted); font-size: .8rem; }
.agenda-distance.is-near { padding: 1px 5px; border-radius: 4px; background: #faf0cf; color: #745614; }
.agenda-notices { margin: 7px 0 0 22px; border-left: 1px solid #d5e0eb; padding-left: 17px; }
.civic-agenda-info { position: relative; padding: 5px 0 7px; }
.civic-agenda-info::before { content: ''; position: absolute; left: -18px; top: 14px; width: 9px; border-top: 1px solid #aebed0; }
.civic-agenda-info .civic-title-link { font-size: .91rem; line-height: 1.4; }
.civic-agenda-info p, .civic-agenda-footer p { margin: 0 0 2px; color: var(--muted); font-size: .78rem; }
.civic-agenda-info time { font-weight: 650; color: #435b78; font-variant-numeric: tabular-nums; }
.civic-agenda-footer { margin-top: auto; padding: 10px 17px 13px; border-top: 1px solid var(--civic-border); }
.civic-blank { margin: 0; padding: 18px 17px 20px; color: var(--civic-muted); }
.civic-projects { margin-top: 17px; }
.civic-project-blank { display: flex; align-items: center; gap: 10px 18px; padding: 12px 17px; background: #f8fafc; border-top: 1px solid var(--civic-border); }
.civic-project-blank p { margin: 0; color: var(--civic-muted); }
.civic-project-table { border-top: 1px solid var(--civic-border); }
.civic-project-table table { min-width: 550px; }
.civic-project-table thead th { background: #f2f5f8; color: #43586e; padding: 10px 15px; }
.civic-project-table tbody :is(th,td) { font-size: 13px; text-transform: none; padding: 11px 15px; white-space: normal; }
.civic-project-due { color: var(--civic-muted); font-size: 12px; }
.civic-project-due.is-urgent { color: var(--civic-yellow-ink); font-weight: 700; }
.civic-data-foot { margin: 11px 0 0; color: var(--civic-muted); font-size: 12px; line-height: 1.5; }
.civic-source-line { display: flex; gap: 4px 20px; flex-wrap: wrap; justify-content: space-between; color: var(--civic-muted); font-size: 13px; padding: 0 0 14px; }
.civic-source-line p { margin: 0; line-height: 1.5; }
.civic-source-warning { color: var(--civic-yellow-ink); }
.civic-source-name { font-weight: 700; color: var(--civic-navy); }
.civic-filterbar { display: grid; grid-template-columns: minmax(180px, 1.45fr) repeat(3, minmax(0, 1fr)); gap: 12px; padding: 13px 15px; border: 1px solid var(--civic-border); border-radius: 5px; background: white; }
.civic-filterbar label { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: #364e68; font-size: 13px; font-weight: 700; }
.civic-filterbar input, .civic-filterbar select { font: 500 13px/1.3 'DM Sans', system-ui, sans-serif; min-height: 38px; width: 100%; border: 1px solid #bdccdc; border-radius: 4px; color: var(--civic-navy); }
.civic-filterbar input { padding: 8px 9px 8px 35px; background: #fff; }
.civic-filterbar select { padding-block: 7px; }
.civic-search-input { position: relative; }
.civic-search-input svg { position: absolute; width: 17px; height: 17px; left: 11px; top: 11px; color: #57738f; pointer-events: none; }
.civic-results { background: white; margin-top: 17px; border: 1px solid var(--civic-border); border-radius: 5px; }
.civic-results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.civic-watch-filter { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #364e68; white-space: nowrap; }
.civic-watch-filter input { margin: 0; width: 15px; height: 15px; accent-color: #1d5083; }
.civic-radar-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.civic-radar-table thead th { background: #eaf0f6; border-block: 1px solid var(--civic-border); text-transform: none; font-size: 12px; letter-spacing: .02em; color: #2f4864; padding: 9px 15px; }
.civic-radar-table thead th:first-child { width: 50%; }
.civic-radar-table thead th:nth-child(2) { width: 18%; }
.civic-radar-table thead th:nth-child(3) { width: 15%; }
.civic-radar-table tbody tr { border-bottom: 1px solid #e2e8ef; }
.civic-radar-table tbody tr:last-child { border-bottom: 0; }
.civic-radar-table tbody tr:hover { background: #f7f9fc; }
.civic-radar-table tbody :is(th,td) { border-bottom: 0; padding: 11px 15px; vertical-align: middle; font-size: 14px; letter-spacing: 0; white-space: normal; }
.civic-radar-notice .civic-title-link { display: block; margin-top: 3px; }
.civic-radar-id, .civic-radar-audience { display: block; color: var(--civic-muted); font-size: 12px; line-height: 1.35; font-weight: 550; }
.civic-radar-audience { margin-top: 4px; }
.civic-radar-deadline { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1.32; }
.civic-radar-deadline time { font-weight: 700; }
.civic-radar-deadline small { color: var(--civic-muted); font-size: 12px; }
.civic-radar-deadline.is-urgent time { color: var(--civic-yellow-ink); background: var(--civic-yellow); box-shadow: 0 0 0 3px var(--civic-yellow); border-radius: 2px; }
.civic-radar-status { display: inline-flex; align-items: center; gap: 5px; color: #23577b; font-size: 12px; font-weight: 650; line-height: 1.3; }
.civic-radar-status::before { content: ''; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; }
.civic-radar-status.review { color: #775612; }
.civic-radar-status.closed { color: #596779; }
.civic-row-actions { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.civic-row-actions > a { white-space: nowrap; }
.civic-watch { flex: 0 0 31px; width: 31px; height: 32px; border-radius: 4px; border: 1px solid #d6e0eb; background: white; padding: 6px; color: #365d86; cursor: pointer; }
.civic-watch svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.civic-watch:hover, .civic-watch.is-saved { background: #faf0d0; color: #735619; border-color: #e9d9a9; }
.civic-watch.is-saved svg { fill: #e8ce7f; }
.civic-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; color: var(--civic-muted); border-top: 1px solid var(--civic-border); font-size: 13px; }
.civic-pagination > div { display: flex; gap: 7px; }
.civic-no-results { border-top: 1px solid var(--civic-border); padding: 23px 16px; }
.civic-no-results h3 { margin: 0; font-size: 16px; }
.civic-no-results p { margin: 6px 0 11px; color: var(--civic-muted); }
.civic-notice-detail dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin: 18px 0; }
.civic-notice-detail dt { color: #526379; font-size: 13px; }
.civic-notice-detail dd { margin: 3px 0 0; font-weight: 650; }
.civic-notice-detail p { color: #40556d; line-height: 1.55; }
.civic-notice-detail .civic-actions { margin-top: 22px; }

@media (max-width: 1180px) {
  .civic-row-actions { align-items: flex-start; flex-direction: column; gap: 7px; }
}
@media (max-width: 1030px) {
  .civic-dashboard-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, .95fr); }
  .civic-filterbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 880px) and (min-width: 701px) {
  .civic-dashboard-grid { grid-template-columns: 1fr; }
  .civic-radar-table thead th, .civic-radar-table tbody :is(th,td) { padding-inline: 9px; }
  .civic-radar-table thead th:first-child { width: 44%; }
  .civic-radar-table thead th:nth-child(2) { width: 19%; }
  .civic-radar-table thead th:nth-child(3) { width: 18%; }
  .civic-row-actions > a { font-size: 12px; }
}
@media (max-width: 700px) {
  .civic-section-head h2, .civic-results-head h2 { font-size: 17px; }
  .civic-indicator .civic-indicator-detail { min-height: 30px; font-size: 12px; }
  .civic-dashboard-grid { grid-template-columns: 1fr; gap: 15px; }
  .civic-agenda { order: -1; }
  .civic-chart { height: auto; }
  .civic-project-blank { align-items: flex-start; flex-direction: column; }
  .civic-filterbar { padding: 10px; gap: 8px; }
  .civic-filter-search { grid-column: 1 / -1; }
  .civic-filterbar input, .civic-filterbar select { font-size: 13px; }
  .civic-results-head { padding: 12px; align-items: flex-start; }
  .civic-watch-filter { padding-top: 3px; font-size: 12px; }
  .civic-radar-table { display: block; }
  .civic-radar-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .civic-radar-table tbody { display: block; }
  .civic-radar-table tbody tr { display: grid; grid-template-columns: 1.1fr 1fr minmax(64px, auto); align-items: center; padding: 11px 12px; gap: 8px; }
  .civic-radar-table tbody tr:first-child { border-top: 1px solid var(--civic-border); }
  .civic-radar-table tbody :is(th,td) { padding: 0; }
  .civic-radar-table tbody th { grid-column: 1 / -1; }
  .civic-row-actions { align-items: flex-end; }
  .civic-radar-status, .civic-row-actions > a, .civic-radar-deadline, .civic-radar-deadline small { font-size: 11px; }
  .civic-notice-detail dl { grid-template-columns: 1fr; }
}
@media (max-width: 370px) {
  .civic-indicator dt { font-size: 13px; }
  .civic-radar-table tbody tr { padding-inline: 8px; }
  .civic-results-head { flex-direction: column; }
}
@media print {
  .civic-actions, .civic-filterbar, .civic-pagination, .civic-watch, .civic-watch-filter, .civic-link { display: none; }
  .civic-dashboard-grid { grid-template-columns: 1.25fr 1fr; }
  .civic-panel, .civic-indicator-band, .civic-radar-table tr { break-inside: avoid; }
}
.civic-view { font-size: 1rem; color: var(--ink); }
.civic-indicator-band { margin-top: 12px; }
.civic-panel.card, .civic-results.card { padding: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.civic-panel > .civic-section-head, .civic-results-head { padding: 20px 21px 14px; }
.civic-section-head h2, .civic-results-head h2 { font: 750 1.08rem/1.35 Manrope, system-ui, sans-serif; letter-spacing: -.025em; color: var(--ink); }
.civic-tabs.segmented { margin: 0 20px 3px; flex-wrap: wrap; }
.civic-chart-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 10px; margin: 12px 0 0; }
.civic-chart-summary strong { font: 750 1.5rem/1.2 Manrope, system-ui, sans-serif; color: var(--blue); }
.civic-chart-summary span { font-size: .875rem; color: var(--muted); }
.civic-filterbar.toolbar { padding: 0; border: 0; background: transparent; gap: 12px; }
.civic-filterbar.toolbar input, .civic-filterbar.toolbar select { border-color: var(--line); border-radius: 6px; min-height: 42px; font-size: .875rem; }
.civic-radar-table tbody .civic-month-row th { background: #f2f5fa; color: var(--muted); padding: 7px 15px; font-size: .81rem; font-weight: 650; }
.civic-radar-table tbody .civic-month-row th::first-letter { text-transform: uppercase; }
.civic-radar-table .civic-title-link { text-transform: none; }
@media (max-width: 700px) {
  .civic-radar-table tbody .civic-month-row { display: block; padding: 0; }
  .civic-radar-table tbody .civic-month-row th { display: block; }
  .civic-panel > .civic-section-head, .civic-results-head { padding: 15px; }
  .civic-tabs.segmented { margin-left: 15px; }
}
