:root {
  --bg: #f4f1e9;
  --card: #fffdf7;
  --ink: #1f2b23;
  --muted: #667267;
  --accent: #23352a;
  --accent-2: #dce5dc;
  --line: #d8d5cc;
  --ok: #2e6b45;
  --warn: #8a5d22;
  --radius: 22px;
  --shadow: 0 12px 35px rgba(31, 43, 35, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

button, audio { width: 100%; }

button {
  font: inherit;
  cursor: pointer;
}

.wrap {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 18px 16px 48px;
}

.hero {
  background: var(--accent);
  color: white;
  border-radius: 28px;
  padding: 28px 20px 24px;
  box-shadow: var(--shadow);
}

.brand {
  margin-bottom: 16px;
}

.brand img {
  width: 170px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  padding: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,.14);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  opacity: .78;
}

.eyebrow.dark { color: var(--muted); }

h1, h2, h3 {
  line-height: 1.08;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 9vw, 3.35rem);
  margin-bottom: 14px;
  max-width: 12ch;
}

h2 { font-size: 1.55rem; }

.lead {
  font-size: 1.05rem;
  line-height: 1.55;
  opacity: .93;
  max-width: 62ch;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 16px;
  padding: 9px 14px 9px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  font-size: .88rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.96);
}

.status .label {
  line-height: 1;
}

.status .dot {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 50%;
  background: #aeb7b0;
  box-shadow: 0 0 0 5px rgba(255,255,255,.12);
}

.status.online .dot {
  background: #2fb344;
  box-shadow: 0 0 0 5px rgba(47,179,68,.18);
}

.status.offline .dot {
  background: #7a1f2b;
  box-shadow: 0 0 0 5px rgba(122,31,43,.20);
}

.status.checking .dot {
  background: #aeb7b0;
  box-shadow: 0 0 0 5px rgba(255,255,255,.12);
}

.primary, .secondary, .download-link {
  border: 0;
  border-radius: 14px;
  min-height: 48px;
  padding: 12px 14px;
  font-weight: 750;
}

.primary {
  background: white;
  color: var(--accent);
  margin-top: 4px;
}

.primary:disabled {
  opacity: .65;
  cursor: wait;
}

.secondary {
  width: auto;
  min-height: 40px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding-inline: 12px;
}

.progress-wrap {
  margin-top: 18px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: .88rem;
  margin-bottom: 8px;
}

.progress-track {
  height: 10px;
  background: rgba(255,255,255,.18);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: white;
  border-radius: inherit;
  transition: width .25s ease;
}

.download-state {
  margin: 14px 0 0;
  min-height: 1.4em;
  font-weight: 650;
}

.guide, .help {
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.audio-list {
  display: grid;
  gap: 12px;
}

.audio-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
}

.audio-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.number {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-2);
  color: var(--accent);
  font-weight: 850;
}

.audio-card h3 {
  margin: 1px 0 4px;
  font-size: 1.05rem;
}

.audio-card p {
  margin: 0;
  color: var(--muted);
  font-size: .91rem;
  line-height: 1.4;
}

audio {
  display: block;
  margin-top: 8px;
}

.download-link {
  display: inline-flex;
  width: auto;
  min-height: 38px;
  margin-top: 10px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #f3f4f1;
  color: var(--accent);
  font-size: .9rem;
  border: 1px solid var(--line);
}

.help p {
  line-height: 1.55;
}

.small {
  color: var(--muted);
  font-size: .92rem;
}

footer {
  text-align: center;
  color: var(--muted);
  padding: 28px 8px 0;
  font-size: .88rem;
}

@media (min-width: 720px) {
  .wrap { padding: 28px 24px 64px; }
  .hero { padding: 44px; }
  .guide, .help { padding: 28px; }
  .audio-card { padding: 18px 20px; }
}


@media (max-width: 719px) {
  .brand img {
    width: 110px;
  }
}
