:root {
  --ink: #353535;
  --black: #0c0d0d;
  --pink: #ff72bb;
  --grey: #838383;
  --paper: #f2efe7;
  --line: #353535;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

button, a { font: inherit; }

button { color: inherit; }

a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  padding: 10px 12px;
  color: var(--paper);
  background: var(--black);
  transform: translateY(-150%);
}

.skip-link:focus { transform: none; }

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
  padding: 10px clamp(18px, 4vw, 70px);
  border-bottom: 2px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  font-weight: 950;
  font-size: clamp(20px, 2vw, 31px);
  letter-spacing: -.075em;
  text-decoration: none;
}

.brand img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}

.site-header > p {
  margin: 0;
  color: var(--grey);
  font-size: 11px;
  text-transform: uppercase;
}

.site-header nav,
.site-footer nav {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.site-header nav a,
.site-footer nav a {
  text-underline-offset: 5px;
}

main { padding: 0 clamp(18px, 4vw, 70px) 56px; }

.opening {
  display: grid;
  grid-template-columns: minmax(260px, .58fr) minmax(0, 1.42fr);
  min-height: 315px;
  border-bottom: 2px solid var(--line);
}

.opening-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 45px clamp(24px, 4vw, 62px) 45px 0;
  border-right: 2px solid var(--line);
}

.issue-line,
.desk-label {
  margin: 0;
  color: var(--grey);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.opening h1 {
  margin: 16px 0 18px;
  color: var(--black);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(66px, 6.5vw, 106px);
  font-weight: 900;
  line-height: .82;
  letter-spacing: -.045em;
  text-transform: uppercase;
}

.opening-copy > p:last-child {
  max-width: 460px;
  margin: 0;
  font-size: clamp(13px, 1.2vw, 17px);
  line-height: 1.5;
}

.tape-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: stretch;
}

.tape-cell {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: 25px;
  text-align: left;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.tape-cell:nth-child(2n) { border-right: 0; }
.tape-cell:nth-child(n+3) { border-bottom: 0; }

.tape-cell span,
.tape-cell small {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.tape-cell strong {
  overflow: hidden;
  margin: 15px 0;
  color: var(--black);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(32px, 4vw, 66px);
  font-weight: 900;
  line-height: .95;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tape-cell small { color: var(--grey); }

.tape-cell:hover,
.tape-cell:focus-visible,
.tape-cell.is-active {
  outline: 0;
  background: var(--pink);
  box-shadow: inset 0 0 0 3px var(--ink);
}

.tape-cell.is-active small { color: var(--ink); }

.desk {
  margin-top: 34px;
  color: var(--paper);
  background: var(--black);
  border: 2px solid var(--black);
  box-shadow: 9px 9px 0 var(--grey);
}

.desk-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  border-bottom: 1px solid #555;
}

.desk-head h2 {
  margin: 7px 0 0;
  color: var(--paper);
  font-size: clamp(22px, 3vw, 40px);
  letter-spacing: -.05em;
}

.window-picker { display: flex; gap: 8px; }

.window-picker button {
  min-width: 54px;
  padding: 10px;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--grey);
  cursor: pointer;
}

.window-picker button:hover,
.window-picker button:focus-visible,
.window-picker button.is-active {
  color: var(--black);
  background: var(--pink);
  border-color: var(--pink);
  outline: 0;
}

.chart-shell {
  position: relative;
  padding: 22px 22px 13px;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 18px 18px;
}

.chart-reading {
  display: flex;
  align-items: baseline;
  gap: 18px;
  min-height: 46px;
}

.chart-reading strong {
  color: var(--pink);
  font-size: clamp(28px, 4vw, 62px);
  letter-spacing: -.06em;
}

.chart-reading span { color: #aaa; font-size: 11px; }

#market-chart {
  display: block;
  width: 100%;
  min-height: 240px;
  max-height: 390px;
  overflow: visible;
}

.grid-lines line {
  stroke: #434343;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

#market-line {
  fill: none;
  stroke: var(--pink);
  stroke-width: 5;
  stroke-linecap: square;
  stroke-linejoin: bevel;
  vector-effect: non-scaling-stroke;
}

#market-point {
  fill: var(--black);
  stroke: var(--paper);
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
}

#chart-hitbox { fill: transparent; cursor: crosshair; }

.axis {
  display: flex;
  justify-content: space-between;
  color: #8e8e8e;
  font-size: 10px;
}

.chart-status {
  min-height: 18px;
  margin: 9px 0 0;
  color: #aaa;
  font-size: 10px;
}

.desk-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 30px;
  padding: 0 22px 22px;
}

.desk-foot dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid #555;
}

.desk-foot dl div { padding: 15px 12px 0 0; }

.desk-foot dt {
  color: #8e8e8e;
  font-size: 9px;
  text-transform: uppercase;
}

.desk-foot dd {
  overflow: hidden;
  margin: 7px 0 0;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-foot > p {
  max-width: 330px;
  margin: 0;
  color: #8e8e8e;
  font-size: 10px;
  line-height: 1.5;
  text-align: right;
}

.handoff {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(390px, 1.3fr);
  gap: 25px 55px;
  align-items: center;
  margin-top: 56px;
  padding: 28px 0;
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}

.handoff h2 {
  margin: 8px 0 0;
  color: var(--black);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(38px, 5vw, 70px);
  letter-spacing: -.035em;
  text-transform: uppercase;
}

.handoff-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.handoff-links a {
  display: flex;
  justify-content: space-between;
  padding: 18px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  border: 2px solid var(--ink);
}

.handoff-links a:first-child {
  background: var(--pink);
  box-shadow: 5px 5px 0 var(--ink);
}

.handoff-links a:hover,
.handoff-links a:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }

.handoff > p {
  grid-column: 2;
  margin: -8px 0 0;
  color: var(--grey);
  font-size: 10px;
}

.page-main { padding-bottom: 72px; }

.page-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  align-items: end;
  gap: 48px;
  min-height: 310px;
  padding: 64px 0 42px;
  border-bottom: 2px solid var(--line);
}

.page-intro h1 {
  margin: 0;
  color: var(--black);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(64px, 9vw, 142px);
  font-weight: 900;
  line-height: .82;
  letter-spacing: -.045em;
  text-transform: uppercase;
}

.page-intro p {
  margin: 0;
  padding-left: 24px;
  font-size: clamp(13px, 1.3vw, 18px);
  line-height: 1.55;
  border-left: 8px solid var(--pink);
}

.page-section {
  padding: 48px 0;
  border-bottom: 2px solid var(--line);
}

.page-section > h2 {
  max-width: 760px;
  margin: 0 0 24px;
  color: var(--black);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(38px, 5vw, 72px);
  line-height: .95;
  letter-spacing: -.03em;
  text-transform: uppercase;
}

.page-section > p,
.page-section > ul {
  max-width: 820px;
  font-size: 13px;
  line-height: 1.75;
}

.page-section > p:last-child,
.page-section > ul:last-child { margin-bottom: 0; }

.ledger {
  margin-top: 26px;
  border-top: 2px solid var(--line);
}

.ledger-row {
  display: grid;
  grid-template-columns: minmax(135px, .45fr) minmax(0, 1.25fr) minmax(135px, .3fr);
  gap: 24px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.ledger-row h3,
.ledger-row p { margin: 0; }

.ledger-row h3 {
  color: var(--black);
  font-size: 15px;
  letter-spacing: -.03em;
}

.ledger-row p {
  font-size: 12px;
  line-height: 1.6;
}

.ledger-row > :last-child {
  color: var(--grey);
  font-size: 10px;
  font-weight: 800;
  text-align: right;
  text-transform: uppercase;
}

.ledger-row .action-link {
  justify-self: end;
  padding: 10px 12px;
  color: var(--black);
  background: var(--pink);
  text-decoration: none;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.ledger-row .action-link:hover,
.ledger-row .action-link:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

.market-row {
  grid-template-columns: minmax(145px, .35fr) minmax(0, 1fr) auto;
  align-items: center;
}

.market-links { display: flex; gap: 8px; }

.market-links a {
  min-width: 48px;
  padding: 10px;
  color: var(--black);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  border: 2px solid var(--ink);
}

.market-links a:nth-child(2) { background: var(--pink); }

.market-links a:hover,
.market-links a:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

.method-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  border: 2px solid var(--line);
}

.method-list li {
  min-height: 190px;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.method-list li:last-child { border-right: 0; }

.method-list strong {
  display: block;
  margin-bottom: 42px;
  color: var(--black);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 38px;
  text-transform: uppercase;
}

.method-list span { font-size: 11px; line-height: 1.55; }

.code-line {
  overflow-x: auto;
  margin: 24px 0 0;
  padding: 18px;
  color: var(--paper);
  background: var(--black);
  border-left: 8px solid var(--pink);
  font-size: 11px;
  line-height: 1.6;
  white-space: nowrap;
}

.page-note {
  margin-top: 26px;
  padding: 20px;
  color: var(--paper);
  background: var(--black);
  border: 2px solid var(--black);
  box-shadow: 6px 6px 0 var(--pink);
  font-size: 12px;
  line-height: 1.65;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 30px;
  padding: 26px clamp(18px, 4vw, 70px);
  color: #aaa;
  background: var(--black);
  font-size: 10px;
  line-height: 1.5;
}

.site-footer p { margin: 0; }
.site-footer p:last-child { grid-column: 1 / -1; }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header > p { display: none; }
  .opening { grid-template-columns: 1fr; }
  .opening-copy { border-right: 0; border-bottom: 2px solid var(--line); }
  .opening h1 { font-size: clamp(76px, 18vw, 130px); }
  .handoff { grid-template-columns: 1fr; }
  .handoff > p { grid-column: 1; margin: 0; }
  .page-intro { grid-template-columns: 1fr; align-items: start; }
  .page-intro p { max-width: 620px; }
  .method-list { grid-template-columns: 1fr; }
  .method-list li { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .method-list li:last-child { border-bottom: 0; }
  .method-list strong { margin-bottom: 18px; }
}

@media (max-width: 620px) {
  .site-header { min-height: 64px; }
  .brand img { width: 40px; height: 40px; }
  .site-header nav { gap: 14px; }
  .site-header nav a:nth-child(2) { display: none; }
  main { padding-inline: 14px; }
  .opening-copy { padding: 38px 0; }
  .opening h1 { font-size: clamp(62px, 21vw, 96px); }
  .tape-strip { grid-template-columns: 1fr 1fr; }
  .tape-cell { min-height: 142px; padding: 17px; }
  .tape-cell strong { font-size: clamp(27px, 9vw, 42px); }
  .desk { margin-top: 20px; box-shadow: 5px 5px 0 var(--grey); }
  .desk-head { align-items: flex-start; flex-direction: column; }
  .window-picker { width: 100%; }
  .window-picker button { flex: 1; }
  .chart-shell { padding-inline: 14px; }
  #market-chart { min-height: 210px; }
  .chart-reading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .desk-foot { grid-template-columns: 1fr; padding-inline: 14px; }
  .desk-foot dl { grid-template-columns: 1fr; }
  .desk-foot dl div { padding-bottom: 11px; border-bottom: 1px solid #333; }
  .desk-foot > p { text-align: left; }
  .handoff { margin-top: 42px; }
  .handoff-links { grid-template-columns: 1fr; }
  .page-intro { min-height: 0; gap: 32px; padding: 46px 0 34px; }
  .page-intro h1 { font-size: clamp(58px, 20vw, 92px); }
  .page-intro p { padding-left: 16px; }
  .page-section { padding: 38px 0; }
  .ledger-row,
  .market-row { grid-template-columns: 1fr; gap: 12px; }
  .ledger-row > :last-child { text-align: left; }
  .ledger-row .action-link { justify-self: start; }
  .market-links { width: 100%; }
  .market-links a { flex: 1; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer nav { justify-content: flex-start; flex-wrap: wrap; }
  .site-footer p:last-child { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
