:root {
  color-scheme: light;
  --ink: #141414;
  --muted: #5a6067;
  --paper: #f8f4ea;
  --panel: #fffdf7;
  --line: #1b1b1b;
  --accent: #ff4f2e;
  --green: #0b7a75;
  --blue: #2454d6;
  --yellow: #f0d94f;
  --shadow: 0 24px 70px rgba(28, 24, 18, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    linear-gradient(90deg, rgba(20, 20, 20, 0.05) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(rgba(20, 20, 20, 0.04) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
}

code,
pre,
button,
a,
table,
.test-target {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

code {
  padding: 0.05em 0.25em;
  background: rgba(20, 20, 20, 0.08);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 22px;
  min-height: min(720px, calc(100vh - 28px));
}

.hero__copy,
.result-card,
.test-area,
.panel,
.notes {
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 6vw, 76px);
  position: relative;
  overflow: hidden;
}

.hero__copy::before {
  content: "";
  position: absolute;
  top: 24px;
  right: 24px;
  width: 118px;
  aspect-ratio: 1;
  border: 18px solid var(--accent);
  border-radius: 50%;
}

.kicker,
.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 7.4vw, 7.2rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4.4vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.lead,
.section-head p,
.notes p,
.hint {
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  line-height: 1.55;
}

.code {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  border: 2px solid var(--line);
  background: #171717;
  color: #fff8dc;
  font-size: clamp(0.86rem, 1.8vw, 1rem);
  line-height: 1.55;
}

.code code {
  padding: 0;
  background: transparent;
}

.result-card {
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 18px;
  padding: 24px;
  background: var(--yellow);
}

.result-card h2 {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.result-card p {
  margin-bottom: 0;
  font-size: 1.02rem;
  line-height: 1.5;
}

dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

dt,
dd {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 800;
}

.test-area,
.panel,
.notes {
  margin-top: 22px;
  padding: clamp(22px, 4vw, 36px);
}

.section-head {
  max-width: 920px;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.column {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
  border: 2px solid var(--line);
}

.column--auto {
  background: #ffd1c7;
}

.column--manipulation {
  background: #bff1d0;
}

.column h3 {
  margin-bottom: 2px;
  font-size: 1.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.test-target {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 78px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: #fffdf7;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 900;
  text-align: left;
  text-decoration: none;
  transition: transform 120ms ease, background-color 120ms ease;
  -webkit-tap-highlight-color: rgba(255, 79, 46, 0.28);
}

.test-target:active {
  transform: translateY(3px);
}

.test-target:focus-visible {
  outline: 4px solid var(--blue);
  outline-offset: 3px;
}

.test-target strong {
  font-size: clamp(1.35rem, 4vw, 2.6rem);
  line-height: 1;
}

.test-target.is-hot {
  background: var(--yellow);
}

.auto {
  touch-action: auto;
}

.manipulation {
  touch-action: manipulation;
}

.canvas-tile {
  min-height: 116px;
  background:
    linear-gradient(45deg, rgba(36, 84, 214, 0.16) 25%, transparent 25% 50%, rgba(36, 84, 214, 0.16) 50% 75%, transparent 75%) 0 0 / 22px 22px,
    #fffdf7;
}

.table-wrap {
  overflow-x: auto;
  border: 2px solid var(--line);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fffdf7;
  font-size: 0.92rem;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 2px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #171717;
  color: #fffdf7;
}

tr:last-child td {
  border-bottom: 0;
}

.hint {
  margin: 16px 0 0;
}

.panel--dark {
  background: #171717;
  color: #fffdf7;
}

.panel--dark .eyebrow {
  color: #8ee7c1;
}

.event-log {
  display: grid;
  gap: 8px;
  min-height: 80px;
  margin: 0;
  padding-left: 22px;
  color: #fff8dc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.45;
}

.notes {
  background: #c8d8ff;
}

.notes p {
  max-width: 920px;
  margin-bottom: 0;
  color: #202020;
}

@media (max-width: 860px) {
  main {
    width: min(100% - 20px, 680px);
    padding-top: 10px;
  }

  .hero,
  .compare-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero__copy::before {
    width: 70px;
    border-width: 12px;
  }
}
