:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
  --ink: #11110f;
  --muted: #767673;
  --line: #b9b9b5;
  --paper: #f7f7f4;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.95), transparent 56rem),
    var(--paper);
  color: var(--ink);
}

button {
  font: inherit;
}

main {
  width: min(1260px, calc(100% - 4rem));
  margin: 0 auto;
  padding: 2rem 0 5rem;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5.75rem);
  font-weight: 750;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.page-header p {
  margin: 0.8rem 0 1.25rem;
  font-size: clamp(1.4rem, 2.8vw, 2.7rem);
  letter-spacing: -0.035em;
  line-height: 1;
}

.hero-rule,
.card-rule {
  height: 1px;
  background: var(--line);
}

.hero-rule {
  margin-bottom: 1.5rem;
}

.benchmarks-section {
  margin: 0;
}

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

.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.benchmark-card {
  min-width: 0;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.22);
}

.benchmark-card h3 {
  margin: 0 0 1rem;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
}

.benchmark-visual {
  position: relative;
  height: 7.5rem;
  overflow: hidden;
  margin-bottom: 1.1rem;
}

.benchmark-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 44%, rgba(112, 112, 112, 0.15) 72%, rgba(80, 80, 80, 0.5));
}

.cpu-visual {
  border: 1px solid #c9c9c5;
  background-image:
    linear-gradient(to right, #c7c7c3 1px, transparent 1px),
    linear-gradient(to bottom, #c7c7c3 1px, transparent 1px);
  background-size: 15px 15px;
}

.gpu-visual {
  background-image: radial-gradient(circle, #767673 2px, transparent 2.5px);
  background-size: 14px 14px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.28), #000);
}

.gpu-visual::after {
  display: none;
}

.pow-visual {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Crect x='2' y='2' width='7' height='7' fill='none' stroke='%2382827e' stroke-width='1.5'/%3E%3C/svg%3E");
  background-size: 14px 14px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.45), #000);
}

.pow-visual::before {
  display: none;
}

.pow-visual::after {
  display: none;
}

.card-rule {
  margin-bottom: 1.25rem;
}

.benchmark-card-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
}

.benchmark-icon {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border: 2px solid #777773;
  color: #5f5f5c;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 1.3rem;
  font-weight: 700;
}

.icon-cpu {
  width: 2.9rem;
  height: 2.9rem;
  margin: 0.25rem;
  box-shadow: -6px 0 0 -4px #777773, 6px 0 0 -4px #777773, 0 -6px 0 -4px #777773, 0 6px 0 -4px #777773;
}

.icon-cpu::after {
  content: "";
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid #92928e;
}

.icon-gpu {
  width: 4.2rem;
  height: 2.7rem;
  background:
    radial-gradient(circle at 31% 50%, transparent 0 8px, #777773 9px 10px, transparent 11px),
    radial-gradient(circle at 70% 50%, transparent 0 8px, #777773 9px 10px, transparent 11px);
}

.icon-gpu::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: -0.45rem;
  height: 0.3rem;
  border: 2px solid #777773;
  border-top: 0;
}

.icon-pow {
  font-size: 2rem;
  font-weight: 400;
}

.benchmark-summary {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
}

.benchmark-summary strong,
.benchmark-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.benchmark-summary strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.96rem;
}

.benchmark-summary span {
  color: var(--muted);
  font-size: 0.82rem;
}

.run-button {
  width: 100%;
  min-height: 2.7rem;
  margin-top: 1rem;
  border: 1px solid var(--ink);
  border-radius: 0.2rem;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.run-button:hover:not(:disabled),
.run-button:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.benchmark-results {
  margin: 3rem 0 2.4rem;
  padding: 2.5rem 0;
  text-align: center;
}

.benchmark-results > h2 {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.benchmark-results dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(900px, 100%);
  margin: 2rem auto 0;
  border-top: 1px solid var(--line);
}

.benchmark-results dl > div {
  display: grid;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.8rem;
  border-top: 0;
  border-right: 1px solid var(--line);
}

.benchmark-results dl > div:nth-child(4) {
  border-right: 0;
}

.benchmark-results dt {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.benchmark-results dd {
  max-width: 100%;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.86rem;
  text-align: center;
}

.benchmark-results dl > .wide {
  grid-column: 1 / -1;
  justify-items: start;
  border-top: 1px solid var(--line);
  border-right: 0;
  text-align: left;
}

.benchmark-results dl > .wide dd {
  text-align: left;
}

.result-score {
  display: block;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: clamp(2.6rem, 7vw, 6.4rem);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 0.95;
}

dl {
  margin: 0.65rem 0 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid #d4d4d0;
  padding: 0.35rem 0;
  font-size: 0.8rem;
}

dt {
  font-weight: 700;
}

dd {
  margin: 0;
  text-align: right;
}

dl .wide {
  display: block;
}

dl .wide dd {
  margin-top: 0.25rem;
  text-align: left;
}

code {
  overflow-wrap: anywhere;
}

.variant-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
}

.variant-toggle button {
  min-height: 2.15rem;
  border: 0;
  border-radius: 0.15rem;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.variant-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.run-status {
  margin-top: 1.4rem;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
}

.status-copy {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.status-copy p {
  margin: 0;
  font-size: 0.9rem;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.status-dot.is-running {
  background: var(--ink);
  animation: blink 0.8s steps(2, end) infinite;
}

@keyframes blink {
  50% { opacity: 0.2; }
}

.run-status progress {
  width: 100%;
  height: 0.45rem;
  margin-top: 0.75rem;
  accent-color: var(--ink);
}

.error {
  margin: 0.7rem 0 0;
  color: #9e2424;
  font-size: 0.82rem;
}

.standalone-error {
  margin-top: 1.4rem;
}

.circuit-board {
  position: relative;
  height: 12rem;
  width: 100%;
  margin: 2.2rem 0 0;
  overflow: hidden;
  border-top: 1px solid #d0d0cc;
  background-image:
    linear-gradient(to right, #cacac6 1px, transparent 1px),
    linear-gradient(to bottom, #cacac6 1px, transparent 1px),
    radial-gradient(circle, #8b8b87 2px, transparent 2.5px);
  background-position: center, center, 2.5rem 1.5rem;
  background-size: 7rem 4.6rem, 7rem 4.6rem, 6rem 4rem;
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}

.circuit-board span {
  position: absolute;
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid #858581;
  background: var(--paper);
}

.circuit-board span:nth-child(1) { left: 4%; top: 19%; }
.circuit-board span:nth-child(2) { left: 15%; top: 67%; }
.circuit-board span:nth-child(3) { left: 24%; top: 36%; }
.circuit-board span:nth-child(4) { left: 32%; top: 64%; }
.circuit-board span:nth-child(5) { left: 40%; top: 34%; }
.circuit-board span:nth-child(6) { left: 48%; top: 63%; }
.circuit-board span:nth-child(7) { left: 56%; top: 35%; }
.circuit-board span:nth-child(8) { left: 64%; top: 63%; }
.circuit-board span:nth-child(9) { left: 72%; top: 34%; }
.circuit-board span:nth-child(10) { left: 80%; top: 64%; }
.circuit-board span:nth-child(11) { left: 90%; top: 36%; }
.circuit-board span:nth-child(12) { left: 95%; top: 64%; }
.circuit-board span:nth-child(13) { left: 10%; top: 34%; }
.circuit-board span:nth-child(14) { left: 37%; top: 18%; }
.circuit-board span:nth-child(15) { left: 67%; top: 18%; }
.circuit-board span:nth-child(16) { left: 87%; top: 18%; }

.hardware-section {
  margin-top: 2rem;
  padding-top: 2rem;
}

.section-heading {
  display: block;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: -0.045em;
}

.hardware-section > .note {
  margin: 0.5rem 0 1.2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.2);
}

th,
td {
  border-bottom: 1px solid #d1d1cd;
  padding: 0.65rem 0;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

th {
  width: 15rem;
}

@media (max-width: 900px) {
  main {
    width: min(100% - 2rem, 760px);
  }

  .benchmark-grid {
    grid-template-columns: 1fr;
  }

  .benchmark-visual {
    height: 9rem;
  }
}

@media (max-width: 600px) {
  main {
    padding-top: 1rem;
  }

  .page-header h1 {
    font-size: clamp(2.6rem, 15vw, 4.5rem);
  }

  .page-header p {
    font-size: clamp(1.35rem, 7vw, 2rem);
    line-height: 1.15;
  }

  .benchmark-results {
    margin-top: 2rem;
    padding: 2rem 0;
  }

  .benchmark-results dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benchmark-results dl > div:nth-child(2) {
    border-right: 0;
  }

  .benchmark-results dl > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .result-score {
    font-size: clamp(2.25rem, 12vw, 4rem);
  }

  table,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  th {
    width: auto;
    padding-bottom: 0.15rem;
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot.is-running {
    animation: none;
  }
}
