/*
 * Medical registry · light documentary interface
 * Unslop by Damir Sokolovsky (@heydamir), CC BY 4.0
 * https://github.com/heydamir/unslop
 * Passes: spacing, color, icons, copy, type, layout, details, visuals, motion.
 */
:root {
  --page: #f7f8f9;
  --surface: #ffffff;
  --raised: #f1f3f4;
  --sidebar: #f4f5f6;
  --ink: #22292f;
  --secondary: #505961;
  --muted: #6b737b;
  --line: #e1e5e8;
  --accent: #1d6051;
  --accent-soft: #eaf1ee;
  --positive: #306c4c;
  --positive-soft: #edf4ef;
  --negative: #8d4e3c;
  --negative-soft: #faf0ec;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 14px/1.5 "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
button, input, select { font: inherit; color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a, select { touch-action: manipulation; }
button { border: 0; background: none; cursor: pointer; }
button:disabled, select:disabled { cursor: default; opacity: .45; }
a { color: inherit; text-decoration: none; }
button, a, select {
  transition: color 160ms var(--ease), background-color 160ms var(--ease), border-color 160ms var(--ease);
}
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
svg.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  vertical-align: middle;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* App shell and navigation */
.app-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: 264px;
  padding: 32px 16px 24px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; margin: 0 12px 40px; font-size: 20px; font-weight: 500; line-height: 1.2; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 40px; color: var(--accent); }
.brand-country { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 400; }
.sidebar-label { display: block; margin: 0 12px 8px; color: var(--muted); font-size: 12px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  margin: 4px 0;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--secondary);
  font-size: 14px;
  text-align: left;
  white-space: nowrap;
}
.nav-item:hover { background: #e9edef; }
.nav-item.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px #22292f08; }
.nav-item.active::before { content: ""; position: absolute; inset: 10px auto 10px 0; width: 2px; background: var(--accent); border-radius: 2px; }
.nav-count { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.sidebar-note { margin: 32px 12px 0; padding-top: 24px; border-top: 1px solid var(--line); color: var(--secondary); font-size: 12px; }
.small-dot { display: inline-block; flex-shrink: 0; width: 6px; height: 6px; border-radius: 3px; background: var(--accent); }
.sidebar-note .small-dot { margin: 0 8px 2px 0; }
.sidebar-note div { margin-top: 8px; color: var(--muted); line-height: 1.75; }
.sidebar-bottom { margin-top: auto; padding: 32px 12px 0; }
.sidebar-bottom .sidebar-label { margin-left: 0; }
.sidebar-bottom a { display: flex; align-items: center; justify-content: space-between; color: var(--secondary); font-size: 14px; }
.sidebar-bottom a:hover { color: var(--accent); }
.sidebar-bottom a + a { margin-top: 12px; }
.sidebar-bottom p { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
main { grid-column: 2; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.breadcrumb { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.breadcrumb strong { font-weight: 400; color: var(--secondary); }
.breadcrumb-divider { color: #a7afb5; }
.snapshot { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.main-content { max-width: 1600px; margin: auto; padding: 32px 32px 24px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.eyebrow { margin-bottom: 8px; color: var(--muted); font-size: 12px; }
h1 { margin: 0; font-size: 32px; font-weight: 500; line-height: 1.25; }
.page-heading p { margin: 8px 0 0; color: var(--secondary); font-size: 14px; }

/* One primary action and its export menu */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover { background: #184f43; border-color: #184f43; }
.secondary { background: var(--surface); border-color: var(--line); color: var(--secondary); }
.secondary:hover { background: var(--raised); border-color: #c4ccd0; }
.down-caret { margin-left: 4px; font-size: 18px; line-height: 1; }
.download-wrap { position: relative; flex-shrink: 0; }
.export-menu { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; width: 296px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 24px #22292f0f; animation: menu-enter 180ms var(--ease); }
.menu-label { padding: 8px 12px; color: var(--muted); font-size: 12px; }
.menu-divider { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.export-menu a, .export-menu > button { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 8px 12px; border-radius: 4px; font-size: 14px; font-weight: 500; text-align: left; }
.export-menu a:hover, .export-menu > button:hover { background: var(--raised); }
.export-menu span { color: var(--muted); font-size: 12px; font-weight: 400; }

/* The figures are content, with no decorative icons or miniature charts. */
.stats-grid { display: grid; grid-template-columns: 1fr 1.2fr 1fr 1fr; margin-bottom: 24px; padding: 20px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.stat-card { min-width: 0; padding: 0 24px; }
.stat-card + .stat-card { border-left: 1px solid var(--line); }
.stat-top { color: var(--secondary); font-size: 13px; }
.stat-card strong { display: block; margin-top: 8px; font-family: var(--mono); font-size: 30px; font-weight: 400; line-height: 1.2; }
.stat-card > span { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.stat-active strong { color: var(--positive); }
.stat-coverage small { font-size: 16px; color: var(--muted); }

/* Search and filters */
.registry-section { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.filter-panel { padding: 20px 24px; border-bottom: 1px solid var(--line); }
.search-row { display: flex; gap: 12px; margin-bottom: 16px; }
.search-box { display: flex; align-items: center; flex: 1; gap: 12px; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid #cbd2d7; border-radius: 8px; background: var(--surface); color: var(--muted); }
.search-box:focus-within { border-color: var(--accent); outline: 2px solid #1d605114; }
.search-box input { width: 100%; min-width: 0; padding: 8px 0; border: 0; background: none; outline: 0; color: var(--ink); font-size: 14px; }
.search-box input::placeholder { color: var(--muted); }
.search-box kbd { display: grid; place-items: center; flex-shrink: 0; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 4px; background: var(--page); font-family: var(--mono); font-size: 12px; }
.more-filters { min-height: 44px; }
.more-filters[aria-expanded="true"] { background: var(--raised); color: var(--ink); }
.filter-row { display: grid; grid-template-columns: 1fr 1fr 1fr 1.1fr; gap: 12px; }
.filter-row label, .extra-filters label { display: flex; flex-direction: column; gap: 8px; min-width: 0; color: var(--secondary); font-size: 12px; }
select, input[type="date"] { width: 100%; min-height: 40px; padding: 8px 32px 8px 12px; border: 1px solid var(--line); border-radius: 8px; background-color: var(--surface); font-size: 13px; text-overflow: ellipsis; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b737b' stroke-width='1.5'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
select:hover { border-color: #bdc6cc; }
input[type="date"] { min-width: 0; padding-right: 8px; }
.extra-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.extra-filters .service-filter { grid-column: 1 / -1; }
.active-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 16px; }
.filter-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--raised); color: var(--secondary); font-size: 12px; text-align: left; }
.filter-chip span { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reset-filters { padding: 4px 8px; color: var(--accent); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }

/* Register table */
.table-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; }
.table-heading h2 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 16px; font-weight: 500; }
.result-count { color: var(--muted); font-family: var(--mono); font-size: 13px; font-weight: 400; }
.table-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.view-switch { display: flex; flex-shrink: 0; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); }
.view-switch button { padding: 4px 12px; border: 1px solid transparent; border-radius: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.view-switch .selected { border-color: var(--line); background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px #22292f08; }
.table-scroll { position: relative; max-height: 600px; overflow: auto; scrollbar-width: thin; scrollbar-color: #b8c1c8 var(--page); }
table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; text-align: left; }
th { position: sticky; top: 0; z-index: 1; padding: 12px 16px; border-block: 1px solid var(--line); background: var(--page); color: var(--secondary); font-size: 12px; font-weight: 400; text-align: left; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 20px; }
th button { display: inline-flex; align-items: center; gap: 8px; padding: 0; color: inherit; font: inherit; text-align: left; }
.sort-mark { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.sort-active { color: var(--accent); }
td { padding: 16px; border-bottom: 1px solid #e9edef; color: var(--secondary); font-size: 13px; line-height: 1.6; vertical-align: middle; overflow-wrap: anywhere; }
tbody tr:hover { background: #f8faf9; }
.compact-table { min-width: 1184px; }
.compact-table th:nth-child(2) { width: 164px; }
.compact-table th:nth-child(3) { width: 152px; }
.compact-table th:nth-child(4) { width: 164px; }
.compact-table th:nth-child(5) { width: 160px; }
.compact-table th:nth-child(6) { width: 128px; }
.compact-table th:last-child { width: 48px; }
.compact-table td { height: 104px; }
.application-id { display: block; margin-bottom: 4px; color: var(--muted); font-family: var(--mono); font-size: 11px; line-height: 1.5; }
.record-name { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; padding: 0; color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.45; text-align: left; }
.record-name:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.ownership-caption { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.mono { color: var(--secondary); font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.bin-cell { white-space: nowrap; }
.copy-button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-left: 4px; padding: 4px; border-radius: 4px; color: var(--muted); vertical-align: middle; }
.copy-button:hover { background: var(--raised); color: var(--accent); }
.badge { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 8px; border-radius: 4px; color: var(--secondary); font-size: 11px; line-height: 1.5; white-space: nowrap; }
.badge.active { background: var(--positive-soft); color: var(--positive); }
.badge.excluded { background: var(--negative-soft); color: var(--negative); }
.badge.neutral { background: var(--raised); }
.badge-dot { flex-shrink: 0; width: 4px; height: 4px; border-radius: 2px; background: currentColor; }
.role-list { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.role-tag { color: var(--secondary); font-size: 12px; }
.role-tag + .role-tag { color: var(--muted); }
.date-cell { color: var(--secondary); font-family: var(--mono); font-size: 11px; white-space: nowrap; }
.date-cell span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.open-row { display: grid; place-items: center; width: 24px; height: 32px; padding: 0; border-radius: 4px; color: var(--muted); }
.open-row:hover { background: var(--raised); color: var(--accent); }
.muted-value { color: var(--muted); }
.source-label { color: var(--accent); font-size: 12px; font-weight: 500; }
.phone-cell { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.phone-cell > div + div { margin-top: 8px; }
.matching-note { margin: 0 0 20px; color: var(--secondary); font-size: 12px; line-height: 1.75; }
.matching-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; }
.full-table { min-width: 4400px; }
.full-table th { width: 200px; }
.full-table th:first-child { width: 112px; }
.full-table th:nth-child(2) { width: 176px; }
.full-table th:nth-child(3) { width: 400px; }
.full-table th:nth-child(5) { width: 320px; }
.full-table th:nth-child(n+11):nth-child(-n+14) { width: 360px; }
.full-table td { font-size: 13px; vertical-align: top; }
.full-table .record-name { -webkit-line-clamp: 4; }
.cell-list { max-height: 200px; overflow: auto; scrollbar-width: thin; }
.cell-list div + div { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
mark { padding: 0 2px; border-radius: 2px; background: #e6eee5; color: inherit; }

/* Paging and supporting copy */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; color: var(--secondary); font-size: 12px; }
.pagination > div { display: flex; align-items: center; gap: 24px; }
.page-size-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.page-size-label select { width: 64px; min-height: 32px; padding: 4px 24px 4px 8px; font-size: 12px; }
.page-controls { gap: 8px !important; }
.page-controls > label { display: flex; align-items: center; gap: 8px; margin-inline: 4px; font-size: 12px; white-space: nowrap; }
.page-controls input { width: 48px; height: 32px; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-family: var(--mono); font-size: 12px; text-align: center; appearance: textfield; }
.page-controls input::-webkit-inner-spin-button { appearance: none; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--secondary); font-size: 20px; }
.icon-button:hover { border-color: #bdc6cc; background: var(--raised); }
.data-note { display: flex; align-items: flex-start; gap: 8px; margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.page-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; color: var(--muted); font-size: 12px; }
.page-footer a { display: inline-flex; align-items: center; gap: 8px; }
.page-footer a:hover { color: var(--accent); }
.loading-state { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 280px; color: var(--muted); font-size: 14px; }
.spinner { width: 20px; height: 20px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
.empty-state { min-height: 320px; padding: 64px 24px; text-align: center; }
.empty-state h3 { margin: 16px 0 8px; font-size: 20px; font-weight: 500; }
.empty-state p { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--page); color: var(--muted); }
.validation-error { color: var(--negative) !important; }

/* The application card uses the registry's own material: identifiers and facts. */
dialog { padding: 0; border: 0; color: var(--ink); box-shadow: 0 8px 40px #22292f14; }
dialog::backdrop { background: #22292f40; }
.record-dialog { position: fixed; inset: 0 0 0 auto; width: min(768px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-left: 1px solid var(--line); background: var(--surface); }
.drawer-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 32px; border-bottom: 1px solid var(--line); background: var(--surface); }
.drawer-top > span { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.drawer-head { padding: 24px 32px; border-bottom: 1px solid var(--line); background: var(--page); }
.drawer-head h2 { margin: 16px 0; color: var(--ink); font-size: 24px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.drawer-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.drawer-meta .mono { font-size: 14px; }
.drawer-head .badge { font-size: 12px; }
.drawer-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--accent); font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.drawer-section { padding: 24px 32px; border-bottom: 1px solid var(--line); }
.drawer-section h3 { margin: 0 0 20px; font-size: 16px; font-weight: 500; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 0; }
.detail-grid > div.wide { grid-column: 1 / -1; }
.detail-grid dt { margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.detail-grid dd { margin: 0; color: var(--ink); font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.detail-grid dd > div + div { margin-top: 8px; }
.detail-grid > div:nth-child(-n+2) dd { font-family: var(--mono); }
.service-group + .service-group { margin-top: 24px; }
.service-group h4 { margin: 0 0 12px; color: var(--muted); font-size: 13px; font-weight: 400; }
.service-group ul { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.65; }
.service-group li + li { margin-top: 12px; }
.service-group li::marker { color: #9aa8a2; }
.drawer-bottom { padding: 24px 32px 32px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.about-dialog { width: 640px; max-width: calc(100% - 32px); max-height: 85dvh; border: 1px solid var(--line); border-radius: 16px; }
.about-content { padding: 24px 32px 32px; }
.about-content h2 { margin: 0 0 16px; font-size: 28px; font-weight: 500; }
.about-content p { color: var(--secondary); font-size: 14px; line-height: 1.75; }
.about-content .detail-grid { margin: 24px 0; }
.about-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.about-note { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--page); }
.toast { position: fixed; bottom: 24px; left: 50%; z-index: 100; max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 8px; background: var(--ink); box-shadow: 0 4px 16px #22292f14; color: #fff; font-size: 14px; text-align: center; transform: translateX(-50%); }
.no-scroll { overflow: hidden; }
.contact-link, .source-links a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.contact-section { background: #fafcfb; }
.contact-section h3 { color: var(--accent); }
.card-provenance { color: var(--muted); font-size: 12px; margin: 16px 0 0; }
.source-section { border: 1px solid var(--line); border-radius: 8px; margin-top: 12px; background: var(--surface); }
.source-section > summary { padding: 16px; cursor: pointer; color: var(--ink); font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.source-section > summary:hover { background: var(--page); }
.source-section-body { padding: 16px; border-top: 1px solid var(--line); min-width: 0; }
.source-section-body .detail-grid { gap: 16px; }
.source-section-body .detail-grid dd { font-family: inherit; }
.source-section-body .detail-grid dd > div { white-space: pre-wrap; }
.raw-fields pre { margin: 0; max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.75 var(--mono); }
.raw-key { display: block; margin-top: 4px; font: 11px var(--mono); }
.schedule-table { width: 100%; min-width: 0; table-layout: auto; }
.schedule-table th { position: static; }
.schedule-table th, .schedule-table td { padding: 12px; font-size: 13px; }
.source-table-scroll { overflow: auto; max-width: 100%; margin-top: 16px; border: 1px solid var(--line); border-radius: 4px; }
.source-table { table-layout: auto; min-width: 640px; }
.source-table th { position: static; font-size: 12px; white-space: normal; }
.source-table th, .source-table td { padding: 12px; vertical-align: top; }
.source-table td { min-width: 100px; max-width: 320px; font-size: 13px; overflow-wrap: anywhere; }
.source-table .source-table { min-width: 540px; }
.source-links { display: flex; flex-direction: column; gap: 8px; }
.source-links a .icon { margin-left: 4px; }
.export-progress { color: var(--muted); font-size: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes menu-enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Reading order and readable type are preserved on smaller screens. */
@media (min-width: 1800px) {
  .main-content { padding: 40px; }
  .topbar { padding-inline: 40px; }
  h1 { font-size: 36px; }
}
@media (max-width: 1280px) {
  .stats-grid { grid-template-columns: 1fr 1.15fr 1fr 1fr; }
  .stat-card { padding-inline: 20px; }
  .stat-card strong { font-size: 28px; }
  .extra-filters { grid-template-columns: 1fr 1fr 1fr; }
  .extra-filters .service-filter { grid-column: 1 / -1; }
  .pagination { flex-wrap: wrap; }
}
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; grid-column: 1; flex-direction: row; align-items: center; gap: 24px; width: 100%; padding: 16px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { flex-shrink: 0; margin: 0; font-size: 18px; }
  .brand-mark { height: 32px; }
  .sidebar > .sidebar-label, .sidebar-note, .sidebar-bottom { display: none; }
  .sidebar nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
  .nav-item { width: auto; margin: 0; }
  .nav-count { display: none; }
  main { grid-column: 1; }
  .topbar { height: 56px; padding-inline: 24px; }
  .main-content { padding: 24px; }
}
@media (max-width: 760px) {
  .sidebar { gap: 16px; padding: 16px; }
  .sidebar nav { gap: 8px; }
  .nav-item { width: 36px; height: 36px; padding: 8px; font-size: 0; }
  .brand { gap: 8px; }
  .topbar { height: auto; min-height: 56px; padding: 12px 16px; }
  .breadcrumb { gap: 8px; font-size: 12px; }
  .breadcrumb-root, .breadcrumb-divider { display: none; }
  .snapshot { gap: 8px; font-size: 11px; }
  .main-content { padding: 24px 16px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .eyebrow { font-size: 12px; }
  h1 { font-size: 28px; }
  .page-heading p { font-size: 14px; }
  .button { min-height: 44px; padding: 8px 16px; font-size: 14px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0; padding: 0; }
  .stat-card { padding: 20px; }
  .stat-card:nth-child(3), .stat-card:nth-child(4) { border-top: 1px solid var(--line); }
  .stat-card:nth-child(3) { border-left: 0; }
  .stat-card strong { font-size: 28px; }
  .stat-card > span { font-size: 12px; }
  .filter-panel { padding: 16px; }
  .search-row { gap: 8px; }
  .search-box { gap: 8px; padding-inline: 12px; }
  .search-box input { font-size: 13px; }
  .search-box kbd { display: none; }
  .more-filters { flex-shrink: 0; width: 44px; padding: 8px; font-size: 0; }
  .filter-row { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .filter-row label, .extra-filters label { font-size: 12px; }
  select { min-height: 44px; padding-left: 12px; font-size: 13px; }
  .extra-filters { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .extra-filters label:last-child { grid-column: 2; }
  .filter-chip span { max-width: 240px; }
  .table-heading { align-items: flex-start; flex-direction: column; gap: 16px; padding: 20px 16px; }
  .table-heading h2 { font-size: 16px; }
  .table-heading p { font-size: 12px; }
  .table-scroll { max-height: 65vh; }
  .compact-table { min-width: 1184px; }
  .view-switch button { min-height: 36px; padding: 4px 12px; font-size: 13px; }
  .pagination { justify-content: center; gap: 16px; padding: 16px; }
  .pagination > div:first-child { justify-content: space-between; gap: 12px; width: 100%; }
  .pagination > div { gap: 12px; }
  .page-controls { gap: 4px !important; }
  .page-controls > label { gap: 4px; margin: 0 4px; font-size: 12px; }
  .page-controls .icon-button { width: 32px; height: 36px; }
  .page-controls input { width: 44px; height: 36px; }
  .data-note { font-size: 12px; line-height: 1.75; }
  .page-footer { align-items: flex-start; gap: 16px; font-size: 12px; }
  .export-menu { right: auto; left: 0; max-width: calc(100vw - 32px); }
  .drawer-top { padding: 16px 20px; }
  .drawer-top > span { font-size: 11px; }
  .drawer-top .icon-button { width: 36px; height: 36px; }
  .drawer-head { padding: 24px 20px; }
  .drawer-head h2 { font-size: 20px; }
  .drawer-meta .mono { font-size: 13px; }
  .drawer-section { padding: 24px 20px; }
  .detail-grid { gap: 20px 16px; }
  .contact-section .detail-grid > div:nth-child(-n+2) { grid-column: 1 / -1; }
  .detail-grid dt { font-size: 12px; }
  .detail-grid dd { font-size: 14px; }
  .drawer-bottom { padding: 24px 20px; }
  .about-content { padding: 24px 20px; }
  .about-content .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .stat-card { padding: 16px; }
  .stat-top { font-size: 12px; }
  .page-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
