:root {
  color-scheme: dark;
  --black: #050505;
  --panel: #0b0b0b;
  --white: #f5f5f2;
  --muted: #8d8d88;
  --line: #3d3d3a;
  --hot: #ffffff;
  --danger: #ffffff;
  --display: "Courier New", Courier, monospace;
  --mono: "Courier New", Courier, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  font-family: "Courier New", Courier, monospace !important;
  font-weight: 400 !important;
  font-style: normal !important;
  font-variant: normal !important;
  font-synthesis: none !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: none !important;
}
html { width: 100%; scroll-behavior: smooth; background: var(--black); overflow-x: clip; }
body { width: 100%; margin: 0; background-color: #000; background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 32px 32px; color: var(--white); font-family: var(--mono); font-size: 16px; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }

.topbar { height: 74px; padding: 0 clamp(18px, 4vw, 64px); border-bottom: 1px solid var(--white); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; background: rgba(0,0,0,.96); }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 1rem; font-weight: 700; letter-spacing: .1em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--white); font-family: var(--mono); font-weight: 800; }
nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 42px); font-weight: 700; font-size: .78rem; letter-spacing: .08em; }
nav a:hover, nav a:focus-visible { color: var(--hot); }
.nav-buy { background: var(--white); color: var(--black); padding: 12px 19px; }
.nav-buy:hover, .nav-buy:focus-visible { background: var(--black); color: var(--white); outline: 1px solid var(--white); }

.hero { min-height: calc(100vh - 74px); display: grid; grid-template-columns: .9fr 1.1fr; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-copy { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: clamp(50px, 7vw, 110px) clamp(22px, 5vw, 78px); border-right: 1px solid var(--line); }
.eyebrow { margin: 0 0 18px; font-weight: 700; font-size: .78rem; letter-spacing: .14em; color: var(--white); }
h1, h2 { font-family: var(--display); margin: 0; text-transform: uppercase; line-height: .9; font-weight: 700; color: var(--white); letter-spacing: .05em; }
h1 { font-size: clamp(4rem, 7vw, 7.2rem); letter-spacing: -.065em; max-width: 9ch; overflow-wrap: normal; word-break: normal; }
.hero-line { margin: 34px 0 0; font-size: clamp(1rem, 1.7vw, 1.35rem); letter-spacing: .08em; }
.terminal-cursor { animation: blink .8s steps(2) infinite; }
.hero-actions { display: flex; margin-top: 54px; gap: 10px; flex-wrap: wrap; }
.button { min-height: 54px; display: inline-flex; align-items: center; justify-content: center; padding: 0 25px; border: 1px solid var(--white); font-family: var(--mono); font-weight: 700; font-size: 1rem; letter-spacing: .08em; }
.button-light { background: var(--white); color: var(--black); }
.button-light:hover { background: var(--black); color: var(--white); }
.button-dark:hover { color: var(--black); background: var(--white); }
.logo-stage { min-height: 620px; overflow: hidden; position: relative; display: grid; place-items: center; background: #000; }
.logo-stage:before { content: "PROFIT TERMINAL / NODE 01"; position: absolute; z-index: 4; top: 22px; left: 24px; padding: 8px 10px; border: 1px solid var(--white); font-size: .64rem; letter-spacing: .1em; }
.logo-stage img { position: absolute; inset: 0; width: 100%; max-width: 100%; height: 100%; object-fit: contain; object-position: center; filter: grayscale(1) contrast(1.35); }
.scanlines { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: repeating-linear-gradient(0deg, transparent 0, transparent 4px, rgba(255,255,255,.035) 5px); }
.stage-code, .stage-status { position: absolute; z-index: 3; bottom: 22px; font-size: .72rem; letter-spacing: .12em; }
.stage-code { left: 24px; }
.stage-status { right: 24px; color: var(--white); }

.game-section { padding: clamp(70px, 9vw, 140px) clamp(18px, 4vw, 64px); border-bottom: 1px solid var(--line); overflow: hidden; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 42px; }
.section-head h2, .manifesto h2 { font-size: clamp(4rem, 9vw, 9rem); letter-spacing: -.03em; }
.game-rule { max-width: 430px; margin: 0 0 6px; line-height: 1.55; color: var(--muted); text-align: right; }
.game-shell { border: 1px solid var(--white); box-shadow: 10px 10px 0 rgba(255,255,255,.07); display: grid; grid-template-columns: 1fr 300px; min-height: 620px; background: var(--panel); }
.chart-panel { min-width: 0; display: grid; grid-template-rows: 68px minmax(360px, 1fr) auto; border-right: 1px solid var(--line); }
.chart-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); }
.live-label { font-size: .78rem; letter-spacing: .08em; }
.live-label span { display: inline-block; width: 8px; height: 8px; background: var(--white); margin-right: 8px; animation: blink 1s steps(2) infinite; }
.chart-price { font-family: var(--mono); font-size: 1.6rem; font-weight: 800; color: var(--white); }
.chart-wrap { position: relative; overflow: hidden; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 10% 20%; }
#pumpChart { display: block; width: 100%; height: 100%; }
.grid-y { position: absolute; inset: 10px 10px 10px auto; display: flex; flex-direction: column; justify-content: space-between; color: #666; font-size: .65rem; pointer-events: none; }
.chart-message { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; transition: opacity .2s; }
.chart-message strong { font-family: var(--display); color: var(--white); font-size: clamp(2.2rem, 5vw, 5rem); font-weight: 700; letter-spacing: .06em; }
.chart-message span { margin-top: 8px; color: var(--muted); font-size: .78rem; letter-spacing: .16em; }
.game-shell[data-game-state="running"] .chart-message { opacity: 0; }
.game-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.game-stats div { padding: 18px 20px; border-right: 1px solid var(--line); }
.game-stats div:last-child { border-right: 0; }
.game-stats span { display: block; color: var(--muted); font-size: .68rem; letter-spacing: .1em; margin-bottom: 9px; }
.game-stats strong { font-size: 1.1rem; }
.pump-panel { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 40px 30px 28px; background: repeating-linear-gradient(-45deg, #0d0d0d, #0d0d0d 10px, #111 10px, #111 20px); }
.pump-label { position: absolute; top: 28px; left: 25px; font-family: var(--mono); font-weight: 700; font-size: 2.3rem; line-height: .9; letter-spacing: .08em; color: #262626; }
.pump-control { width: 200px; height: 405px; border: 0; padding: 0; background: transparent; position: relative; cursor: pointer; touch-action: manipulation; outline: none; }
.pump-handle { position: absolute; z-index: 3; top: 20px; left: 8px; width: 184px; height: 58px; background: var(--black); border: 5px double var(--white); transition: transform .08s ease; }
.pump-handle:before, .pump-handle:after { content: ""; position: absolute; width: 16px; height: 16px; top: 16px; background: var(--black); }
.pump-handle:before { left: 14px; }.pump-handle:after { right: 14px; }
.pump-stem { position: absolute; top: 72px; left: 91px; width: 18px; height: 175px; background: var(--white); border: 5px solid #777; transition: height .08s ease, top .08s ease; }
.pump-base { position: absolute; z-index: 2; bottom: 10px; left: 15px; width: 170px; height: 185px; border: 5px solid var(--white); background: var(--black); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: inset 0 0 0 8px #202020; }
.pump-button-text { font-family: var(--display); color: var(--white); font-weight: 700; font-size: 2.8rem; line-height: 1; letter-spacing: .08em; }
.pump-hint { margin-top: 16px; color: var(--muted); font-size: .62rem; }
.pump-control:active .pump-handle, .pump-control.is-pumping .pump-handle { transform: translateY(112px); }
.pump-control:active .pump-stem, .pump-control.is-pumping .pump-stem { top: 130px; height: 115px; }
.pump-control:focus-visible .pump-base { outline: 3px solid var(--white); outline-offset: 4px; }
.reset-button { width: 200px; height: 42px; border: 1px solid var(--line); background: var(--black); font-weight: 700; font-size: .72rem; cursor: pointer; }
.reset-button:hover { border-color: var(--white); }

.manifesto { padding: clamp(80px, 10vw, 160px) clamp(18px, 4vw, 64px); border-bottom: 1px solid var(--line); overflow: hidden; }
.manifesto-grid { margin-top: 64px; display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(50px, 9vw, 150px); align-items: end; }
.manifesto-grid p { max-width: 560px; margin: 0; font-size: clamp(1.1rem, 2vw, 1.6rem); line-height: 1.55; }
.formula { border-top: 1px solid var(--white); border-bottom: 1px solid var(--white); padding: 20px 0; display: grid; grid-template-columns: auto 1fr auto auto 1fr; gap: 18px; align-items: center; }
.formula span { color: var(--muted); font-size: .7rem; }
.formula strong { font-family: var(--display); font-size: clamp(1.7rem, 3vw, 3rem); }
.formula b { color: var(--white); font-size: 2rem; }
.contract-section { margin: clamp(18px, 4vw, 64px); border: 1px solid var(--white); display: flex; align-items: stretch; justify-content: space-between; }
.contract-section div { padding: 24px; min-width: 0; }
.contract-section span { display: block; color: var(--muted); font-size: .68rem; margin-bottom: 10px; }
.contract-section strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.contract-section button { flex: 0 0 160px; border: 0; border-left: 1px solid var(--white); background: var(--white); color: var(--black); font-family: var(--display); font-size: 1.3rem; cursor: pointer; }
.contract-section button:hover { background: var(--hot); }
footer { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(18px, 4vw, 64px); color: var(--muted); font-size: .74rem; }
@keyframes blink { 50% { opacity: .25; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { border-right: 0; border-bottom: 1px solid var(--line); min-height: 650px; }
  .logo-stage { min-height: 480px; }
  .game-shell { grid-template-columns: 1fr; }
  .chart-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .pump-panel { min-height: 580px; }
  .manifesto-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .topbar { height: 62px; }
  nav a:not(.nav-buy) { display: none; }
  .nav-buy { padding: 10px 14px; }
  .hero { min-height: auto; }
  .hero-copy { min-height: 330px; padding-top: 38px; padding-bottom: 38px; }
  h1 { font-size: clamp(3.25rem, 15.6vw, 4.6rem); }
  .hero-actions { margin-top: 40px; }
  .button { width: 100%; }
  .logo-stage { min-height: 390px; }
  .logo-stage img { width: 100%; }
  .section-head { display: block; }
  .section-head h2, .manifesto h2 { font-size: clamp(3.6rem, 18vw, 5.5rem); }
  .game-rule { text-align: left; margin-top: 26px; }
  .chart-panel { grid-template-rows: 60px 340px auto; }
  .chart-toolbar { padding: 0 14px; }
  .chart-price { font-size: 1.55rem; }
  .game-stats { grid-template-columns: 1fr 1fr; }
  .game-stats div:nth-child(2) { border-right: 0; }
  .game-stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .pump-panel { min-height: 550px; }
  .manifesto-grid { margin-top: 42px; }
  .formula { grid-template-columns: 1fr 1fr; }
  .formula b { display: none; }
  .formula span { align-self: end; }
  .contract-section { display: block; }
  .contract-section button { width: 100%; min-height: 58px; border-left: 0; border-top: 1px solid var(--white); }
  footer { padding-top: 25px; padding-bottom: 25px; align-items: flex-start; flex-direction: column; justify-content: center; }
}

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