@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root {
  font-family: 'DM Sans', sans-serif;
  color: #22312d;
  background: #f5f5ef;
  font-synthesis: none;
  --muted: #788179;
  --line: #dfe3d9;
  --green: #d5e8a1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px 14px;
  transition:
    background 0.18s,
    transform 0.18s;
}
button:hover {
  background: #e9eddc;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #849c55;
  outline-offset: 3px;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
header {
  height: 80px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: inherit;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
}
.brand-icon {
  font-size: 35px;
  line-height: 1;
}
.tag {
  font:
    10px 'DM Sans',
    sans-serif;
  letter-spacing: 1.4px;
  border-left: 1px solid #c7cec1;
  padding-left: 17px;
  margin-left: 9px;
  color: #7a8176;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  letter-spacing: 1px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94ac69;
}
.quiet {
  border: 0;
  font-size: 12px;
  letter-spacing: 0;
  margin-left: 22px;
}
main {
  max-width: 1600px;
  margin: auto;
  padding: 44px 4% 22px;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #7b8476;
}
h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(30px, 3.1vw, 47px);
  line-height: 1.15;
  letter-spacing: -1.9px;
  font-weight: 500;
  margin: 18px 0 15px;
}
h1 span {
  color: #7c8872;
}
.intro p {
  font-size: 13px;
  line-height: 1.8;
  color: #7b8179;
  margin: 0;
}
.scenario {
  width: 295px;
}
.scenario label {
  display: block;
  font-size: 10px;
  letter-spacing: 1.4px;
  color: #788171;
  margin-bottom: 12px;
}
.scenario select {
  width: 100%;
  padding: 14px 10px;
  border: 1px solid #d6dccd;
  background: #eef1e5;
  border-radius: 5px;
  font-size: 12px;
  color: #34402e;
}
.scenario p {
  font-size: 11px;
  line-height: 1.7;
  margin-top: 10px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcf7;
  margin-bottom: 26px;
  padding: 21px 0;
}
.stat {
  padding: 0 25px;
  border-right: 1px solid var(--line);
}
.stat:last-child {
  border: 0;
}
.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 31px;
  letter-spacing: -1px;
  margin: 10px 0 7px;
}
.stat-number small {
  font:
    16px 'DM Sans',
    sans-serif;
  color: #87917e;
}
.stat-detail {
  font-size: 11px;
  color: #85907c;
}
.positive {
  color: #648148;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 322px;
  gap: 23px;
}
.panel {
  background: #fcfcf8;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  gap: 12px;
}
h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  letter-spacing: -0.6px;
  font-weight: 500;
  margin: 8px 0 0;
}
.segmented {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  display: flex;
}
.segmented button {
  font-size: 10px;
  border: 0;
  padding: 7px 10px;
  color: #7b8576;
}
.segmented button.active {
  background: #e9eedf;
  color: #36472d;
}
.map-caption {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 1.2px;
  color: #97a69e;
  padding: 20px 24px 0;
}
.map-caption i {
  margin-right: 6px;
}
#map-view {
  background: #11242a;
  color: #e3eae3;
}
.system-map {
  position: relative;
  height: 294px;
  overflow: hidden;
  background-image:
    radial-gradient(circle at 8% 40%, #a9c6b944 0.6px, transparent 1px),
    radial-gradient(circle at 61% 20%, #a9c6b933 0.7px, transparent 1px);
  background-size:
    41px 53px,
    67px 71px;
}
.orbit {
  position: absolute;
  border: 1px solid #8faf9920;
  border-radius: 50%;
  width: 500px;
  height: 500px;
  left: -270px;
  top: -97px;
  pointer-events: none;
}
.orbit-two {
  width: 860px;
  height: 700px;
  left: -395px;
  top: -190px;
}
.orbit-three {
  width: 1250px;
  height: 950px;
  left: -545px;
  top: -310px;
}
.sun {
  position: absolute;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle at 60% 40%, #efe5a2, #e2bf65);
  border-radius: 50%;
  left: -69px;
  top: 95px;
  box-shadow: 0 0 55px #d6bb5335;
}
.sun-label {
  position: absolute;
  left: 12px;
  top: 224px;
  font-size: 8px;
  color: #b6af87;
  letter-spacing: 2px;
}
.planet-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px 7px;
  padding: 12px 22px 0 58px;
}
.planet-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid transparent;
  min-width: 0;
  padding: 8px 2px 6px;
  border-radius: 5px;
  z-index: 1;
  color: #afc0b9;
}
.planet-button:hover {
  background: #ffffff09;
}
.planet-button.selected {
  border-color: #b8d39a88;
  background: #b8d39a0d;
  color: #e0f0b6;
}
.planet {
  display: block;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, var(--planet), #16252c 110%);
  box-shadow: 3px 3px 8px #0005;
  margin-bottom: 6px;
}
.planet-earth {
  background:
    radial-gradient(ellipse at 30% 30%, #9fba94 15%, transparent 20%),
    radial-gradient(ellipse at 60% 70%, #729e80 20%, transparent 25%),
    linear-gradient(120deg, #82b4bc, #2c525c);
}
.planet-saturn {
  outline: 2px solid #c9af8260;
  outline-offset: 3px;
  transform: rotate(-25deg) scaleY(0.78);
}
.planet-belt,
.planet-oort {
  background: radial-gradient(circle, #b4b8a6 1px, transparent 2px);
  background-size: 6px 6px;
  box-shadow: none;
}
.planet-name {
  font-size: 11px;
}
.planet-distance {
  font-size: 8px;
  color: #718a83;
  margin-top: 3px;
}
.map-legend {
  display: flex;
  justify-content: space-between;
  padding: 0 24px 16px;
  color: #8ba29a;
  font-size: 9px;
}
.legend-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #c0d892;
  border-radius: 50%;
  margin-right: 5px;
}
#site-detail {
  padding: 22px 24px;
}
.site-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.small-pill {
  font-size: 8px;
  padding: 4px 7px;
  background: #eef2e4;
  color: #829061;
  border: 1px solid #e1e7d2;
  border-radius: 3px;
  letter-spacing: 0.6px;
  vertical-align: middle;
  margin-left: 8px;
}
.coordinates {
  text-align: right;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
}
.coordinates small {
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  color: var(--muted);
}
.site-note {
  font-size: 12px;
  color: #7a8476;
  line-height: 1.7;
  margin: 15px 0;
}
.physical-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #f0f2e9;
  border: 1px solid #e7eadf;
  border-radius: 4px;
  padding: 14px 0;
}
.physical-metrics > div {
  padding: 0 14px;
  border-right: 1px solid #dfe5d5;
}
.physical-metrics > div:last-child {
  border: 0;
}
.physical-metrics span {
  font-size: 9px;
  color: #818b75;
  display: block;
}
.physical-metrics strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 500;
  margin-top: 7px;
}
.physical-metrics small {
  font:
    11px 'DM Sans',
    sans-serif;
  color: #8b967e;
}
.resource-line {
  font-size: 10px;
  color: #6f7e68;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.resource-line > span {
  font-size: 8px;
  letter-spacing: 0.7px;
  margin-right: 12px;
  color: #969d8c;
}
.build-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 12px;
}
.build-title h3 {
  font-size: 12px;
  margin: 0;
  font-weight: 500;
}
.build-title > span {
  font-size: 9px;
  color: #919787;
}
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.project {
  position: relative;
  display: flex;
  gap: 9px;
  text-align: left;
  padding: 13px 10px 23px;
  min-width: 0;
}
.project strong {
  display: block;
  font-size: 10px;
  font-weight: 500;
}
.project small {
  display: block;
  font-size: 8px;
  color: #8b9482;
  margin-top: 5px;
}
.project-icon {
  font-size: 17px;
  color: #85986c;
}
.project-cost {
  display: block;
  font-size: 11px;
  margin-top: 12px;
  color: #5e714c;
}
.project-cost > span {
  margin-left: 5px;
}
.asset-count {
  position: absolute;
  bottom: 6px;
  right: 9px;
  font-size: 8px;
  color: #9ca28e;
}
.controls .panel-heading {
  padding: 22px 20px;
}
.controls h2 {
  font-size: 18px;
}
.control-content {
  padding: 0 20px;
}
.muted {
  color: #909786;
}
.control-content > p {
  font-size: 11px;
  margin: 0 0 24px;
}
.label-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}
.slider-control {
  display: block;
  margin: 0 0 21px;
}
.slider-control output {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  color: #6c8055;
}
.slider-control input {
  display: block;
  accent-color: #8da568;
  width: 100%;
  height: 4px;
  margin: 15px 0 10px;
  cursor: pointer;
}
.slider-control small {
  font-size: 9px;
  line-height: 1.5;
  color: #969c8e;
  display: block;
}
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 17px 0;
  font-size: 12px;
}
.toggle-row small {
  display: block;
  font-size: 9px;
  color: #969c8e;
  margin-top: 5px;
}
.toggle-row input {
  width: 30px;
  height: 19px;
  accent-color: #819559;
}
.ownership {
  padding-top: 21px;
}
.ownership-track {
  height: 8px;
  background: #3b555a;
  border-radius: 3px;
  overflow: hidden;
  margin: 12px 0;
}
.ownership-track > div {
  height: 100%;
  background: #c7da9e;
  transition: width 0.25s;
}
.ownership .muted {
  font-size: 9px;
}
.ownership p {
  font-size: 10px;
  line-height: 1.7;
  color: #969d90;
  margin: 19px 0;
}
.timeline {
  margin-top: 24px;
}
.timeline h2 span {
  font:
    10px 'DM Sans',
    sans-serif;
  color: #929b85;
  margin-left: 10px;
}
.actions {
  display: flex;
  gap: 10px;
}
.actions button {
  font-size: 11px;
}
.primary {
  background: #d7e8b0;
  border-color: #c7da9f !important;
}
.primary:hover {
  background: #c8df98;
}
.primary span {
  padding-left: 20px;
}
.timeline-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  padding: 0 24px 17px;
  gap: 30px;
}
.chart-wrap small {
  font-size: 9px;
  color: #929d87;
  margin-left: 7px;
}
#year-range {
  color: #8d9784;
  font-size: 10px;
}
#chart svg {
  width: 100%;
  display: block;
  margin-top: 10px;
  max-height: 160px;
}
.checkpoints {
  border-left: 1px solid var(--line);
  padding-left: 24px;
  max-height: 190px;
  overflow: auto;
}
.empty {
  font-size: 11px;
  line-height: 1.8;
  color: #969f8c;
  margin-top: 24px;
}
.checkpoint-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-size: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
  border-radius: 0;
  padding: 13px 0;
  gap: 8px;
}
.checkpoint-item small {
  display: block;
  font-size: 9px;
  color: #909b83;
  margin-top: 5px;
}
.checkpoint-item > span:last-child {
  font-size: 9px;
  color: #6c8253;
  white-space: nowrap;
}
.activity {
  padding: 12px 24px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: #8b9580;
}
.activity summary {
  cursor: pointer;
}
#log {
  max-height: 150px;
  overflow: auto;
  font-size: 11px;
}
#log strong {
  margin-right: 12px;
}
footer {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #9ba28f;
  margin-top: 27px;
  gap: 12px;
}
footer > span:first-child {
  letter-spacing: 1px;
}
footer .muted {
  letter-spacing: 0;
  margin-left: 10px;
}
.table-scroll {
  max-height: 313px;
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 10px;
}
th {
  text-align: left;
  padding: 12px;
  background: #eef2e6;
  font-weight: 500;
  position: sticky;
  top: 0;
}
td {
  border-bottom: 1px solid var(--line);
  padding: 5px 12px;
}
.table-site {
  border: 0;
  padding: 5px 0;
  font-size: 11px;
}
.current {
  background: #edf3df;
}
.table-note {
  font-size: 9px;
  color: #87947b;
  padding: 0 18px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: #223831;
  color: #ecf3dc;
  border: 1px solid #576e54;
  padding: 15px 22px;
  border-radius: 7px;
  box-shadow: 0 5px 30px #0002;
  font-size: 12px;
  transition: 0.2s;
  z-index: 10;
  max-width: 90%;
  width: max-content;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  max-width: 700px;
  width: 90%;
  max-height: 85vh;
  border: 1px solid #dbe2cd;
  border-radius: 10px;
  background: #fafbf5;
  padding: 28px;
  color: #354331;
}
dialog::backdrop {
  background: #0c1d26aa;
  backdrop-filter: blur(4px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
dialog p,
dialog li {
  font-size: 13px;
  line-height: 1.8;
  color: #717c68;
}
dialog h3 {
  font-size: 15px;
  margin-top: 24px;
}
dialog a {
  color: #557638;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1450px) {
  .system-map {
    height: 326px;
  }
  .planet-grid {
    gap: 17px;
    padding-top: 19px;
  }
  .planet {
    width: 25px;
    height: 25px;
  }
  .project strong {
    font-size: 12px;
  }
  .project small {
    font-size: 9px;
  }
}
@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .panel-heading {
    padding: 18px;
  }
  .segmented button {
    padding: 7px 6px;
  }
  .projects {
    grid-template-columns: repeat(2, 1fr);
  }
  .tag {
    display: none;
  }
  .physical-metrics > div {
    padding: 0 9px;
  }
  .stat {
    padding: 0 17px;
  }
  .stat-detail {
    font-size: 9px;
  }
  .intro {
    gap: 25px;
  }
  .scenario {
    width: 255px;
    flex-shrink: 0;
  }
}
@media (max-width: 780px) {
  header {
    height: 65px;
  }
  .header-right {
    font-size: 0;
    gap: 0;
  }
  .header-right .status-dot {
    display: none;
  }
  .quiet {
    margin: 0;
  }
  .brand {
    font-size: 16px;
  }
  .brand-icon {
    font-size: 27px;
  }
  main {
    padding-top: 27px;
  }
  .intro {
    display: block;
  }
  .scenario {
    margin-top: 23px;
    width: 100%;
  }
  .scenario p {
    display: none;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px 0;
  }
  .stat:nth-child(2) {
    border: 0;
  }
  .stat-number {
    font-size: 28px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .controls .control-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 25px;
  }
  .control-content > p {
    grid-column: 1/-1;
  }
  #sliders {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 25px;
  }
  .ownership {
    padding-top: 10px;
  }
  .toggle-row {
    border-bottom: 0;
    align-self: start;
  }
  .timeline-body {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .checkpoints {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 18px 0 0;
  }
  .timeline > .panel-heading {
    flex-wrap: wrap;
    gap: 20px;
  }
  .actions {
    width: 100%;
  }
  .actions button {
    flex: 1;
  }
  footer {
    line-height: 1.6;
    display: block;
  }
  footer > span {
    display: block;
  }
  .panel-heading h2 {
    font-size: 18px;
  }
  .panel-heading .eyebrow {
    font-size: 8px;
  }
  .build-title > span {
    font-size: 8px;
  }
  .projects {
    grid-template-columns: repeat(3, 1fr);
  }
  .project {
    gap: 6px;
  }
  .project-icon {
    display: none;
  }
}
@media (max-width: 430px) {
  .segmented button {
    font-size: 9px;
  }
  .panel-heading {
    padding: 18px 14px;
  }
  #site-detail {
    padding: 20px 14px;
  }
  .planet-grid {
    padding-left: 38px;
    padding-right: 10px;
    gap: 8px 1px;
  }
  .planet-name {
    font-size: 10px;
  }
  .map-legend {
    font-size: 8px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .map-caption {
    font-size: 8px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .physical-metrics strong {
    font-size: 18px;
  }
  .physical-metrics span {
    font-size: 8px;
  }
  .resource-line {
    line-height: 1.8;
  }
  .resource-line > span {
    display: block;
  }
  .project {
    padding: 10px 6px 23px;
  }
  .project strong {
    font-size: 9px;
  }
  .project small {
    font-size: 8px;
  }
  .timeline h2 span {
    display: block;
    margin: 7px 0 0;
  }
  .stat .eyebrow {
    font-size: 9px;
  }
  .coordinates {
    font-size: 11px;
  }
}

.ai-progress {
  background: #eef2e4;
  padding: 13px;
  border: 1px solid #dfe7d1;
  border-radius: 4px;
  margin-bottom: 22px;
}
.ai-progress .label-line {
  font-size: 9px;
  color: #7b886b;
}
.ai-progress strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 500;
  margin-top: 10px;
}
.ai-progress p {
  font-size: 9px;
  line-height: 1.6;
  color: #839074;
  margin-bottom: 0;
}
@media (max-width: 780px) {
  .ai-progress {
    grid-column: 1/-1;
  }
}
.treaties {
  margin-top: 24px;
}
.treaty-intro {
  font-size: 12px;
  line-height: 1.8;
  color: #818d77;
  padding: 0 24px;
  margin: 0 0 18px;
}
#treaty-summary {
  padding: 0 24px 22px;
}
#treaty-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  padding: 0 24px 24px;
}
.treaty-card {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 17px;
  min-width: 0;
}
.treaty-card.enabled {
  border-color: #bbcba0;
  background: #f8faf2;
}
.treaty-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  font-size: 13px;
  cursor: pointer;
}
.treaty-title input {
  width: 18px;
  height: 18px;
  accent-color: #829b5d;
  flex-shrink: 0;
}
.treaty-card p {
  font-size: 11px;
  line-height: 1.7;
  color: #859178;
}
.defector-benefit {
  min-height: 40px;
}
.defector-benefit strong {
  color: #6a7a56;
}
.treaty-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}
.treaty-fields label {
  font-size: 9px;
  line-height: 1.6;
  color: #7b886e;
}
.treaty-fields input {
  display: block;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid #d6dfca;
  border-radius: 4px;
  margin-top: 4px;
  background: #fffef9;
  color: #435532;
}
.treaty-fields input:disabled {
  opacity: 0.45;
}
.treaty-result {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.defection-track {
  background: #e6ecdd;
  height: 5px;
  border-radius: 3px;
  margin: 10px 0 15px;
  overflow: hidden;
}
.defection-track span {
  display: block;
  height: 100%;
  background: #aa8052;
  min-width: 1px;
}
.treaty-result dl {
  font-size: 10px;
}
.treaty-result dl > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
}
.treaty-result dd {
  margin: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.treaty-result dt {
  color: #7b886e;
}
.net-gain {
  border-top: 1px solid var(--line);
  margin-top: 3px;
  padding-top: 10px !important;
}
.treaty-inactive {
  font-size: 10px;
  line-height: 1.7;
  color: #97a18d;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.treaty-footnote {
  grid-column: 1/-1;
  font-size: 10px;
  line-height: 1.8;
  color: #8c977f;
  margin-bottom: 0;
}
.funding-warning {
  color: #98683d !important;
}
@media (max-width: 1000px) {
  #treaty-cards {
    grid-template-columns: 1fr;
  }
  .treaty-fields {
    grid-template-columns: repeat(3, 1fr);
  }
  .defector-benefit {
    min-height: 0;
  }
}
@media (max-width: 500px) {
  .treaty-fields {
    grid-template-columns: 1fr 1fr;
  }
  #treaty-cards {
    padding: 0 14px 18px;
  }
  #treaty-summary {
    padding: 0 14px 18px;
  }
  .treaties .panel-heading {
    flex-wrap: wrap;
  }
  .treaty-intro {
    padding: 0 14px;
  }
  .treaty-result .label-line {
    font-size: 10px;
  }
}

.capability-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px;
  background: #edf2e3;
  border-radius: 4px;
}
.capability-comparison span {
  display: block;
  font-size: 8px;
  letter-spacing: 0.6px;
  color: #899675;
  margin-bottom: 8px;
}
.capability-comparison strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
  margin-top: 5px;
}
.resource-growth {
  border: 1px solid #dce5cd;
  background: #f0f4e7;
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 15px;
}
.resource-growth .label-line {
  margin-bottom: 9px;
  font-size: 10px;
}
.resource-growth p {
  margin-bottom: 0;
}
.suppression {
  font-size: 11px;
  width: 100%;
  border-color: #d8c8b3;
  color: #866b48;
  margin-top: 10px;
}
.suppression:hover {
  background: #f2eadf;
}

.group-chart {
  margin: 18px 0 6px;
}
.group-chart > span {
  font-size: 8px;
  letter-spacing: 0.7px;
  color: #849170;
}
.group-chart svg {
  width: 100%;
  height: 80px;
  display: block;
}
.technology {
  margin-top: 24px;
}
#technology-controls,
#technology-status {
  padding: 0 24px 22px;
}
.technology-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 22px;
}
.technology-fields label {
  font-size: 10px;
  line-height: 1.6;
  color: #78866d;
}
.technology-fields input {
  display: block;
  width: 100%;
  padding: 9px 11px;
  margin-top: 5px;
  background: #fffef9;
  border: 1px solid #d6dfca;
  border-radius: 4px;
  color: #435532;
}
.technology-toggles {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.technology-toggles label {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #718261;
}
.technology-toggles input {
  accent-color: #849b61;
}
.research-progress {
  height: 5px;
  background: #e4ead9;
  border-radius: 3px;
  overflow: hidden;
  margin: 18px 0 10px;
}
.research-progress span {
  display: block;
  height: 100%;
  background: #92a76a;
}
#technology-status > .label-line {
  font-size: 10px;
  color: #849574;
}
.industry-effects {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 23px;
}
.industry-effects > div {
  border-left: 2px solid #d7e1c7;
  padding-left: 13px;
}
.industry-effects span {
  display: block;
  font-size: 10px;
  color: #829275;
}
.industry-effects strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 500;
  margin-top: 9px;
}
.technology-note {
  font-size: 11px;
  line-height: 1.8;
  color: #8a977d;
  margin-bottom: 0;
}
#technology-routes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  padding: 0 24px 22px;
}
.technology-route {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 17px;
  display: flex;
  flex-direction: column;
}
.technology-route.chosen {
  background: #f0f5e6;
  border-color: #b8cc95;
}
.technology-route h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 500;
  margin: 0;
}
.technology-route p {
  font-size: 11px;
  line-height: 1.8;
  color: #819171;
  min-height: 40px;
}
.technology-route .route-bottleneck {
  min-height: 60px;
  color: #8f846e;
}
.technology-route dl {
  font-size: 10px;
  line-height: 1.8;
  margin-top: auto;
}
.technology-route dl > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0;
}
.technology-route dt {
  color: #7d8d6d;
}
.technology-route dd {
  margin: 0;
  white-space: nowrap;
}
.technology-route button {
  width: 100%;
  font-size: 10px;
  margin-top: 12px;
}
.technology-sources {
  padding: 0 24px 16px;
  font-size: 10px;
  line-height: 1.8;
  color: #8b977e;
}
.technology-sources a {
  color: #6d8752;
}
.local-route {
  background: #f0f3e9;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 4px;
}
.local-route label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  color: #778a62;
}
.local-route select {
  max-width: 65%;
  font-size: 10px;
  border: 1px solid #d2dec2;
  border-radius: 4px;
  padding: 6px;
  color: #4f6738;
  background: #fffef9;
}
.local-route p {
  font-size: 9px;
  line-height: 1.7;
  color: #859676;
  margin-bottom: 0;
}
@media (max-width: 1000px) {
  #technology-routes {
    grid-template-columns: 1fr;
  }
  .technology-route p,
  .technology-route .route-bottleneck {
    min-height: 0;
  }
  .technology-fields {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 500px) {
  .technology-fields {
    gap: 12px;
  }
  .technology-fields label {
    font-size: 9px;
  }
  .industry-effects {
    grid-template-columns: 1fr 1fr;
  }
  .technology-toggles {
    gap: 12px;
  }
  .technology .panel-heading {
    flex-wrap: wrap;
  }
  #technology-controls,
  #technology-status,
  #technology-routes {
    padding-left: 14px;
    padding-right: 14px;
  }
  .technology-sources {
    padding-left: 14px;
    padding-right: 14px;
  }
}
.economic-term {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  line-height: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: help;
}
.economic-term span {
  font-size: 0.85em;
  opacity: 0.6;
}
.economic-term:hover {
  background: transparent;
  color: #526f35;
}
.stat-detail .economic-term {
  font-size: 9px;
}
.concept-plain {
  color: #425735 !important;
  font-size: 15px !important;
}
#concepts-content article {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
#all-concepts {
  margin-top: 20px;
  font-size: 12px;
}
.build-title {
  gap: 12px;
}
.build-title > span {
  text-align: right;
}
@media (max-width: 780px) {
  .header-right .quiet {
    font-size: 10px;
    padding: 8px;
  }
  .header-right {
    gap: 2px;
  }
  .brand {
    gap: 6px;
  }
}
@media (max-width: 430px) {
  .brand {
    font-size: 13px;
    letter-spacing: 1px;
  }
  .brand-icon {
    font-size: 22px;
  }
  .header-right .quiet {
    font-size: 9px;
    padding: 6px;
  }
  .header-right .quiet:first-of-type {
    max-width: 70px;
  }
}

.economic-term span {
  display: inline !important;
  letter-spacing: normal;
}
.technology-route .route-bottleneck {
  min-height: 75px;
}
@media (max-width: 1000px) {
  .technology-route .route-bottleneck {
    min-height: 0;
  }
}

a.quiet {
  color: inherit;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 5px;
}
a.quiet:hover {
  background: #e9eddc;
}

/* Stepped flow: assumptions, policies, run */
.stepper {
  display: flex;
  gap: 8px;
  margin: 0 0 22px;
}
.stepper .step {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: #fbfcf7;
}
.stepper .step span {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 11px;
}
.stepper .step.active {
  background: #e9eedf;
  border-color: #b8c99a;
  color: #36472d;
}
.stepper .step.active span {
  background: #758953;
  color: #fff;
  border-color: #758953;
}
.step-panel > .treaty-intro,
.step-panel > h3 {
  padding: 0 24px;
}
.policy-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  letter-spacing: -0.4px;
  font-weight: 500;
  margin: 26px 0 6px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.step-panel > .policy-heading:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.setting-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px 28px;
  padding: 6px 24px 18px;
}
.setting-group {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 16px 18px;
  background: #fbfcf7;
}
.setting-group h3 {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #7b8476;
  margin: 0 0 14px;
  font-weight: 600;
}
.setting-group .slider-control {
  margin-bottom: 16px;
}
.setting-group .toggle-row {
  border: 0;
  padding: 8px 0;
}
.step-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 24px 24px;
}
.step-nav button {
  font-size: 12px;
}
#step-run > .step-nav {
  padding-right: 0;
}
#ai-progress {
  margin: 0 24px 8px;
}
.control-summary dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  font-size: 12px;
  margin: 0 0 16px;
}
.control-summary dt {
  color: #7b8476;
}
.control-summary dd {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  text-align: right;
}
.share-track {
  height: 8px;
  background: #e6e9dd;
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  margin: 4px 0 14px;
}
.share-track span {
  height: 100%;
}
.share-human {
  background: #758953;
}
.share-ai {
  background: #7aa7c7;
}
.share-defector {
  background: #c48164;
}
.economy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  padding: 0 24px 22px;
}
.economy-grid table {
  font-size: 11px;
}
.economy-grid th {
  position: static;
}
.treaty-card details {
  margin-top: 10px;
  font-size: 11px;
}
.treaty-card summary {
  cursor: pointer;
  color: #7b8476;
}
