:root {
  color-scheme: light;
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-strong: #111817;
  --text: #17201e;
  --muted: #5e6f6a;
  --line: #d9e2de;
  --accent: #087f5b;
  --accent-dark: #056044;
  --warning: #b54708;
  --error: #b42318;
  --shadow: 0 24px 70px rgba(17, 24, 23, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  min-height: 100vh;
  padding: 18px;
}

.lookup-panel,
.result-panel,
.map-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.lookup-panel {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--surface-strong);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.eyebrow,
.panel-heading p,
.metric-label,
.address-block span,
.lookup-form label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  margin-top: 3px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}

h2 {
  margin-top: 4px;
  font-size: 28px;
}

.lookup-form {
  display: grid;
  gap: 10px;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.input-row input {
  width: 100%;
  min-width: 0;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #f9fbfa;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  outline: none;
}

.input-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(8, 127, 91, 0.14);
}

.input-row button {
  height: 52px;
  border: 0;
  border-radius: 8px;
  padding: 0 22px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.input-row button:hover:not(:disabled) {
  background: var(--accent-dark);
}

.input-row button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.error-text,
.notice {
  margin: 0;
  color: var(--error);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.notice {
  color: var(--warning);
}

.demo-notes {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.workspace {
  display: grid;
  grid-template-rows: auto minmax(420px, 1fr);
  gap: 18px;
  min-width: 0;
}

.result-panel {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 18px;
  padding: 24px;
}

.result-body {
  display: grid;
  gap: 18px;
}

.address-block {
  display: grid;
  gap: 7px;
}

.address-block strong {
  font-size: 18px;
  line-height: 1.45;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f9fbfa;
}

.metric strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 15px;
}

.map-panel {
  position: relative;
  overflow: hidden;
  min-height: 420px;
}

.map-canvas {
  width: 100%;
  height: 100%;
  min-height: 420px;
}

.map-fallback {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--error);
  font-weight: 800;
}

.leaflet-container {
  font-family: inherit;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .lookup-panel {
    min-height: auto;
  }

  .result-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 10px;
    gap: 10px;
  }

  .lookup-panel,
  .result-panel {
    padding: 18px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .input-row button {
    width: 100%;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .workspace {
    grid-template-rows: auto minmax(360px, 58vh);
    gap: 10px;
  }

  .map-panel,
  .map-canvas {
    min-height: 360px;
  }
}

@media (max-width: 420px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }
}

