:root {
  color-scheme: light;
  --ink: #17221d;
  --muted: #667169;
  --paper: #f7f4ec;
  --panel: #fffdf8;
  --line: #d9ddd5;
  --green: #176b4d;
  --green-dark: #0d4b35;
  --green-soft: #e5f1e9;
  --red: #b83c39;
  --red-soft: #f8e8e4;
  --gold: #d6a139;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, #e9f1e8 0, transparent 32rem),
    var(--paper);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
  margin-bottom: 24px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 6vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.eyebrow,
.step-kicker {
  margin-bottom: 7px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.progress-block {
  width: min(310px, 40vw);
  color: var(--muted);
  font-size: 0.86rem;
  text-align: right;
}

.progress-track {
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #dedfd8;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 180ms ease;
}

.panel {
  padding: clamp(24px, 6vw, 56px);
  border: 1px solid rgba(23, 34, 29, 0.09);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 22px 70px rgba(48, 55, 47, 0.09);
}

.login-card,
.submit-card {
  width: min(100%, 600px);
}

.stacked-field {
  display: grid;
  gap: 8px;
  width: min(100%, 420px);
  margin: 24px auto 18px;
  font-weight: 750;
  text-align: left;
}

.stacked-field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid #bdc6bd;
  border-radius: 10px;
  background: white;
  color: var(--ink);
}

.centered {
  min-height: 420px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.hidden {
  display: none !important;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(30px, 7vw, 70px);
}

.practice-banner {
  margin: 0 0 28px;
  padding: 15px 17px;
  border: 1px solid #d5b867;
  border-radius: 13px;
  background: #fff4d6;
  color: #5b4716;
  line-height: 1.45;
}

.practice-banner strong {
  margin-right: 5px;
}

.lede {
  max-width: 42rem;
  color: #4d5a52;
  font-size: 1.08rem;
  line-height: 1.65;
}

.prep-list {
  display: grid;
  gap: 17px;
  margin: 0;
  padding-left: 1.3rem;
  color: #4d5a52;
  line-height: 1.48;
}

.prep-list strong {
  display: block;
  color: var(--ink);
}

.consent-row {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin: 36px 0 18px;
  padding: 18px;
  border: 1px solid #cdd9ce;
  border-radius: 14px;
  background: #f4f8f3;
  line-height: 1.5;
}

.consent-row input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  accent-color: var(--green);
}

.privacy-note {
  color: var(--muted);
  font-size: 0.88rem;
}

code {
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 750;
  text-decoration: none;
}

.button.primary {
  background: var(--green);
  color: white;
}

.button.primary:hover:not(:disabled) {
  background: var(--green-dark);
}

.button.secondary {
  border-color: #bfcbc1;
  background: white;
  color: var(--ink);
}

.button.ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.button.record {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-width: 190px;
  justify-content: center;
  background: var(--red);
  color: white;
}

.record-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
}

.clip-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
}

.badges {
  display: flex;
  gap: 8px;
}

.badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 99px;
  background: #ece8dc;
  color: #4f4c42;
  font-size: 0.8rem;
  font-weight: 750;
}

.badge.saved {
  background: var(--green-soft);
  color: var(--green-dark);
}

.nav-buttons {
  display: flex;
  gap: 8px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  color: var(--ink);
  font-size: 1.25rem;
}

.prompt-card {
  margin: 26px 0 22px;
  padding: clamp(24px, 5vw, 46px);
  border-radius: 18px;
  background: #f2eee3;
  text-align: center;
}

.pace-instruction {
  margin-bottom: 21px;
  color: var(--muted);
  font-size: 0.94rem;
}

.transcript {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 8vw, 5.4rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.transcript u {
  text-decoration-color: var(--gold);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.12em;
}

.plain-spelling {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.meter-wrap {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #e3e4df;
}

.meter {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 70ms linear;
}

.meter.hot {
  background: var(--red);
}

.recording-status {
  min-height: 27px;
  margin: 10px 0 18px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.record-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.take-panel {
  display: grid;
  gap: 16px;
  margin-top: 26px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfaf6;
}

.take-title {
  margin-bottom: 2px;
  font-weight: 800;
}

.take-details,
.hint {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.87rem;
}

audio {
  width: 100%;
}

.take-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.error {
  min-height: 1.4em;
  margin: 16px 0 0;
  color: var(--red);
  font-weight: 650;
}

.shortcut-hint {
  margin: 22px 0 0;
  color: #899088;
  font-size: 0.78rem;
  text-align: center;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 30px 0;
}

.form-grid label {
  display: grid;
  gap: 8px;
  font-weight: 750;
}

.form-grid input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid #bdc6bd;
  border-radius: 10px;
  background: white;
  color: var(--ink);
}

.form-grid small {
  color: var(--muted);
  font-weight: 400;
  line-height: 1.35;
}

.final-check {
  margin-top: 0;
}

.done-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 1.8rem;
}

.command-card {
  width: min(100%, 720px);
  margin: 18px 0 24px;
  padding: 18px;
  border-radius: 12px;
  background: #19231e;
  color: white;
  text-align: left;
}

.file-mode-command {
  margin-top: 6px;
  text-align: center;
}

.command-card p {
  margin-bottom: 8px;
  color: #b9c6bd;
  font-size: 0.82rem;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid rgba(23, 34, 29, 0.09);
  border-radius: 16px;
  background: var(--panel);
}

.summary-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.summary-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 500;
}

.review-list {
  display: grid;
  gap: 14px;
  margin-top: 30px;
}

.review-row {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfaf6;
}

.review-row-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.review-transcript {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.review-transcript u {
  text-decoration-color: var(--gold);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.12em;
}

.review-confirmation {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #4d5a52;
  font-size: 0.9rem;
}

.review-confirmation input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--green);
}

.admin-finalize {
  margin-top: 18px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.spinner {
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  border: 3px solid #dce3dc;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 960px);
    padding-top: 20px;
  }

  .masthead {
    display: block;
  }

  .progress-block {
    width: 100%;
    margin-top: 18px;
    text-align: left;
  }

  .intro-grid,
  .form-grid,
  .admin-summary {
    grid-template-columns: 1fr;
  }

  .panel {
    border-radius: 18px;
  }

  .take-actions {
    display: grid;
  }
}
