/* SEA Fertility Genomics Research — Design System */
/* Spec: docs/frontend-design-spec.md */

:root {
  --primary: #1E3A5F;
  --primary-light: #2E5A8E;
  --accent: #0EA5E9;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --neutral-50: #F8FAFC;
  --neutral-100: #F1F5F9;
  --neutral-200: #E2E8F0;
  --neutral-400: #94A3B8;
  --neutral-600: #475569;
  --neutral-900: #0F172A;
  --radius: 0.75rem;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --max-width: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--neutral-600);
  background: var(--neutral-50);
}

h1, h2, h3, h4 { color: var(--neutral-900); font-weight: 700; line-height: 1.3; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.875rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* --- NAV --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary);
  transition: box-shadow 0.2s;
}
.nav.scrolled { box-shadow: var(--shadow-md); }
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}
.nav-brand {
  color: white;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a { color: rgba(255,255,255,0.85); font-size: 0.875rem; font-weight: 500; }
.nav-links a:hover { color: white; text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

/* --- HERO --- */
.hero {
  padding: 4rem 0 3rem;
  background: white;
  border-bottom: 1px solid var(--neutral-200);
}
.hero h1 { margin-bottom: 0.75rem; }
.hero-sub {
  font-size: 1.125rem;
  color: var(--neutral-600);
  max-width: 720px;
  margin-bottom: 2.5rem;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.metric-card {
  background: var(--neutral-100);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-align: center;
}
.metric-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}
.metric-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--neutral-600);
  margin-top: 0.25rem;
}

/* --- SECTION --- */
.section { padding: 4rem 0; }
.section:nth-child(even) { background: white; }
.section-header { margin-bottom: 2rem; }
.section-header p { color: var(--neutral-600); margin-top: 0.5rem; }

/* --- PGT COLLAPSE --- */
.pgt-collapse-header {
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s;
}
.pgt-collapse-header:hover {
  opacity: 0.85;
}
.pgt-collapse-header h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.pgt-toggle-hint {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: #FFF7ED;
  padding: 0.2rem 0.75rem;
  border-radius: 99px;
  transition: all 0.2s;
}
.pgt-collapse-header.open .pgt-toggle-hint {
  content: 'Click to collapse';
}
.pgt-collapse-header.open .pgt-toggle-hint::after {
  content: ' ▴';
}
.pgt-collapse-header:not(.open) .pgt-toggle-hint::after {
  content: ' ▾';
}
.pgt-collapse-content {
  display: none;
  animation: fadeIn 0.3s ease;
}
.pgt-collapse-content.open {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- PGT EDUCATION --- */
.pgt-edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.pgt-edu-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--neutral-200);
}
.pgt-edu-highlight {
  border: 2px solid var(--accent);
  background: #F0F9FF;
}
.pgt-edu-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.pgt-edu-card h3 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}
.pgt-edu-full {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--neutral-400);
  margin-bottom: 0.75rem;
}
.pgt-edu-what, .pgt-edu-example, .pgt-edu-why {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}
.pgt-edu-note {
  background: #FEF3C7;
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.85rem;
  margin: 0.75rem 0;
  color: #92400E;
}
.pgt-edu-status {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

/* Flow diagram */
.pgt-edu-flow {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--neutral-200);
}
.pgt-edu-flow h3 { margin-bottom: 1.25rem; }
.flow-steps {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.flow-step {
  flex: 1;
  text-align: center;
}
.flow-num {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  margin: 0 auto 0.75rem;
}
.flow-text { font-size: 0.8rem; line-height: 1.5; }
.flow-arrow {
  font-size: 1.5rem;
  color: var(--neutral-400);
  padding-top: 0.5rem;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .pgt-edu-grid { grid-template-columns: 1fr; }
  .flow-steps { flex-direction: column; align-items: center; }
  .flow-arrow { transform: rotate(90deg); }
}

/* --- DETAILED WORKFLOW --- */
.pgt-workflow-detailed {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--neutral-200);
}
.pgt-workflow-detailed h3 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.workflow-intro {
  color: var(--neutral-500);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}
.workflow-timeline {
  position: relative;
  padding-left: 2rem;
}
.workflow-timeline::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
}
.wf-step {
  position: relative;
  margin-bottom: 1.5rem;
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.wf-step:hover {
  box-shadow: var(--shadow-md);
}
.wf-step-highlight {
  border-color: var(--accent);
  border-width: 2px;
  background: linear-gradient(135deg, #FFF7ED, #FFFFFF);
}
.wf-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
}
.wf-header::after {
  content: '▾';
  color: var(--neutral-400);
  font-size: 1rem;
  margin-left: auto;
  transition: transform 0.2s;
}
.wf-step.open .wf-header::after {
  transform: rotate(180deg);
}
.wf-num {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.wf-step-highlight .wf-num {
  background: var(--accent);
}
.wf-title h4 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--primary-dark);
}
.wf-meta {
  display: flex;
  gap: 1rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}
.wf-duration, .wf-cost {
  font-size: 0.8rem;
  padding: 0.15rem 0.6rem;
  border-radius: 99px;
  font-weight: 500;
}
.wf-duration {
  background: #EFF6FF;
  color: #1E40AF;
}
.wf-cost {
  background: #F0FDF4;
  color: #166534;
}
.wf-body {
  display: none;
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid var(--neutral-100);
}
.wf-step.open .wf-body {
  display: block;
}
.wf-body p {
  margin: 1rem 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--neutral-600);
}
.wf-considerations {
  background: var(--neutral-50);
  border-radius: calc(var(--radius) - 4px);
  padding: 1rem 1.25rem;
  margin-top: 0.75rem;
}
.wf-considerations strong {
  font-size: 0.85rem;
  color: var(--primary);
  display: block;
  margin-bottom: 0.5rem;
}
.wf-considerations ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.wf-considerations li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--neutral-600);
}
.wf-considerations li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.wf-considerations li strong {
  color: var(--neutral-700);
  display: inline;
  font-size: inherit;
}

/* Summary cards */
.wf-summary {
  margin-top: 2rem;
  background: var(--primary);
  border-radius: var(--radius);
  padding: 2rem;
  color: white;
}
.wf-summary h4 {
  margin: 0 0 1.25rem;
  font-size: 1.2rem;
}
.wf-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.wf-summary-card {
  background: rgba(255,255,255,0.12);
  border-radius: calc(var(--radius) - 4px);
  padding: 1rem;
  text-align: center;
}
.wf-summary-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}
.wf-summary-value {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.wf-summary-note {
  font-size: 0.75rem;
  opacity: 0.7;
}
.wf-summary-footnote {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 1.25rem;
  line-height: 1.5;
}
.wf-summary-footnote a {
  color: white;
  text-decoration: underline;
}

@media (max-width: 1023px) {
  .wf-summary-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .workflow-timeline { padding-left: 0.5rem; }
  .workflow-timeline::before { left: 0.25rem; }
  .wf-header { padding: 1rem; }
  .wf-body { padding: 0 1rem 1rem; }
  .wf-meta { flex-direction: column; gap: 0.4rem; }
  .wf-summary-grid { grid-template-columns: 1fr; }
  .wf-summary { padding: 1.5rem; }
}

/* --- MAP --- */
#map {
  height: 500px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 1;
}
.map-legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--neutral-600);
}
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* --- FILTERS --- */
.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.filter-group { display: flex; gap: 0.5rem; align-items: center; }
.filter-group label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--neutral-600);
}
.filter-btn {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--neutral-200);
  border-radius: 2rem;
  background: white;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.search-input {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--neutral-200);
  border-radius: 2rem;
  font-size: 0.8rem;
  width: 200px;
  font-family: inherit;
  outline: none;
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14,165,233,0.1); }

.result-count { font-size: 0.8rem; color: var(--neutral-400); margin-left: auto; }

/* --- TABLE --- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: white;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
thead { background: var(--neutral-100); position: sticky; top: 0; }
th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--neutral-600);
  border-bottom: 2px solid var(--neutral-200);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
th:hover { color: var(--primary); }
td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--neutral-100);
  vertical-align: top;
}
tr:hover { background: var(--neutral-50); }
.clinic-name { font-weight: 600; color: var(--neutral-900); }
.clinic-name a { color: var(--neutral-900); }
.clinic-name a:hover { color: var(--accent); }

/* --- BADGES --- */
.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 2rem;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-tier1 { background: var(--success); color: white; }
.badge-tier2 { background: var(--warning); color: white; }
.badge-tier3 { background: var(--neutral-400); color: white; }
.badge-untiered { background: var(--neutral-200); color: var(--neutral-600); }
.badge-approved { background: #D1FAE5; color: #065F46; }
.badge-restricted { background: #FEF3C7; color: #92400E; }
.badge-not-approved { background: #FEE2E2; color: #991B1B; }
.badge-unclear { background: var(--neutral-200); color: var(--neutral-600); }
.badge-prohibited { background: #FEE2E2; color: #991B1B; }
.badge-unknown { background: var(--neutral-200); color: var(--neutral-600); }

.services-text { font-size: 0.8rem; color: var(--neutral-600); }
.empty-field { color: var(--neutral-400); }

/* --- EXPANDABLE ROW --- */
.expand-row { display: none; }
.expand-row.open { display: table-row; }
.expand-row td {
  background: var(--neutral-50);
  padding: 1rem 1rem 1rem 2rem;
  border-bottom: 2px solid var(--neutral-200);
}
.expand-detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; font-size: 0.8rem; }
.detail-label { font-weight: 600; color: var(--neutral-600); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.detail-value { color: var(--neutral-900); margin-top: 0.125rem; word-break: break-word; }

/* --- REGULATORY CARDS --- */
.reg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
}
.reg-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--neutral-200);
}
.reg-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.reg-card-header .flag { font-size: 1.5rem; }
.reg-card-header h3 { margin: 0; }
.reg-card-header .regulator { font-size: 0.8rem; color: var(--neutral-600); }
.pgt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 1rem 0;
}
.pgt-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
}
.pgt-item .label { color: var(--neutral-600); font-weight: 600; min-width: 4.5rem; }
.reg-shipping {
  background: var(--neutral-100);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin: 1rem 0;
  font-size: 0.8rem;
}
.reg-shipping strong { color: var(--neutral-900); }
.reg-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8rem;
  margin: 0.75rem 0;
}
.reg-stats .stat-value { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--primary); }
.reg-insight {
  background: #EFF6FF;
  border-left: 3px solid var(--accent);
  padding: 0.75rem;
  border-radius: 0 0.5rem 0.5rem 0;
  font-size: 0.85rem;
  color: var(--primary);
  margin-top: 1rem;
}

/* --- REGULATORY SOURCES --- */
.reg-sources { margin-top: 1rem; }
.reg-sources-toggle {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  cursor: pointer;
  padding: 0.4rem 0;
  user-select: none;
}
.reg-sources-toggle::before { content: '+ '; }
.reg-sources.open .reg-sources-toggle::before { content: '- '; }
.reg-sources-toggle:hover { text-decoration: underline; }
.reg-sources-list {
  display: none;
  list-style: none;
  margin-top: 0.5rem;
  padding-left: 0;
  font-size: 0.8rem;
  border-top: 1px solid var(--neutral-200);
  padding-top: 0.5rem;
}
.reg-sources.open .reg-sources-list { display: block; }
.reg-sources-list li {
  padding: 0.2rem 0;
  line-height: 1.4;
}
.reg-sources-list li::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}
.reg-sources-list a {
  color: var(--neutral-600);
  text-decoration: none;
}
.reg-sources-list a:hover { color: var(--accent); text-decoration: underline; }

/* --- SECONDARY COUNTRIES --- */
.secondary-countries { margin-top: 1.5rem; }
.secondary-toggle {
  background: none;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  color: var(--neutral-600);
}
.secondary-toggle:hover { border-color: var(--accent); }
.secondary-content { display: none; margin-top: 1rem; }
.secondary-content.open { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 1.5rem; }

/* --- API DOCS --- */
.api-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.api-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--neutral-200);
}
.api-method {
  display: inline-block;
  background: #D1FAE5;
  color: #065F46;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.125rem 0.4rem;
  border-radius: 0.25rem;
  margin-right: 0.5rem;
}
.api-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--neutral-900);
}
.api-desc { font-size: 0.8rem; color: var(--neutral-600); margin-top: 0.5rem; }
.api-copy {
  margin-top: 0.75rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--neutral-200);
  border-radius: 0.375rem;
  background: var(--neutral-50);
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
  color: var(--neutral-600);
}
.api-copy:hover { border-color: var(--accent); color: var(--accent); }

.code-block {
  background: var(--neutral-900);
  color: #E2E8F0;
  border-radius: var(--radius);
  padding: 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  overflow-x: auto;
}
.code-block .comment { color: #64748B; }
.code-block .keyword { color: #C084FC; }
.code-block .string { color: #34D399; }
.code-block .func { color: #60A5FA; }

/* --- METHODOLOGY --- */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.method-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.method-card h4 { margin-bottom: 0.5rem; font-size: 1rem; }
.method-card ul { list-style: none; font-size: 0.85rem; }
.method-card li { padding: 0.25rem 0; }
.method-card li::before { content: ''; display: inline-block; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; margin-right: 0.5rem; vertical-align: middle; }

/* --- FOOTER --- */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.75);
  padding: 2.5rem 0;
  font-size: 0.85rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}
.footer a { color: rgba(255,255,255,0.9); }
.footer-right { text-align: right; font-size: 0.8rem; }

/* --- RESPONSIVE --- */
@media (max-width: 1023px) {
  #map { height: 400px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 3.5rem;
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 1rem 1.5rem;
    gap: 1rem;
    box-shadow: var(--shadow-md);
  }
  .nav-toggle { display: block; }
  #map { height: 300px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { flex-direction: column; align-items: stretch; }
  .search-input { width: 100%; }
  .result-count { margin-left: 0; }
  .reg-grid, .secondary-content.open { grid-template-columns: 1fr; }
  .api-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .footer-right { text-align: left; }
  .pgt-grid { grid-template-columns: 1fr; }

  /* Mobile: table → card list */
  .table-wrap { box-shadow: none; background: transparent; }
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  tr {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 0.75rem;
    padding: 1rem;
  }
  td { padding: 0.25rem 0; border: none; }
  td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--neutral-400);
    display: block;
  }
}
