:root {
  --bg: #f4f6ef;
  --ink: #10171f;
  --muted: #516172;
  --card: #ffffff;
  --accent: #086a8f;
  --accent-soft: #dceef5;
  --ok: #237a4d;
  --warn: #b67d00;
  --bad: #9b2f2f;
  --shadow: 0 18px 40px rgba(16, 23, 31, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 15% 10%, #e9f6ff 0%, var(--bg) 35%),
    radial-gradient(circle at 100% 0%, #fff4dd 0%, transparent 30%);
}

.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to right, rgba(8, 106, 143, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(8, 106, 143, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 18px 36px;
  position: relative;
}

.hero h1 {
  margin: 6px 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.03em;
}

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  color: var(--accent);
  margin: 0;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.subtext {
  margin-top: 4px;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid #e0e7ed;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.controls {
  margin-top: 16px;
  padding: 16px;
}

.row {
  margin-bottom: 12px;
}

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

label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  gap: 6px;
  color: var(--muted);
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid #ccd8e2;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
}

.actions {
  display: flex;
  gap: 10px;
}

.btn {
  border: 0;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.subtle {
  background: #eff3f7;
  color: var(--ink);
}

.status {
  margin: 10px 2px 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.hidden {
  display: none;
}

.best {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #f0f8ff, #ffffff 65%);
}

.best h2 {
  margin: 0 0 8px;
}

.best p {
  margin: 4px 0;
}

.layout {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 14px;
}

.map {
  min-height: 540px;
  overflow: hidden;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.count {
  color: var(--muted);
  font-size: 0.9rem;
}

.results {
  margin-top: 8px;
  display: grid;
  gap: 10px;
}

.result {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e0e7ed;
  background: #fff;
}

.result h3 {
  margin: 0;
  font-size: 1.05rem;
}

.meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  padding: 3px 6px;
  border-radius: 999px;
  background: #f2f5f8;
}

.tag.green {
  color: var(--ok);
  background: #e8f5ee;
}

.tag.yellow {
  color: var(--warn);
  background: #fff6df;
}

.tag.red {
  color: var(--bad);
  background: #fdeaea;
}

.tag.freshness.fresh {
  color: #0d6a52;
  background: #e7faf1;
}

.tag.freshness.recent {
  color: #8a6400;
  background: #fff5d9;
}

.tag.freshness.stale {
  color: #7f2a2a;
  background: #fde8e8;
}

.links {
  margin-top: 8px;
  display: flex;
  gap: 12px;
}

.links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.report {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d6e0e8;
}

.report-label {
  max-width: 220px;
}

.report-wait-input {
  max-width: 120px;
}

.checkbox-inline {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.checkbox-inline input {
  width: auto;
}

.report-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-note {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

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

  .map {
    min-height: 360px;
  }

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

  .actions {
    flex-direction: column;
  }
}
