/* No external fonts, scripts or trackers: every request stays on our own host. */
:root {
  --yellow: #ffc51c;
  --ink: #141414;
  --muted: #5a4a14;
  --line: rgba(20, 20, 20, 0.18);
  --paper: #fff8e1;
  --hot: #d7261e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--yellow);
  color: var(--ink);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--ink); }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 900; font-size: 1.4rem; letter-spacing: -0.03em; text-decoration: none; }
nav a { margin-left: 20px; text-decoration: none; font-weight: 600; opacity: 0.6; }
nav a.active, nav a:hover { opacity: 1; }

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

h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.05; letter-spacing: -0.03em; margin: 40px 0 12px; }
h2 { font-size: 1.2rem; margin: 48px 0 12px; }
.lead { font-size: 1.1rem; max-width: 560px; margin: 0 0 24px; }

.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--yellow);
  border: 0;
  border-radius: 999px;
  padding: 14px 26px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.filters button {
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
  border-radius: 999px; padding: 4px 14px; cursor: pointer; font: inherit; font-size: 0.9rem; font-weight: 600;
}
.filters button.on { background: var(--ink); color: var(--yellow); }

/* 3D map: wider than the text column, up to 1040px. */
.map {
  position: relative;
  margin: 12px calc(50% - min(50vw - 16px, 520px)) 0;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
}
.map canvas { display: block; width: 100%; height: 540px; cursor: grab; touch-action: pan-y; }
.map canvas:active { cursor: grabbing; }
.map canvas.labels { position: absolute; top: 0; left: 0; pointer-events: none; }
.tip.fallback { position: static; transform: none; margin: 24px; max-width: none; }
.map canvas:focus-visible { outline: 3px solid var(--ink); outline-offset: -5px; }
.zoom { position: absolute; top: 12px; right: 12px; display: grid; gap: 6px; }
.zoom button {
  width: 38px; height: 38px; border: 2px solid var(--ink); border-radius: 10px; cursor: pointer;
  background: var(--paper); color: var(--ink); font: 800 1.3rem/1 system-ui, sans-serif;
}
.zoom button:hover { background: var(--ink); color: var(--yellow); }
.tip {
  position: absolute; transform: translate(-50%, -100%); pointer-events: none;
  background: var(--ink); color: var(--yellow); border-radius: 10px; padding: 8px 12px;
  font-size: 0.85rem; line-height: 1.35; max-width: 260px;
}
.tip strong, .tip span { display: block; }
.legend {
  display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px;
  border-top: 2px solid var(--ink); background: var(--paper); font-size: 0.8rem; font-weight: 600;
}
.legend .drag { margin-left: auto; color: var(--muted); font-weight: 400; }
.spike {
  display: inline-block; width: 16px; height: 13px; margin-right: 6px; vertical-align: -2px;
  background: #8a8f9c; clip-path: polygon(0 100%, 28% 40%, 42% 60%, 62% 0, 100% 100%);
}
.spike.hot, .fill.hot { background: var(--hot); }

.sub { margin: -4px 0 12px; color: var(--muted); font-size: 0.95rem; }
.notorious { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.notorious button {
  width: 100%; display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; text-align: left; font: inherit; color: var(--yellow); cursor: pointer;
  background: var(--ink); border: 3px solid var(--ink); border-radius: 14px;
}
.notorious button:hover, .notorious button.on { border-color: var(--hot); }
.notorious .rank {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--hot); color: #fff; font-weight: 900; font-size: 1.1rem;
}
.notorious strong { display: block; font-size: 1.1rem; }
.notorious small { display: block; color: rgba(255, 197, 28, 0.75); font-size: 0.85rem; }
.notorious .count { font-size: 2rem; font-weight: 900; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.notorious .count small { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.notorious .empty { padding: 14px 0; color: var(--muted); }

.row { display: grid; grid-template-columns: 1fr 2fr 28px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row small { display: block; color: var(--muted); }
.track { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.fill { height: 100%; background: var(--ink); border-radius: 5px; }
.row .n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

form label { display: block; font-weight: 700; margin: 22px 0 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
input[type=text], input[type=month], textarea {
  width: 100%; padding: 12px 14px; font: inherit;
  border: 2px solid var(--ink); border-radius: 10px;
  background: var(--paper); color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 22px 0 0; }
legend { font-weight: 700; padding: 0; margin-bottom: 6px; }
form label.choice {
  font-weight: 400; display: flex; gap: 10px; align-items: center; margin: 8px 0;
  padding: 12px 14px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); cursor: pointer;
}
input[type=radio] { accent-color: var(--ink); width: 20px; height: 20px; margin: 0; }
input::placeholder { color: rgba(20, 20, 20, 0.4); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
form label.chip {
  position: relative; display: inline-block; margin: 0; padding: 9px 16px; font-weight: 600;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); cursor: pointer;
}
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.chip:has(input:checked) { background: var(--ink); color: var(--yellow); }
.chip:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
form label.choice:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ink); font-weight: 600; }
form .btn { margin-top: 28px; }
.btn-wide { width: 100%; padding: 16px; }

.urgent { background: var(--ink); color: var(--yellow); border-radius: 14px; padding: 20px; margin-top: 16px; }
.urgent h2 { margin: 0 0 8px; }
.urgent ul { margin: 0 0 16px; padding-left: 20px; }
.urgent li { margin: 6px 0; }
.urgent .btn { background: var(--yellow); color: var(--ink); }
.thanks { display: none; }

p { max-width: 600px; }

footer { margin-top: 64px; padding: 20px 0 40px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }

@media (max-width: 520px) {
  nav a { margin-left: 14px; }
  .row { grid-template-columns: 1fr 28px; }
  .row .track { grid-column: 1 / -1; grid-row: 2; }
  .map canvas { height: 420px; }
  .legend .drag { margin-left: 0; }
  .notorious button { grid-template-columns: 32px 1fr auto; gap: 10px; padding: 12px; }
  .notorious .rank { width: 32px; height: 32px; font-size: 0.95rem; }
}
