:root {
  --bg-canvas: #f4f3ee;
  --bg-surface: #ffffff;
  --bg-muted: #ece9df;
  --bg-deep: #e3dfd2;
  --text-strong: #1f2a30;
  --text-body: #2f3d45;
  --text-muted: #5c6b73;
  --border-subtle: #cdd5d8;
  --accent-primary: #0b6b6f;
  --accent-primary-hover: #09575a;
  --accent-warm: #8a5a00;
  --status-new: #0f766e;
  --status-reviewed: #1d4ed8;
  --status-flagged: #b91c1c;
  --focus-ring: #0ea5e9;
  --shadow-soft: 0 10px 25px rgba(33, 46, 52, 0.07);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --content-max: 1200px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --status-rail-width: 4px;
  --header-height: 68px;
  --freshness-height: 42px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text-body);
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  background:
    radial-gradient(circle at 15% 0%, #f6f2e2 0%, transparent 42%),
    radial-gradient(circle at 85% 20%, #e7f1ef 0%, transparent 45%),
    var(--bg-canvas);
}

a {
  color: var(--accent-primary);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--accent-primary-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  color: var(--text-strong);
  font-family: "Newsreader", Georgia, serif;
  letter-spacing: -0.01em;
  margin: 0;
}

p {
  margin: 0;
}

.container {
  margin: 0 auto;
  max-width: var(--content-max);
  padding: 0 var(--space-5);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 1000;
  padding: var(--space-3) var(--space-4);
  background: var(--text-strong);
  color: #fff;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--space-3);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(244, 243, 238, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(6px);
}

.header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.top-shell-brand-group {
  display: flex;
  align-items: center;
  min-width: 0;
}

.top-shell-nav-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-strong);
  font-weight: 700;
  text-decoration: none;
}

.brand-dot {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(145deg, var(--accent-primary), #2f7f81);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.brand-text {
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.site-nav-scroll {
  width: 100%;
}

.site-nav--top-shell {
  justify-content: flex-end;
}

.site-nav a {
  color: var(--text-body);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.96rem;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-nav a:hover {
  background: var(--bg-muted);
}

.site-nav a.active {
  color: var(--accent-primary);
  background: #dceeed;
  border-color: rgba(11, 107, 111, 0.2);
}

.freshness-strip {
  min-height: var(--freshness-height);
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(90deg, #e8f2f0 0%, #f6f3e8 100%);
}

.freshness-inner {
  min-height: var(--freshness-height);
  display: flex;
  gap: var(--space-5);
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.freshness-inner strong {
  color: var(--text-strong);
}

.freshness-inner--compact {
  flex-wrap: wrap;
}

.freshness-run-group {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-1);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.freshness-metrics-group {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.freshness-metric {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 var(--space-2);
  border: 1px solid rgba(99, 122, 128, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  font-variant-numeric: tabular-nums;
}

.freshness-metric-new {
  color: #24535d;
}

.freshness-metric-total {
  color: #3d4f57;
}

.page-content {
  padding-top: var(--space-6);
  padding-bottom: var(--space-7);
}

.page-header {
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-4);
}

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  margin-bottom: var(--space-2);
}

.lede {
  max-width: 68ch;
  color: var(--text-muted);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-soft);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.stat-value {
  color: var(--text-strong);
  font-size: 1.7rem;
  font-weight: 700;
  margin-top: var(--space-2);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-5);
}

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: var(--space-4);
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

.panel-head h2 {
  font-size: 1.3rem;
}

.panel-empty {
  color: var(--text-muted);
  padding: var(--space-5) var(--space-2);
}

.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-3);
}

.activity-list li {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  align-items: center;
  gap: var(--space-3);
}

.activity-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-muted);
  overflow: hidden;
}

.activity-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0b6b6f 0%, #3d8c8f 100%);
}

.activity-count {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-muted);
}

.filter-shell {
  position: sticky;
  top: calc(var(--header-height) + var(--freshness-height));
  z-index: 20;
  margin-bottom: var(--space-5);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: var(--space-4);
  backdrop-filter: blur(5px);
}

.entries-quick-controls,
.entries-advanced-filters {
  display: contents;
}

.entries-advanced-filters[hidden] {
  display: none !important;
}

.field-group {
  display: grid;
  gap: var(--space-2);
}

.field-span-2 {
  grid-column: span 2;
}

.field-group span {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-body);
  padding: 0 var(--space-3);
}

input[type="date"] {
  min-width: 0;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.button-primary,
.button-subtle,
.copy-link {
  min-height: 44px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.button-primary {
  background: var(--accent-primary);
  color: #fff;
}

.button-primary:hover {
  background: var(--accent-primary-hover);
  color: #fff;
}

.button-subtle,
.copy-link {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-body);
}

.button-subtle:hover,
.copy-link:hover {
  background: var(--bg-muted);
}

.loading-note {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.entries-results {
  animation: fade-in 160ms ease-out;
}

.results-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.results-count {
  color: var(--text-muted);
}

.entries-results-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.message-banner {
  border: 1px solid;
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.message-banner-error {
  border-color: #f3b9b9;
  background: #fff2f2;
  color: #7d1c1c;
}

.empty-state {
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  padding: var(--space-6) var(--space-5);
}

.empty-state h3 {
  margin-bottom: var(--space-2);
  font-size: 1.2rem;
}

.table-wrap {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: auto;
}

.entries-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

.entries-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f8f7;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  padding: var(--space-3);
}

.sort-link {
  color: inherit;
  text-decoration: none;
}

.sort-link.active {
  color: var(--accent-primary);
}

.entries-table tbody td {
  border-bottom: 1px solid #e7ecee;
  vertical-align: top;
  padding: var(--space-3);
  font-size: 0.95rem;
}

.entries-table tbody tr:hover {
  background: #f8fbfb;
}

.entries-table tbody tr td:first-child {
  position: relative;
  padding-left: calc(var(--space-4) + var(--status-rail-width));
}

.entries-table tbody tr td:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--space-2);
  bottom: var(--space-2);
  width: var(--status-rail-width);
  border-radius: 999px;
  background: var(--status-new);
}

.entries-table tbody tr.status-reviewed td:first-child::before {
  background: var(--status-reviewed);
}

.entries-table tbody tr.status-flagged td:first-child::before {
  background: var(--status-flagged);
}

.title-cell a {
  color: var(--text-strong);
  font-weight: 600;
  text-decoration: none;
}

.title-cell a:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.entries-table-compact {
  min-width: 0;
}

.ref-chip {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  background: var(--bg-muted);
  color: var(--text-strong);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 10px;
}

.status-badge.status-new {
  color: var(--status-new);
  border-color: #a7ddd7;
  background: #ecfbf8;
}

.status-badge.status-reviewed {
  color: var(--status-reviewed);
  border-color: #b8c9ff;
  background: #eef2ff;
}

.status-badge.status-flagged {
  color: var(--status-flagged);
  border-color: #f1bcbc;
  background: #fff2f2;
}

.table-action {
  white-space: nowrap;
}

.mobile-entry-list {
  display: none;
}

.mobile-entry-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  position: relative;
}

.mobile-entry-card::before {
  content: none;
}

.mobile-entry-card.status-new::before,
.mobile-entry-card.status-reviewed::before,
.mobile-entry-card.status-flagged::before {
  content: "";
  position: absolute;
  inset: var(--space-3) auto var(--space-3) 0;
  width: var(--status-rail-width);
  border-radius: 999px;
  background: var(--status-new);
}

.mobile-entry-card.status-reviewed::before {
  background: var(--status-reviewed);
}

.mobile-entry-card.status-flagged::before {
  background: var(--status-flagged);
}

.mobile-entry-dept {
  color: var(--text-muted);
  font-size: 0.84rem;
  margin-bottom: var(--space-1);
}

.mobile-entry-title {
  font-size: 1.15rem;
  margin-bottom: var(--space-2);
}

.mobile-entry-title a {
  text-decoration: none;
  color: var(--text-strong);
}

.mobile-entry-meta {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.mobile-entry-actions {
  margin-top: var(--space-2);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.page-link {
  min-height: 42px;
  min-width: 96px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-body);
  background: var(--bg-surface);
}

.page-link:hover {
  background: var(--bg-muted);
}

.page-link.is-disabled {
  color: #8b989f;
  cursor: not-allowed;
}

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

.detail-shell {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: var(--space-5);
}

.back-link-wrap {
  margin-bottom: var(--space-4);
}

.back-link {
  font-weight: 600;
  text-decoration: none;
}

.detail-head {
  margin-bottom: var(--space-4);
}

.detail-head h1 {
  font-size: clamp(1.6rem, 3.8vw, 2.3rem);
  margin-bottom: var(--space-2);
}

.detail-department {
  color: var(--text-muted);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin: 0 0 var(--space-5);
}

.meta-grid div {
  background: #f9faf8;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
}

.meta-grid dt {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: var(--space-1);
  font-weight: 600;
}

.meta-grid dd {
  margin: 0;
  color: var(--text-strong);
}

.summary-card {
  border: 1px solid #c8dbd9;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f2faf9, #ffffff);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.summary-card h2 {
  font-size: 1.2rem;
  margin-bottom: var(--space-2);
}

.summary-card p {
  white-space: pre-wrap;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.detail-actions a,
.detail-actions span {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  text-decoration: none;
}

.detail-actions a:first-child {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.detail-actions a:first-child:hover {
  background: var(--accent-primary-hover);
  border-color: var(--accent-primary-hover);
}

.detail-actions .is-disabled {
  color: var(--text-muted);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.about-grid h2 {
  font-size: 1.2rem;
  margin-bottom: var(--space-2);
}

.error-shell {
  background: var(--bg-surface);
  border: 1px solid #f2c4c4;
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-soft);
}

.error-shell h1 {
  margin-bottom: var(--space-2);
}

.error-shell p + p {
  margin-top: var(--space-3);
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #ece9df;
}

.footer-inner {
  min-height: 74px;
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: center;
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
  color: var(--text-muted);
  font-size: 0.87rem;
}

.htmx-indicator {
  opacity: 0;
  visibility: hidden;
  transition: opacity 140ms ease;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
  visibility: visible;
}

#entries-results.htmx-swapping {
  opacity: 0.28;
  transform: translateY(2px);
  transition: opacity 140ms ease, transform 140ms ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1050px) {
  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

@media (max-width: 760px) {
  .container {
    padding: 0 var(--space-3);
  }

  .header-inner {
    align-items: stretch;
    flex-direction: column;
    gap: var(--space-2);
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
  }

  .site-header {
    position: static;
  }

  .site-nav-scroll {
    overflow-x: visible;
    padding-bottom: 0;
  }

  .site-nav {
    gap: var(--space-1);
  }

  .site-nav--top-shell {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    justify-content: stretch;
  }

  .site-nav a.site-nav-link {
    width: 100%;
    min-height: 38px;
    padding: 0 var(--space-2);
    justify-content: center;
    white-space: nowrap;
    font-size: 0.84rem;
    line-height: 1.15;
    border-color: rgba(99, 122, 128, 0.26);
    background: rgba(255, 255, 255, 0.78);
  }

  .site-nav a.site-nav-link:hover {
    background: #eef4f3;
  }

  .site-nav a.site-nav-link.active {
    border-color: rgba(11, 107, 111, 0.28);
    background: #dceeed;
  }

  .freshness-strip {
    position: static;
    min-height: 0;
  }

  .freshness-inner {
    align-items: flex-start;
    gap: var(--space-2);
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
  }

  .freshness-run-group {
    font-size: 0.9rem;
  }

  .freshness-metrics-group {
    gap: var(--space-2);
  }

  .freshness-separator {
    display: none;
  }

  .freshness-metric {
    min-height: 24px;
    font-size: 0.77rem;
  }

  .page-content {
    padding-top: var(--space-4);
    padding-bottom: var(--space-5);
  }

  .page-header {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
  }

  .page-header h1 {
    font-size: clamp(1.6rem, 8vw, 2.1rem);
  }

  .lede {
    font-size: 0.98rem;
  }

  .filter-shell {
    position: static;
    margin-bottom: var(--space-4);
  }

  .filter-grid {
    grid-template-columns: 1fr;
    padding: var(--space-3);
    gap: var(--space-2);
  }

  .entries-quick-controls,
  .entries-advanced-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .field-span-2 {
    grid-column: auto;
  }

  .entries-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
    margin-top: 0;
  }

  .entries-quick-actions .button-primary,
  .entries-quick-actions .loading-note {
    grid-column: 1 / -1;
  }

  .entries-results-controls {
    margin-bottom: var(--space-2);
  }

  .entries-results-actions,
  .entries-results-actions .copy-link {
    width: 100%;
  }

  .entries-results-actions .copy-link {
    padding: 0 var(--space-3);
  }

  .results-count {
    font-size: 0.9rem;
  }

  .table-wrap {
    display: none;
  }

  .mobile-entry-list {
    display: block;
  }

  .dashboard-mobile-actions {
    margin-bottom: var(--space-3);
  }

  .dashboard-mobile-actions .detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
  }

  .dashboard-mobile-actions .detail-actions a {
    min-height: 40px;
  }

  .mobile-entry-card {
    padding: var(--space-3);
  }

  .detail-shell {
    padding: var(--space-4);
  }

  .detail-mobile-quick {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: #f8fbfb;
    padding: var(--space-3);
    margin-bottom: var(--space-3);
  }

  .detail-mobile-quick .detail-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .detail-mobile-quick .detail-actions a,
  .detail-mobile-quick .detail-actions span {
    width: 100%;
    min-height: 40px;
  }

  .detail-shell > .detail-actions {
    display: none;
  }

  .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
  }

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
  }

  .stat-card {
    padding: var(--space-3);
  }

  .stat-value {
    font-size: 1.45rem;
    margin-top: var(--space-1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

.monitoring-status-row {
  margin-bottom: var(--space-5);
}

.monitoring-status-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.monitoring-status-line {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 1.05rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.status-healthy {
  background: var(--status-new);
}

.status-dot.status-degraded {
  background: var(--accent-warm);
}

.status-dot.status-broken {
  background: var(--status-flagged);
}

.status-dot.status-unknown {
  background: var(--text-muted);
}

.entries-table tbody tr.status-healthy td:first-child::before {
  background: var(--status-new);
}

.entries-table tbody tr.status-degraded td:first-child::before {
  background: var(--accent-warm);
}

.entries-table tbody tr.status-broken td:first-child::before {
  background: var(--status-flagged);
}

.status-badge.status-healthy {
  color: var(--status-new);
  border-color: #a7ddd7;
  background: #ecfbf8;
}

.status-badge.status-degraded {
  color: #7c4f00;
  border-color: #f0d5a4;
  background: #fff8ec;
}

.status-badge.status-broken {
  color: var(--status-flagged);
  border-color: #f1bcbc;
  background: #fff2f2;
}

.monitoring-status-meta {
  color: var(--text-muted);
  font-size: 0.92rem;
}

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

.monitoring-detail-meta {
  margin-bottom: var(--space-2);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.monitoring-error-row {
  background: #fdf3f2;
  color: #6d2f2b;
  font-size: 0.9rem;
}

.monitoring-cost-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.cost-chart {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16px, 1fr));
  gap: 6px;
  align-items: end;
  min-height: 180px;
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #faf8f2 0%, #ffffff 100%);
}

.cost-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.cost-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #0f766e, #0b6b6f);
  min-height: 4px;
}

.cost-bar.spike {
  background: linear-gradient(180deg, #c77d13, #8a5a00);
}

.cost-bar-label {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.quality-grid {
  display: grid;
  gap: var(--space-3);
}

.quality-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: var(--space-2);
  align-items: center;
}

.quality-label {
  font-weight: 600;
  color: var(--text-strong);
}

.quality-value {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: right;
}

.quality-progress {
  grid-column: 1 / -1;
  height: 10px;
  border-radius: 999px;
  background: var(--bg-muted);
  overflow: hidden;
}

.quality-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0f766e, #3aa58f);
}

@media (min-width: 980px) {
  .monitoring-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
