:root {
  --bg: #f5efe5;
  --bg-strong: #efe2cf;
  --paper: #fffaf2;
  --ink: #1f1a17;
  --muted: #6b6259;
  --line: rgba(78, 57, 38, 0.14);
  --accent: #b95c2f;
  --accent-dark: #8a3f1a;
  --success: #5f8d4e;
  --warn: #b8742f;
  --error: #ae3f38;
  --shadow: 0 18px 50px rgba(72, 42, 16, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(233, 179, 95, 0.28), transparent 32%),
    radial-gradient(circle at top right, rgba(185, 92, 47, 0.16), transparent 24%),
    linear-gradient(180deg, #f7f1e8 0%, #f3eadf 42%, #f8f4ef 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.brand {
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 32px;
  letter-spacing: 0.02em;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
}

.page {
  display: grid;
  gap: 18px;
}

.hero,
.card,
.job-card {
  background: rgba(255, 250, 242, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero {
  border-radius: 28px;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.hero.compact {
  align-items: center;
}

.hero-copy h1,
.card h1,
.card h2,
.job-card h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  font-weight: 700;
}

.hero-copy p,
.card p,
.job-card p,
label span,
legend {
  color: var(--muted);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  margin: 0 0 10px;
}

.hero-actions,
.hero-actions.split {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.card.narrow {
  width: min(460px, 100%);
}

.stack {
  display: grid;
  gap: 14px;
}

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

label,
fieldset {
  display: grid;
  gap: 8px;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

input,
button,
.button-link,
.link-button {
  font: inherit;
}

input[type="text"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="file"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(83, 59, 37, 0.16);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

button,
.button-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 18px;
  border: none;
  cursor: pointer;
}

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

.secondary {
  background: rgba(185, 92, 47, 0.12);
  color: var(--accent-dark);
  border: 1px solid rgba(185, 92, 47, 0.18);
}

.danger {
  background: var(--error);
  color: white;
}

.secondary-danger {
  background: rgba(174, 63, 56, 0.12);
  color: var(--error);
  border: 1px solid rgba(174, 63, 56, 0.2);
}

.ghost,
.link-button {
  background: transparent;
  color: var(--muted);
}

.grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.job-card {
  padding: 20px;
  border-radius: 22px;
  display: grid;
  gap: 12px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

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

.job-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.job-date {
  font-size: 13px;
  color: var(--muted);
}

.progress-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.processing-card {
  display: grid;
  gap: 22px;
}

.processing-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.progress-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.progress-number {
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(56px, 8vw, 104px);
  line-height: 0.9;
  color: var(--accent-dark);
  letter-spacing: -0.04em;
}

.progress-number span {
  font-size: 0.42em;
  margin-left: 6px;
}

.progress-copy {
  display: grid;
  gap: 12px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.progress-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(185, 92, 47, 0.12);
  overflow: hidden;
}

.progress-track.large {
  height: 20px;
  background: linear-gradient(180deg, rgba(185, 92, 47, 0.12), rgba(185, 92, 47, 0.2));
  box-shadow: inset 0 1px 2px rgba(95, 59, 35, 0.1);
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #e69f4b 0%, #b95c2f 100%);
  transition: width 0.9s ease;
  position: relative;
}

.progress-fill.animated::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.45) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: progress-glow 1.8s linear infinite;
}

.processing-note {
  margin: 0;
}

.processing-details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.detail-chip {
  min-width: 150px;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
}

.detail-chip span {
  color: var(--muted);
  font-size: 13px;
}

.detail-chip strong {
  font-size: 18px;
  line-height: 1.25;
}

@keyframes progress-glow {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(180%);
  }
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(120, 106, 90, 0.12);
  color: var(--muted);
}

.status.completed {
  background: rgba(95, 141, 78, 0.14);
  color: var(--success);
}

.status.processing,
.status.queued {
  background: rgba(184, 116, 47, 0.14);
  color: var(--warn);
}

.status.failed {
  background: rgba(174, 63, 56, 0.12);
  color: var(--error);
}

.alert {
  border-radius: 16px;
  padding: 12px 14px;
  margin: 0;
}

.alert.error {
  background: rgba(174, 63, 56, 0.1);
  color: var(--error);
}

.alert.warn {
  background: rgba(184, 116, 47, 0.12);
  color: var(--warn);
}

.separator {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.separator::before,
.separator::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

.inline-form {
  margin-top: 12px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
}

.speaker-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.44);
}

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

.chip-button {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(185, 92, 47, 0.08);
  border: 1px solid rgba(185, 92, 47, 0.14);
  color: var(--accent-dark);
}

.samples {
  display: grid;
  gap: 8px;
}

.samples p {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.transcript-card {
  min-height: 420px;
}

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

.transcript {
  margin: 0;
  white-space: pre-wrap;
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}

.empty {
  text-align: center;
}

.danger-zone {
  border-color: rgba(174, 63, 56, 0.24);
}

.danger-zone p {
  margin-top: 0;
}

@media (max-width: 860px) {
  .topbar,
  .hero,
  .workspace,
  .two-cols {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .shell {
    width: min(100vw - 20px, 100%);
  }

  .progress-hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .processing-head {
    flex-direction: column;
    align-items: start;
  }
}
