:root {
  --color-bg: #f4f6fb;
  --color-surface: #ffffff;
  --color-primary: #6f8fbc;
  --color-primary-strong: #27568f;
  --color-accent: #007bff;
  --color-text: #1f2933;
  --color-muted: #6b7280;
  --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.08);
  --radius-lg: 16px;
  --radius-pill: 999px;
}

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

img {
  max-width: 100%;
  display: block;
}

.site-header {
  background: #e0e7f3;
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

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

.brand-logo {
  height: 40px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.main-nav {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  border: none;
  background: transparent;
  padding: 0.5rem 0.9rem;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  color: var(--color-primary-strong);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  background: rgba(148, 163, 184, 0.2);
}

.nav-link.active {
  background: var(--color-primary-strong);
  color: #ffffff;
}

.site-main {
  max-width: 1100px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem 0.5rem;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.layout-two-column {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.3fr);
  gap: 1.75rem;
  align-items: flex-start;
}

.layout-stack {
  align-items: stretch;
}

h1 {
  font-size: 1.7rem;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

/* Added for subheadings in info cards */
h3 {
  font-size: 1rem;
  margin: 0.7rem 0 0.4rem;
}

p {
  margin: 0 0 0.7rem;
  line-height: 1.5;
}

.small {
  font-size: 0.82rem;
  color: var(--color-muted);
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-soft);
}

/* Slight spacing between stacked info cards in About tab */
.info-card {
  margin-top: 1.1rem;
}

.founders-card .founder + .founder {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.founder h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.site-groups {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.site-group h2 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.site-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-group li {
  padding: 0.2rem 0;
  font-size: 0.95rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0.5rem;
}

.chip {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.8);
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  background: #ffffff;
  color: var(--color-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
  border-color: var(--color-primary);
}

.chip-active {
  background: var(--color-primary-strong);
  border-color: var(--color-primary-strong);
  color: #ffffff;
}

.map-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1rem 1.2rem 1.2rem;
  box-shadow: var(--shadow-soft);
}

.map-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.map-legend {
  display: flex;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--color-muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.legend-ec {
  background: #22c55e;
}

.legend-bg {
  background: #f97316;
}

.map-container {
  position: relative;
  margin-top: 0.5rem;
  border-radius: 18px;
  height: 260px;
  overflow: hidden;
}

.sa-map {
  position: absolute;
  inset: 10% 12% 10% 12%;
}

.sa-outline {
  fill: url(#sa-grad);
  stroke: rgba(15, 23, 42, 0.45);
  stroke-width: 3;
  stroke-linejoin: round;
}

.site-marker {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  cursor: pointer;
  background: var(--color-accent);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.3);
  padding: 0;
}

.site-marker.ec-lab {
  background: #22c55e;
}

.site-marker.blood-gas {
  background: #f97316;
}

.map-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  font-size: 0.75rem;
  transform: translate(-50%, -140%);
  opacity: 0;
  transition: opacity 0.12s ease;
  white-space: nowrap;
}

.map-note {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  color: var(--color-muted);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
}

.contact-list li + li {
  margin-top: 0.25rem;
}

.contact-list a {
  color: var(--color-accent);
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

/* Simple list style reused in several cards (scope, consent, factors) */
.info-list {
  list-style: disc;
  margin: 0 0 0.7rem 1.2rem;
  padding: 0;
  font-size: 0.92rem;
  color: var(--color-muted);
}

.app-card p {
  margin-bottom: 0.9rem;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: #111827;
  color: #ffffff;
  font-size: 0.8rem;
  text-decoration: none;
  font-weight: 500;
}

.store-badge:hover {
  opacity: 0.9;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.screenshot {
  margin: 0;
  padding: 0.25rem;
  background: #f1f5f9;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.screenshot img {
  border-radius: 10px;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  padding: 1rem 1rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* Locations table styling (lab locations / hours / contact) */
.locations-card {
  margin-top: 1.5rem;
}

.locations-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.86rem;
}

.locations-table th,
.locations-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
  vertical-align: top;
}

.locations-table th {
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--color-muted);
}

.locations-table tr:last-child th,
.locations-table tr:last-child td {
  border-bottom: none;
}

@media (max-width: 840px) {
  .layout-two-column {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .main-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .map-container {
    height: 240px;
  }

  .map-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .brand-logo {
    height: 32px;
  }

  .header-inner {
    padding-inline: 0.8rem;
  }

  .site-main {
    padding-inline: 0.8rem;
  }

  .locations-table {
    font-size: 0.8rem;
  }
}

