:root {
  --ink: #111111;
  --cyan: #00afe1;
  --grey: #5a5a5a;
  --panel: #fafafa;
  --line: #d8d8d8;
}

* { box-sizing: border-box; }

html { margin: 0; padding: 0; }

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

button, .button-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  font-weight: 700;
}

button {
  background: #ffffff;
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 8px 14px;
  cursor: pointer;
}

button:hover, button.active { background: var(--ink); color: #ffffff; }
button:disabled { cursor: wait; opacity: 0.55; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 24px; }

header.site { border-bottom: 2px solid var(--ink); }
header.site .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 16px;
  padding-bottom: 16px;
}
header.site img { width: 40px; height: 40px; object-fit: contain; }
header.site .name { font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
header.site nav { margin-left: auto; font-size: 15px; }
header.site nav a { margin-left: 20px; }

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-banner {
  background: var(--ink);
  color: #ffffff;
  margin: 28px 0 22px;
  padding: 22px 24px;
  border: 2px solid var(--ink);
}
.replay-banner .eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0 0 8px;
}
.replay-banner h1 {
  font-size: clamp(34px, 7vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}
.replay-banner p { max-width: 720px; margin: 0; font-size: 17px; }

.run-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 2px solid var(--ink);
  margin: 20px 0;
}
.run-strip > div { padding: 14px 16px; border-right: 1px solid var(--line); }
.run-strip > div:last-child { border-right: 0; }
.run-strip .label {
  display: block;
  color: var(--grey);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
}
.run-strip .value { display: block; font-weight: 800; font-size: 19px; margin-top: 3px; }
.run-strip .zero { background: var(--cyan); padding: 0 7px; }

.replay-stage {
  position: relative;
  border: 2px solid var(--ink);
  padding: 26px;
  margin: 26px 0;
  background: #ffffff;
}
.corner {
  position: absolute;
  width: 26px;
  height: 26px;
  pointer-events: none;
}
.corner.tl { top: -2px; left: -2px; border-top: 7px solid var(--ink); border-left: 7px solid var(--ink); }
.corner.tr { top: -2px; right: -2px; border-top: 7px solid var(--ink); border-right: 7px solid var(--ink); }
.corner.bl { bottom: -2px; left: -2px; border-bottom: 7px solid var(--ink); border-left: 7px solid var(--ink); }
.corner.br { bottom: -2px; right: -2px; border-bottom: 7px solid var(--ink); border-right: 7px solid var(--ink); }

.readout {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0 0 16px;
}
.controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
.controls .play { margin-left: auto; }

.call-card {
  border-top: 6px solid var(--ink);
  padding: 20px 0 24px;
  scroll-margin-top: 24px;
}
.call-card.active { background: var(--panel); box-shadow: 0 0 0 14px var(--panel); }
.call-card h2 {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 25px;
  margin: 2px 0 8px;
}
.call-card h3 { font-size: 16px; margin: 0 0 6px; }
.call-card p { margin: 0 0 10px; }
.step-label {
  color: var(--grey);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  margin: 0;
}
.io-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 14px; }
.io-box { border: 1px solid var(--line); padding: 16px; overflow-wrap: anywhere; }
.io-box ul { margin: 0; padding-left: 19px; }
.io-box li { margin-bottom: 7px; }
.hash { font-size: 12.5px; color: var(--grey); }
.cost {
  display: inline-block;
  margin-top: 8px;
  border-top: 2px solid var(--ink);
  padding-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 800;
}

section { padding: 28px 0 8px; }
.section-title {
  border-top: 6px solid var(--ink);
  padding-top: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
section h2 { font-size: clamp(26px, 4.4vw, 36px); letter-spacing: -0.02em; margin: 0 0 12px; }
section p.lede { font-size: 18px; max-width: 720px; }

.asset-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin: 18px 0;
}
.asset-card { border: 1px solid var(--line); padding: 10px; overflow-wrap: anywhere; }
.asset-card img {
  width: 100%;
  height: 190px;
  object-fit: contain;
  display: block;
  background: repeating-conic-gradient(#eeeeee 0% 25%, #ffffff 0% 50%) 0 0/18px 18px;
}
.asset-card .kind {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 10px 0 4px;
}
.asset-card p { font-size: 12.5px; color: var(--grey); margin: 0; }

.panel {
  border: 2px solid var(--ink);
  padding: 20px 22px;
  margin: 20px 0;
  overflow-wrap: anywhere;
}
.panel.grey { background: var(--panel); }
.panel .zero { background: var(--cyan); font-weight: 800; padding: 0 8px; }
.baseline-value { font-weight: 800; letter-spacing: 0.08em; }

pre.receipt {
  background: var(--ink);
  color: #f2f2f2;
  padding: 20px 22px;
  font-size: 13px;
  line-height: 1.55;
  overflow: auto;
  max-height: 620px;
  border-radius: 4px;
}
.downloads { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.downloads a { border: 2px solid var(--ink); padding: 8px 13px; text-decoration: none; font-weight: 700; }
.downloads a:hover { background: var(--panel); }

footer {
  border-top: 2px solid var(--ink);
  margin-top: 44px;
  padding: 24px 0 40px;
  color: var(--grey);
  font-size: 14.5px;
}

@media (max-width: 760px) {
  .run-strip { grid-template-columns: 1fr 1fr; }
  .run-strip > div { border-bottom: 1px solid var(--line); }
  .io-grid { grid-template-columns: 1fr; }
  .asset-grid { grid-template-columns: 1fr 1fr; }
  .controls .play { margin-left: 0; }
  header.site nav a { margin-left: 12px; }
}

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