@font-face {
  font-family: Onest;
  src: url(onest-cyrillic.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0400-052F, U+2116;
}
@font-face {
  font-family: Onest;
  src: url(onest-latin.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+20BD;
}
:root {
  color-scheme: dark;
  --ink: #f1f5f2;
  --muted: #b1c2cb;
  --cyan: #73eaff;
  --line: #30414a;
  --card: #101c23;
  --bg: #0a1117;
  --amber: #ffbf79;
  --gutter: clamp(18px, 3.8vw, 104px);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font:
    16px/1.45 Onest,
    system-ui,
    sans-serif;
  --spot: #1b5360;
  --accent: #7be9f1;
}
html[data-sector="build"] {
  --spot: #53442e;
  --accent: #ffd093;
}
html[data-sector="fitness"] {
  --spot: #2c4f47;
  --accent: #a3f3ce;
}
html[data-sector="assembly"] {
  --spot: #294b63;
  --accent: #91e0ff;
}
html[data-sector="parts"] {
  --spot: #34495d;
  --accent: #a3e2ff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
main,
header,
.bar {
  width: 100%;
}
button,
input,
select,
a,
summary {
  font: inherit;
}
button,
summary {
  cursor: pointer;
}
button,
a,
select,
input,
summary {
  touch-action: manipulation;
}
a {
  color: var(--cyan);
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #a6f8ff;
  outline-offset: 3px;
}
.skip {
  position: absolute;
  top: -6rem;
  left: 12px;
  z-index: 9;
  background: #ebfdff;
  color: #07151b;
  padding: 12px;
}
.skip:focus {
  top: 8px;
}
.mast {
  background: #090f14;
  border-bottom: 1px solid #2d3e47;
}
.bar {
  padding: 12px var(--gutter);
  min-height: 76px;
  display: grid;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.87rem;
  color: #c3d0d7;
  white-space: nowrap;
}
.brand img {
  display: block;
  width: clamp(98px, 8vw, 160px);
  height: auto;
}
.sep {
  height: 22px;
  width: 1px;
  background: var(--line);
}
.industries,
.segmented {
  display: flex;
  align-items: stretch;
  gap: 3px;
}
.industries {
  padding: 3px;
  background: #121e26;
  border: 1px solid #2a3b45;
  border-radius: 999px;
}
.industries button,
.segmented button {
  font-weight: 550;
  line-height: 1.1;
  color: #bbc9d0;
  background: transparent;
  border: 0;
  min-height: 40px;
  padding: 8px clamp(9px, 1.35vw, 28px);
  border-radius: 999px;
}
.industries button[aria-pressed="true"] {
  color: #0a171d;
  background: #d6edf0;
}
.industries button:hover:not([aria-pressed="true"]),
.segmented button:hover {
  background: #2c3d46;
  color: white;
}
.quiet,
.back,
.motionButton {
  background: transparent;
  color: var(--ink);
  border: 1px solid #49606b;
  border-radius: 9px;
  min-height: 44px;
  padding: 9px 15px;
}
.quiet {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.87rem;
}
.quiet span {
  font: 600 0.76rem/1.3 var(--mono);
  border: 1px solid #9babba;
  border-radius: 50%;
  padding: 0 4px;
}
.quiet:hover,
.back:hover,
.motionButton:hover {
  background: #23343d;
}
.stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.87fr) minmax(0, 1.13fr);
  isolation: isolate;
  background:
    radial-gradient(
      ellipse at 80% 44%,
      var(--spot) 0%,
      #132831 32%,
      transparent 69%
    ),
    linear-gradient(120deg, #0b151b, #132029 56%, #0b1924);
  border-bottom: 1px solid #41505a;
  scroll-margin-top: 0;
}
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: radial-gradient(#b0e6ef2e 0.8px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(100deg, transparent 10%, #000 72%);
}
.story {
  position: relative;
  z-index: 1;
  align-self: center;
  min-width: 0;
  padding: clamp(32px, 5.5vh, 86px) 8px clamp(34px, 5.7vh, 90px) var(--gutter);
}
.edition,
.eyebrow,
.modelClock,
.storyMeta,
.sequence,
.mapLegend,
.deskTag {
  font-family: var(--mono);
}
.edition {
  font-size: 0.81rem;
  letter-spacing: 0.075em;
  color: #afc8d5;
  text-transform: uppercase;
  margin-bottom: clamp(20px, 3.7vh, 48px);
}
.storyMeta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  color: #b6c6ce;
  font-size: 0.78rem;
}
.status {
  color: #ffd6a7;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.status::before,
.pin {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px #ffbc7766;
}
.story.done .status {
  color: #9deecf;
}
.story.done .status::before {
  background: #9deecf;
}
h1 {
  font-weight: 650;
  font-size: clamp(3rem, 5.75vw, 9rem);
  letter-spacing: -0.068em;
  line-height: 1.01;
  margin: clamp(10px, 1.4vw, 23px) 0;
  overflow-wrap: break-word;
}
h1 span,
h1 em {
  display: block;
}
h1 em {
  color: var(--accent);
  font-style: normal;
}
#eventTitle:focus {
  outline: none;
}
#eventText {
  max-width: 44ch;
  color: #d4e2e6;
  font-size: clamp(1rem, 1.25vw, 1.47rem);
  line-height: 1.48;
  text-wrap: pretty;
}
.actions,
.controlRow,
.dialogTop,
.sectionTitle,
.pilot,
footer {
  display: flex;
  gap: 10px;
  align-items: center;
}
.actions,
.controlRow {
  flex-wrap: wrap;
}
.actions {
  margin: clamp(17px, 2.6vh, 32px) 0 13px;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  border-radius: 9px;
  background: #8aeaef;
  color: #071b21;
  min-height: 46px;
  font-weight: 670;
  padding: 11px 20px;
  text-decoration: none;
}
.primary:hover {
  background: #b7fbff;
}
#advance::after {
  content: "→";
  font-family: system-ui;
  font-size: 1.12em;
}
.source {
  max-width: 48ch;
  font-size: 0.91rem;
}
.source summary,
.journal summary {
  color: #bed0d9;
}
.source summary {
  width: fit-content;
  padding: 6px 0;
}
.source strong,
.source p {
  display: block;
  color: #b8c9d1;
  line-height: 1.5;
  margin: 8px 0;
}
.source strong {
  color: #e4f0f3;
  font-weight: 520;
}
.model {
  align-self: stretch;
  position: relative;
  min-height: clamp(400px, 66svh, 980px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  padding: clamp(20px, 3vh, 48px) var(--gutter) clamp(16px, 3vh, 44px)
    max(10px, 1.35vw);
}
.model::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 56% 52%, #8fd2e21e, transparent 61%);
  pointer-events: none;
}
.model canvas {
  display: block;
  position: absolute;
  inset: clamp(46px, 6vh, 80px) 0 clamp(47px, 6vh, 84px);
  width: 100%;
  height: calc(100% - clamp(46px, 6vh, 80px) - clamp(47px, 6vh, 84px));
}
.modelTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.modelTop .eyebrow {
  color: #b4d4df;
}
.modelClock,
.eyebrow,
.mapLegend {
  font-size: 0.78rem;
  line-height: 1.4;
}
.eyebrow {
  font-weight: 550;
  color: #9ab5c1;
  letter-spacing: 0.07em;
}
.modelClock {
  color: #e5f2f4;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mapLegend {
  position: relative;
  grid-row: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d9e9ed;
  padding-right: 48px;
  min-height: 44px;
}
.motionButton {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(16px, 3vh, 44px);
  height: 44px;
  width: 44px;
  padding: 4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 1rem/1 var(--mono);
  background: #12232e;
}
.sequence {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  background: #101a22;
  border-top: 1px solid var(--line);
  padding: 0 var(--gutter);
}
.sequence span {
  position: relative;
  padding: 13px 6px 14px 0;
  font-size: 0.81rem;
  color: #b0c1c9;
}
.sequence span::before {
  content: "";
  position: absolute;
  height: 2px;
  right: 0;
  left: 0;
  top: -1px;
  background: #38505d;
}
.sequence .current {
  color: #b0f7ff;
}
.sequence .current::before {
  background: var(--accent);
  box-shadow: 0 0 12px #7bd9fc44;
}
.sequence .past::before {
  background: #588389;
}
.workbench {
  padding: 0 var(--gutter) clamp(24px, 3.6vw, 56px);
  background: #0c141a;
}
.jump {
  display: flex;
  align-items: stretch;
  gap: clamp(5px, 2.1vw, 46px);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.jump a {
  color: #abc1cc;
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  border-radius: 7px;
  padding: 6px 12px;
  font-weight: 550;
  font-size: 0.99rem;
}
.jump a[aria-current="true"] {
  background: #22353e;
  color: #bdffff;
}
.jump a:hover {
  color: #e8feff;
}
.deskPanel {
  padding: clamp(20px, 2.5vw, 44px) 0 0;
  min-width: 0;
}
.sectionTitle,
.pilot,
footer,
.dialogTop {
  justify-content: space-between;
  gap: 16px;
}
.sectionTitle {
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
h2 {
  font-size: clamp(1.65rem, 2.7vw, 3.3rem);
  line-height: 1.12;
  letter-spacing: -0.046em;
  font-weight: 610;
}
.sectionTitle .eyebrow {
  margin-bottom: 5px;
}
.segmented {
  flex-wrap: wrap;
}
.segmented button {
  border-radius: 7px;
  font-size: 0.92rem;
  padding: 9px 12px;
}
.segmented button[aria-pressed="true"] {
  background: #20373e;
  color: #bdffff;
}
.roleGrid,
.moduleGrid,
.calcGrid {
  display: grid;
  gap: clamp(10px, 1.3vw, 26px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.roleGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.roleCard,
.console,
.inputs,
.total,
.monitor {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(15px, 1.75vw, 34px);
  min-width: 0;
}
.roleCard .value,
.console h3 {
  display: block;
  margin: 0.5em 0 0.27em;
  font-size: clamp(1.15rem, 1.55vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.17;
}
.roleCard p,
.console p:not(.eyebrow),
.hint,
.caveat,
#equation,
#payback,
.pilot p:not(.eyebrow),
.research p,
.journal li {
  color: var(--muted);
  line-height: 1.52;
  max-width: 80ch;
}
.hint {
  margin-bottom: 15px;
}
.caveat {
  font-size: 0.9rem;
  margin-top: 10px;
}
.selectField,
.check {
  color: var(--muted);
  font-size: 0.95rem;
}
.selectField {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
select,
.inputs input {
  background: #101a21;
  border: 1px solid #536471;
  border-radius: 6px;
  min-height: 44px;
  color: var(--ink);
  padding: 8px;
  max-width: 100%;
}
.roleLink {
  display: inline-block;
  margin-top: 10px;
}
.controlRow {
  margin-top: 16px;
}
.console p:not(.eyebrow) {
  margin-top: 6px;
}
.monitor {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 265px;
  background: #13232c;
  padding: 14px 18px;
  isolation: isolate;
}
.monitor canvas {
  display: block;
  position: absolute;
  left: 0;
  top: 38px;
  width: 100%;
  height: calc(100% - 79px);
}
.feedFoot {
  grid-row: 3;
  color: var(--muted);
  font: 0.78rem/1.4 var(--mono);
}
.journal {
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}
.journal li,
.research p {
  margin: 9px 0;
}
.journal summary,
.source summary {
  min-height: 32px;
}
.sliders,
.aux,
.inputs {
  display: grid;
  gap: 12px;
}
.sliders {
  margin: 16px 0;
}
.aux {
  margin-top: 9px;
  gap: 7px;
}
.sliders label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px;
}
.sliders input {
  grid-column: 1/-1;
  width: 100%;
}
.sliders output {
  font: 600 0.95rem var(--mono);
  color: var(--cyan);
}
input {
  accent-color: var(--cyan);
}
.inputs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.inputs label {
  display: grid;
  align-content: start;
  gap: 6px;
  color: #cbd9df;
  font-size: 0.96rem;
}
.inputs input {
  width: 100%;
  font-variant-numeric: tabular-nums;
}
.total {
  background: linear-gradient(135deg, #173440, #111e27);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.total output {
  font-size: clamp(2.15rem, 4.6vw, 6rem);
  line-height: 1.15;
  letter-spacing: -0.065em;
  overflow-wrap: anywhere;
  margin: 0.14em 0;
}
.total output.negative {
  color: var(--amber);
}
#payback {
  margin-top: 8px;
}
.pilot {
  margin: 0;
  padding: 22px var(--gutter);
  border-block: 1px solid var(--line);
  background: #111c24;
}
.pilot h2 {
  font-size: clamp(1.18rem, 1.7vw, 1.95rem);
  margin-bottom: 4px;
}
.pilot .primary {
  flex: none;
}
.pilot details {
  font-size: 0.95rem;
  color: var(--muted);
}
.pilot details p {
  margin-top: 6px;
}
.research {
  margin: 14px var(--gutter);
}
footer {
  padding: 16px var(--gutter);
  font-size: 0.83rem;
  color: #b7c8cf;
  flex-wrap: wrap;
}
dialog {
  width: min(540px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: clamp(18px, 3vw, 36px);
  background: #132129;
  color: var(--ink);
  border: 1px solid #53717e;
  border-radius: 13px;
}
dialog::backdrop {
  background: #03090ce8;
}
dialog h2 {
  margin-top: 18px;
}
dialog ol {
  padding-left: 1.3em;
}
dialog li {
  margin: 10px 0;
}
dialog p {
  margin: 10px 0;
}
button:disabled {
  opacity: 0.6;
  cursor: default;
}
@media (min-width: 1900px) {
  .model {
    min-height: clamp(540px, 68svh, 1350px);
  }
  .story {
    padding-left: var(--gutter);
  }
  .bar {
    min-height: 86px;
  }
}
@media (max-width: 1000px) {
  .brand .sep,
  .brand > span:last-child {
    display: none;
  }
  .bar {
    grid-template-columns: auto 1fr auto;
  }
  .industries {
    justify-self: center;
  }
  .stage {
    grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  }
  .story {
    padding-right: 0;
  }
  .sectionTitle {
    align-items: flex-start;
  }
  .model {
    min-height: 430px;
  }
}
@media (max-width: 700px) {
  :root {
    --gutter: clamp(14px, 4.7vw, 30px);
  }
  .bar {
    min-height: 0;
    grid-template-columns: 1fr auto;
    row-gap: 9px;
    padding: 10px var(--gutter) 11px;
  }
  .brand img {
    width: 100px;
  }
  .quiet {
    font-size: 0.83rem;
    min-height: 40px;
    padding: 7px 10px;
    text-wrap: nowrap;
  }
  .bar .industries {
    grid-row: 2;
    grid-column: 1/-1;
    justify-self: stretch;
  }
  .industries button {
    flex: 1;
    min-width: 0;
    padding: 8px 3px;
    font-size: 0.88rem;
  }
  .stage {
    grid-template-columns: 1fr;
  }
  .story {
    padding: 21px var(--gutter) 2px;
    align-self: auto;
  }
  .edition {
    margin-bottom: 8px;
    font-size: 0.72rem;
  }
  .storyMeta {
    font-size: 0.72rem;
  }
  h1 {
    font-size: clamp(2.7rem, 10vw, 4.3rem);
    margin: 8px 0 10px;
  }
  #eventText {
    font-size: 1rem;
    max-width: 52ch;
  }
  .actions {
    margin: 12px 0 4px;
  }
  .source summary {
    min-height: 32px;
    font-size: 0.85rem;
  }
  .model {
    min-height: 0;
    height: clamp(240px, 66vw, 380px);
    padding: 8px var(--gutter) 6px;
  }
  .model canvas {
    inset: 28px 0 40px;
    width: 100%;
    height: calc(100% - 68px);
  }
  .modelTop .eyebrow,
  .modelClock,
  .mapLegend {
    font-size: 0.72rem;
  }
  .mapLegend {
    min-height: 38px;
  }
  .motionButton {
    bottom: 4px;
    min-height: 40px;
    height: 40px;
    width: 40px;
  }
  .sequence span {
    font-size: 0.73rem;
    padding: 9px 3px 12px 0;
  }
  .jump {
    gap: 3px;
    padding: 7px 0;
  }
  .jump a {
    font-size: 0.88rem;
    padding: 7px 9px;
    min-height: 40px;
  }
  .roleGrid,
  .moduleGrid,
  .calcGrid {
    grid-template-columns: minmax(0, 1fr);
  }
  .roleGrid {
    gap: 8px;
  }
  .roleCard .value {
    margin: 0.28em 0;
  }
  .deskPanel {
    padding-top: 18px;
  }
  .segmented {
    gap: 2px;
  }
  .segmented button {
    padding: 8px;
    font-size: 0.86rem;
  }
  .pilot {
    align-items: flex-start;
    flex-direction: column;
  }
  .research {
    padding: 12px;
  }
}
@media (max-width: 380px) {
  .inputs {
    grid-template-columns: 1fr;
  }
  .back,
  .primary {
    padding: 9px 12px;
  }
  .industries button {
    font-size: 0.81rem;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a {
    transition:
      background-color 150ms,
      color 150ms,
      border-color 150ms;
  }
  html:not([data-motion="paused"]) .sequence .current::before {
    transform-origin: left;
    animation: step-reveal 420ms ease-out;
  }
  html:not([data-motion="paused"]) .deskPanel:not([hidden]) {
    animation: panel-enter 250ms ease-out;
  }
  @keyframes step-reveal {
    from {
      transform: scaleX(0.15);
    }
    to {
      transform: scaleX(1);
    }
  }
  @keyframes panel-enter {
    from {
      transform: translateY(5px);
      opacity: 0.6;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
}
