:root {
  --ink: #111827;
  --muted: #5d6675;
  --paper: #f7f5f1;
  --panel: #ffffff;
  --line: #ddd9d1;
  --danger: #b42318;
  --danger-dark: #7a1712;
  --blue: #185b8f;
  --shadow: 0 12px 34px rgba(17, 24, 39, 0.1);
  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);
  font-size: 18px;
  line-height: 1.5;
}
a { color: inherit; }
button, input { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 14px;
  color: #fff;
  background: var(--danger);
  box-shadow: 0 8px 24px rgba(122, 23, 18, 0.24);
}
.brand {
  display: inline-flex;
  min-width: 0;
  gap: 12px;
  align-items: center;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 950;
}
.brand strong,
.brand small { display: block; }
.brand small { color: rgba(255, 255, 255, 0.78); font-size: 0.82rem; }
nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
nav a { color: rgba(255,255,255,0.86); font-weight: 820; text-decoration: none; }

main,
footer {
  width: min(100%, 760px);
  margin: 0 auto;
}
.finder { padding: 14px; }
.hero,
.search-panel,
.map-panel,
.notice,
.number-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.hero {
  padding: 22px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(70, 12, 10, 0.94), rgba(99, 20, 16, 0.78)),
    url("assets/emergency-department.jpg");
  background-size: cover;
  background-position: center;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 920;
  letter-spacing: 0;
  text-transform: uppercase;
}
.hero .eyebrow { color: #ffd7d2; }
h1, h2 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}
h1 { max-width: 680px; font-size: clamp(2.2rem, 8vw, 4.4rem); }
h2 { font-size: clamp(1.45rem, 5vw, 2rem); }
.hero p:not(.eyebrow) {
  max-width: 640px;
  color: rgba(255,255,255,0.88);
}
.call-button,
.find-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 14px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--danger);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.number-status { margin: 10px 0 0; color: rgba(255,255,255,0.86); font-weight: 780; }

.search-panel,
.map-panel,
.notice { margin-top: 14px; padding: 16px; }
.emergency-visuals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.emergency-visuals figure {
  overflow: hidden;
  min-height: 160px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e7eef1;
}
.emergency-visuals img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
}
.search-panel label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}
input {
  width: 100%;
  min-height: 52px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}
.find-button {
  width: 100%;
  margin-top: 10px;
  min-height: 58px;
  background: var(--blue);
  font-size: 1.08rem;
}
.search-status {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 740;
}

.map-header {
  margin-bottom: 12px;
}
.map-action-panel {
  display: grid;
  place-items: center;
  gap: 14px;
  margin-top: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: #fbfaf7;
}
.map-action-panel p {
  max-width: 560px;
  margin: 0;
  font-weight: 760;
}
.map-canvas {
  width: 100%;
  min-height: 480px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e7eef1;
}
.map-embed {
  display: block;
  width: 100%;
  min-height: 480px;
  border: 0;
  border-radius: 8px;
}
.map-error {
  display: grid;
  min-height: 480px;
  padding: 24px;
  place-items: center;
  color: var(--danger-dark);
  text-align: center;
  font-weight: 850;
}
.map-info {
  max-width: 220px;
  color: var(--ink);
}
.map-info p {
  margin: 6px 0;
}
.map-info a {
  color: var(--blue);
  font-weight: 850;
}
.result-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.result-list > p {
  margin: 0;
  color: var(--muted);
  font-weight: 760;
}
.result-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.result-card strong,
.result-card span {
  display: block;
}
.result-card span {
  margin-top: 3px;
  color: #267342;
  font-size: 0.86rem;
  font-weight: 850;
}
.result-card p {
  margin: 8px 0;
  color: var(--muted);
}
.result-card a {
  color: var(--blue);
  font-weight: 850;
}

.notice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--danger-dark);
  box-shadow: none;
}
.notice strong,
.notice span {
  padding: 6px 8px;
  border: 1px solid #f3b5ad;
  border-radius: 8px;
  background: #fff5f3;
}

.section { padding: 44px 14px; }
.section-heading { margin-bottom: 18px; }
.number-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.number-card { padding: 16px; }
.number-card strong { display: block; margin-bottom: 4px; }
.number-card a {
  color: var(--danger);
  font-size: 1.35rem;
  font-weight: 950;
  text-decoration: none;
}
.number-card p { margin: 8px 0 0; color: var(--muted); }
.backup-link {
  margin: 16px 0 0;
}
.backup-link a {
  color: var(--blue);
  font-weight: 850;
}
footer {
  padding: 30px 14px;
  color: #fff;
  background: #2b1110;
}
footer p { margin: 6px 0 0; color: rgba(255,255,255,0.74); }

@media (max-width: 640px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  nav { justify-content: flex-start; }
  .emergency-visuals { grid-template-columns: 1fr; }
  .number-grid { grid-template-columns: 1fr; }
}
