/* Earshelf: phone first, one column, system fonts, light and dark, no external assets. */
:root {
  --bg: #fbf8f2;
  --panel: #ffffff;
  --ink: #1d1b18;
  --muted: #5f5a52;
  --line: #d9d2c5;
  --accent: #14594f;
  --accent-ink: #ffffff;
  --accent-soft: #e2efec;
  --danger: #9b1c1c;
  --warn-bg: #fff3d6;
  --focus: #0a58ca;
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --panel: #1d1b17;
    --ink: #f1ede4;
    --muted: #b4ada0;
    --line: #3a362e;
    --accent: #6fcfbd;
    --accent-ink: #0b1e1a;
    --accent-soft: #1e3430;
    --danger: #ff9b95;
    --warn-bg: #3a3118;
    --focus: #8ab4ff;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--panel); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; top: 0.5rem; }
.top, main, .foot { max-width: 42rem; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding-top: 1rem; padding-bottom: 0.5rem; }
.brand { font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; }
.top nav, .foot nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.top nav a, .foot nav a { color: var(--muted); }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 1.25rem 0 0.75rem; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 2rem 0 0.5rem; }
.card h2 { margin-top: 0; }
p { margin: 0.5rem 0 0.75rem; }
.lead { font-size: 1.15rem; color: var(--ink); max-width: 36rem; }
.hint { color: var(--muted); font-size: 0.9375rem; }
.byline { margin: -0.25rem 0 0.25rem; color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; }
label { display: block; font-weight: 600; margin: 0.9rem 0 0.25rem; }
label .hint { font-weight: 400; }
label.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; margin: 0.6rem 0; }
label.check input { flex: none; width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; accent-color: var(--accent); }
input[type=file], input[type=email], select {
  width: 100%; font: inherit; color: inherit; background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.7rem; min-height: 2.75rem;
}
input[type=file] { padding: 0.5rem; }
button, .button {
  font: inherit; font-weight: 600; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem 0.9rem; min-height: 2.75rem;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
button:hover, .button:hover { border-color: var(--accent); }
button:disabled { opacity: 0.55; cursor: not-allowed; }
.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.primary:hover { filter: brightness(1.08); }
.danger { color: var(--danger); border-color: var(--danger); }
form button.primary, .card > button.primary { width: 100%; margin-top: 0.75rem; }
progress { width: 100%; height: 0.9rem; accent-color: var(--accent); margin: 0.5rem 0; }
#work progress { width: calc(100% - 4rem); vertical-align: middle; }
.status { min-height: 1.5em; margin: 0.5rem 0 0; }
.status.error, .error { color: var(--danger); }
.notice { background: var(--accent-soft); border-radius: var(--radius); padding: 0.75rem 1rem; margin: 1rem 0; }
.notice button { margin-top: 0.4rem; min-height: 2.25rem; padding: 0.25rem 0.7rem; }
.banner { background: var(--warn-bg); border-radius: var(--radius); padding: 0.75rem 1rem; margin: 1rem 0; }
.banner.error { border: 1px solid var(--danger); }
.hero { padding-top: 0.25rem; }
.steps { padding-left: 1.25rem; }
.steps li, .prices li { margin: 0.5rem 0; }
.prices { padding-left: 1.25rem; }
ul { padding-left: 1.25rem; }
ul.voices { list-style: none; padding: 0; margin: 0.5rem 0; border-top: 1px solid var(--line); }
ul.voices li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
ul.voices audio { width: 100%; max-width: 20rem; height: 2.5rem; }
ul.chapters { list-style: none; padding: 0; margin: 0.5rem 0 0; border-top: 1px solid var(--line); }
ul.chapters li { padding: 0.15rem 0; border-bottom: 1px solid var(--line); }
ul.chapters li.row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.25rem 0.75rem; padding: 0.5rem 0; }
.acts { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.5rem 0; }
.acts a:not(.button) { padding: 0.5rem 0.25rem; }
.player { margin: 0.75rem 0; position: sticky; top: 0; background: var(--panel); padding: 0.25rem 0; z-index: 2; }
.player audio, #voice-sample { width: 100%; margin: 0.5rem 0; }
button.play[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); }
details { border-bottom: 1px solid var(--line); padding: 0.5rem 0; }
details summary { cursor: pointer; font-weight: 600; min-height: 2.25rem; display: flex; align-items: center; }
details p { margin: 0.25rem 0 0.5rem; }
.doc h2 { margin-top: 1.5rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--accent-soft); padding: 0.05em 0.3em; border-radius: 4px; }
.foot { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.25rem; padding-bottom: 2.5rem; color: var(--muted); font-size: 0.9375rem; }
@media (min-width: 40rem) {
  h1 { font-size: 2.4rem; }
  body { font-size: 1.125rem; }
}
@media (prefers-reduced-motion: no-preference) {
  button, .button { transition: border-color 0.15s ease, filter 0.15s ease; }
}
.hero-sample { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin: 0.75rem 0 0; }
a.play-sample[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); }
ul.voices .button { min-width: 5rem; }
.more-voices { margin-top: 0.5rem; }
.more-voices summary { cursor: pointer; font-weight: 600; min-height: 2.75rem; display: flex; align-items: center; }
.more-voices summary::after { content: "+"; margin-left: 0.5rem; font-weight: 400; color: var(--muted); }
.more-voices[open] summary::after { content: "\2212"; }
