:root {
  color-scheme:dark;
  --bg:#0b1513;
  --panel:#14211e;
  --line:#2c3a34;
  --mint:#7af6a9;
  --text:#f4f6ef;
  --muted:#bac6bf;
  --gold:#efc67d;
  --gutter:clamp(20px,5.5vw,92px);
  font-family:"DM Sans","Avenir Next",system-ui,sans-serif;
  color:var(--text);
  background:var(--bg);
  scroll-behavior:smooth;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
}

a {
  color:inherit;
  text-decoration:none;
}

button,select {
  font:inherit;
}

button,a,select {
  -webkit-tap-highlight-color:transparent;
}

button,select {
  cursor:pointer;
}

button {
  color:inherit;
}

svg {
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.symbols {
  position:absolute;
  width:0;
  height:0;
  overflow:hidden;
}

.wrap {
  width:min(100%,1580px);
  margin-inline:auto;
  padding-inline:var(--gutter);
}

:focus-visible {
  outline:3px solid var(--gold);
  outline-offset:3px;
}

section[id] {
  scroll-margin-top:16px;
}

.topbar {
  position:relative;
  z-index:4;
  background:#121914;
  border-bottom:1px solid #39413a;
}

.nav-inner {
  min-height:74px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

.brand {
  display:inline-flex;
  align-items:center;
  letter-spacing:-1.3px;
  font-weight:850;
  font-size:25px;
  white-space:nowrap;
}

.brand img {
  margin-right:10px;
  border-radius:8px;
}

.topbar .brand img {
  width:40px;
  height:40px;
  margin-right:7px;
}

.brand-name {
  display:grid;
  gap:2px;
}

.brand-name b {
  color:#f4f5ef;
  font:800 20px/1.05 system-ui,sans-serif;
  letter-spacing:1.5px;
}

.brand-name small {
  color:#f0bb5e;
  font:750 12px/1.15 system-ui,sans-serif;
  letter-spacing:2.7px;
}

nav,.nav-actions,.lang,.small,.btn,.paging {
  display:flex;
  align-items:center;
}

nav {
  gap:clamp(22px,3vw,48px);
  font-weight:600;
  color:#c3cdc5;
  font-size:14px;
}

nav a:hover,footer a:hover {
  color:var(--mint);
}

.nav-actions {
  gap:10px;
}

.lang {
  position:relative;
  min-height:42px;
  padding:0 10px;
  white-space:nowrap;
  border:1px solid #354038;
  border-radius:7px;
  background:#1a211c;
  gap:6px;
  font-size:13px;
  font-weight:700;
}

.lang svg {
  width:16px;
}

.lang .chev {
  width:11px;
}

.lang select {
  position:absolute;
  inset:0;
  opacity:0;
  width:100%;
  height:100%;
}

.lang:focus-within {
  outline:2px solid var(--gold);
}

.small {
  gap:12px;
  padding:10px 17px;
  font-size:13px;
  font-weight:750;
  border:1px solid #5c8c6c;
  border-radius:6px;
  color:#a4f6bb;
  background:#172a20;
}

.small svg {
  width:14px;
  height:14px;
}

.small:hover {
  background:#22412d;
}

.icon-btn {
  display:inline-grid;
  place-items:center;
  width:41px;
  height:41px;
  border-radius:50%;
  border:1px solid #54635a;
  background:transparent;
}

.icon-btn:hover:enabled {
  color:var(--mint);
  border-color:var(--mint);
}

.icon-btn:disabled {
  opacity:.35;
  cursor:default;
}

.menu-trigger {
  display:none;
}

.hero {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background:#081a17;
}

.hero-art {
  position:absolute;
  inset:0;
  z-index:-1;
  background-image:linear-gradient(90deg,rgba(5,18,16,.93) 1%,rgba(5,19,17,.74) 30%,rgba(5,22,19,.15) 63%,transparent 80%),linear-gradient(0deg,rgba(4,15,12,.55),transparent 25%),url("assets/mine.webp");
  background-size:cover;
  background-position:center,center,center 17%;
}

.hero-inner {
  position:relative;
  min-height:clamp(464px,39vw,594px);
  display:flex;
  align-items:center;
  padding-block:49px;
}

.hero-copy {
  max-width:59%;
}

.eyebrow,.portrait-caption small,.card-tag,.dialog-body dt {
  font:700 10px/1.4 ui-monospace,"SFMono-Regular",Consolas,monospace;
  text-transform:uppercase;
  letter-spacing:1.65px;
}

.eyebrow {
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--mint);
}

.eyebrow i {
  width:23px;
  height:2px;
  background:currentColor;
}

.hero .eyebrow {
  color:#a0f6be;
}

.hero h1 {
  margin:17px 0 16px;
  font-family:"Archivo Black","Avenir Next Condensed","Arial Black",system-ui,sans-serif;
  font-weight:1000;
  font-size:clamp(64px,7.65vw,120px);
  line-height:.85;
  letter-spacing:-.055em;
  transform:skewX(-5deg);
  transform-origin:left bottom;
}

.hero h1 span,.hero h1 em {
  display:block;
}

.hero h1 em {
  font-style:normal;
  color:var(--mint);
  margin-top:.075em;
}

.hero-copy>p {
  max-width:490px;
  color:#d2e0d6;
  font-size:clamp(15px,1.18vw,19px);
  line-height:1.6;
  margin:18px 0 25px;
}

.hero-actions {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.btn {
  min-height:47px;
  display:inline-flex;
  justify-content:center;
  gap:10px;
  padding:10px 21px;
  border-radius:6px;
  font-size:14px;
  font-weight:750;
  transition:background .18s,transform .18s;
}

.btn:hover {
  transform:translateY(-2px);
}

.primary {
  background:var(--mint);
  color:#092417;
  border:1px solid var(--mint);
}

.primary:hover {
  background:#a3ffbf;
}

.btn svg {
  width:17px;
  height:17px;
}

.secondary {
  background:rgba(12,30,25,.72);
  border:1px solid #658072;
}

.secondary:hover {
  background:#244233;
}

.portrait-caption {
  position:absolute;
  right:var(--gutter);
  bottom:24px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:7px 12px;
  border-left:2px solid var(--gold);
  background:rgba(9,18,14,.79);
}

.sight {
  color:var(--gold);
  font-size:23px;
}

.portrait-caption small,.portrait-caption strong {
  display:block;
}

.portrait-caption small {
  font-size:8px;
  color:#ddcdad;
}

.portrait-caption strong {
  font-size:13px;
}

.facts {
  background:#111f1b;
  border-block:1px solid #344339;
}

.fact-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  padding-block:16px;
}

.fact-grid>div {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:13px;
  min-height:44px;
}

.fact-grid>div+div {
  border-left:1px solid #36443b;
}

.fact-grid img {
  width:45px;
  height:45px;
  object-fit:contain;
  border-radius:9px;
  mix-blend-mode:lighten;
}

.fact-grid strong {
  font:bold 26px/1 ui-monospace,monospace;
  letter-spacing:-1.7px;
}

.fact-grid span {
  font-size:13px;
  color:#c2cec6;
}

.district-section,.guide-section,.ledger-section {
  padding-block:clamp(43px,4.6vw,76px);
}

.section-heading {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:15px;
  margin-bottom:26px;
}

h2 {
  font-size:clamp(34px,3.45vw,54px);
  line-height:1.07;
  letter-spacing:-.055em;
  margin:9px 0 11px;
  font-weight:800;
}

.section-heading p,.lead,.note,.steps p,.dialog-body p {
  color:var(--muted);
  line-height:1.6;
  margin:0;
}

.section-heading p,.lead {
  font-size:15px;
}

.paging {
  gap:8px;
}

.prev svg {
  transform:rotate(180deg);
}

.cards {
  display:flex;
  gap:18px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scrollbar-width:thin;
  scrollbar-color:#466e56 transparent;
  padding:2px 2px 10px;
}

.district-card {
  user-select:none;
  -webkit-user-select:none;
  flex:0 0 calc((100% - 36px)/3);
  min-width:0;
  scroll-snap-align:start;
  border:1px solid #34483f;
  border-radius:10px;
  overflow:hidden;
  background:var(--panel);
  padding:0;
  text-align:start;
  transition:border-color .2s;
  display:flex;
  flex-direction:column;
}

@media (any-pointer:fine) {
  .district-card { cursor:grab; }
}

.cards.mouse-scroll {
  scroll-snap-type:none;
}

.cards.dragging, .cards.dragging .district-card {
  cursor:grabbing;
}

.district-card:hover,.district-card:focus-visible {
  border-color:var(--accent);
}

.card-art {
  background-size:cover;
  background-position:center;
  height:clamp(135px,12vw,190px);
  display:flex;
  align-items:flex-start;
  padding:15px;
}

.card-tag {
  background:#091410de;
  color:var(--accent);
  border:1px solid #ffffff3b;
  padding:4px 8px;
  border-radius:3px;
  font-size:9px;
  letter-spacing:1px;
}

.card-info {
  width:100%;
  padding:17px 19px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.card-info strong {
  display:block;
  font-size:23px;
  line-height:1.2;
  letter-spacing:-.04em;
}

.card-info small {
  color:var(--accent);
  display:block;
  margin-top:5px;
  font-size:13px;
}

.card-info svg {
  color:var(--accent);
  flex:none;
}

.guide-section {
  border-block:1px solid var(--line);
  background:#111e1a;
}

.guide-layout {
  display:grid;
  grid-template-columns:1fr 1.2fr;
  gap:8%;
}

.guide-layout .lead {
  max-width:440px;
}

.steps {
  margin:0;
  padding:0;
  list-style:none;
}

.steps li {
  display:grid;
  grid-template-columns:38px 1fr;
  gap:16px;
  border-top:1px solid var(--line);
  padding:17px 0;
}

.steps li:first-child {
  padding-top:0;
  border:0;
}

.step-num {
  color:var(--gold);
  font:700 17px/1.5 ui-monospace,monospace;
}

.steps h3 {
  margin:0 0 4px;
  font-size:20px;
}

.steps p {
  font-size:14px;
}

.table-box {
  overflow-x:auto;
  border:1px solid var(--line);
  border-radius:9px;
  margin:24px 0 12px;
}

.table-box table {
  width:100%;
  border-collapse:collapse;
  text-align:right;
  font-variant-numeric:tabular-nums;
  font-size:14px;
}

.table-box th,.table-box td {
  padding:13px 16px;
  white-space:nowrap;
}

.table-box thead {
  color:#c2d4c6;
  background:#1d3027;
  font-size:12px;
}

.table-box th:first-child {
  text-align:left;
}

.table-box tbody tr {
  border-top:1px solid var(--line);
}

.table-box tr:nth-child(even) {
  background:#12201a;
}

.table-box td:last-child {
  color:var(--mint);
  font-weight:700;
}

.swatch {
  display:inline-block;
  width:8px;
  height:8px;
  border-radius:2px;
  transform:rotate(45deg);
  vertical-align:middle;
  margin-right:12px;
}

.note {
  font-size:13px;
}

.end-panel {
  background:linear-gradient(90deg,#091711ee,#0c2019b8),url("assets/district-0.webp") center/cover;
  min-height:165px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding-block:32px;
}

.end-panel h2 {
  margin-bottom:0;
}

.end-panel .btn {
  flex:none;
}

footer {
  border-top:1px solid var(--line);
}

footer>.wrap {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-block:25px;
}

footer .brand {
  font-size:20px;
}

footer a:last-child {
  font-size:13px;
  color:var(--muted);
}

dialog {
  width:min(480px,92vw);
  max-height:88vh;
  padding:0;
  background:var(--panel);
  border:1px solid #55665a;
  color:var(--text);
  border-radius:12px;
  box-shadow:0 15px 100px #0008;
}

dialog::backdrop {
  background:#020b08cc;
}

#dialog-image {
  height:140px;
  background-position:center;
  background-size:cover;
}

.dialog-body {
  padding:25px;
}

.dialog-body h2 {
  font-size:31px;
  margin-right:24px;
}

.close {
  position:absolute;
  right:12px;
  top:12px;
  background:#102019ed;
  font-size:24px;
}

.dialog-body dl {
  margin:20px 0;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.dialog-body dl:empty {
  display:none;
}

.dialog-body dt {
  font-size:10px;
  color:#b2c9b9;
  letter-spacing:.5px;
}

.dialog-body dd {
  margin:4px 0 0;
  font:700 19px/1.2 ui-monospace,monospace;
}

#dismiss {
  margin-top:12px;
}

@media(max-width:900px) {
  :root {
    --gutter:4vw;
  }
  .nav-inner {
    gap:16px;
  }
  nav {
    gap:16px;
  }
  .nav-actions {
    gap:15px;
  }
  .hero-copy {
    max-width:64%;
  }
  .guide-layout {
    gap:5%;
  }
  .fact-grid>div {
    gap:8px;
  }
  .card-info {
    padding:14px;
  }
  .card-info strong {
    font-size:20px;
  }
}

@media(max-width:1050px) {
  .nav-inner {
    min-height:70px;
    gap:8px;
    padding-inline:16px;
  }
  .brand {
    font-size:22px;
  }
  .brand img {
    width:30px;
    height:30px;
    margin-right:7px;
  }
  .small {
    display:none;
  }
  .menu-trigger {
    display:grid;
    width:34px;
    height:34px;
    border-radius:6px;
  }
  .nav-actions {
    gap:8px;
  }
  nav {
    display:none;
    position:absolute;
    top:100%;
    left:0;
    right:0;
    padding:12px var(--gutter);
    background:#12251e;
    box-shadow:0 12px 15px #0005;
  }
  nav.open {
    display:grid;
  }
  nav a {
    padding:8px 2px;
  }
}

@media(max-width:740px) {
  :root {
    --gutter:20px;
  }
  .hero-inner {
    min-height:500px;
    align-items:flex-end;
    padding-block:32px;
  }
  .hero-art {
    background-image:linear-gradient(0deg,#091814 1%,#081a16e6 18%,#071b1699 43%,transparent 80%),url("assets/mine.webp");
    background-size:cover,auto 86%;
    background-repeat:no-repeat;
    background-position:center,75% 0;
  }
  .hero-copy {
    max-width:100%;
    width:100%;
  }
  .hero h1 {
    font-size:clamp(57px,10vw,77px);
  }
  .hero-copy>p {
    max-width:450px;
    font-size:15px;
    margin:14px 0 19px;
  }
  .portrait-caption {
    display:none;
  }
  .fact-grid {
    padding-inline:8px;
    padding-block:13px;
  }
  .fact-grid>div {
    display:grid;
    grid-template-columns:auto auto;
    justify-content:center;
    gap:2px 6px;
    text-align:center;
  }
  .fact-grid img {
    width:28px;
    height:28px;
  }
  .fact-grid strong {
    font-size:21px;
    text-align:left;
  }
  .fact-grid span {
    grid-column:1/-1;
    font-size:11px;
  }
  .cards {
    gap:12px;
  }
  .district-card {
    flex-basis:74%;
  }
  .card-art {
    height:145px;
  }
  .section-heading {
    align-items:flex-start;
    margin-bottom:19px;
  }
  .paging {
    align-self:center;
    gap:5px;
  }
  .paging .icon-btn {
    width:33px;
    height:33px;
  }
  .guide-layout {
    grid-template-columns:1fr;
    gap:24px;
  }
  .table-box th,.table-box td {
    padding:12px 10px;
  }
  .table-box th:first-child {
    position:sticky;
    left:0;
    z-index:1;
    background:var(--bg);
    box-shadow:inset -1px 0 var(--line);
  }
  .table-box thead th:first-child {
    background:#1d3027;
  }
  .table-box tbody tr:nth-child(even) th:first-child {
    background:#12201a;
  }
  .table-box .swatch {
    margin-right:7px;
  }
  .end-panel {
    align-items:flex-start;
    flex-direction:column;
    gap:22px;
  }
  .btn {
    font-size:13px;
    padding:10px 15px;
  }
  .hero-actions {
    gap:8px;
  }
}

@media(max-width:470px) {
  .nav-inner { padding-inline:10px; }
  .topbar .brand img { width:34px; height:34px; margin-right:5px; }
  .brand-name b { font-size:17px; }
  .brand-name small { font-size:10px; letter-spacing:2px; }
  .nav-actions { gap:6px; }
  .lang { min-height:36px; padding-inline:6px; }
  .menu-trigger { width:28px; height:32px; }
}

@media(max-width:360px) {
  .hero-actions .btn {
    padding:10px;
    gap:5px;
  }
  .district-card {
    flex-basis:86%;
  }
  .nav-inner {
    gap:8px;
  }
}

@media(prefers-reduced-motion:reduce) {
  :root {
    scroll-behavior:auto;
  }
  * {
    transition:none!important;
  }
}

