:root {
  --bg: #f5efe3;
  --bg-deep: #e7dac7;
  --panel: rgba(255, 252, 245, 0.9);
  --panel-solid: #fffaf0;
  --ink: #142328;
  --muted: #68757a;
  --line: rgba(20, 35, 40, 0.12);
  --primary: #0a6b58;
  --primary-strong: #06483d;
  --primary-soft: #dff2ec;
  --danger: #b33c2e;
  --amber: #d98b3a;
  --sand: #f0dfc6;
  --shadow: 0 30px 90px rgba(45, 54, 53, 0.16);
  --soft-shadow: 0 18px 45px rgba(45, 54, 53, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(10, 107, 88, 0.22), transparent 28rem),
    radial-gradient(circle at 84% 5%, rgba(217, 139, 58, 0.22), transparent 24rem),
    linear-gradient(145deg, #fbf4e8 0%, var(--bg) 48%, var(--bg-deep) 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(20, 35, 40, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 35, 40, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.62), transparent 72%);
}

.app-shell,
.mobile-shell {
  width: min(100% - 28px, 1120px);
  margin: 0 auto;
  padding: 22px 0 44px;
}

.mobile-shell {
  max-width: 820px;
}

.hero-card,
.panel,
.workflow-strip,
.results-layout {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 32px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  padding: clamp(24px, 5vw, 44px);
}

.hero-card--home {
  overflow: hidden;
  position: relative;
}

.hero-card--home::after {
  position: absolute;
  right: -7rem;
  bottom: -8rem;
  width: 21rem;
  height: 21rem;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(10, 107, 88, 0.16), transparent 68%);
}

.hero-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 28px;
  align-items: center;
}

.hero-signal {
  min-height: 230px;
  border: 1px solid rgba(10, 107, 88, 0.16);
  border-radius: 34px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(10, 107, 88, 0.14), rgba(217, 139, 58, 0.12)),
    rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.signal-dot {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--primary), var(--primary-strong));
  box-shadow:
    0 0 0 18px rgba(10, 107, 88, 0.12),
    0 0 0 44px rgba(10, 107, 88, 0.06);
}

.signal-line {
  width: 118px;
  height: 12px;
  margin-top: -50px;
  border-radius: 999px;
  background: rgba(20, 35, 40, 0.12);
}

.signal-line.short {
  width: 78px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  letter-spacing: -0.03em;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.6rem, 8vw, 5.35rem);
  line-height: 0.9;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.05;
}

h3 {
  font-size: 1.12rem;
}

.lead,
.muted {
  color: var(--muted);
  line-height: 1.62;
}

.lead {
  max-width: 680px;
  margin: 18px 0 0;
  font-size: clamp(1.02rem, 2.3vw, 1.2rem);
}

.muted {
  margin: 12px 0 0;
}

.tip-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.tip {
  border: 1px solid rgba(10, 107, 88, 0.14);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--primary-strong);
  font-size: 0.92rem;
  font-weight: 800;
}

.top-link {
  border: 1px solid rgba(10, 107, 88, 0.16);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--primary-strong);
  background: rgba(255, 255, 255, 0.62);
  font-weight: 800;
  text-decoration: none;
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  background: rgba(20, 35, 40, 0.08);
  box-shadow: var(--soft-shadow);
}

.workflow-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(255, 250, 240, 0.84);
}

.workflow-item span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 900;
}

.workflow-item strong {
  font-size: 0.95rem;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  margin-top: 18px;
}

.side-stack {
  display: grid;
  gap: 18px;
}

.panel,
.results-layout {
  padding: clamp(18px, 3vw, 26px);
}

.recorder-panel {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(150deg, rgba(255, 250, 240, 0.96), rgba(240, 223, 198, 0.68)),
    var(--panel-solid);
}

.compact-panel {
  box-shadow: var(--soft-shadow);
}

.launch-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 16px;
  align-items: end;
  margin-top: 18px;
}

.section-head {
  margin-bottom: 16px;
}

.section-head p {
  margin-bottom: 7px;
}

.record-stage {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px dashed rgba(10, 107, 88, 0.22);
  border-radius: 30px;
  margin: 8px 0 18px;
  padding: 22px;
  background:
    radial-gradient(circle at center, rgba(10, 107, 88, 0.12), transparent 55%),
    rgba(255, 255, 255, 0.48);
}

.record-meter {
  display: inline-flex;
  min-width: 176px;
  min-height: 176px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(10, 107, 88, 0.18);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(223, 242, 236, 0.74));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 24px 60px rgba(10, 107, 88, 0.14);
  color: var(--primary-strong);
  font-size: 1.7rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

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

.record-meter.active {
  color: var(--danger);
  animation: breathe 1.8s ease-in-out infinite;
}

.record-meter.active .record-dot {
  background: var(--danger);
  box-shadow: 0 0 0 9px rgba(179, 60, 46, 0.12);
}

@keyframes breathe {
  50% {
    transform: scale(1.025);
  }
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 15px;
}

.compact-field {
  margin-top: 0;
}

.access-panel {
  margin-bottom: 14px;
  border: 1px solid rgba(179, 60, 46, 0.16);
  border-radius: 22px;
  padding: 14px;
  background: rgba(255, 244, 232, 0.74);
}

.mini-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.help-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.75;
}

label {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 850;
}

textarea,
select,
input[type="file"],
input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 15px;
  outline: none;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea:focus,
select:focus,
input[type="file"]:focus,
input[type="password"]:focus {
  border-color: rgba(10, 107, 88, 0.55);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 4px rgba(10, 107, 88, 0.12);
}

textarea {
  resize: vertical;
  min-height: 130px;
}

input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 999px;
  margin-right: 12px;
  padding: 10px 14px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 850;
}

audio {
  width: 100%;
  margin-top: 16px;
}

.btn {
  min-height: 48px;
  border: 1px solid rgba(20, 35, 40, 0.12);
  border-radius: 999px;
  padding: 13px 17px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(20, 35, 40, 0.12);
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
}

.btn.danger:not(:disabled) {
  border-color: rgba(179, 60, 46, 0.2);
  color: var(--danger);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.wide {
  width: 100%;
}

.results-layout {
  margin-top: 18px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.result-card,
.capture-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 18px;
  background: rgba(255, 250, 240, 0.82);
  box-shadow: var(--soft-shadow);
}

.capture-card + .capture-card,
.result-card + .result-card {
  margin-top: 14px;
}

.result-card textarea {
  min-height: 270px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.timing-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
}

.timing-summary div {
  border: 1px solid rgba(10, 107, 88, 0.12);
  border-radius: 18px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 0.9rem;
}

.timing-summary strong {
  display: block;
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inline-state {
  margin: -74px 0 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-weight: 850;
}

.status {
  margin: 0;
  border: 1px solid rgba(10, 107, 88, 0.16);
  border-radius: 22px;
  padding: 15px 16px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 850;
}

.status.is-error {
  border-color: rgba(179, 60, 46, 0.22);
  background: #fbe7df;
  color: #8e2f25;
}

.hidden {
  display: none;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

.divider::before,
.divider::after {
  flex: 1;
  height: 1px;
  content: "";
  background: var(--line);
}

@media (max-width: 900px) {
  .hero-layout,
  .workspace-grid,
  .launch-panel,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .hero-signal {
    display: none;
  }

  .timing-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .app-shell,
  .mobile-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 10px;
  }

  .hero-card,
  .panel,
  .workflow-strip,
  .results-layout {
    border-radius: 26px;
  }

  .hero-card {
    padding: 22px;
  }

  h1 {
    font-size: clamp(2.4rem, 16vw, 4rem);
  }

  .workflow-strip {
    grid-template-columns: 1fr;
  }

  .workflow-item {
    padding: 12px 14px;
  }

  .record-stage {
    min-height: 222px;
  }

  .record-meter {
    min-width: 148px;
    min-height: 148px;
    font-size: 1.42rem;
  }

  .action-row,
  .result-actions,
  .mini-actions,
  .timing-summary {
    grid-template-columns: 1fr;
  }

  .launch-panel {
    align-items: stretch;
  }
}
