/* Gradar design system — hand-crafted, no build step, no external fonts
   (system stack, GDPR-friendly). Light app surface, deep-navy "radar" hero. */

:root {
  --ink: #0c1c2b;        /* primary text + hero */
  --ink-soft: #15324a;
  --slate: #45596b;      /* secondary text */
  --muted: #6b7e8e;      /* tertiary text */
  --line: #e4eaf0;
  --line-soft: #eef2f6;
  --bg: #f5f8fb;
  --surface: #ffffff;
  --surface-2: #f9fbfd;
  --brand: #1f6feb;
  --brand-ink: #1657c4;
  --brand-soft: #eaf2fe;
  --amber: #f59e0b;
  --amber-ink: #9a6400;
  --amber-soft: #fdf3e0;
  --green: #1aa15a;
  --green-soft: #e7f6ee;
  --danger: #c0392b;
  --danger-soft: #fbeceA;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(12, 28, 43, .06);
  --shadow: 0 1px 2px rgba(12, 28, 43, .05), 0 6px 20px rgba(12, 28, 43, .07);
  --shadow-lg: 0 10px 40px rgba(12, 28, 43, .14);
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
          sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }

/* ---- top nav ---------------------------------------------------------- */
.nav {
  display: flex; align-items: center; gap: 20px;
  height: 62px; padding: 0 24px; background: var(--surface);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50;
}
.nav .brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700;
  font-size: 18px; color: var(--ink); letter-spacing: -.02em; }
.nav .brand:hover { text-decoration: none; }
.nav .brand svg { display: block; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-links a { color: var(--slate); padding: 7px 11px; border-radius: var(--radius-sm);
  font-weight: 500; font-size: 14px; }
.nav-links a:hover { color: var(--ink); background: var(--line-soft); text-decoration: none; }
.nav-links a.active { color: var(--brand); }

/* ---- buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1;
  padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; transition: background .14s, border-color .14s, transform .04s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); }
.btn-cta { background: var(--amber); color: #3a2600; }
.btn-cta:hover { background: #e6920a; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: #d4dde6; }
.btn-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.22); }
.btn-light:hover { background: rgba(255,255,255,.2); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-block { width: 100%; }

/* ---- banners ---------------------------------------------------------- */
.banner { padding: 10px 0; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.banner .container { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.banner-info { background: var(--brand-soft); color: #1a4b8f; border-bottom-color: #cfe1fb; }
.banner-warn { background: var(--danger-soft); color: #8a2317; border-bottom-color: #f0c5bd; font-weight: 600; }

/* ---- filter bar ------------------------------------------------------- */
.toolbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 0; }
.input, .select {
  font-family: inherit; font-size: 14px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px;
}
.input:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input { min-width: 200px; }

/* ---- lead cards ------------------------------------------------------- */
.result-count { color: var(--muted); font-size: 14px; padding: 16px 0 6px; }
.result-count b { color: var(--ink); }
.lead-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px; padding: 8px 0 48px; }
.lead-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 17px; box-shadow: var(--shadow-sm); transition: box-shadow .15s, border-color .15s;
  display: flex; flex-direction: column;
}
.lead-card:hover { box-shadow: var(--shadow); border-color: #d7e0e9; }
.lead-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 9px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; background: var(--line-soft); color: var(--slate);
  letter-spacing: .01em; }
.badge-permit { background: var(--green-soft); color: #0f7a40; }
.badge-link { background: var(--brand-soft); color: var(--brand-ink); }
.badge-link:hover { text-decoration: none; background: #dce9fd; }
.lead-title { font-weight: 650; font-size: 15.5px; color: var(--ink); margin-bottom: 8px; }
.lead-meta { color: var(--slate); font-size: 13px; margin: 3px 0; display: flex; gap: 6px; }
.lead-meta .i { color: var(--muted); flex: none; }
.lead-meta.personal { color: var(--amber-ink); }
.trades { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.trade { font-size: 12px; padding: 4px 9px; border-radius: 7px; background: var(--brand-soft);
  color: var(--brand-ink); border: 1px solid #d6e6fd; font-weight: 500; }
.trade b { color: var(--brand); font-weight: 700; margin-left: 2px; }
.evidence { font-size: 12.5px; color: var(--slate); margin-top: 8px; padding: 7px 10px;
  background: var(--surface-2); border-left: 3px solid var(--brand); border-radius: 0 6px 6px 0;
  line-height: 1.45; }
.evidence b { color: var(--brand-ink); }
.lead-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center;
  justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }
.empty code { background: var(--line-soft); padding: 2px 6px; border-radius: 5px; }

/* ---- hero (landing) --------------------------------------------------- */
.hero { background: radial-gradient(1200px 500px at 75% -10%, #1d3e5c 0%, var(--ink) 55%);
  color: #eaf2fa; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.05) 1px, transparent 0);
  background-size: 26px 26px; pointer-events: none; }
.hero-inner { position: relative; padding: 76px 0 84px; max-width: 720px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: #7fd0ff;
  background: rgba(127,208,255,.1); border: 1px solid rgba(127,208,255,.22);
  padding: 5px 11px; border-radius: 999px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); margin: 20px 0 16px; color: #fff; letter-spacing: -.025em; }
.hero .lede { font-size: clamp(16px, 2.2vw, 19px); color: #b7cbdb; max-width: 600px; margin: 0 0 28px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero .fineprint { margin-top: 16px; font-size: 13px; color: #8aa6bd; }

/* ---- stat band -------------------------------------------------------- */
.stat-band { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin: -42px auto 0; box-shadow: var(--shadow); max-width: var(--maxw); }
.stat { background: var(--surface); padding: 20px 22px; }
.stat .n { font-size: 30px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.stat .l { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---- sections --------------------------------------------------------- */
.section { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head .eyebrow { color: var(--brand); background: var(--brand-soft); border-color: #d6e6fd; }
.section-head h2 { font-size: clamp(24px, 3.5vw, 32px); margin: 14px 0 10px; }
.section-head p { color: var(--slate); font-size: 16px; margin: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm); }
.step .num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 9px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.step h3 { font-size: 16.5px; margin-bottom: 6px; }
.step p { color: var(--slate); font-size: 14px; margin: 0; }

/* trades showcase */
.chips-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-lg { font-size: 14px; padding: 9px 15px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink-soft); font-weight: 500; box-shadow: var(--shadow-sm); }

/* ---- teaser ----------------------------------------------------------- */
.teaser-wrap { position: relative; }
.teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.unlock-band { margin-top: 22px; background: var(--ink); color: #eaf2fa; border-radius: var(--radius);
  padding: 26px 28px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  box-shadow: var(--shadow); }
.unlock-band .lock { font-size: 26px; }
.unlock-band .txt { flex: 1; min-width: 220px; }
.unlock-band .txt b { color: #fff; font-size: 17px; }
.unlock-band .txt div { color: #aac1d5; font-size: 14px; margin-top: 2px; }
.is-blurred { filter: blur(5px); user-select: none; pointer-events: none; }

/* ---- panels (account / generic) -------------------------------------- */
.page { padding: 32px 0 56px; }
.page-title { font-size: 22px; margin-bottom: 4px; }
.page-sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm); max-width: 640px; }
.field { margin-bottom: 18px; }
.field > .label { display: block; font-size: 13px; font-weight: 600; color: var(--slate); margin-bottom: 8px; }
.chip-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); cursor: pointer; user-select: none; }
.chip-check:hover { border-color: #cdd9e3; }
.chip-check input { accent-color: var(--brand); }
.chip-check:has(input:checked) { background: var(--brand-soft); border-color: #bcd7fb; color: var(--brand-ink); font-weight: 500; }

/* ---- case timeline ---------------------------------------------------- */
.casehead { margin-bottom: 24px; }
.casehead h1 { font-size: 22px; margin-bottom: 6px; }
.casehead .meta { color: var(--slate); font-size: 14px; }
.timeline { position: relative; margin-left: 6px; padding-left: 26px; border-left: 2px solid var(--line); }
.tl-entry { position: relative; margin-bottom: 22px; }
.tl-entry::before { content: ""; position: absolute; left: -33px; top: 4px; width: 13px; height: 13px;
  border-radius: 50%; background: var(--brand); border: 3px solid var(--bg); }
.tl-entry.permit::before { background: var(--green); }
.tl-date { color: var(--muted); font-size: 13px; }
.tl-type { font-weight: 650; margin: 1px 0 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---- auth ------------------------------------------------------------- */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(900px 480px at 50% -20%, #15324a 0%, var(--bg) 50%); padding: 24px; }
.auth-card { width: 360px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 30px 30px 26px; box-shadow: var(--shadow-lg); }
.auth-card .brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px;
  color: var(--ink); margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.auth-card label { display: block; font-size: 13px; font-weight: 600; color: var(--slate); margin: 14px 0 6px; }
.auth-card input { width: 100%; font-family: inherit; font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.auth-card input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.auth-alt { margin-top: 16px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-err { background: var(--danger-soft); color: #8a2317; border: 1px solid #f0c5bd;
  border-radius: var(--radius-sm); padding: 9px 11px; font-size: 13px; margin-bottom: 6px; }

/* ---- footer ----------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 40px; }
.footer .container { display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  padding-top: 26px; padding-bottom: 26px; color: var(--muted); font-size: 13.5px; }
.footer .brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.footer .spacer { margin-left: auto; }
.footer a { color: var(--slate); }

/* ---- map -------------------------------------------------------------- */
.map-body { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.map-body .toolbar { flex: none; }
#map { flex: 1; background: #e9eef3; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.leaflet-popup-content-wrapper { border-radius: 10px; box-shadow: var(--shadow-lg); }
.leaflet-popup-content { margin: 12px 14px; max-height: 250px; overflow: auto; font-family: var(--font); }
.pop b { color: var(--ink); }
.pop .lead { border-top: 1px solid var(--line); padding: 5px 0; font-size: 13px; }
.pop .lead:first-of-type { border-top: 0; }
.pop .t { color: #0f7a40; font-size: 11px; }
.pop .w { color: var(--muted); font-size: 11px; }

/* ---- responsive ------------------------------------------------------- */
@media (max-width: 860px) {
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .teaser-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nav { gap: 10px; padding: 0 16px; }
  .container { padding: 0 16px; }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .input { min-width: 0; flex: 1; }
}
