.bitwork-page {
  --bit-ice: #7ad4ff;
  --bit-gold: #f0c36a;
  --bit-violet: #c084fc;
  --bit-ink: #e8f4fa;
  --bit-muted: #9eb6c2;
  --bit-line: rgba(122, 212, 255, 0.2);
  --bit-surface: rgba(6, 22, 32, 0.86);
  --bit-gap: 1.15rem;
  --bit-pad: 1.15rem 1.2rem;
  --bit-radius: 16px;
  background:
    radial-gradient(circle at 12% 0%, rgba(192, 132, 252, 0.08), transparent 32rem),
    radial-gradient(circle at 88% 8%, rgba(62, 200, 255, 0.1), transparent 28rem),
    #041018;
}

.bitwork-page p,
.bitwork-page h1,
.bitwork-page h2,
.bitwork-page h3,
.bitwork-page ol,
.bitwork-page ul,
.bitwork-page pre {
  margin: 0;
}

.bitwork-page .container {
  width: min(calc(100% - 2.5rem), 1120px);
}

.bitwork-page .button-row {
  margin-top: 1.15rem;
  gap: 0.55rem;
}

.bitwork-hero {
  padding: clamp(2.4rem, 5vw, 3.4rem) 0 2.25rem;
}

.bitwork-hero .eyebrow {
  margin: 0.7rem 0 0;
}

.bitwork-hero h1 {
  margin: 0.2rem 0 0.7rem;
  font-size: clamp(2.7rem, 6vw, 4.4rem);
  letter-spacing: -0.06em;
  line-height: 0.95;
  color: var(--bit-ink);
}

.bitwork-hero .lede {
  max-width: 38rem;
  margin: 0;
  color: #bfd2da;
  font-size: 1.05rem;
  line-height: 1.55;
}

.bitwork-plant {
  display: inline-block;
  margin: 0;
  padding: 0.28rem 0.7rem;
  border: 1px solid rgba(240, 195, 106, 0.45);
  border-radius: 999px;
  background: rgba(240, 195, 106, 0.08);
  color: var(--bit-gold);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bitwork-band {
  padding: 0 0 2.4rem;
}

.bitwork-band-exhibit {
  padding: 0.4rem 0 2.6rem;
}

.bitwork-band-limit {
  padding: 0.2rem 0 3.2rem;
}

.bitwork-band h2,
.bitwork-math-copy h2,
.bitwork-exhibit-head h2,
.bitwork-limit h2 {
  margin: 0.15rem 0 0.55rem;
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--bit-ink);
}

.bitwork-concepts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--bit-gap);
}

.bitwork-concepts article {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  min-height: 100%;
  padding: var(--bit-pad);
  border: 1px solid var(--bit-line);
  border-radius: var(--bit-radius);
  background: var(--bit-surface);
}

.bitwork-concepts .eyebrow {
  margin: 0;
}

.bitwork-concepts h2 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.bitwork-concepts p {
  color: var(--bit-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.bitwork-math {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 1.4rem 1.6rem;
  align-items: start;
}

.bitwork-math-copy p {
  max-width: 36rem;
  color: var(--bit-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.bitwork-equations {
  display: grid;
  gap: 0.6rem;
}

.bitwork-eq {
  display: flex;
  align-items: center;
  min-height: 3.15rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--bit-line);
  border-radius: 12px;
  background: rgba(4, 18, 26, 0.9);
  overflow-x: auto;
  color: #d7f3ff;
}

.bitwork-eq .katex-display {
  margin: 0;
  text-align: left;
}

.bitwork-eq .katex-display > .katex {
  text-align: left;
}

.bitwork-eq.is-contrast {
  border-color: rgba(138, 168, 184, 0.25);
  color: var(--bit-muted);
}

.bitwork-exhibit-head {
  max-width: 40rem;
  margin-bottom: 1.15rem;
}

.bitwork-exhibit-head .eyebrow {
  margin: 0 0 0.15rem;
}

.bitwork-exhibit-head .lede {
  max-width: none;
  color: var(--bit-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.bitwork-composer {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1.15rem;
}

.bitwork-prompt-label {
  display: block;
  color: var(--bit-ice);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bitwork-prompt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.bitwork-prompt-row input {
  min-height: 48px;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--bit-line);
  border-radius: 12px;
  background: rgba(4, 16, 24, 0.92);
  color: var(--bit-ink);
}

.bitwork-prompt-row input:focus {
  outline: 2px solid var(--bit-ice);
  outline-offset: 1px;
}

.bitwork-prompt-row .button {
  min-height: 48px;
  padding-inline: 1.15rem;
}

.bitwork-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.bitwork-examples button {
  min-height: 34px;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--bit-line);
  border-radius: 999px;
  background: rgba(8, 28, 38, 0.8);
  color: var(--bit-ink);
  font-size: 0.8rem;
  font-weight: 650;
}

.bitwork-examples button.is-on,
.bitwork-examples button:hover {
  border-color: var(--bit-ice);
  color: #041018;
  background: linear-gradient(135deg, #3ec8ff, #1490c8);
}

.bitwork-metrics {
  color: var(--bit-ice);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.4;
}

.bitwork-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(19rem, 0.92fr);
  gap: var(--bit-gap);
  align-items: start;
}

.bitwork-field-panel,
.bitwork-card {
  padding: var(--bit-pad);
  border: 1px solid var(--bit-line);
  border-radius: var(--bit-radius);
  background: var(--bit-surface);
}

.bitwork-field-panel {
  display: grid;
  gap: 0.7rem;
}

.bitwork-field-panel header,
.bitwork-card header {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  align-items: baseline;
}

.bitwork-field-panel h3,
.bitwork-card h3 {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.bitwork-field-panel header p,
.bitwork-card header p {
  color: var(--bit-muted);
  font-size: 0.75rem;
  line-height: 1.35;
  text-align: right;
}

#bitwork-field {
  display: block;
  width: min(100%, 28.5rem);
  margin: 0 auto;
  aspect-ratio: 1;
  height: auto;
  border-radius: 10px;
  background: #02080c;
  image-rendering: pixelated;
}

.bitwork-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  padding: 0;
  list-style: none;
  color: var(--bit-muted);
  font-size: 0.78rem;
}

.bitwork-legend i {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  margin-right: 0.32rem;
  border-radius: 2px;
  vertical-align: -0.05rem;
}

.bitwork-legend i[data-swatch="input"] { background: var(--bit-ice); }
.bitwork-legend i[data-swatch="proto"] { background: var(--bit-violet); }
.bitwork-legend i[data-swatch="and"] { background: var(--bit-gold); }

.bitwork-side {
  display: grid;
  gap: var(--bit-gap);
}

.bitwork-card {
  display: grid;
  gap: 0.7rem;
}

.bitwork-experts {
  display: grid;
  gap: 0.55rem;
  padding: 0;
  list-style: none;
}

.bitwork-experts li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.28rem 0.7rem;
}

.bitwork-experts li.is-win strong { color: var(--bit-gold); }

.bitwork-experts .bar {
  grid-column: 1 / -1;
  height: 5px;
  border-radius: 99px;
  background: rgba(122, 212, 255, 0.12);
  overflow: hidden;
}

.bitwork-experts .bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--bit-ice), var(--bit-violet));
  transition: width 280ms ease;
}

.bitwork-experts li.is-win .bar span {
  background: linear-gradient(90deg, var(--bit-gold), #ffe7a8);
}

.bitwork-experts em {
  color: var(--bit-ice);
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}

.bitwork-graph {
  display: block;
  width: 100%;
  height: auto;
  max-height: 13.5rem;
}

.bitwork-graph .lane {
  fill: none;
  stroke: rgba(122, 212, 255, 0.22);
  stroke-width: 1.4;
}

.bitwork-graph .lane.is-on {
  stroke: var(--bit-gold);
  stroke-width: 2.2;
}

.bitwork-graph .node {
  fill: #071820;
  stroke: rgba(122, 212, 255, 0.35);
  stroke-width: 1.2;
}

.bitwork-graph .node.is-on {
  stroke: var(--bit-gold);
  fill: rgba(240, 195, 106, 0.12);
}

.bitwork-graph text {
  fill: #d5e8ef;
  font-size: 11px;
  font-family: inherit;
}

.bitwork-route-why {
  color: var(--bit-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.bitwork-receipt {
  padding: 0.7rem 0.8rem;
  max-height: 11.5rem;
  overflow: auto;
  border-radius: 10px;
  background: #02080c;
  color: #c5d8e2;
  font-size: 0.74rem;
  line-height: 1.42;
  white-space: pre-wrap;
}

.bitwork-card .button {
  justify-self: start;
  min-height: 40px;
  padding: 0.45rem 0.9rem;
}

.bitwork-limit {
  max-width: 42rem;
}

.bitwork-limit .eyebrow {
  margin: 0 0 0.15rem;
}

.bitwork-limit p {
  color: var(--bit-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.bitwork-explain {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.4rem 1.6rem;
  align-items: start;
}

.bitwork-explain-copy {
  display: grid;
  gap: 0.75rem;
}

.bitwork-explain-copy p {
  max-width: 42rem;
  color: var(--bit-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.bitwork-principles {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  list-style: none;
}

.bitwork-principles li {
  padding: 0.85rem 1rem;
  border: 1px solid var(--bit-line);
  border-radius: var(--bit-radius);
  background: var(--bit-surface);
  color: var(--bit-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.bitwork-principles strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--bit-ink);
}

.bitwork-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--bit-gap);
  padding: 0;
  list-style: none;
}

.bitwork-steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem 0.9rem;
  padding: var(--bit-pad);
  border: 1px solid var(--bit-line);
  border-radius: var(--bit-radius);
  background: var(--bit-surface);
}

.bitwork-steps li > span {
  color: var(--bit-gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.bitwork-steps h3 {
  margin-bottom: 0.35rem;
  font-size: 1.02rem;
}

.bitwork-steps p {
  color: var(--bit-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.bitwork-uses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--bit-gap);
}

.bitwork-uses article {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  padding: var(--bit-pad);
  border: 1px solid var(--bit-line);
  border-radius: var(--bit-radius);
  background: var(--bit-surface);
}

.bitwork-uses h3 {
  font-size: 1.05rem;
}

.bitwork-uses p {
  color: var(--bit-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .bitwork-concepts,
  .bitwork-math,
  .bitwork-explain,
  .bitwork-steps,
  .bitwork-uses,
  .bitwork-stage,
  .bitwork-prompt-row {
    grid-template-columns: 1fr;
  }

  .bitwork-field-panel header p,
  .bitwork-card header p {
    text-align: left;
  }

  #bitwork-field {
    width: min(100%, 22rem);
  }
}

@media (max-width: 680px) {
  .bitwork-page .container {
    width: min(calc(100% - 1.5rem), 1120px);
  }

  .bitwork-hero {
    padding-top: 1.8rem;
  }

  .bitwork-band,
  .bitwork-band-exhibit,
  .bitwork-band-limit {
    padding-bottom: 1.8rem;
  }

  .bitwork-uses {
    grid-template-columns: 1fr;
  }

  .bitwork-page .button-row {
    gap: 0.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bitwork-experts .bar span { transition: none; }
}
