:root {
  --ink: #142225;
  --muted: #59686d;
  --paper: #f4f1ea;
  --panel: #ffffff;
  --teal: #0b6f72;
  --deep: #12343b;
  --gold: #d79a32;
  --line: rgba(20, 34, 37, 0.14);
  --shadow: 0 18px 50px rgba(18, 52, 59, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.55; }
a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(244, 241, 234, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--deep));
  font-weight: 950;
}
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: 0.78rem; }

.top-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.top-nav a { padding: 8px 10px; color: var(--muted); text-decoration: none; }
.top-nav a:hover { color: var(--ink); }

.hero {
  min-height: 68vh;
  display: grid;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(18, 52, 59, 0.96), rgba(18, 52, 59, 0.82) 48%, rgba(18, 52, 59, 0.4)),
    url("https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  background-position: center;
}

.hero-copy {
  width: min(960px, 100%);
  padding: clamp(80px, 12vw, 150px) clamp(20px, 6vw, 72px) clamp(42px, 8vw, 92px);
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.78rem;
}
.hero .eyebrow { color: #9ce4df; }

h1, h2, h3 { margin-top: 0; line-height: 1.08; letter-spacing: 0; overflow-wrap: break-word; }
h1 { max-width: 900px; margin-bottom: 18px; font-size: clamp(2.8rem, 7vw, 5.9rem); }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: 1.15rem; }

.lede { max-width: 780px; color: rgba(255,255,255,0.86); font-size: clamp(1.04rem, 2vw, 1.24rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 850;
  text-decoration: none;
}
.button.primary { color: #1d1607; background: var(--gold); }
.button.secondary { color: #ffffff; border-color: rgba(255,255,255,0.34); background: rgba(255,255,255,0.1); }

.section { width: min(1240px, calc(100% - 36px)); margin: 0 auto; padding: 72px 0; }
.section-heading { max-width: 900px; margin-bottom: 28px; }
.section-heading p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; }

.caution-section {
  width: 100%;
  padding-inline: max(18px, calc((100% - 1240px) / 2));
  background: #e8f2f1;
}
.caution-grid, .hospital-grid, .reference-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.caution-grid article, .hospital-card, .reference-grid a {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(18, 52, 59, 0.06);
}
.caution-grid p, .hospital-card p { color: var(--muted); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 10px 32px rgba(18,52,59,0.08);
}
.toolbar label { display: grid; gap: 6px; flex: 1 1 260px; color: var(--muted); font-size: 0.82rem; font-weight: 850; text-transform: uppercase; }
input, select { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; color: var(--ink); background: #ffffff; font: inherit; }
.reset-button {
  align-self: end;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--deep);
  background: #ffffff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.reset-button:hover { border-color: rgba(11, 111, 114, 0.5); color: var(--teal); }
.stats { margin: 18px 0; color: var(--muted); font-weight: 750; }

.hospital-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hospital-card { display: grid; gap: 14px; }
.card-top { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.tag { display: inline-flex; padding: 5px 8px; border-radius: 6px; color: #245b33; background: #eef6ef; font-size: 0.78rem; font-weight: 850; white-space: nowrap; }
.tag.region { color: #334e68; background: #edf4fb; }
.tag.expertise { color: #6b4a12; background: #fff7eb; }
.link-row { display: flex; flex-wrap: wrap; gap: 10px; }
.link-row a, .reference-grid a { color: var(--teal); font-weight: 850; }

.reference-section { border-top: 1px solid var(--line); }
.reference-grid a { min-height: 88px; text-decoration: none; }
.footer { padding: 34px clamp(18px, 4vw, 54px); color: #ffffff; background: var(--deep); }
.footer p { margin: 6px 0 0; color: rgba(255,255,255,0.72); }

@media (max-width: 980px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .top-nav { justify-content: flex-start; width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .top-nav a { white-space: nowrap; }
  .caution-grid, .hospital-grid, .reference-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  h1 { font-size: clamp(2.35rem, 12vw, 4rem); }
  .card-top { display: grid; }
  .tag-row { justify-content: flex-start; }
}
