:root {
  --bg: #f6f7f5;
  --panel: #ffffff;
  --ink: #16201b;
  --muted: #5d6a63;
  --line: #e2e6e3;
  --brand: #0f6b4f;
  --brand-ink: #ffffff;
  --warn-bg: #fff6e5;
  --warn-ink: #7a4b00;
  --err: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1412;
    --panel: #161d1a;
    --ink: #e6ece8;
    --muted: #98a59e;
    --line: #26302b;
    --brand: #3fbf8f;
    --brand-ink: #06130e;
    --warn-bg: #2b2210;
    --warn-ink: #f2c46d;
    --err: #ff8a80;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* class display rules must not override the hidden attribute */
html, body { height: 100%; margin: 0; }
body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  display: grid;
  grid-template-columns: 460px 1fr;
}

.panel {
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
#map { height: 100%; min-height: 360px; }

.brand { display: flex; gap: 12px; align-items: center; }
.brand-text { flex: 1; min-width: 0; }
.badge { align-self: flex-start; display: flex; gap: 6px; align-items: center; white-space: nowrap;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.badge .link-strong { font-size: 12px; }
.feedback-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.feedback-head .link { padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chips label { flex-direction: row; align-items: center; gap: 6px; margin: 0; font-size: 12.5px;
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.chips label:has(input:checked) { border-color: var(--brand); color: var(--brand); font-weight: 600; }
.chips input { margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; font-size: 13px; font-weight: 500; }
.chips button { font: inherit; font-size: 12.5px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: inherit; cursor: pointer; }
.chips button[aria-pressed="true"], .chips button[aria-selected="true"] { border-color: var(--brand); color: var(--brand); font-weight: 600; }
.years { margin-bottom: 0; }
.logo { width: 42px; height: 42px; flex: none; display: block; object-fit: contain; }
h1 { margin: 0; font-size: 20px; letter-spacing: -0.01em; }
.tagline { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.step h2 { font-size: 14px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.num {
  width: 20px; height: 20px; border-radius: 50%; font-size: 12px;
  background: var(--line); display: grid; place-items: center;
}
.hint, .small { font-size: 12.5px; }
.muted { color: var(--muted); }
.area { font-size: 13px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.area.over { color: var(--err); border-color: var(--err); }

label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; margin-bottom: 10px; }
label.toggle { flex-direction: row; align-items: center; gap: 8px; }
input, select {
  font: inherit; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}

.primary, a.button {
  display: block; width: 100%; text-align: center; text-decoration: none;
  font: inherit; font-weight: 600; padding: 10px 14px; border-radius: 8px;
  border: 0; background: var(--brand); color: var(--brand-ink); cursor: pointer;
}
.primary:disabled { opacity: 0.45; cursor: not-allowed; }

.plan { display: flex; justify-content: space-between; align-items: center; font-size: 13px;
  padding: 8px 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }
.link-strong { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--brand); cursor: pointer; }
.history { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.history li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.history a { color: var(--brand); font-weight: 600; text-decoration: none; white-space: nowrap; }
.legal { margin-top: 6px; }
.link-line { margin-top: -4px; }
.link-line a { color: var(--brand); font-weight: 600; }
.legal a { color: var(--muted); }
.buy { border: 1px solid var(--brand); border-radius: 10px; padding: 12px; margin-top: 10px; }
.buy p { margin: 0 0 10px; font-size: 13.5px; }
.status { font-size: 13px; margin-top: 8px; min-height: 1em; }
.status.error { color: var(--err); }
.spinner {
  display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px;
  border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.counts { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; }
.counts th, .counts td { text-align: left; padding: 5px 4px; border-bottom: 1px solid var(--line); }
.counts td:not(:first-child), .counts th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

.warnings { list-style: none; padding: 0; margin: 0 0 8px; }
.warnings li { background: var(--warn-bg); color: var(--warn-ink); font-size: 12.5px; padding: 6px 8px; border-radius: 6px; margin-bottom: 4px; }

.trust { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); }
.trust a { color: var(--brand); }

dialog { max-width: 520px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); }
dialog::backdrop { background: rgb(0 0 0 / 0.4); }
dialog p { font-size: 14px; line-height: 1.5; }

@media (max-width: 760px) {
  body { grid-template-columns: 1fr; grid-template-rows: 55vh auto; }
  #map { grid-row: 1; }
  .panel { grid-row: 2; border-right: 0; border-top: 1px solid var(--line); padding: 16px; }
}

/* Privacy and terms pages */
body.doc { display: block; overflow-y: auto; }
.doc-page { max-width: 720px; margin: 0 auto; padding: 24px 16px 64px; line-height: 1.55; font-size: 15px; }
.doc-page h1 { font-size: 26px; margin: 12px 0 4px; }
.doc-page h2 { font-size: 17px; margin: 24px 0 6px; }
.doc-page a { color: var(--brand); }
.doc-page td, .doc-page th { vertical-align: top; }

.choice { display: flex; gap: 8px; margin-bottom: 8px; }
.choice .secondary { width: auto; flex: 1; }
.choice .secondary.selected { background: var(--brand); color: var(--brand-ink); }
textarea { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); resize: vertical; }

.footer-links { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 24px; margin-top: 8px; }
.footer-links a { color: var(--brand); }
.trust .by { margin: 10px 0 0; font-size: 11.5px; }
