:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, sans-serif;
  color: #242a24;
  background: #f6f1e8;
  --border: #ded7ca;
  --surface: #fffcf5;
  --accent: #315e4f;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
header, main { width: min(860px, 100%); margin: auto; padding-inline: clamp(16px, 4vw, 32px); }
header { display: flex; justify-content: space-between; align-items: center; padding-block: 15px; border-bottom: 1px solid var(--border); }
.brand { color: inherit; text-decoration: none; font-weight: 700; }
.brand span { color: #9a4320; padding-inline: .25rem; }
main { padding-block: 30px 48px; }
h1 {
  margin: 0 0 10px;
  font: 500 clamp(35px, 6vw, 56px)/1.06 Georgia, serif;
  letter-spacing: -.04em;
}
p { margin: 0 0 20px; max-width: 70ch; color: #505b50; }
form, .results { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 14px; }
label { display: grid; gap: 4px; font-size: .86rem; font-weight: 600; }
input, button {
  min-height: 40px;
  padding: 5px 9px;
  border: 1px solid #b2c1b4;
  border-radius: 6px;
  color: inherit;
  background: #f7faf3;
  font: inherit;
}
#seed { width: 10ch; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 4px; font-size: .86rem; font-weight: 600; }
fieldset label { position: relative; display: inline-block; }
fieldset input { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
fieldset span { display: grid; place-items: center; min-height: 40px; padding: 0 14px; border: 1px solid #b2c1b4; border-radius: 6px; }
fieldset input:checked + span { background: #deebdd; border-color: var(--accent); }
fieldset input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.successor-controls > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 8px;
  flex: 1 1 235px;
}
.successor-controls output {
  font-size: .86rem;
  font-variant-numeric: tabular-nums;
}
.successor-controls input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0;
  background: transparent;
  accent-color: var(--accent);
  cursor: pointer;
}
.successor-controls #seed { width: 16ch; }
button { padding-inline: 14px; color: white; background: var(--accent); font-weight: 650; cursor: pointer; }
button:disabled { opacity: .7; cursor: default; }
.progress { display: grid; gap: 5px; margin: 12px 0; }
progress { width: 100%; height: .55rem; accent-color: var(--accent); }
#status { min-height: 1.5em; margin: 0; font-size: .86rem; }
.results { overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 8px 12px; text-align: left; }
thead th, td { font-variant-numeric: tabular-nums; }
td, thead th:last-child { text-align: right; }
thead { background: #eef2e7; }
tbody tr + tr { border-top: 1px solid var(--border); }
tbody th { font-weight: 500; }
td small { display: block; color: #505b50; font-size: .76rem; }
td { white-space: nowrap; vertical-align: top; }
summary { cursor: pointer; }
summary small { color: #505b50; margin-left: .45rem; }
details dl {
  display: grid;
  grid-template-columns: minmax(0, max-content) auto;
  gap: 3px 12px;
  margin: 5px 0 0 12px;
  color: #505b50;
  font-size: .85rem;
}
details dd { margin: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 510px) {
  form button { flex-basis: 100%; }
  th, td { padding: 7px 8px; }
}
