:root {
  font-family: Arial, sans-serif;
  color: #242e39;
  background: #f5f7f8;
  font-synthesis: none;
  letter-spacing: 0;
  --muted: #7b8793;
  --line: #dfe5e9;
  --accent: #286dcd;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: inherit;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
}
button:hover {
  background: #eef3f8;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #87b7f0;
  outline-offset: 3px;
}
.lucide {
  width: 18px;
  height: 18px;
  stroke-width: 1.7;
  flex-shrink: 0;
}
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 210px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
}
.brand {
  font-size: 30px;
  font-weight: 800;
  color: #28323e;
  text-decoration: none;
  padding: 0 15px;
}
.brand span {
  font-weight: 400;
}
.brand b {
  color: var(--accent);
}
nav {
  display: grid;
  gap: 8px;
  margin-top: 64px;
}
nav button {
  justify-content: flex-start;
  background: transparent;
  border: 0;
  padding: 14px 16px;
  color: #697580;
}
nav button.active {
  background: #eaf1fb;
  color: #286dcd;
}
nav .lucide {
  margin-right: 4px;
}
.rail-bottom {
  margin-top: auto;
  font-size: 11px;
  color: #78848e;
  line-height: 2.3;
  padding: 0 8px;
}
.rail-bottom small {
  padding-left: 13px;
  font-size: 10px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #48a98b;
  border-radius: 50%;
  margin-right: 8px;
}
.workspace {
  margin-left: 210px;
}
header {
  height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  background: #fff;
}
.breadcrumb {
  font-size: 12px;
  color: #79848f;
}
.breadcrumb span {
  padding: 0 15px;
  color: #b5bec7;
}
.breadcrumb strong {
  font-weight: 500;
  color: #374554;
}
.header-actions {
  display: flex;
  gap: 10px;
}
.quiet {
  background: transparent;
  border-color: transparent;
}
.icon-button {
  width: 36px;
  height: 36px;
  padding: 8px;
}
main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px 36px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 600;
  color: #778693;
}
h1 {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 600;
  margin: 10px 0;
}
p {
  font-size: 13px;
  color: #7b8793;
  line-height: 1.6;
  margin: 6px 0;
}
h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}
h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
.turn {
  text-align: right;
  flex-shrink: 0;
}
.turn > span {
  font-size: 9px;
  color: #7f8c96;
}
.turn strong {
  display: block;
  font-size: 30px;
  font-weight: 500;
  margin-top: 6px;
}
.turn small {
  font-size: 16px;
  color: #b0b8c0;
}
.resource-strip {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  border-block: 1px solid var(--line);
  padding: 20px 0;
  margin-bottom: 28px;
  gap: 16px;
}
.resource {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 22px;
  border-left: 1px solid var(--line);
}
.resource:first-child {
  border: 0;
  padding: 0;
}
.resource > .lucide {
  color: #7d8d9e;
  width: 22px;
  height: 22px;
}
.resource small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-bottom: 7px;
}
.resource strong {
  font-size: 19px;
  font-weight: 500;
}
.resource:first-child strong {
  font-size: 13px;
}
.resource em {
  font-size: 10px;
  font-style: normal;
  color: #8b98a5;
}
.party-mark {
  height: 34px;
  width: 5px;
  background: var(--accent);
  border-radius: 2px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
}
.layout > div {
  min-width: 0;
}
.map-area {
  min-width: 0;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.section-title small {
  font-size: 10px;
  color: #8a96a2;
}
.map-surface {
  position: relative;
  min-height: 350px;
  background: #eef2f3;
  border: 1px solid #e1e6e9;
  overflow: hidden;
  background-image: radial-gradient(#ced7de 0.7px, transparent 0.7px);
  background-size: 18px 18px;
}
.map-surface svg {
  display: block;
  width: 100%;
  height: 365px;
}
.hex polygon {
  stroke: #fff;
  stroke-width: 3;
  transition: fill 0.2s;
  cursor: pointer;
}
.hex:hover polygon {
  filter: brightness(0.95);
}
.hex.selected polygon {
  stroke: #286dcd;
  stroke-width: 2.5;
}
.hex text {
  pointer-events: none;
  text-anchor: middle;
  fill: #31475a;
  font: 500 11px Arial;
}
.hex .hex-value {
  font-size: 20px;
  font-weight: 600;
  fill: #286dcd;
}
.hex .hex-sub {
  font-size: 8px;
  fill: #7a8d9d;
}
.map-stamp {
  position: absolute;
  left: 18px;
  top: 16px;
  font-size: 9px;
  color: #8e9ca8;
  line-height: 1.8;
}
.map-compass {
  position: absolute;
  right: 20px;
  top: 16px;
  color: #8e9ca8;
  font-size: 10px;
  text-align: center;
}
.map-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 0;
  font-size: 10px;
  color: #81909d;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  margin-right: 6px;
}
.region-detail {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 6px;
}
.region-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 11px;
  color: #7d8996;
  margin: 14px 0 18px;
}
.region-meta b {
  color: #384b5a;
  font-weight: 500;
}
.bars {
  display: grid;
  gap: 12px;
}
.bar-row {
  display: grid;
  grid-template-columns: 150px 1fr 42px;
  align-items: center;
  gap: 12px;
  font-size: 11px;
}
.bar-track {
  height: 5px;
  background: #e6ebef;
  border-radius: 2px;
  overflow: hidden;
}
.bar-track span {
  display: block;
  height: 100%;
  border-radius: 2px;
}
.bar-row b {
  text-align: right;
  font-weight: 500;
}
.tag {
  font-size: 9px;
  padding: 5px 7px;
  background: #e8eef4;
  color: #637a91;
  border-radius: 3px;
  white-space: nowrap;
}
.tag.private {
  background: #edf2ed;
  color: #60816a;
}
.right-column {
  border-left: 1px solid var(--line);
  padding-left: 25px;
}
.election-clock {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.election-clock > span {
  font-size: 10px;
  color: #85919c;
}
.election-clock strong {
  display: block;
  font-size: 24px;
  font-weight: 500;
  margin: 10px 0;
}
.timeline {
  display: flex;
  gap: 5px;
  margin-top: 18px;
}
.timeline span {
  height: 4px;
  background: #e0e7ed;
  flex: 1;
}
.timeline .done {
  background: #6e9bd4;
}
.action-list {
  margin-top: 22px;
}
.action-list > button {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e5e9ed;
  border-radius: 0;
  background: transparent;
  padding: 14px 0;
}
.action-list > button .lucide {
  color: #6e8193;
}
.action-list > button span {
  flex: 1;
  text-align: left;
}
.action-list > button small {
  color: #8c9aa6;
  font-size: 10px;
}
.plan {
  margin-top: 25px;
}
.plan-empty {
  padding: 15px 0;
  color: #94a0ac;
  font-size: 12px;
}
.plan-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.plan-item span {
  flex: 1;
  line-height: 1.6;
}
.plan-item small {
  color: #8996a2;
}
.plan-item .icon-button {
  width: 26px;
  height: 26px;
  padding: 4px;
}
.primary {
  background: #286dcd;
  border-color: #286dcd;
  color: #fff;
}
.primary:hover {
  background: #1b5daf;
}
.ready-button {
  width: 100%;
  margin-top: 20px;
  padding: 13px 10px;
}
.ready-meta {
  font-size: 10px;
  color: #82909c;
  text-align: center;
  margin-top: 10px;
}
.news-preview {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.news-row {
  display: flex;
  gap: 15px;
  font-size: 11px;
  padding: 13px 0;
  line-height: 1.7;
}
.news-row time {
  color: #98a4af;
  min-width: 42px;
}
.news-row span {
  color: #617181;
}
.hemicycle {
  width: 100%;
  height: 210px;
  display: block;
}
.party-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.party-table td,
.party-table th {
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.party-table th {
  font-size: 10px;
  color: #8a97a3;
  font-weight: 500;
}
.party-table td:last-child,
.party-table th:last-child {
  text-align: right;
}
.law-list {
  margin-top: 30px;
}
.law {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.law h3 {
  max-width: 430px;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.law p {
  font-size: 11px;
}
.vote-controls {
  display: flex;
  gap: 4px;
}
.vote-controls button {
  padding: 7px 9px;
  font-size: 11px;
}
.vote-controls .selected {
  background: #e7effb;
  border-color: #96b5df;
  color: #286dcd;
}
.country-metrics {
  display: grid;
  gap: 22px;
  margin-top: 25px;
}
.metric-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 10px;
}
.empty {
  padding: 36px 0;
  color: #8b98a3;
  font-size: 13px;
}
.journal-entry {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 70px 80px 1fr;
  gap: 15px;
  font-size: 12px;
  line-height: 1.7;
}
.journal-entry time {
  color: #91a0ad;
}
.journal-entry .tag {
  align-self: start;
  text-align: center;
}
.report-block {
  margin-top: 26px;
}
.report-block .section-title {
  margin-bottom: 18px;
}
.muted {
  color: var(--muted);
}
.finance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.finance-grid strong {
  font-size: 25px;
  font-weight: 500;
  display: block;
  margin-bottom: 8px;
}
.finance-grid span {
  font-size: 11px;
  color: #8895a0;
}
footer {
  display: flex;
  justify-content: space-between;
  margin: 15px 36px 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: #97a3ad;
  font-size: 9px;
  gap: 10px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 25px;
  width: min(440px, calc(100% - 28px));
  box-shadow: 0 20px 70px #20334525;
  color: #2d3a47;
}
dialog::backdrop {
  background: #22314165;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
label {
  display: block;
  font-size: 12px;
  color: #677786;
  margin: 18px 0;
}
input:not([type="range"]),
select {
  display: block;
  width: 100%;
  padding: 11px;
  border: 1px solid #cdd7df;
  border-radius: 4px;
  margin-top: 8px;
  background: #fff;
  color: #2e4050;
}
input[type="range"] {
  width: 100%;
  margin: 15px 0 0;
  accent-color: #286dcd;
}
output {
  float: right;
}
form > .primary {
  width: 100%;
  margin-top: 18px;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #81909c;
}
.invite {
  display: grid;
  gap: 14px;
  text-align: center;
  padding: 12px 0 18px;
  border-bottom: 1px solid var(--line);
}
.invite > span {
  font-size: 10px;
  color: #7b8994;
}
.invite strong {
  font-size: 26px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 30px);
  padding: 14px 20px;
  border-radius: 6px;
  background: #283f50;
  color: #fff;
  font-size: 12px;
  z-index: 20;
  box-shadow: 0 8px 30px #24374533;
}
#loading {
  padding: 50px;
  text-align: center;
  color: #8897a4;
}
.journal-entry > span:last-child {
  overflow-wrap: anywhere;
}
@media (min-width: 1500px) {
  main {
    padding-top: 40px;
  }
  .layout {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
  .map-surface svg {
    height: 430px;
  }
  .map-surface {
    min-height: 430px;
  }
}
@media (max-width: 1150px) {
  .rail {
    width: 175px;
    padding-inline: 12px;
  }
  .workspace {
    margin-left: 175px;
  }
  main {
    padding: 26px 24px;
  }
  header {
    padding: 0 24px;
  }
  .layout {
    grid-template-columns: minmax(0, 1fr) 245px;
    gap: 20px;
  }
  .right-column {
    padding-left: 20px;
  }
  .resource {
    padding-left: 12px;
    gap: 8px;
  }
  .resource strong {
    font-size: 17px;
  }
  .resource:first-child strong {
    font-size: 11px;
  }
  .bar-row {
    grid-template-columns: 125px 1fr 40px;
    gap: 7px;
  }
  .bar-row > span:first-child {
    font-size: 10px;
  }
  .map-surface svg {
    height: 325px;
  }
  .map-surface {
    min-height: 325px;
  }
}
@media (max-width: 900px) {
  .rail {
    width: 72px;
    padding: 26px 10px;
  }
  .brand {
    font-size: 23px;
    padding: 0 6px;
  }
  .brand span {
    display: none;
  }
  nav button {
    padding: 14px;
    justify-content: center;
  }
  nav button span,
  .rail-bottom {
    display: none;
  }
  nav .lucide {
    margin: 0;
  }
  .workspace {
    margin-left: 72px;
  }
  .resource-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .resource:nth-child(3) {
    border: 0;
    padding: 0;
  }
  .resource:first-child strong {
    font-size: 13px;
  }
  .layout {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .breadcrumb {
    font-size: 11px;
  }
  .breadcrumb span {
    padding-inline: 6px;
  }
  .law {
    flex-wrap: wrap;
  }
}
@media (max-width: 680px) {
  .rail {
    inset: auto 0 0;
    width: 100%;
    height: 66px;
    padding: 0 8px;
    z-index: 10;
    border: 0;
    border-top: 1px solid var(--line);
  }
  .brand {
    display: none;
  }
  nav {
    display: flex;
    margin: 0;
    height: 100%;
    justify-content: space-around;
    gap: 0;
  }
  nav button {
    flex-direction: column;
    gap: 5px;
    font-size: 9px;
    border-radius: 0;
    padding: 10px 8px;
    min-width: 65px;
  }
  nav button span {
    display: block;
  }
  nav .lucide {
    width: 19px;
    height: 19px;
  }
  .workspace {
    margin: 0 0 66px;
  }
  header {
    height: 60px;
    padding: 0 16px;
  }
  .breadcrumb > strong,
  .breadcrumb > span {
    display: none;
  }
  .header-actions {
    gap: 0;
  }
  .header-actions .quiet {
    font-size: 10px;
    padding: 8px;
  }
  main {
    padding: 24px 18px;
  }
  .page-heading {
    gap: 8px;
    margin-bottom: 22px;
  }
  h1 {
    font-size: 25px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .turn strong {
    font-size: 26px;
  }
  .turn > span {
    font-size: 8px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .resource-strip {
    gap: 18px 10px;
    margin-bottom: 23px;
    padding: 18px 0;
  }
  .resource strong {
    font-size: 18px;
  }
  .resource:first-child strong {
    font-size: 12px;
  }
  .resource small {
    font-size: 9px;
  }
  .resource > .lucide {
    width: 18px;
    height: 18px;
  }
  .layout {
    display: flex;
    flex-direction: column;
    gap: 25px;
  }
  .map-surface svg {
    height: auto;
    aspect-ratio: 1.3;
  }
  .map-surface {
    min-height: 0;
  }
  .map-stamp {
    font-size: 8px;
    left: 10px;
    top: 10px;
  }
  .map-compass {
    right: 12px;
    top: 10px;
  }
  .map-legend {
    gap: 12px;
    font-size: 9px;
  }
  .right-column {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 23px 0 0;
  }
  .election-clock {
    display: none;
  }
  .action-list {
    margin-top: 0;
  }
  .news-preview {
    margin-top: 23px;
  }
  .bar-row {
    grid-template-columns: 143px 1fr 40px;
  }
  .region-meta {
    gap: 15px;
    font-size: 10px;
  }
  .journal-entry {
    grid-template-columns: 46px 1fr;
    gap: 9px;
  }
  .journal-entry > span:last-child {
    grid-column: 1/-1;
  }
  .journal-entry .tag {
    justify-self: start;
  }
  .finance-grid {
    gap: 12px;
  }
  .finance-grid strong {
    font-size: 21px;
  }
  .finance-grid span {
    font-size: 10px;
  }
  footer {
    margin: 0 18px;
    padding: 15px 0;
    font-size: 8px;
  }
  footer > span {
    display: none;
  }
  .party-table {
    font-size: 11px;
  }
  .party-table td,
  .party-table th {
    padding: 12px 3px;
  }
  .hemicycle {
    height: 175px;
  }
}
.resource-breakdown { position: relative; }
.resource-breakdown summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.resource-breakdown summary::-webkit-details-marker { display: none; }
.resource-popover { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 205px; padding: 10px 12px; background: #fff; color: #243044; border: 1px solid #bac5cf; box-shadow: 0 8px 22px #18253633; font-size: 12px; line-height: 1.65; }
.resource-breakdown:not([open]):hover .resource-popover { display: block; }
.budget-lines { margin: 12px 0; padding: 10px 0; border-top: 1px solid #cdd5dd; }
.budget-lines summary { cursor: pointer; }
.budget-lines > div { display: flex; justify-content: space-between; max-width: 380px; padding: 4px 0; }
