@import url('https://fonts.googleapis.com/css2?family=Old+Standard+TT:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --paper: #E3E2DD;
  --paper-light: #ECEBE7;
  --paper-shadow: #D5D4CF;
  --ink: #181714;
  --ink-heavy: #11110F;
  --ink-secondary: #57544D;
  --rule: #6F6E69;
  --rule-light: rgba(111,110,105,.48);
  --wash: #D8D7D2;
  --good: #345c40;
  --warn: #8a5b28;
  --bad: #7a3935;
  --font-news: "Old Standard TT", Georgia, serif;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper-shadow);
  color: var(--ink);
  font-family: var(--font-news);
}

body {
  background-image:
    radial-gradient(ellipse at 18% 12%, rgba(255,255,255,.13), transparent 32%),
    repeating-linear-gradient(0deg, rgba(17,17,15,.011) 0, rgba(17,17,15,.011) 1px, transparent 1px, transparent 5px);
}

.map-masthead,
.legend,
.map-layout,
footer {
  max-width: 1280px;
  margin: auto;
  background: var(--paper);
}

.map-masthead {
  padding: 12px 28px 14px;
  border-top: 1px solid var(--ink-heavy);
  border-bottom: 5px double var(--ink-heavy);
}

.map-view-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 7px;
  margin-bottom: 12px;
  font: 700 10px Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.map-view-nav a,
.map-view-nav span {
  color: inherit;
  text-decoration: none;
  padding: 5px 8px;
}

.map-view-nav a:hover,
.map-view-nav a:focus-visible {
  background: rgba(17,17,15,.06);
}

.map-view-nav [aria-current="page"] {
  background: var(--ink-heavy);
  color: var(--paper);
}

.map-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-end;
}

.map-masthead h1 {
  font-size: clamp(42px, 7vw, 84px);
  line-height: .86;
  letter-spacing: -.035em;
  margin: .08em 0;
}

.eyebrow {
  font: 700 10px Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.7px;
  margin: 0 0 4px;
}

.deck {
  max-width: 850px;
  font-size: 15px;
  line-height: 1.4;
  margin: 8px 0 0;
  color: var(--ink-secondary);
}

.map-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  font: 700 11px Arial, sans-serif;
  text-transform: uppercase;
}

.map-actions button {
  border: 1px solid var(--ink-heavy);
  background: transparent;
  color: inherit;
  padding: 8px 10px;
  font: inherit;
  cursor: pointer;
}

.map-actions button:hover,
.map-actions button:focus-visible {
  background: var(--paper-light);
}

.legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 9px 28px;
  border-bottom: 1px solid var(--rule);
  font: 11px Arial, sans-serif;
  text-transform: uppercase;
}

.legend div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sample {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #b4b3aa;
  border: 2px solid #555;
}

.sample.impact { width: 24px; height: 24px; }
.sample.traction-low { background: #c9d7df; border-color: #777; }
.sample.risk-high { background: #e0b77e; border: 5px solid var(--bad); }
.sample.line { height: 0; width: 28px; border: 0; border-top: 2px dashed #6b6258; border-radius: 0; }

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.7fr) minmax(280px, .8fr);
  min-height: 72vh;
}

.map-panel {
  position: relative;
  border-right: 1px solid var(--rule);
}

#map {
  height: 72vh;
  min-height: 560px;
  background: #D0D5D6;
  filter: saturate(.78) contrast(.96);
}

#mapStatus {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 500;
  background: rgba(227,226,221,.96);
  border: 1px solid var(--rule);
  padding: 7px 9px;
  font: 11px Arial, sans-serif;
}

.story-radar {
  padding: 18px 18px 30px;
  max-height: 72vh;
  overflow: auto;
}

.radar-head {
  border-bottom: 3px double var(--ink-heavy);
  padding-bottom: 10px;
  margin-bottom: 8px;
}

.radar-head h2 {
  font-size: 30px;
  line-height: 1;
  margin: 2px 0;
}

.radar-head p:last-child {
  font-size: 12px;
  color: var(--ink-secondary);
}

.radar-item {
  border-bottom: 1px solid var(--rule-light);
  padding: 11px 4px;
  cursor: pointer;
  outline: none;
}

.radar-item:hover,
.radar-item:focus-visible {
  background: var(--paper-light);
}

.radar-item:focus-visible {
  box-shadow: inset 3px 0 0 var(--ink-heavy);
}

.radar-item h3 {
  font-size: 17px;
  line-height: 1.08;
  margin: 3px 0 7px;
}

.radar-item .meta {
  font: 9px Arial, sans-serif;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

.score-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 7px;
}

.score {
  background: var(--wash);
  padding: 5px;
  text-align: center;
}

.score b {
  display: block;
  font: 700 15px Arial, sans-serif;
}

.score span {
  display: block;
  font: 8px Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--paper);
  color: var(--ink);
}

.leaflet-popup-content {
  font-family: var(--font-news);
}

.leaflet-popup-content h3 {
  font-size: 18px;
  line-height: 1.05;
  margin: 0 0 7px;
}

.popup-scores {
  font: 10px Arial, sans-serif;
  text-transform: uppercase;
  line-height: 1.6;
}

.popup-note {
  font-size: 11px;
  color: var(--ink-secondary);
}

footer {
  border-top: 4px double var(--ink-heavy);
  padding: 12px 28px 24px;
  font-size: 12px;
  color: var(--ink-secondary);
}

@media (max-width: 850px) {
  .map-heading-row { display: block; }
  .map-actions { justify-content: flex-start; margin-top: 14px; }
  .map-layout { display: block; }
  .map-panel { border-right: 0; border-bottom: 1px solid var(--rule); }
  #map { height: 62vh; min-height: 430px; }
  .story-radar { max-height: none; }
  .legend { gap: 10px; }
  .radar-item h3 { font-size: 19px; }
}

@media (max-width: 650px) {
  .map-masthead { padding: 8px 12px 12px; }
  .map-view-nav { overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .map-view-nav::-webkit-scrollbar { display: none; }
  .map-masthead h1 { font-size: clamp(38px, 13vw, 58px); }
  .deck { font-size: 14px; }
  .legend { padding: 8px 12px; }
  #map { height: 56vh; min-height: 360px; }
  .story-radar { padding: 14px 12px 24px; }
  footer { padding: 10px 12px 20px; }
}

.map-local-focus{display:flex;align-items:center;gap:6px}
.map-local-focus span{font-weight:700}
.map-local-focus input{width:190px;padding:7px 8px;border:1px solid var(--rule);background:var(--paper-light);color:var(--ink);font:12px var(--font-news)}
.map-local-focus input:focus{outline:2px solid var(--ink-heavy);outline-offset:1px}
.pressroom-nav{border-top:3px double var(--ink-heavy);margin-top:14px}
@media(max-width:850px){.map-local-focus{width:100%}.map-local-focus input{flex:1;min-width:160px}}

.map-mode-switch{display:inline-flex;border:1px solid var(--ink-heavy)}
.map-mode-switch button{border:0!important;border-right:1px solid var(--ink-heavy)!important}
.map-mode-switch button:last-child{border-right:0!important}
.map-mode-switch button[aria-pressed="true"]{background:var(--ink-heavy);color:var(--paper)}
.map-depth{display:flex;align-items:center;gap:6px}
.map-depth span{font-weight:700}
.map-depth select{padding:7px 8px;border:1px solid var(--rule);background:var(--paper-light);color:var(--ink);font:12px var(--font-news)}
.sample.storyline{border-radius:0;width:28px;height:4px;border:0;background:#315b7a;box-shadow:0 5px 0 #8a4d2f}
.radar-item{position:relative;padding-left:10px}
.storyline-key{position:absolute;left:0;top:9px;bottom:9px;width:4px;background:var(--storyline-color,#999)}
.radar-item.not-mapped{opacity:.68}
.radar-actions{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}
.radar-actions button{border:1px solid var(--rule);background:transparent;color:inherit;padding:5px 7px;font:700 9px Arial,sans-serif;text-transform:uppercase;cursor:pointer}
.radar-actions button:hover,.radar-actions button:focus-visible{background:var(--paper-light)}
.weather-map-card h3{font-size:24px;line-height:1.05;margin:6px 0 12px}
.weather-map-days{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.weather-map-days>div{border-top:1px solid var(--rule-light);padding:6px 0}
.weather-map-days b,.weather-map-days span{display:block}
.weather-map-days span{font-size:11px;color:var(--ink-secondary)}
@media(max-width:850px){.map-mode-switch{width:auto}.map-depth{width:100%}}
