/* Shared shell for every MinMap page except the map, which is full-bleed and has its own. */

:root {
  --navy: #1f3a5f;
  --navy-soft: #f4f7fb;
  --ink: #1a1a1a;
  --muted: #666;
  --line: #e6e6e6;
  --amber: #e6a817;
  --green: #2e7d32;
  --red: #c62828;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.6;
  background: #fff;
}

/* ---------------------------------------------------------------- nav */

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  background: #fff;
}
.nav .brand {
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 14px;
  color: var(--navy);
  text-decoration: none;
  margin-right: auto;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--navy); }
.nav a.active { border-bottom-color: var(--navy); font-weight: 600; }

/* ------------------------------------------------------- slogan + freshness stamp

   One strip under the nav on every page: what the site is for, why it can be trusted, and
   how current the data is. The stamp sits at the right on a wide screen and drops onto its
   own line on a phone, where it reads as the footnote to the claim above it. */

.tagline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  padding: 10px 20px;
  background: var(--navy-soft);
  border-bottom: 1px solid var(--line);
}
.tagline .slogan {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.tagline .trust { font-size: 13px; color: #4a5568; }

.stamp {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted #b9c2cd;
  /* Reserve the line before the fetch answers, so the header doesn't jump on load. */
  min-height: 1.2em;
}
.stamp:hover { color: var(--navy); border-bottom-color: var(--navy); }

/* The outage alarm. A stale stamp has to look wrong at a glance, or it isn't an alarm —
   the whole point is that a pipeline that quietly stopped stops looking normal. */
.stamp[data-state="stale"] { color: #8a1f1f; font-weight: 600; border-bottom-color: #d9a0a0; }
.stamp[data-state="unknown"] { font-style: italic; }

@media (max-width: 44rem) {
  .tagline { gap: 2px 12px; padding: 9px 16px; }
  .tagline .slogan { font-size: 15px; }
  /* margin-left:auto would strand it against the right edge once it wraps to its own row. */
  .stamp { margin-left: 0; flex-basis: 100%; }
}

/* ---------------------------------------------------------------- page */

.wrap { max-width: 44rem; margin: 0 auto; padding: 32px 20px 80px; }
.wrap.wide { max-width: 60rem; }

h1 { font-size: 28px; line-height: 1.25; margin: 0 0 10px; }
h2 { font-size: 19px; margin: 32px 0 8px; }
h3 { font-size: 16px; margin: 22px 0 6px; }
.lede { font-size: 17px; color: #444; margin: 0 0 28px; }
.muted { color: var(--muted); font-size: 13px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

/* ---------------------------------------------------------------- forms */

label { display: block; font-size: 14px; font-weight: 600; margin: 16px 0 4px; }
label .hint { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; }

input[type="text"], input[type="email"], input[type="number"], input[type="tel"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  border: 1px solid #ccd2da;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
textarea { min-height: 110px; resize: vertical; }

button, .btn {
  display: inline-block;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
button:disabled { opacity: 0.5; cursor: default; }
button.secondary, .btn.secondary { background: #fff; color: var(--navy); border: 1px solid var(--navy); }
button.ghost { background: transparent; color: var(--navy); padding: 6px 0; font-size: 14px; }

/* The honeypot. Off-screen rather than display:none — some bots skip hidden inputs. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.choices { display: grid; gap: 10px; margin-top: 8px; }
@media (min-width: 34rem) { .choices.two { grid-template-columns: 1fr 1fr; } }
.choice {
  text-align: left;
  background: #fff;
  color: var(--ink);
  border: 1px solid #ccd2da;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-weight: 600;
  cursor: pointer;
}
.choice:hover { border-color: var(--navy); background: var(--navy-soft); }
.choice[aria-pressed="true"] { border-color: var(--navy); background: var(--navy-soft); box-shadow: inset 0 0 0 1px var(--navy); }
.choice small { display: block; font-weight: 400; color: var(--muted); margin-top: 3px; font-size: 13px; }

/* ---------------------------------------------------------------- cards */

.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.card.accent { background: var(--navy-soft); border-color: #d6e0ee; }

.estimate { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; margin: 4px 0 2px; }
.estimate .per { font-size: 15px; font-weight: 600; color: var(--muted); }

.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
}
.pill.rough { background: #fdf1d8; color: #8a6100; }
.pill.better { background: #e2eefc; color: #1a4d8f; }
.pill.good { background: #e0f0e2; color: #1f5f24; }

.notes { list-style: none; padding: 0; margin: 14px 0 0; }
.notes li { font-size: 14px; color: #444; padding: 7px 0 7px 18px; position: relative; border-top: 1px solid #eef1f4; }
.notes li:before { content: "·"; position: absolute; left: 4px; font-weight: 700; color: var(--navy); }

.stats { display: flex; gap: 22px; flex-wrap: wrap; margin: 10px 0 0; }
.stat b { display: block; font-size: 22px; line-height: 1.2; }
.stat span { font-size: 13px; color: var(--muted); }

.verdict { font-size: 19px; font-weight: 700; margin: 0 0 6px; }
.verdict.low { color: var(--red); }
.verdict.in_range { color: var(--navy); }
.verdict.strong { color: var(--green); }

.disclaimer { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 22px; padding-top: 12px; }

.ok { background: #e0f0e2; border: 1px solid #bcdcc0; color: #1f5f24; padding: 12px 14px; border-radius: 8px; font-size: 14px; }
.err { background: #fbe4e4; border: 1px solid #f0c2c2; color: #8a1f1f; padding: 12px 14px; border-radius: 8px; font-size: 14px; }

.hidden { display: none !important; }

details.faq { border-bottom: 1px solid var(--line); padding: 4px 0; }
details.faq summary { cursor: pointer; font-weight: 600; font-size: 16px; padding: 12px 0; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary:before { content: "+ "; color: var(--navy); font-weight: 800; }
details.faq[open] summary:before { content: "– "; }
details.faq .a { padding: 0 0 14px 18px; color: #333; font-size: 15px; }

footer.site { border-top: 1px solid var(--line); padding: 24px 20px 40px; font-size: 13px; color: var(--muted); }
footer.site a { color: var(--muted); }
