@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500&family=IBM+Plex+Sans:wght@400;500&display=swap');

:root {
  --paper: #E8ECE4;
  --paper-deep: #DCE2D6;
  --ink: #1B2430;
  --ink-soft: #55606B;
  --rule: #B9C2B4;
  --sea: #1C6E7A;
  --madder: #B3452F;
  --display: 'Fraunces', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--paper); color: var(--ink); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--sea); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; }

.wrap { max-width: 880px; margin: 0 auto; padding: 32px 20px 64px; }

header.site {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--rule); padding-bottom: 12px; margin-bottom: 36px;
  font-size: 14px; color: var(--ink-soft);
}
header.site a { color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 20px; }

h1 {
  font-family: var(--display); font-weight: 400; font-size: 44px; line-height: 1.05;
  letter-spacing: -0.01em; margin: 0 0 12px; max-width: 18ch;
}
h2 { font-family: var(--display); font-weight: 400; font-size: 26px; margin: 40px 0 8px; }
p.lede { font-size: 18px; color: var(--ink-soft); max-width: 60ch; margin: 0 0 32px; }
p { max-width: 68ch; }

/* index list */
.atlas { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.atlas li { border-bottom: 1px solid var(--rule); }
.atlas a {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: baseline;
  padding: 20px 0; text-decoration: none; color: var(--ink);
}
.atlas a:hover .t { color: var(--sea); }
.atlas .t { font-family: var(--display); font-size: 24px; }
.atlas .d { color: var(--ink-soft); font-size: 15px; margin-top: 2px; display: block; }
.atlas .n { color: var(--ink-soft); font-size: 14px; white-space: nowrap; }

/* map pages */
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; align-items: center; }
.legend button {
  font: inherit; font-size: 14px; color: var(--ink); background: transparent;
  border: 1px solid var(--rule); border-radius: 999px; padding: 6px 12px 6px 8px;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
}
.legend button.off { opacity: .4; }
.legend .sw { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.legend .count { margin-left: auto; font-size: 14px; color: var(--ink-soft); }

.control { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; font-size: 14px; color: var(--ink-soft); }
.control input[type=range] { flex: 1; accent-color: var(--sea); }
.control output { min-width: 70px; text-align: right; color: var(--ink); font-weight: 500; }

svg.map { width: 100%; height: auto; display: block; background: #C9D6D9; border-radius: 6px; }
svg.map .land { fill: #EEF0E8; stroke: #A9B3A6; stroke-width: .6; stroke-linejoin: round; }
svg.map .grid { stroke: #8FA0A4; stroke-width: .4; stroke-dasharray: 2 3; }
svg.map .gt { font-size: 11px; fill: #4F6469; font-family: var(--sans); }
svg.map .pt { cursor: pointer; stroke: var(--paper); stroke-width: 1.2; }
svg.map .pt:hover { stroke: var(--ink); stroke-width: 2; }

.info {
  min-height: 72px; margin-top: 14px; padding: 14px 16px; border-left: 3px solid var(--rule);
  font-size: 15px; color: var(--ink-soft); line-height: 1.5;
}
.info b { color: var(--ink); font-weight: 500; font-family: var(--display); font-size: 18px; }
.info .tag { font-size: 12px; padding: 2px 9px; border-radius: 999px; color: var(--ink); margin-left: 8px; vertical-align: 2px; }

.note { font-size: 14px; color: var(--ink-soft); border-top: 1px solid var(--rule); padding-top: 16px; margin-top: 32px; }

@media (max-width: 560px) {
  h1 { font-size: 34px; }
  .atlas a { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: no-preference) {
  svg.map .pt { transition: stroke-width .12s; }
}
