/* Is It Safe to Go Outside?: page styles on top of the site's /styles.css. */
[hidden] { display: none !important; }

.safe { --yes: #2F6B3A; --probably: #9A7000; --no: #C2541B; --absolutely: #A3221B; }

/* The one enormous button */
.go {
  display: grid; place-items: center; width: 100%; min-height: clamp(160px, 24vw, 240px); padding: 24px;
  border: 0; border-radius: 16px;
  background: var(--ink); color: var(--paper);
  font: 500 clamp(1.6rem, 4.5vw, 3.25rem)/1.05 var(--sans); letter-spacing: -.035em;
  cursor: pointer;
  transition: background-color .2s, transform .12s;
}
.go:hover { background: #000; }
.go:active { transform: scale(.995); }
.go[disabled] { cursor: progress; color: var(--night-ink-2); font-size: clamp(1.1rem, 2.6vw, 1.6rem); letter-spacing: -.015em; }
.progress { min-height: 1.5em; margin-top: 14px; color: var(--ink-2); text-align: center; }

.search { margin-top: 28px; }
.search label { display: block; margin-bottom: 8px; color: var(--ink-3); font-size: .85rem; font-weight: 500; }
.search-row { display: flex; gap: 10px; }
.search input {
  flex: 1; min-width: 0; padding: .75em .95em;
  border: 1px solid var(--rule); border-radius: 999px; background: #fff;
  color: var(--ink); font: 400 1rem var(--sans);
}
.search input:focus { border-color: var(--ink); outline: 2px solid var(--butter); outline-offset: 1px; }
.note { min-height: 1.4em; margin-top: 8px; color: var(--ink-3); font-size: .92rem; }

/* The answer */
.verdict-lead { text-align: center; }
.verdict {
  margin-top: 12px; text-align: center;
  font-size: clamp(3.5rem, 13vw, 8rem); font-weight: 500; line-height: .95; letter-spacing: -.05em;
}
.verdict[data-verdict="YES"] { color: var(--yes); }
.verdict[data-verdict="PROBABLY"] { color: var(--probably); }
.verdict[data-verdict="NO"] { color: var(--no); }
.verdict[data-verdict="ABSOLUTELY NOT"] { color: var(--absolutely); font-size: clamp(2.6rem, 9vw, 6rem); }
.summary { max-width: 36em; margin: 18px auto 0; color: var(--ink-2); text-align: center; font-size: 1.1rem; }
.actions { display: flex; justify-content: center; margin: 24px 0 clamp(32px, 5vw, 56px); }

.map-wrap { overflow: hidden; border: 1px solid var(--rule); border-radius: 10px; background: #fff; }
.map { width: 100%; height: min(60vh, 520px); }
.legend {
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 12px 16px;
  border-top: 1px solid var(--rule); list-style: none; font-size: .88rem; color: var(--ink-2);
}
.legend label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.legend input { accent-color: var(--ink); }
.legend .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.legend .swatch.polygon { border-radius: 2px; }
.maplibregl-popup-content { border-radius: 8px; color: var(--ink); font: .92rem/1.45 var(--sans); }

/* Everything we asked: one row per source, loudest first. */
.factors-title { margin: clamp(48px, 6vw, 72px) 0 16px; }
.factors { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.factor {
  display: grid; grid-template-columns: 3.5rem 1fr; gap: 4px 16px; align-items: start;
  padding: 18px 0; border-bottom: 1px solid var(--rule);
}
.factor .dread {
  justify-self: start; min-width: 2.6em; padding: .2em .5em; border-radius: 999px;
  background: #ECE6DB; font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; text-align: center;
}
.factor[data-band="high"] .dread { background: #F6D5C8; color: #8F2D12; }
.factor[data-band="mid"] .dread { background: #F6E6B4; color: #6B5000; }
.factor[data-band="none"] .dread { background: transparent; color: var(--ink-3); }
.factor .label { font-size: 1rem; font-weight: 600; letter-spacing: normal; text-transform: none; color: var(--ink); }
.factor .headline { color: var(--ink-2); }
.factor .lines { margin: 6px 0 0; padding-left: 18px; color: var(--ink-3); font-size: .95rem; }
.factor .source { grid-column: 2; color: var(--ink-3); font-size: .85rem; }
.factor .source a { color: var(--ink-2); }
.factor.quiet { opacity: .6; }
.small-print { margin-top: 20px; }

/* What's really going on, rendered by js/explain.js */
.explain table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.explain th, .explain td { padding: 16px 32px 16px 0; border-top: 1px solid var(--night-rule); text-align: left; vertical-align: top; }
.explain th { color: var(--night-ink-2); font-size: .75rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.explain td:first-child { width: 38%; color: var(--night-ink); }
.explain td:last-child { color: var(--night-ink-2); }
.explain .bridge { margin-top: clamp(32px, 4vw, 48px); }

@media (max-width: 640px) {
  .search-row { flex-direction: column; }
  .search-row .btn { justify-content: center; }
  .explain thead { display: none; }
  .explain tr { display: block; padding: 16px 0; border-top: 1px solid var(--night-rule); }
  .explain td { display: block; width: auto !important; padding: 0; border: 0; }
  .explain td + td { margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .go { transition: none; }
  .go:active { transform: none; }
}
