:root {
  --bg: #f4efe6;
  --panel: rgba(255, 252, 247, 0.88);
  --ink: #1f2520;
  --muted: #5f675f;
  --line: rgba(31, 37, 32, 0.1);
  --accent: #c94f2d;
  --accent-dark: #97381e;
  --shadow: 0 20px 70px rgba(35, 28, 20, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(201, 79, 45, 0.2), transparent 30%),
    linear-gradient(135deg, #efe6d5 0%, #f7f4ed 50%, #e6efe8 100%);
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
  display: grid;
  gap: 24px;
  align-items: start;
}

.hero,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero {
  padding: 32px;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--accent-dark);
}

h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 0.95;
}

.lead {
  max-width: 700px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.chips span {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.card {
  padding: 28px;
}

form {
  display: grid;
  gap: 14px;
}

.status {
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.5;
  border: 1px solid var(--line);
}

.status-idle {
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.status-loading {
  background: rgba(223, 127, 47, 0.12);
  color: #7d4317;
  border-color: rgba(201, 79, 45, 0.25);
}

.status-success {
  background: rgba(70, 134, 87, 0.12);
  color: #1f5e30;
  border-color: rgba(70, 134, 87, 0.28);
}

.status-error {
  background: rgba(181, 47, 47, 0.09);
  color: #8d2323;
  border-color: rgba(181, 47, 47, 0.22);
}

.progress-panel {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.progress-hidden {
  display: none;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(31, 37, 32, 0.08);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0%, #df7f2f 100%);
  transition: width 0.35s ease;
}

.progress-fill.progress-indeterminate {
  width: 55%;
  background:
    linear-gradient(
      90deg,
      rgba(201, 79, 45, 0.75) 0%,
      rgba(223, 127, 47, 1) 45%,
      rgba(201, 79, 45, 0.75) 100%
    );
  background-size: 220% 100%;
  animation: progress-slide 1.2s linear infinite;
}

.progress-fill.progress-complete {
  background: linear-gradient(90deg, #2f8f53 0%, #5aaa63 100%);
}

.progress-hint {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

@keyframes progress-slide {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -20% 0;
  }
}

.preview {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}

.preview-hidden {
  display: none;
}

.preview img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 16px;
  background: #e8e0d0;
}

.preview-copy {
  display: grid;
  align-content: start;
  gap: 8px;
}

.preview-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--accent-dark);
}

.preview h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.preview-meta,
.preview-ready {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

label {
  font-weight: 600;
}

input,
select,
button {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 14px 16px;
  font-size: 16px;
}

input,
select {
  background: rgba(255, 255, 255, 0.85);
}

button {
  margin-top: 6px;
  cursor: pointer;
  color: white;
  border: none;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent) 0%, #df7f2f 100%);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 12px 30px rgba(201, 79, 45, 0.28);
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  transform: none;
  opacity: 0.55;
  box-shadow: none;
}

.secondary-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  box-shadow: none;
}

.note {
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.5;
}

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

@media (max-width: 700px) {
  .shell {
    padding-top: 20px;
  }

  .hero,
  .card {
    padding: 20px;
    border-radius: 20px;
  }

  .preview {
    grid-template-columns: 1fr;
  }

  .preview img {
    height: 180px;
  }
}
