:root { color-scheme: light; }

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  background: #f3efe6;
  color: #1c1915;
  font: 18px/1.45 ui-sans-serif, system-ui, sans-serif;
  padding: max(18px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

main { max-width: 32rem; margin: 0 auto; }

.kicker {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: #8a4b2f;
  font-weight: 700;
}

h1 { margin: 0.1rem 0 0.3rem; font-size: 3rem; line-height: 0.95; font-family: Georgia, "Iowan Old Style", serif; }
h2 { font-size: 1.1rem; margin: 1.4rem 0 0.5rem; }
.lede, .note { color: #4e463d; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

.picks, .controls { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }

button, textarea {
  font: 650 1rem/1.3 ui-sans-serif, system-ui, sans-serif;
  border: 0;
  border-radius: 12px;
}

button {
  min-height: 48px;
  padding: 0 0.9rem;
  background: #e5dccb;
  cursor: pointer;
}

button.on, .go { background: #1c1915; color: #f3efe6; }
button:focus-visible, textarea:focus-visible, input:focus-visible { outline: 2px solid #1c1915; outline-offset: 2px; }

.block { display: grid; gap: 0.35rem; font-weight: 750; font-size: 0.85rem; margin: 0.8rem 0 0.4rem; }

textarea {
  width: 100%;
  padding: 0.7rem;
  font: 1.2rem/1.35 ui-monospace, Menlo, Consolas, monospace;
  background: white;
  color: inherit;
  resize: vertical;
}

.out {
  margin: 0.6rem 0 0.2rem;
  font: 1.55rem/1.45 ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
  word-break: break-word;
}

.plain { margin: 0.2rem 0 0.8rem; color: #4e463d; }

.wpm { display: grid; gap: 0.2rem; font-size: 0.85rem; font-weight: 700; flex: 1; min-width: 12rem; }
input[type="range"] { width: 100%; }

.chart {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 0.8rem;
}

.chart li {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  border-bottom: 1px solid #e0d5c4;
  padding: 0.15rem 0;
  font-variant-numeric: tabular-nums;
}

.chart b { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 650; }
.note { font-size: 0.9rem; }
