:root {
  --ink: #101422;
  --muted: #5c6478;
  --accent: #ff6f3d;
  --accent-deep: #e1562d;
  --accent-cool: #1b8df2;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --border: rgba(16, 20, 34, 0.12);
  --shadow: 0 24px 60px rgba(16, 20, 34, 0.18);
  --radius: 24px;
  --font-sans: "Space Grotesk", sans-serif;
  --font-display: "Fraunces", serif;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 196, 173, 0.4), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(27, 141, 242, 0.18), transparent 45%),
    linear-gradient(135deg, #fff6ef 0%, #f1f5ff 45%, #f7f7f3 100%);
  min-height: 100vh;
}

.page {
  position: relative;
  overflow: hidden;
}

.page::before,
.page::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  opacity: 0.2;
  z-index: 0;
}

.page::before {
  background: #ff6f3d;
  top: -120px;
  right: -120px;
}

.page::after {
  background: #1b8df2;
  bottom: -140px;
  left: -120px;
}

.hero,
.workspace {
  position: relative;
  z-index: 1;
}

.hero {
  padding: 4.5rem 0 2.5rem;
}

.hero-shell {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  align-items: center;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.6rem);
  margin-bottom: 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--muted);
}

.lede {
  font-size: 1.1rem;
  color: var(--muted);
}

.hero-panel {
  background: var(--surface-strong);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(16, 20, 34, 0.08);
}

.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.pill {
  background: rgba(255, 111, 61, 0.18);
  color: var(--accent-deep);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status {
  font-size: 0.85rem;
  color: #2b7a4b;
}

.btn.btn-ghost {
  background: transparent;
  border: 1px solid rgba(31, 41, 55, 0.2);
  color: #0f2444;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 400;
  font-family: inherit;
}

.btn.btn-ghost:hover {
  border-color: rgba(31, 41, 55, 0.4);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat {
  font-size: 1.4rem;
  font-weight: 600;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.workspace {
  padding-bottom: 4rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.grid > .card {
  height: 100%;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid rgba(16, 20, 34, 0.08);
  box-shadow: 0 12px 40px rgba(16, 20, 34, 0.1);
}

.section-gap {
  margin-top: 2.5rem;
}

.instructions ul {
  padding-left: 1.1rem;
  color: var(--muted);
}

.instructions li {
  margin-bottom: 0.5rem;
}

.sku-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.sku-form textarea,
.sku-form input,
.sku-form select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 0.9rem 1rem;
  font-size: 1rem;
  background: var(--surface-strong);
}

.sku-form textarea {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  min-height: 180px;
  resize: vertical;
}

.field-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.field-row > div {
  flex: 1 1 160px;
}

.field-row-gap {
  margin-bottom: 1rem;
}

.btn-primary {
  background: var(--accent);
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(255, 111, 61, 0.3);
}

.btn-primary:hover {
  background: var(--accent-deep);
}

.btn-secondary {
  background: rgba(16, 20, 34, 0.08);
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 999px;
  color: var(--ink);
}

.btn-secondary:hover {
  background: rgba(16, 20, 34, 0.15);
}

.action-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.hint {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.preview-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.preview-container {
  display: grid;
  gap: 1.5rem;
  justify-items: center;
}

.raw-data {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 16px;
  padding: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.5;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.preview-slide {
  position: relative;
  width: 100%;
  max-width: 1200px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(16, 20, 34, 0.12);
}

.preview-slide * {
  box-sizing: border-box;
}

.clone-text {
  position: absolute;
  white-space: pre-line;
}

.clone-pill {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clone-image-box {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.clone-image-box img {
  display: block;
}

.clone-size-box {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
}
}

.output {
  margin-top: 0;
}

.output-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.status-badge {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(27, 141, 242, 0.15);
  color: #1b58a6;
}

.status-badge[data-tone="success"] {
  background: rgba(42, 157, 106, 0.18);
  color: #2a6b4d;
}

.status-badge[data-tone="error"] {
  background: rgba(220, 38, 38, 0.16);
  color: #9f1d1d;
}

.status-badge[data-tone="warn"] {
  background: rgba(245, 158, 11, 0.2);
  color: #9a5a06;
}

.results {
  min-height: 48px;
}

.muted {
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: reveal 0.8s ease forwards;
}

.delay-1 {
  animation-delay: 0.15s;
}

.delay-2 {
  animation-delay: 0.3s;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .hero {
    padding-top: 3rem;
  }

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
