:root {
  color-scheme: dark;
  --night: #191b29;
  --surface: #1e2030;
  --moon: #222436;
  --highlight: #2f334d;
  --divider: #3b4261;
  --muted: #828bb8;
  --text: #c8d3f5;
  --blue: #82aaff;
  --cyan: #86e1fc;
  --violet: #c099ff;
  font: 100%/1.55 system-ui, sans-serif;
  background: var(--moon);
  color: var(--text);
}

* { box-sizing: border-box; }
body { margin: 0; }
.wrap { width: min(70rem, calc(100% - 2rem)); margin-inline: auto; }
header { background: var(--night); border-bottom: 1px solid var(--divider); padding: 1rem 0; }
header a { color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .09em; }
header span, summary::marker { color: var(--violet); }
main { padding-block: clamp(2.5rem, 7vw, 5rem); }
h1 { font-size: clamp(2.4rem, 7vw, 5rem); line-height: 1.04; margin: 0; letter-spacing: -.05em; }
.intro { max-width: 42rem; margin-bottom: 2.75rem; }
.controls { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
label { font-weight: 650; }
input, select {
  display: block;
  width: 100%;
  margin-top: .3rem;
  padding: .65rem .75rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--muted);
  border-radius: .35rem;
}
input::placeholder { color: var(--muted); opacity: 1; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
::selection { color: var(--night); background: var(--violet); }
#status { color: var(--muted); font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--divider); border-radius: .4rem; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: .65rem .75rem; border-bottom: 1px solid var(--divider); text-align: left; }
th { background: var(--highlight); color: var(--violet); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:focus-within { background: var(--highlight); }
@media (hover: hover) { tbody tr:hover { background: var(--highlight); } }
td:first-child { width: 55%; overflow-wrap: anywhere; }
td:nth-child(3) { font-variant-numeric: tabular-nums; }
summary { cursor: pointer; }
code { overflow-wrap: anywhere; color: var(--cyan); }
td a { color: var(--blue); text-underline-offset: .18em; }
td a:visited { color: var(--violet); }
td a:hover { color: var(--cyan); }
@media (max-width: 38rem) {
  .controls { grid-template-columns: 1fr; }
  th, td { padding: .6rem .45rem; }
}
