:root {
  color-scheme: light dark;
  --background: #fff;
  --text: #22252a;
  --muted: #4c555e;
  --line: #777e83;
  --link: #214e47;
  --button: #254f46;
  --button-text: #fff;
  --focus: #245d9f;
  --mark: #f7df94;
  --mark-text: #22252a;
  font: 100%/1.55 system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1d2024;
    --text: #f1f0eb;
    --muted: #c5ccd3;
    --line: #a0a8ad;
    --link: #a4e0cc;
    --button: #a4e0cc;
    --button-text: #15241d;
    --focus: #a9d0ff;
    --mark: #f3d48b;
  }
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); }
main { max-width: 46rem; margin-inline: auto; padding: clamp(1.25rem, 5vw, 3rem); }
a { color: var(--link); text-underline-offset: 0.15em; }
.home { font-weight: 650; }
h1, h2 { font-family: Georgia, serif; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 7vw, 3.2rem); margin: 1.65rem 0 1rem; }
label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.controls { display: flex; gap: 0.65rem; }
input, button { min-height: 2.85rem; border: 1px solid var(--line); border-radius: 0.3rem; padding: 0.5rem 0.8rem; font: inherit; }
input { flex: 1; width: 100%; min-width: 0; background: var(--background); color: var(--text); }
button { background: var(--button); border-color: var(--button); color: var(--button-text); font-weight: 650; cursor: pointer; }
button:disabled, input:disabled { opacity: 0.65; cursor: default; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
#allapot { color: var(--muted); margin: 1rem 0 0; min-height: 1.55em; }
.results { list-style: none; padding: 0; margin: 0 0 1rem; overflow-wrap: anywhere; }
.results li { border-bottom: 1px solid var(--line); padding-block: 1rem; }
.results h2 { font-size: 1.36rem; margin: 0 0 0.4rem; }
.results p { margin: 0; }
mark { color: var(--mark-text); background: var(--mark); }

@media (max-width: 24rem) {
  .controls { flex-wrap: wrap; }
  input { flex-basis: 100%; }
}
