:root {
  --paper: #f7f7f5;
  --ink: #110e08;
  --acid: #ccff00;
  --acid-pressed: #b8e600;
  --fuel: #ff5b00;
  --muted: #8f8c83;
  --rule: #cbc9c2;
  --screen-rule: rgba(17, 14, 8, .24);
  --sans: "Hanken Grotesk", Arial, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
}

button,
input { color: inherit; font: inherit; }

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

.forever-fallback-header {
  min-height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--ink);
  font-size: 10px;
}

.future-shell {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 18px 32px 46px;
}

.future-machine {
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--ink);
  box-shadow: 9px 9px 0 rgba(17, 14, 8, .13);
  color: var(--paper);
}

.machine-strip {
  min-height: 42px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #4b4841;
  color: #aaa79f;
  font-size: 10px;
  text-transform: uppercase;
}

.machine-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--acid);
  text-align: right;
}

.machine-state i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 14px var(--acid);
}

.machine-body {
  min-height: min(670px, calc(100svh - 168px));
  display: grid;
  grid-template-columns: minmax(310px, .68fr) minmax(0, 1.32fr);
}

.future-copy {
  min-width: 0;
  padding: clamp(28px, 3.3vw, 52px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;
  border-right: 1px solid #4b4841;
}

.eyebrow {
  margin: 0 0 20px;
  color: #aaa79f;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.future-copy h1 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(66px, 7.4vw, 112px);
  font-weight: 900;
  letter-spacing: -.065em;
  line-height: .76;
  text-transform: uppercase;
}

.machine-joke {
  max-width: 34ch;
  margin: 29px 0 0;
  color: #d7d4cc;
  font-family: var(--sans);
  font-size: clamp(16px, 1.5vw, 21px);
  font-weight: 560;
  line-height: 1.22;
}

.bag-control {
  width: min(100%, 360px);
  padding-top: 18px;
  border-top: 1px solid #4b4841;
}

.bag-control > label {
  display: block;
  margin-bottom: 9px;
  color: #aaa79f;
  font-size: 10px;
}

.bag-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.bag-entry input {
  width: 100%;
  min-height: 50px;
  padding: 0 0 3px;
  border: 0;
  border-bottom: 2px solid var(--acid);
  outline: 0;
  background: transparent;
  color: var(--paper);
  font-family: var(--sans);
  font-size: clamp(32px, 3vw, 46px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.045em;
  line-height: 1;
}

.bag-entry input:focus-visible {
  border-bottom-color: var(--paper);
  box-shadow: 0 4px 0 var(--acid);
}

.bag-entry span {
  padding-bottom: 8px;
  color: var(--acid);
  font-size: 12px;
  font-weight: 800;
}

.bag-control p {
  margin: 9px 0 0;
  color: #88857d;
  font-size: 10px;
  line-height: 1.45;
}

.capsule-display {
  width: min(100%, 330px);
  display: grid;
  justify-items: center;
  gap: 12px;
}

.capsule-display img {
  width: min(100%, 275px);
  height: auto;
  display: block;
  filter: drop-shadow(0 11px 0 #060503) drop-shadow(0 18px 20px rgba(0, 0, 0, .46));
}

.capsule-display span {
  color: #77746d;
  font-size: 9px;
  text-align: center;
}

.future-screen {
  min-width: 0;
  padding: clamp(20px, 2.3vw, 34px);
  display: flex;
  flex-direction: column;
  background: var(--acid);
  color: var(--ink);
}

.screen-meta,
.screen-tape {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}

.screen-meta {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--screen-rule);
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(210px, .66fr);
  border-bottom: 1px solid var(--screen-rule);
}

.bag-result,
.treasury-result {
  min-width: 0;
  padding: 20px 0 17px;
}

.treasury-result {
  padding-left: 22px;
  border-left: 1px solid var(--screen-rule);
}

.bag-result > span,
.treasury-result > span {
  display: block;
  margin-bottom: 7px;
  font-size: 10px;
  font-weight: 800;
}

.bag-result output,
.treasury-result output {
  display: block;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  letter-spacing: -.07em;
  line-height: .8;
}

.bag-result output {
  font-size: clamp(68px, 8vw, 124px);
}

.treasury-result output {
  color: var(--fuel);
  font-size: clamp(42px, 4.7vw, 72px);
}

.bag-result p,
.treasury-result p {
  margin: 13px 0 0;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}

.bag-result p strong { font-size: 12px; }

.treasury-result p {
  max-width: 31ch;
  color: rgba(17, 14, 8, .68);
}

.chart-shell {
  position: relative;
  min-height: 230px;
  flex: 1 1 270px;
  overflow: hidden;
  border-bottom: 1px solid var(--screen-rule);
}

#futureChart {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 230px;
  display: block;
}

.chart-watermark {
  position: absolute;
  z-index: 0;
  right: 1%;
  bottom: 0;
  color: rgba(17, 14, 8, .07);
  font-family: var(--sans);
  font-size: clamp(58px, 9vw, 138px);
  font-weight: 950;
  letter-spacing: -.08em;
  line-height: .76;
  pointer-events: none;
}

.chart-legend {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 4px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
  font-size: 9px;
  font-weight: 800;
  pointer-events: none;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend span::before {
  content: "";
  width: 16px;
  height: 3px;
  background: var(--ink);
}

.chart-legend .legend-fuel::before { background: var(--fuel); }

.chart-legend .legend-live::before {
  height: 1px;
  background: transparent;
  border-top: 1px dashed rgba(17, 14, 8, .58);
}

.market-control {
  padding: 17px 0 13px;
  border-bottom: 1px solid var(--screen-rule);
}

.market-control-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.market-control-head label {
  font-size: 11px;
  font-weight: 900;
}

.market-control-head output {
  font-family: var(--sans);
  font-size: clamp(24px, 2.8vw, 42px);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.05em;
  line-height: .8;
}

#marketCapSlider {
  width: 100%;
  height: 48px;
  margin: 9px 0 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: ew-resize;
  -webkit-tap-highlight-color: transparent;
}

#marketCapSlider::-webkit-slider-runnable-track {
  height: 6px;
  border: 1px solid var(--ink);
  background: linear-gradient(
    90deg,
    var(--paper) 0 var(--rail-progress, 60%),
    rgba(247, 247, 245, .4) var(--rail-progress, 60%) 100%
  );
  box-shadow: 0 5px 0 rgba(17, 14, 8, .13);
}

#marketCapSlider::-moz-range-track {
  height: 6px;
  border: 1px solid var(--ink);
  background: linear-gradient(
    90deg,
    var(--paper) 0 var(--rail-progress, 60%),
    rgba(247, 247, 245, .4) var(--rail-progress, 60%) 100%
  );
  box-shadow: 0 5px 0 rgba(17, 14, 8, .13);
}

#marketCapSlider::-webkit-slider-thumb {
  width: 72px;
  height: 35px;
  margin-top: -15px;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--acid) url("/logo.png") center / 26px 26px no-repeat;
  box-shadow: 0 5px 0 var(--ink), 0 9px 14px rgba(17, 14, 8, .24);
}

#marketCapSlider::-moz-range-thumb {
  width: 72px;
  height: 35px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--acid) url("/logo.png") center / 26px 26px no-repeat;
  box-shadow: 0 5px 0 var(--ink), 0 9px 14px rgba(17, 14, 8, .24);
}

#marketCapSlider:focus-visible::-webkit-slider-thumb {
  outline: 3px solid var(--paper);
  outline-offset: 4px;
}

#marketCapSlider:focus-visible::-moz-range-thumb {
  outline: 3px solid var(--paper);
  outline-offset: 4px;
}

.market-ticks {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin-top: -1px;
  color: rgba(17, 14, 8, .62);
  font-size: 9px;
}

.market-ticks span { text-align: center; }
.market-ticks span:first-child { text-align: left; }
.market-ticks span:last-child { text-align: right; }

#marketCapHelp {
  margin: 10px 0 0;
  color: rgba(17, 14, 8, .62);
  font-size: 10px;
  line-height: 1.4;
}

.screen-tape {
  min-height: 54px;
  padding-top: 8px;
}

.screen-tape span {
  display: grid;
  gap: 3px;
  color: rgba(17, 14, 8, .62);
}

.screen-tape strong {
  max-width: 23ch;
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.always-disclaimer {
  margin: 0;
  padding: 12px 18px 13px;
  border-top: 1px solid #4b4841;
  color: #aaa79f;
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.method {
  margin-top: 17px;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.method summary {
  min-height: 50px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  cursor: pointer;
  list-style: none;
  font-size: 10px;
  font-weight: 700;
}

.method summary::-webkit-details-marker { display: none; }

.method summary i {
  position: relative;
  width: 12px;
  height: 12px;
}

.method summary i::before,
.method summary i::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  width: 12px;
  height: 1px;
  background: currentColor;
}

.method summary i::after { transform: rotate(90deg); }
.method[open] summary i::after { transform: rotate(0); }

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
}

.method-grid > div {
  min-width: 0;
  padding: 22px;
}

.method-grid > div + div { border-left: 1px solid var(--rule); }
.method h2 { margin: 0 0 9px; font: 700 10px/1 var(--mono); }
.method p { margin: 0; color: #65625b; font-size: 10px; line-height: 1.65; }

.full-disclaimer {
  padding: 16px 22px;
  border-top: 1px solid var(--rule);
}

.full-disclaimer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.forever-footer {
  width: min(100%, 1480px);
  min-height: 70px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid var(--ink);
  font-size: 10px;
}

.forever-footer a { font-weight: 700; }

.no-script {
  margin: 0;
  padding: 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 10px;
  text-align: center;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 1050px) {
  .machine-body { grid-template-columns: minmax(285px, .58fr) minmax(0, 1.42fr); }
  .future-copy { padding: 30px 25px; }
  .future-copy h1 { font-size: clamp(60px, 8vw, 84px); }
  .result-grid { grid-template-columns: minmax(0, 1.2fr) minmax(180px, .8fr); }
  .treasury-result { padding-left: 17px; }
  .screen-tape span:nth-child(3) { display: none; }
}

@media (max-width: 760px) {
  .forever-fallback-header {
    min-height: 54px;
    padding-inline: 16px;
  }

  .future-shell { padding: 12px 12px 30px; }
  .future-machine { box-shadow: 5px 5px 0 rgba(17, 14, 8, .13); }
  .machine-strip { min-height: 38px; padding-inline: 12px; font-size: 9px; }
  .machine-state { font-size: 0; }
  .machine-state::after { content: "NO CLOCK"; font-size: 9px; }
  .machine-body { min-height: 0; display: flex; flex-direction: column; }

  .future-copy {
    padding: 23px 18px 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(122px, .52fr);
    align-items: end;
    gap: 20px 14px;
    border-right: 0;
    border-bottom: 1px solid #4b4841;
  }

  .future-copy > div:first-child { grid-column: 1 / -1; }
  .eyebrow { margin-bottom: 13px; font-size: 9px; }
  .future-copy h1 { font-size: clamp(54px, 16vw, 76px); }
  .machine-joke { max-width: 42ch; margin-top: 17px; font-size: 14px; }
  .bag-control { width: 100%; padding-top: 13px; }
  .bag-control > label { font-size: 9px; }
  .bag-entry input { min-height: 42px; font-size: clamp(28px, 8vw, 38px); }
  .bag-control p { font-size: 9px; }
  .capsule-display { width: 100%; gap: 8px; }
  .capsule-display img { width: 132px; filter: drop-shadow(0 7px 0 #060503) drop-shadow(0 11px 14px rgba(0, 0, 0, .46)); }
  .capsule-display span { font-size: 8px; }

  .future-screen { min-height: 660px; padding: 16px 15px 12px; }
  .screen-meta { font-size: 9px; }
  .screen-meta span:last-child { display: none; }
  .result-grid { grid-template-columns: minmax(0, 1.12fr) minmax(130px, .88fr); }
  .bag-result,
  .treasury-result { padding-block: 16px 14px; }
  .treasury-result { padding-left: 13px; }
  .bag-result > span,
  .treasury-result > span { font-size: 8px; }
  .bag-result output { font-size: clamp(52px, 16vw, 76px); }
  .treasury-result output { font-size: clamp(31px, 9vw, 47px); }
  .bag-result p,
  .treasury-result p { margin-top: 10px; font-size: 8px; }
  .bag-result p strong { font-size: 9px; }
  .chart-shell { min-height: 236px; flex-basis: 250px; }
  #futureChart { min-height: 236px; }
  .chart-legend { top: 9px; gap: 7px 11px; font-size: 8px; }
  .chart-legend span::before { width: 11px; }
  .market-control { padding-top: 14px; }
  .market-control-head label { font-size: 10px; }
  .market-control-head output { font-size: 27px; }
  #marketCapSlider { height: 50px; }
  #marketCapSlider::-webkit-slider-thumb { width: 62px; height: 32px; margin-top: -14px; }
  #marketCapSlider::-moz-range-thumb { width: 62px; height: 32px; }
  .market-ticks { font-size: 8px; }
  #marketCapHelp { font-size: 9px; }
  .screen-tape { min-height: 46px; font-size: 9px; }
  .screen-tape strong { max-width: none; font-size: 9px; }
  .screen-tape span:nth-child(2),
  .screen-tape span:nth-child(3) { display: none; }
  .always-disclaimer { padding-inline: 12px; font-size: 9px; }
  .method-grid { grid-template-columns: 1fr; }
  .method-grid > div + div { border-top: 1px solid var(--rule); border-left: 0; }
  .method p { font-size: 10px; }
  .forever-footer { min-height: 62px; padding-inline: 16px; font-size: 8px; }
}

@media (max-width: 430px) {
  .future-copy { grid-template-columns: minmax(0, 1fr) 112px; }
  .capsule-display img { width: 106px; }
  .result-grid { grid-template-columns: minmax(0, 1fr) 124px; }
  .treasury-result { padding-left: 10px; }
  .bag-result output { font-size: clamp(48px, 15vw, 64px); }
  .treasury-result output { font-size: 30px; }
  .chart-legend .legend-live { display: none; }
  .market-ticks span:nth-child(even) { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
