:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #ccc7c0;
  --card: #ffffff;
  --ink: #231f20;
  --muted: #6b6561;
  --line: rgba(35, 31, 32, 0.14);
  --brand: #231f20;
  --brand-strong: #141112;
  --accent: #bc987d;
  --accent-soft: rgba(188, 152, 125, 0.22);
  --ok: #231f20;
  --warn: #bc987d;
  --radius: 18px;
  --shadow: 0 24px 36px rgba(35, 31, 32, 0.12);
  --font-heading: 'Begum Light', 'Begum', 'Forum', 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Gill Sans Light', 'Gill Sans', 'Gill Sans MT', 'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  --font-button: 'Avenir Next Condensed', 'Avenir Next', 'Avenir', 'Gill Sans', 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background:
    radial-gradient(880px 420px at 85% -15%, rgba(188, 152, 125, 0.32) 0%, transparent 60%),
    radial-gradient(680px 320px at -10% 20%, rgba(204, 199, 192, 0.7) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, #f3f0ec 45%, var(--bg-2) 100%);
  color: var(--ink);
}

.orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.orb-a {
  width: 300px;
  height: 300px;
  background: rgba(188, 152, 125, 0.22);
  top: -120px;
  right: -80px;
}

.orb-b {
  width: 260px;
  height: 260px;
  background: rgba(35, 31, 32, 0.12);
  left: -90px;
  bottom: -80px;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 26px 18px 64px;
}

.hero {
  animation: rise 500ms ease;
}

.brand-logo {
  display: block;
  width: min(220px, 70%);
  height: auto;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--ink);
}

.hero h1 {
  margin: 10px 0;
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 6vw, 3.3rem);
  line-height: 1;
  font-weight: 400;
}

.lede {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 1.02rem;
}

.card {
  margin-top: 18px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid rgba(35, 31, 32, 0.06);
  box-shadow: var(--shadow);
  animation: rise 420ms ease;
}

.hidden {
  display: none;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 400;
}

.section-head p {
  margin-top: 6px;
  color: var(--muted);
}

.capture-grid,
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.upload-tile {
  display: grid;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  color: var(--muted);
  font-size: 0.92rem;
}

.upload-tile span {
  color: var(--ink);
  font-weight: 600;
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-name {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.upload-tile input,
label input,
label select,
label textarea {
  width: 100%;
  font: inherit;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

input,
select,
textarea {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.prefilled-lock {
  background: #f2efeb;
  border-style: dashed;
  color: #5f5b57;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.preview {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.preview img {
  width: 100%;
  height: 130px;
  border-radius: 10px;
  object-fit: cover;
}

.actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.decision-block {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f4f0;
}

.decision-title {
  margin: 0 0 10px;
  font-weight: 700;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.decision-btn {
  min-height: 72px;
  border: 2px solid rgba(188, 152, 125, 0.45);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  font-family: var(--font-button);
  font-size: 0.98rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 140ms ease;
}

.decision-btn:hover {
  border-color: var(--accent);
  background: rgba(188, 152, 125, 0.12);
}

.decision-btn.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 24px rgba(35, 31, 32, 0.2);
}

.debug-panel {
  background: #f4f1ed;
  border: 1px dashed rgba(35, 31, 32, 0.2);
}

.debug-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 14px;
  margin-top: 10px;
}

.debug-grid p {
  margin: 0;
  font-size: 0.9rem;
}

.debug-events {
  margin: 12px 0 0;
  max-height: 220px;
  overflow: auto;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: pre-wrap;
}

.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-button);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all 140ms ease;
}

.btn:hover {
  background: rgba(188, 152, 125, 0.12);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}

.btn-primary:hover {
  background: var(--brand-strong);
}

.btn-warning {
  border-color: rgba(188, 152, 125, 0.55);
  color: var(--ink);
  background: rgba(188, 152, 125, 0.12);
}

.btn-warning:hover {
  background: rgba(188, 152, 125, 0.22);
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
}

.voice-shell {
  display: grid;
  gap: 14px;
  justify-items: center;
  margin-top: 12px;
}

.record {
  width: min(240px, 100%);
  height: 240px;
  border-radius: 999px;
  border: none;
  font-family: var(--font-button);
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  background: radial-gradient(circle at 30% 20%, #d8bca7 0%, #bc987d 55%, #231f20 100%);
  color: #fff;
  box-shadow: 0 24px 40px rgba(35, 31, 32, 0.28);
  transition: transform 180ms ease;
}

.record:hover {
  transform: translateY(-2px);
}

.record.active {
  animation: pulse 1300ms ease infinite;
}

.voice-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(188, 152, 125, 0.2);
  color: var(--ink);
}

.pill.muted {
  background: rgba(35, 31, 32, 0.08);
  color: var(--ink);
}

.transcript-wrap {
  margin-top: 14px;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.check-item.done {
  border-color: rgba(188, 152, 125, 0.45);
  background: rgba(188, 152, 125, 0.12);
}

.check-name {
  font-weight: 600;
  line-height: 1.35;
  flex: 1;
}

.check-status {
  font-size: 0.84rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(188, 152, 125, 0.18);
  color: var(--ink);
}

.check-item.done .check-status {
  background: rgba(35, 31, 32, 0.12);
  color: var(--ok);
}

details {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

.full {
  grid-column: 1 / -1;
}

.setup-output {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  line-height: 1.4;
}

.success {
  text-align: center;
  background: rgba(188, 152, 125, 0.14);
}

@media (max-width: 760px) {
  .record {
    width: min(200px, 100%);
    height: 200px;
  }

  .card {
    padding: 16px;
    border-radius: 16px;
  }

  .decision-btn {
    min-height: 64px;
    font-size: 0.92rem;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(188, 152, 125, 0.45);
  }
  100% {
    box-shadow: 0 0 0 28px rgba(188, 152, 125, 0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
