:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #142725;
  background: #f4f7f6;
  font-synthesis: none;
  --ink: #142725;
  --muted: #526863;
  --teal: #006657;
  --rule: #d4e1dd;
  --soft: #eaf4f0;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
button:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #32977c;
  outline-offset: 3px;
}

.site-header { background: #fff; border-bottom: 1px solid var(--rule); }
.site-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(100% - 2.5rem, 50rem);
  min-height: 4.4rem;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: .6rem; font-size: 1.12rem; font-weight: 750; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: .52rem;
  background: var(--teal);
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
}
.product { color: var(--muted); border-left: 1px solid var(--rule); padding-left: 1rem; font-size: .9rem; }

main {
  width: min(100% - 2.5rem, 43rem);
  margin: clamp(2.3rem, 6vw, 4rem) auto 4rem;
}
.intro { margin-bottom: 1.65rem; }
h1 { margin: 0 0 .55rem; font-size: clamp(2rem, 6vw, 3.125rem); letter-spacing: -.05em; line-height: 1.1; }
.intro p { margin: 0; color: var(--muted); line-height: 1.55; max-width: 36rem; }
.card {
  border: 1px solid var(--rule);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 3px 12px #163c3510;
}
.form-card {
  padding: 1.05rem 1.2rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .9rem;
  margin-bottom: .9rem;
}
.form-icon {
  display: grid;
  place-items: center;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: .65rem;
  background: var(--soft);
  color: var(--teal);
}
.form-card label { display: block; font-size: .875rem; font-weight: 650; color: var(--muted); margin-bottom: .24rem; }
.form-card select {
  width: 100%;
  min-height: 2rem;
  border: 1px solid var(--rule);
  border-radius: .4rem;
  background: #fff;
  color: var(--ink);
  padding: .38rem .62rem;
}
.input-card { padding: clamp(1.05rem, 4vw, 1.55rem); }
h2 { font-size: 1.15rem; margin: 0 0 .95rem; }
.mode-picker {
  display: inline-flex;
  gap: .22rem;
  padding: .25rem;
  border-radius: .65rem;
  background: var(--soft);
  margin-bottom: .95rem;
}
.mode-picker button {
  padding: .55rem .85rem;
  border: 1px solid transparent;
  border-radius: .45rem;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
  font-size: .9rem;
}
.mode-picker button[aria-pressed="true"] {
  color: var(--teal);
  border-color: var(--rule);
  background: #fff;
}
textarea {
  display: block;
  width: 100%;
  min-height: 11.5rem;
  resize: vertical;
  padding: .9rem;
  border: 1px solid var(--rule);
  border-radius: .65rem;
  line-height: 1.5;
  color: var(--ink);
  background: #fafcfb;
}
textarea::placeholder { color: #60766f; }
.record-area {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .9rem;
  min-height: 11.5rem;
  border: 1px dashed #9bb6ae;
  background: #fafcfb;
  border-radius: .65rem;
  padding: 1.15rem;
}
.record-state { color: var(--muted); text-align: center; }
audio { width: min(100%, 21rem); }
.hint, .status { font-size: .875rem; line-height: 1.5; color: var(--muted); }
.status:empty, #challenge:empty { display: none; }
.status[data-kind="error"] { color: #a1302a; }
.status[data-kind="success"] { color: var(--teal); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1rem; padding-top: .42rem; }
.primary, .secondary {
  min-height: 2.8rem;
  border: 1px solid var(--teal);
  border-radius: .55rem;
  padding: .58rem .9rem;
  font-weight: 690;
}
.primary { background: var(--teal); color: #fff; }
.primary:hover:not(:disabled) { background: #005347; }
.secondary { background: #fff; color: var(--teal); }
.secondary:hover:not(:disabled) { background: var(--soft); }
.text-button {
  padding: .6rem .25rem;
  border: 0;
  background: transparent;
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: .18em;
  font-size: .9rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 500px) {
  .primary { width: 100%; }
  .site-inner { min-height: 3.6rem; }
}
