:root {
  --paper: #f8f7f0;
  --panel: #fffef8;
  --ink: #172f28;
  --green: #16533f;
  --muted: #546258;
  --line: #c7cec1;
  --yellow: #f3dc57;
  --orange: #ad4729;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --serif: Georgia, "Times New Roman", serif;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 1rem;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.55 system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
a {
  color: var(--green);
  text-underline-offset: 4px;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
summary,
label {
  touch-action: manipulation;
}
button,
summary {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible,
textarea:focus-visible {
  outline: 3px solid #1266bc;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.wrap,
.body {
  margin-inline: auto;
  width: min(1240px, calc(100% - clamp(32px, 9vw, 144px)));
}
.skip {
  position: absolute;
  top: -100px;
  z-index: 3;
  background: white;
  padding: 0.6rem;
}
.skip:focus {
  top: 5px;
}
.mast {
  border-bottom: 1px solid var(--line);
}
.mast-inner,
.mast nav,
.brand,
.brand-mark,
.foot,
.section-heading,
.panel-top,
.actions,
.rail {
  display: flex;
  align-items: center;
}
.mast-inner {
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}
.mast nav {
  gap: clamp(16px, 3vw, 40px);
}
.mast nav a,
.brand {
  text-decoration: none;
  color: var(--ink);
}
.mast nav a {
  font-weight: 600;
  font-size: 0.9rem;
}
.mast nav a:hover,
.brand:hover {
  text-decoration: underline;
}
.mast nav .network {
  border-left: 1px solid var(--line);
  padding-left: clamp(16px, 3vw, 36px);
}
.brand {
  font-weight: 530;
  letter-spacing: -1.1px;
  font-size: 1.4rem;
  gap: 11px;
}
.brand b {
  font-weight: 900;
}
.brand-mark {
  background: var(--ink);
  width: 34px;
  height: 34px;
  border-radius: 6px;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding: 7px 6px;
}
.brand-mark i {
  background: var(--yellow);
  width: 5px;
  height: 8px;
}
.brand-mark i:nth-child(2) {
  height: 13px;
}
.brand-mark i:nth-child(3) {
  height: 20px;
}
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(30px, 5vw, 82px);
  align-items: center;
  padding: clamp(35px, 5vw, 70px) 0;
}
.kicker,
.plate-meta,
.unit-label,
.save,
.meta,
.legend,
.round-no,
.foot,
.produce figcaption small {
  font: 600 0.72rem/1.4 var(--mono);
  letter-spacing: 0.065em;
}
.kicker,
.plate-meta,
.unit-label,
.round-no,
.produce figcaption small {
  text-transform: uppercase;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 13px;
  color: var(--green);
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}
.sep {
  color: #8c9889;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
.task-title,
.produce figcaption > span {
  font-family: var(--serif);
  font-weight: 500;
}
.hero h1 {
  max-width: 690px;
  font-size: clamp(3.2rem, 5.75vw, 5.9rem);
  line-height: 0.99;
  letter-spacing: -0.061em;
}
.hero h1 em {
  color: var(--green);
}
.dek {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.55;
  margin: 22px 0 26px;
  max-width: 51ch;
  color: #47594f;
}
.primary,
.secondary {
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 5px;
  font-weight: 650;
  border: 1px solid var(--ink);
  line-height: 1.35;
}
.primary {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.primary:hover {
  background: #ffe978;
}
.primary span {
  display: inline-block;
  margin-left: 13px;
}
.secondary {
  background: var(--panel);
  color: var(--green);
  border-color: var(--line);
}
.secondary:hover {
  border-color: var(--green);
}
.meta {
  color: var(--muted);
  margin-left: 16px;
  letter-spacing: 0;
}
.produce {
  background: #174737;
  isolation: isolate;
  position: relative;
  min-height: clamp(270px, 27vw, 355px);
  overflow: hidden;
  border: 1px solid #103c2f;
  border-radius: 8px;
  color: #fffdea;
}
.image-grid,
.orbit {
  position: absolute;
  z-index: -1;
  inset: 0;
}
.image-grid {
  background-image:
    linear-gradient(#dee69f17 1px, transparent 1px),
    linear-gradient(90deg, #dee69f17 1px, transparent 1px);
  background-size: 32px 32px;
}
.orbit {
  inset: 12% 15% 13%;
  border: 1px dashed #a0b97d70;
  border-radius: 50%;
  transform: rotate(-24deg);
}
.plate-meta,
.produce figcaption {
  position: absolute;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1;
}
.plate-meta {
  top: 16px;
  color: #dfebbc;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
}
.produce img {
  position: absolute;
  object-fit: contain;
  top: 8%;
  left: 19%;
  width: 64%;
  height: 76%;
  transform: rotate(19deg);
  filter: drop-shadow(9px 12px 5px #06291f77);
}
.produce figcaption {
  bottom: 14px;
  border-top: 1px solid #a6c3a14d;
  padding-top: 8px;
}
.produce figcaption > span {
  font-size: 1.25rem;
  font-style: italic;
}
.produce figcaption small {
  font-size: 0.6rem;
  color: #dfebbc;
}
#lab {
  border-top: 2px solid var(--ink);
  padding: 27px 0 0;
  outline: none;
}
body.playing #lab {
  border-top: 0;
}
.section-heading,
.panel-top,
.foot {
  justify-content: space-between;
  gap: 15px;
}
.section-heading {
  margin-bottom: 18px;
}
.section-heading .kicker {
  margin-bottom: 4px;
}
.dash {
  width: 20px;
  height: 2px;
  background: var(--green);
}
h2 {
  font-size: clamp(2.1rem, 3.6vw, 3.3rem);
  letter-spacing: -0.055em;
  line-height: 1.05;
}
.save {
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  font-size: 0.71rem;
  text-align: right;
}
.board {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 16px;
}
.chart-panel,
.table-panel,
.stage-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: clamp(16px, 2.3vw, 30px);
  min-width: 0;
}
.panel-top h3,
.note-grid h3 {
  font-size: 1.15rem;
  letter-spacing: -0.035em;
}
.unit-label {
  color: #52654e;
  font-size: 0.62rem;
  font-weight: 500;
  white-space: nowrap;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 17px;
  font-size: 0.72rem;
  letter-spacing: 0;
  color: var(--muted);
  margin: 7px 0 10px;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legend i {
  width: 18px;
  border-top: 3px solid;
}
.s-line {
  color: var(--green);
}
.d-line {
  color: var(--orange);
}
.legend .old-line {
  color: #646f65;
  border-top: 2px dashed;
}
#chart svg {
  width: 100%;
  height: auto;
  display: block;
}
.gridline {
  stroke: #dce0d6;
  stroke-width: 1;
}
.axis {
  stroke: #617165;
}
.axis-text,
.axis-title,
.mark-label {
  font: 12px var(--mono);
  fill: #4c5f52;
}
.axis-title,
.mark-label {
  font-weight: bold;
}
.mark-label {
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--panel);
  stroke-width: 4px;
}
.curve {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}
.supply {
  stroke: var(--green);
}
.demand {
  stroke: var(--orange);
}
.previous {
  stroke: #737f75;
  stroke-width: 2;
  stroke-dasharray: 5 5;
}
.point {
  fill: var(--yellow);
  stroke: var(--ink);
  stroke-width: 2;
}
.old-point {
  fill: var(--panel);
  stroke: #626e61;
  stroke-width: 2;
}
.subtle,
.reading {
  color: var(--muted);
  font-size: 0.92rem;
}
.subtle {
  margin: 8px 0 18px;
  max-width: 40ch;
}
.reading {
  border-left: 3px solid #a2bba0;
  padding-left: 12px;
  margin-top: 20px;
}
.outcome-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.outcome-table th,
.outcome-table td {
  padding: 11px 5px;
  border-bottom: 1px solid var(--line);
  font-size: 0.89rem;
}
.outcome-table thead th {
  background: #edf0e6;
  color: #475847;
  font: 600 0.73rem/1.45 var(--mono);
}
.outcome-table thead small {
  display: block;
  font-weight: 400;
  font-size: 0.67rem;
}
.outcome-table th:first-child {
  text-align: left;
}
.outcome-table tbody td {
  font-family: var(--mono);
}
.outcome-table tbody tr:last-child {
  background: #f6f5df;
}
.notes {
  margin: 22px 0 38px;
}
.notes details {
  border-block: 1px solid var(--line);
}
summary {
  padding: 14px 0;
  font-weight: 650;
  color: var(--green);
}
.note-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding-bottom: 20px;
}
.note-grid p {
  margin: 6px 0 16px;
}
.credit,
.foot {
  font-size: 0.77rem;
  color: var(--muted);
}
.foot {
  padding-block: 18px 30px;
  letter-spacing: 0;
  border-top: 1px solid var(--line);
}
.foot span:first-child {
  font-weight: 750;
  color: var(--ink);
}
.stage-card {
  margin-bottom: 16px;
  border-top: 4px solid var(--green);
}
.rail {
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.rail li,
.round-no {
  font: 600 0.7rem/1.5 var(--mono);
  color: var(--muted);
}
.rail li {
  border-bottom: 2px solid var(--line);
  padding: 4px 8px;
}
.rail li[aria-current] {
  border-color: var(--green);
  background: #e6ecde;
  color: var(--green);
}
.round-no {
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--green);
  margin-bottom: 4px;
}
.task-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
}
.event {
  max-width: 80ch;
  margin: 8px 0 15px;
}
.action-title {
  font-size: 1rem;
  margin: 12px 0 8px;
}
.choices {
  display: flex;
  gap: clamp(12px, 4vw, 60px);
  flex-wrap: wrap;
  margin: 10px 0 18px;
}
.choices fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.choices legend {
  font-weight: 650;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.option {
  position: relative;
  display: inline-block;
  margin: 0 3px 5px 0;
}
.option input {
  position: absolute;
  opacity: 0;
  left: 8px;
  top: 8px;
}
.option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid #abb7a8;
  border-radius: 5px;
  padding: 6px 12px;
  background: var(--panel);
  font-weight: 550;
  cursor: pointer;
}
.option input:checked + span {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.option input:focus-visible + span {
  outline: 3px solid #1266bc;
  outline-offset: 2px;
}
.actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 15px;
}
.notice,
.feedback {
  background: #edf2e7;
  border-left: 3px solid var(--green);
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 0.94rem;
  max-width: 85ch;
}
.notice {
  background: #fcf3cd;
  border-color: #977200;
}
.written {
  display: block;
  font-weight: 650;
}
.written span {
  display: block;
  font-weight: 400;
  margin-top: 4px;
}
.written textarea {
  display: block;
  width: min(100%, 78ch);
  padding: 10px;
  margin-top: 8px;
  min-height: 85px;
  border: 1px solid #8c9b8d;
  border-radius: 4px;
  background: white;
  color: var(--ink);
}
.responses {
  margin-top: 12px;
}
.responses p {
  margin: 6px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.jump {
  font-size: 0.87rem;
}
.body {
  padding-block: 35px;
}
@media (max-width: 760px) {
  .wrap,
  .body {
    width: calc(100% - 36px);
  }
  .mast-inner {
    min-height: 60px;
  }
  .brand {
    font-size: 1.18rem;
    gap: 7px;
  }
  .brand-mark {
    width: 29px;
    height: 29px;
    padding: 5px;
  }
  .mast nav {
    gap: 16px;
  }
  .mast nav a {
    font-size: 0.82rem;
  }
  .mast nav .network {
    padding-left: 12px;
  }
  .hero {
    gap: 20px;
    padding: 30px 0;
  }
  .hero h1 {
    font-size: clamp(3rem, 7.3vw, 3.9rem);
  }
  .produce {
    min-height: 235px;
  }
  .produce figcaption small {
    display: none;
  }
  .board {
    grid-template-columns: 1fr;
  }
  .note-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
@media (max-width: 560px) {
  .mast-inner {
    flex-wrap: wrap;
    gap: 0;
    padding-block: 7px;
  }
  .mast nav {
    gap: 12px;
  }
  .mast nav a {
    font-size: 0.78rem;
  }
  .mast nav a:first-child {
    display: none;
  }
  .mast nav .network {
    padding-left: 10px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .hero h1 {
    max-width: 13ch;
    font-size: clamp(3.3rem, 12.8vw, 4.6rem);
  }
  .dek {
    margin: 14px 0 17px;
  }
  .produce {
    min-height: 170px;
  }
  .produce img {
    width: 52%;
    left: 24%;
    height: 90%;
    top: 0;
    transform: rotate(47deg);
  }
  .produce figcaption {
    left: 12px;
    bottom: 9px;
    right: auto;
    border: 0;
  }
  .produce figcaption > span {
    font-size: 1rem;
  }
  .plate-meta {
    left: 12px;
    right: 12px;
    top: 9px;
  }
  .section-heading {
    align-items: flex-end;
    gap: 6px;
  }
  .save {
    max-width: 100px;
  }
  .choices {
    gap: 8px 20px;
  }
  .chart-panel,
  .table-panel,
  .stage-card {
    padding: 15px;
  }
  .rail {
    gap: 3px;
  }
  .rail li {
    padding: 3px 5px;
  }
  .foot {
    gap: 6px;
  }
  .legend {
    font-size: 0.65rem;
  }
  .kicker {
    font-size: 0.64rem;
  }
  .outcome-table th,
  .outcome-table td {
    padding: 9px 4px;
  }
}

@media (max-width: 560px) {
  .mast nav .network:not(:only-child) { display: none; }
}
