:root {
  /* Raw light/dark design tokens */
  --bg-canvas-light: #f4f6f9;
  --bg-canvas-dark: #0b0f17;

  --surface-card-light: #ffffff;
  --surface-card-dark: #131926;

  --surface-subtle-light: #eef2f7;
  --surface-subtle-dark: #1a2234;

  --surface-elevated-light: #f8fafc;
  --surface-elevated-dark: #1e293b;

  --border-subtle-light: #dce3ed;
  --border-subtle-dark: #273248;

  --border-strong-light: #b9c5d6;
  --border-strong-dark: #3b4b6b;

  --text-primary-light: #0f172a;
  --text-primary-dark: #f1f5f9;

  --text-secondary-light: #475569;
  --text-secondary-dark: #94a3b8;

  --text-muted-light: #64748b;
  --text-muted-dark: #7c8da5;

  --brand-light: #1d4ed8;
  --brand-dark: #60a5fa;
  --brand-contrast-light: #ffffff;
  --brand-contrast-dark: #081226;

  --brand-soft-light: #dbeafe;
  --brand-soft-dark: #172554;

  --ok-text-light: #166534;
  --ok-text-dark: #4ade80;
  --ok-bg-light: #dcfce7;
  --ok-bg-dark: #052e16;
  --ok-bar-light: #16a34a;
  --ok-bar-dark: #22c55e;

  --warn-text-light: #9a3412;
  --warn-text-dark: #fbbf24;
  --warn-bg-light: #ffedd5;
  --warn-bg-dark: #431407;

  --err-text-light: #991b1b;
  --err-text-dark: #f87171;
  --err-bg-light: #fee2e2;
  --err-bg-dark: #450a0a;
  --err-bar-light: #dc2626;
  --err-bar-dark: #ef4444;

  --code-bg-light: #0f172a;
  --code-bg-dark: #090d14;
  --code-text-light: #e2e8f0;
  --code-text-dark: #e2e8f0;

  /* Default light values before media/light-dark overrides */
  --bg-canvas: var(--bg-canvas-light);
  --surface-card: var(--surface-card-light);
  --surface-subtle: var(--surface-subtle-light);
  --surface-elevated: var(--surface-elevated-light);
  --border-subtle: var(--border-subtle-light);
  --border-strong: var(--border-strong-light);
  --text-primary: var(--text-primary-light);
  --text-secondary: var(--text-secondary-light);
  --text-muted: var(--text-muted-light);
  --brand: var(--brand-light);
  --brand-contrast: var(--brand-contrast-light);
  --brand-soft: var(--brand-soft-light);
  --ok-text: var(--ok-text-light);
  --ok-bg: var(--ok-bg-light);
  --ok-bar: var(--ok-bar-light);
  --warn-text: var(--warn-text-light);
  --warn-bg: var(--warn-bg-light);
  --err-text: var(--err-text-light);
  --err-bg: var(--err-bg-light);
  --err-bar: var(--err-bar-light);

  /* Fallback for browsers without light-dark() support */
  @media (prefers-color-scheme: dark) {
    --bg-canvas: var(--bg-canvas-dark);
    --surface-card: var(--surface-card-dark);
    --surface-subtle: var(--surface-subtle-dark);
    --surface-elevated: var(--surface-elevated-dark);
    --border-subtle: var(--border-subtle-dark);
    --border-strong: var(--border-strong-dark);
    --text-primary: var(--text-primary-dark);
    --text-secondary: var(--text-secondary-dark);
    --text-muted: var(--text-muted-dark);
    --brand: var(--brand-dark);
    --brand-contrast: var(--brand-contrast-dark);
    --brand-soft: var(--brand-soft-dark);
    --ok-text: var(--ok-text-dark);
    --ok-bg: var(--ok-bg-dark);
    --ok-bar: var(--ok-bar-dark);
    --warn-text: var(--warn-text-dark);
    --warn-bg: var(--warn-bg-dark);
    --err-text: var(--err-text-dark);
    --err-bg: var(--err-bg-dark);
    --err-bar: var(--err-bar-dark);
  }

  /* Modern automatic light-dark() resolution */
  @supports (color: light-dark(white, black)) {
    --bg-canvas: light-dark(var(--bg-canvas-light), var(--bg-canvas-dark));
    --surface-card: light-dark(var(--surface-card-light), var(--surface-card-dark));
    --surface-subtle: light-dark(var(--surface-subtle-light), var(--surface-subtle-dark));
    --surface-elevated: light-dark(var(--surface-elevated-light), var(--surface-elevated-dark));
    --border-subtle: light-dark(var(--border-subtle-light), var(--border-subtle-dark));
    --border-strong: light-dark(var(--border-strong-light), var(--border-strong-dark));
    --text-primary: light-dark(var(--text-primary-light), var(--text-primary-dark));
    --text-secondary: light-dark(var(--text-secondary-light), var(--text-secondary-dark));
    --text-muted: light-dark(var(--text-muted-light), var(--text-muted-dark));
    --brand: light-dark(var(--brand-light), var(--brand-dark));
    --brand-contrast: light-dark(var(--brand-contrast-light), var(--brand-contrast-dark));
    --brand-soft: light-dark(var(--brand-soft-light), var(--brand-soft-dark));
    --ok-text: light-dark(var(--ok-text-light), var(--ok-text-dark));
    --ok-bg: light-dark(var(--ok-bg-light), var(--ok-bg-dark));
    --ok-bar: light-dark(var(--ok-bar-light), var(--ok-bar-dark));
    --warn-text: light-dark(var(--warn-text-light), var(--warn-text-dark));
    --warn-bg: light-dark(var(--warn-bg-light), var(--warn-bg-dark));
    --err-text: light-dark(var(--err-text-light), var(--err-text-dark));
    --err-bg: light-dark(var(--err-bg-light), var(--err-bg-dark));
    --err-bar: light-dark(var(--err-bar-light), var(--err-bar-dark));
  }

  /* MANDATORY: Base viewport color-scheme follows system, mapped to <meta name="color-scheme"> override */
  color-scheme: light dark;
  accent-color: var(--brand);

  &:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
  }
  &:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
  }

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.5;
  min-block-size: 100dvh;
  display: flex;
  flex-direction: column;
}

.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* CSS-only branch for two-state theme toggle options (no JS class needed) */
.theme-opt-to-light {
  display: none;
}
.theme-opt-to-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-opt-to-dark {
    display: none;
  }
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-opt-to-light {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
  }
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-opt-to-dark {
  display: none;
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-opt-to-light {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Header & Navigation */
.site-header {
  background-color: var(--surface-card);
  border-block-end: 1px solid var(--border-subtle);
  position: sticky;
  inset-block-start: 0;
  z-index: 20;
}

.header-inner {
  max-inline-size: 1360px;
  margin-inline: auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  inline-size: 2.25rem;
  block-size: 2.25rem;
  border-radius: var(--radius-md);
  background-color: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.brand-subtitle {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

/* Buttons & Controls */
button,
.btn {
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border-subtle);
  background-color: var(--surface-card);
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

button:hover,
.btn:hover {
  background-color: var(--surface-subtle);
  border-color: var(--border-strong);
}

button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
.table-wrapper:focus-visible,
pre:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

button.btn-primary,
.btn-primary {
  background-color: var(--brand);
  color: var(--brand-contrast);
  border-color: transparent;
  font-weight: 600;
}

button.btn-primary:hover,
.btn-primary:hover {
  filter: brightness(1.08);
  background-color: var(--brand);
}

button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
}

button.user-pill,
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.65rem 0.25rem 0.3rem;
  border-radius: 999px;
  background-color: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
}

button.user-pill:hover {
  background-color: var(--surface-elevated);
  border-color: var(--border-strong);
}

button.user-pill[hidden],
.user-pill[hidden] {
  display: none;
}

.user-chevron {
  color: var(--text-secondary);
  flex-shrink: 0;
}

[popover].user-dropdown {
  padding: 0.3rem;
  min-inline-size: 150px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background-color: var(--surface-card);
  color: var(--text-primary);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

[popover].user-dropdown:is(:popover-open, .\:popover-open) {
  display: block;
}

@supports (position-area: block-end) {
  [popover].user-dropdown {
    inset: auto;
    margin: 0.35rem 0 0 0;
    position-area: block-end span-inline-start;
    position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
  }
}

@supports not (position-area: block-end) {
  [popover].user-dropdown {
    position: fixed;
    inset: auto;
    margin: 0;
  }
}

button.user-dropdown-item {
  inline-size: 100%;
  justify-content: flex-start;
  padding: 0.45rem 0.65rem;
  border: none;
  border-radius: var(--radius-sm);
  background-color: transparent;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
}

button.user-dropdown-item:hover {
  background-color: var(--surface-subtle);
  border: none;
}

.user-avatar {
  inline-size: 24px;
  block-size: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background-color: var(--surface-elevated);
}

.user-avatar-fallback {
  inline-size: 24px;
  block-size: 24px;
  border-radius: 50%;
  background-color: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-avatar-fallback[hidden],
.user-avatar[hidden] {
  display: none;
}

.user-name {
  font-weight: 500;
  white-space: nowrap;
}

/* Main Dashboard Container */
.main-container {
  max-inline-size: 1360px;
  inline-size: 100%;
  margin-inline: auto;
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Toast / Status Banner */
.status-banner {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--surface-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.status-banner[hidden] {
  display: none;
}

.status-banner.is-ok {
  background-color: var(--ok-bg);
  color: var(--ok-text);
  border-color: var(--ok-text);
}

.status-banner.is-err {
  background-color: var(--err-bg);
  color: var(--err-text);
  border-color: var(--err-text);
}

/* Search & Filter Bar */
.filter-bar {
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
}

.filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.field-group label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.field-group input,
.field-group select {
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background-color: var(--surface-elevated);
  color: var(--text-primary);
  inline-size: 100%;
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 1rem;
}

.kpi-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.kpi-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.kpi-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.health-bar-track {
  inline-size: 100%;
  block-size: 6px;
  background-color: var(--err-bar);
  border-radius: 999px;
  overflow: hidden;
  margin-block-start: 0.25rem;
}

.health-bar-fill {
  block-size: 100%;
  inline-size: var(--rate-pct, 100%);
  background-color: var(--ok-bar);
  transition: inline-size 0.3s ease;
}

/* Cards & Grid Sections */
.analytics-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1rem;
}

@media (width < 960px) {
  .analytics-grid {
    grid-template-columns: 1fr;
  }
}

.panel-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
}

.panel-subtitle {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Time-Series SVG Chart */
.chart-container {
  min-block-size: 210px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.chart-svg {
  inline-size: 100%;
  block-size: auto;
  max-block-size: 220px;
  overflow: visible;
}

.chart-legend {
  display: flex;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.legend-dot {
  display: inline-block;
  inline-size: 10px;
  block-size: 10px;
  border-radius: 2px;
  margin-inline-end: 0.35rem;
}

.legend-ok {
  background-color: var(--ok-bar);
}

.legend-err {
  background-color: var(--err-bar);
}

/* Domain & Reporter Lists */
.stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.stat-item {
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  background-color: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.domain-name {
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.mx-list {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Badges (always pair text + symbol, never color alone) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-ok {
  background-color: var(--ok-bg);
  color: var(--ok-text);
}

.badge-warn {
  background-color: var(--warn-bg);
  color: var(--warn-text);
}

.badge-err {
  background-color: var(--err-bg);
  color: var(--err-text);
}

.badge-neutral {
  background-color: var(--surface-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* Responsive Data Table (following modern-web-guidance responsive-table) */
.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(620px, 78vh);
  container-type: inline-size;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

table.data-table {
  inline-size: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.86rem;
  --label-2: "Policy Domain";
  --label-3: "Reporter";
  --label-4: "MTA-STS Policy";
  --label-5: "MX Hosts";
  --label-6: "Sessions";
  --label-7: "Actions";
}

table.data-table caption {
  text-align: start;
  padding: 0.65rem 0.9rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background-color: var(--surface-subtle);
  border-block-end: 1px solid var(--border-subtle);
}

table.data-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
}

table.data-table thead th {
  background-color: var(--surface-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  text-align: start;
  padding: 0.65rem 0.85rem;
  border-block-end: 1px solid var(--border-subtle);
  white-space: nowrap;
}

table.data-table tbody th,
table.data-table tbody td {
  padding: 0.7rem 0.85rem;
  border-block-end: 1px solid var(--border-subtle);
  vertical-align: middle;
  text-align: start;
}

/* Sticky row header on desktop */
table.data-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  background-color: var(--surface-card);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

table.data-table tbody tr:hover th,
table.data-table tbody tr:hover td {
  background-color: var(--surface-elevated);
}

/* Stacked card transformation on narrow containers */
@container (width < 680px) {
  table.data-table,
  table.data-table thead,
  table.data-table tbody,
  table.data-table tr,
  table.data-table th,
  table.data-table td {
    display: block;
  }

  table.data-table thead {
    display: none;
  }

  table.data-table tbody tr {
    margin: 0.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }

  table.data-table tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    background-color: var(--surface-subtle);
  }

  table.data-table td::before {
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-block;
    min-inline-size: 8.5rem;
  }

  table.data-table td:nth-child(2)::before { content: var(--label-2) ": "; }
  table.data-table td:nth-child(3)::before { content: var(--label-3) ": "; }
  table.data-table td:nth-child(4)::before { content: var(--label-4) ": "; }
  table.data-table td:nth-child(5)::before { content: var(--label-5) ": "; }
  table.data-table td:nth-child(6)::before { content: var(--label-6) ": "; }
  table.data-table td:nth-child(7)::before { content: var(--label-7) ": "; }
}

/* Failure Details Table labels */
table.failures-table {
  --label-2: "Domain";
  --label-3: "Reporter";
  --label-4: "Sending MTA IP";
  --label-5: "Receiving MX";
  --label-6: "Failed Sessions";
  --label-7: "Reason / Info";
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 2.25rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Native Disclosure (<details> / <summary>) for Sync History */
details.disclosure-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
}

details.disclosure-card summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  padding-block: 0.15rem;
}

details.disclosure-card[open] summary {
  margin-block-end: 0.85rem;
}

/* Native Modal Dialog & Scroll Lock (modern-web-guidance dialog + prevent-page-scroll-under-modal-dialog) */
dialog {
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background-color: var(--surface-card);
  color: var(--text-primary);
  inline-size: min(920px, calc(100vw - 2rem));
  max-block-size: calc(100dvh - 2.5rem);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

dialog[open] {
  display: flex;
  flex-direction: column;
}

dialog:modal {
  /* MANDATORY: Prevent scroll gestures inside modal from chaining to underlying page */
  overscroll-behavior: contain;
}

dialog::backdrop {
  /* MANDATORY: Make ::backdrop a non-scrollable scroll container so overscroll-behavior applies */
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgba(8, 12, 21, 0.62);
  backdrop-filter: blur(3px);
}

.dialog-header {
  padding: 1rem 1.25rem;
  border-block-end: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dialog-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.dialog-body {
  padding: 1.15rem 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.meta-dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.65rem 1rem;
  margin: 0;
  padding: 0.85rem;
  background-color: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
}

.meta-dl dt {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.74rem;
}

.meta-dl dd {
  margin: 0.1rem 0 0;
  font-family: var(--font-mono);
  word-break: break-all;
}

.policy-block {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.code-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

pre.json-pre {
  margin: 0;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-sm);
  background-color: var(--code-bg-light);
  color: var(--code-text-light);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  overflow: auto;
  max-block-size: 360px;
  border: 1px solid var(--border-subtle);
}

/* Login View */
.login-shell {
  min-block-size: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  max-inline-size: 440px;
  inline-size: 100%;
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.login-alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  border: 1px solid var(--err-text);
  background-color: var(--err-bg);
  color: var(--err-text);
}

.login-info {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  border: 1px solid var(--border-subtle);
  background-color: var(--surface-subtle);
  color: var(--text-secondary);
}

.site-footer {
  max-inline-size: 1360px;
  inline-size: 100%;
  margin-inline: auto;
  padding: 1rem 1.25rem 1.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

