* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: #1e3429;
  background: #f7f4e9;
  font:
    16px/1.6 "Source Sans 3",
    system-ui,
    sans-serif;
}
header,
footer,
main {
  max-width: 1180px;
  margin: auto;
  padding: 22px clamp(18px, 5vw, 70px);
}
header,
footer nav,
nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(12px, 3vw, 38px);
}
header {
  justify-content: space-between;
  border-bottom: 1px solid #b6b9a6;
}
.brand,
h1,
h2,
h3 {
  font-family: "Baskervville", Georgia, serif;
}
.brand {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}
a {
  color: #254d3c;
  text-underline-offset: 4px;
}
nav a,
.brand {
  text-decoration: none;
}
nav a:hover,
.brand:hover {
  text-decoration: underline;
}
h1 {
  font-size: clamp(3.2rem, 8vw, 6.5rem);
  line-height: 0.99;
  letter-spacing: -0.065em;
  font-weight: 500;
  margin: 1rem 0 1.8rem;
}
h2 {
  font-size: 2.2rem;
  font-weight: 500;
  line-height: 1.12;
  margin: 1rem 0;
}
main {
  min-height: 64vh;
  padding-top: clamp(28px, 6vw, 75px);
  padding-bottom: 65px;
}
p {
  max-width: 65ch;
}
main > p:first-of-type,
.lead {
  font-size: 1.18rem;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #183c35;
  color: #fff9e7;
  padding: clamp(24px, 5vw, 65px);
  border-radius: 3px;
  min-height: 400px;
}
.hero h1,
.hero p,
.hero a {
  position: relative;
}
.hero h1 {
  max-width: 9ch;
}
.hero p {
  max-width: 41ch;
}
.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}
.hero:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #102f29f2, #12382db8 45%, transparent 90%);
  z-index: -1;
}
.hero a {
  color: #fff4c9;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 24px;
  margin: 34px 0;
}
.card,
article,
form,
dl {
  border-top: 1px solid #a4ae95;
  padding: 18px 0;
}
article time,
dt,
small {
  font-size: 0.85rem;
  color: #4b604f;
}
dd {
  margin: 0 0 16px;
}
label {
  display: block;
  margin: 12px 0 4px;
}
input,
button {
  font: inherit;
}
input {
  width: min(100%, 360px);
  padding: 10px;
  border: 1px solid #718271;
  background: #fffdf4;
}
button,
.button {
  display: inline-block;
  cursor: pointer;
  border: 0;
  background: #27503f;
  color: #fffdf1;
  padding: 10px 18px;
  border-radius: 2px;
  margin: 10px 8px 10px 0;
}
output {
  display: block;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.skip {
  position: absolute;
  left: -100vw;
}
.skip:focus {
  left: 12px;
  top: 0;
  background: white;
  z-index: 3;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #b17417;
  outline-offset: 4px;
}
footer {
  border-top: 1px solid #b6b9a6;
  display: grid;
  gap: 12px;
}
footer small {
  max-width: 80ch;
}
@media (max-width: 550px) {
  header nav {
    gap: 12px;
    font-size: 0.86rem;
  }
  .hero {
    min-height: 360px;
  }
  .grid {
    gap: 8px;
  }
  h1 {
    overflow-wrap: anywhere;
  }
}
.worldmap canvas {
  display: block;
  width: 100%;
  height: min(70vh, 640px);
  border: 1px solid #b6b9a6;
  border-radius: 6px;
  background: #d9d4c1;
  cursor: grab;
  touch-action: none;
}
.worldmap canvas:active {
  cursor: grabbing;
}
.worldmap canvas:focus-visible {
  outline: 3px solid #254d3c;
  outline-offset: 2px;
}
.maptools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.coords {
  font-variant-numeric: tabular-nums;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 0;
  list-style: none;
}
.legend .swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 1px solid #1e3429;
}
.legend .spawn {
  border: 2px dashed #a3322a;
}
.legend .mine {
  background: rgba(214, 150, 40, 0.45);
  border-color: #8a5600;
}
.legend .other {
  background: rgba(30, 52, 41, 0.28);
}
.legend .realm {
  background: linear-gradient(90deg, hsla(200, 55%, 45%, 0.5), hsla(20, 55%, 45%, 0.5));
  border-color: hsl(200, 55%, 30%);
}
.ledger {
  padding-left: 1.2em;
  font-variant-numeric: tabular-nums;
}

.vote {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.civics li {
  margin: 0.2rem 0;
}

.economy .range button[aria-pressed="true"] {
  outline: 2px solid #1e3429;
  outline-offset: 2px;
}
.alerts {
  list-style: none;
  padding: 0;
}
.alerts li {
  padding: 8px 12px;
  margin: 6px 0;
  border-left: 4px solid #6b7a6c;
  background: #fffdf4;
}
.alerts .critical {
  border-left-color: #b3261e;
}
.alerts .warning {
  border-left-color: #b26b00;
}
.alerts .ok {
  border-left-color: #1f7a4d;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: 16px;
  margin: 20px 0;
}
.tiles div {
  border-top: 1px solid #a4ae95;
  padding-top: 8px;
}
.tiles strong {
  display: block;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}
.tiles span {
  font-size: 0.85rem;
  color: #4b604f;
}
.chart {
  position: relative;
  margin: 24px 0;
}
.chart figcaption {
  font-weight: 600;
  margin-bottom: 6px;
}
.chart svg {
  width: 100%;
  height: auto;
  display: block;
}
.chart .grid {
  stroke: #d9d6c6;
  stroke-width: 1;
}
.chart .tick {
  font-size: 11px;
  fill: #4b604f;
  font-variant-numeric: tabular-nums;
}
.chart .series-line {
  fill: none;
  stroke: #1f7a4d;
  stroke-width: 2;
  stroke-linejoin: round;
}
.chart .series-bar,
.chart .series-dot {
  fill: #1f7a4d;
}
.chart .series-dot {
  stroke: #f7f4e9;
  stroke-width: 2;
}
.chart .cross {
  stroke: #4b604f;
  stroke-dasharray: 3 3;
}
.chart .tip {
  position: absolute;
  top: 28px;
  width: 160px;
  padding: 6px 8px;
  background: #fffdf4;
  border: 1px solid #a4ae95;
  font-size: 0.85rem;
  pointer-events: none;
}
.economy table {
  border-collapse: collapse;
  width: 100%;
  margin: 8px 0 20px;
  font-size: 0.95rem;
}
.economy th,
.economy td {
  text-align: left;
  padding: 4px 8px;
  border-bottom: 1px solid #d9d6c6;
}
.economy th.num,
.economy td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.economy details {
  margin: 8px 0 16px;
}
.economy {
  overflow-x: auto;
}
@media (max-width: 600px) {
  .chart .tick {
    font-size: 20px;
  }
}
