/* retoor <retoor@molodetz.nl> */
.section {
  padding: 76px 0 68px 0;
  border-top: var(--border);
}

.section-head {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  margin-bottom: 40px;
  align-items: start;
}

.section-numeral {
  font-family: var(--font-serif);
  font-size: 58px;
  line-height: 1;
  color: var(--accent);
  border-top: 3px solid var(--ink);
  padding-top: 10px;
}

.section-head h1, .section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  margin-bottom: 0.3em;
}

.section-head .lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 0;
}

.register {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
}

.register th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: normal;
  color: var(--faint);
  text-align: left;
  padding: 0 16px 10px 0;
  border-bottom: 2px solid var(--ink);
}

.register td {
  padding: 13px 16px 13px 0;
  border-bottom: var(--border);
  vertical-align: top;
}

.register tr:last-child td {
  border-bottom: none;
}

.register .cell-id {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 16px;
}

.register .cell-rule strong {
  display: block;
  font-size: 16px;
}

.register .cell-rule span {
  color: var(--ink-soft);
  font-size: 14.5px;
}

.register .cell-check {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  white-space: nowrap;
  padding-top: 16px;
}

.pillar {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 28px;
  padding: 26px 0;
  border-bottom: var(--border);
}

.pillar:first-of-type {
  border-top: var(--border);
}

.pillar-id {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  padding-top: 6px;
}

.pillar h3 {
  font-size: 1.35rem;
  margin-bottom: 0.3em;
}

.pillar p {
  color: var(--ink-soft);
  margin: 0;
  max-width: 76ch;
}

.finding {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 28px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: var(--border);
}

.finding:first-of-type {
  border-top: var(--border);
}

.finding-id {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.finding p {
  margin: 0;
}

.stamp {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 3px 10px;
  white-space: nowrap;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-bottom: var(--border);
}

.steps li:last-child {
  border-bottom: none;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--accent);
  line-height: 1.2;
}

.steps strong {
  display: block;
  font-size: 16.5px;
}

.steps span {
  color: var(--ink-soft);
  font-size: 15px;
}

.callout {
  border: 1px solid var(--accent);
  padding: 18px 22px;
  margin-top: 24px;
}

.callout strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 8px;
}

.callout p {
  margin: 0;
  font-size: 15px;
}

.stack-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  padding: 18px 0;
  border-bottom: var(--border);
}

.stack-row:first-of-type {
  border-top: var(--border);
}

.stack-row dt {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  padding-top: 3px;
}

.stack-row dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: 15.5px;
}

.stack-row dd strong {
  color: var(--ink);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.split > div {
  min-width: 0;
}

.split h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  font-weight: normal;
  color: var(--faint);
  margin-bottom: 12px;
}

.terminal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.terminal-head h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  font-weight: normal;
  color: var(--faint);
  margin: 0;
}

.run-button {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  background: var(--ink);
  color: #ffffff;
  border: 1px solid var(--ink);
  padding: 10px 20px;
  cursor: pointer;
}

.run-button:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
}

.run-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.panel-dark {
  background: var(--panel);
  color: var(--panel-text);
  border-top: 3px solid var(--accent);
  padding: 28px 30px;
  overflow-x: auto;
}

.panel-dark pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.75;
}

.panel-dark .ok { color: #7fa98f; }
.panel-dark .bad { color: #e88f7f; }
.panel-dark .dim { color: var(--panel-dim); }
.panel-dark .verdict { color: #ffffff; font-weight: bold; }

.grades { margin-top: 40px; }

@media (max-width: 768px) {
  .section-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .section-numeral {
    font-size: 40px;
    border-top: none;
    padding-top: 0;
  }
  .pillar, .finding {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .finding .stamp {
    justify-self: start;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .register .cell-check {
    white-space: normal;
  }
  .register .cell-rule, .register .cell-check {
    overflow-wrap: anywhere;
  }
  .stack-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
