:root {
  --ink: #1a1a1a;
  --paper: #f9f7f2;
  --accent: #0057ff;
  --gray: #e5e5e5;
  --muted: #4b4b4b;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(var(--gray) 1px, transparent 1px),
    linear-gradient(90deg, var(--gray) 1px, transparent 1px);
  background-size: 96px 96px;
  min-height: 100vh;
  overflow-x: hidden;
}

.orb {
  display: none;
}

.orb--coral {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(242, 95, 76, 0.45) 0%, rgba(242, 95, 76, 0.05) 70%);
  top: -80px;
  right: 10%;
  animation-delay: -2s;
}

.orb--mint {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(156, 229, 211, 0.6) 0%, rgba(156, 229, 211, 0.05) 70%);
  bottom: -60px;
  left: 6%;
}

.grid-fade {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(26, 26, 26, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 26, 26, 0.05) 1px, transparent 1px);
  background-size: 96px 96px;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 32px 80px;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand__logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
}

.brand__name {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.topbar__links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
}

.topbar__links a {
  color: var(--ink);
  text-decoration: none;
}

button,
input,
select {
  font-family: inherit;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  margin-top: 64px;
  align-items: center;
}

.tool-mark {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--ink);
  font-weight: 700;
}

.hero__copy h1 {
  font-size: clamp(2rem, 3vw, 3.2rem);
  margin: 8px 0 16px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

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

.lede {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 24px;
}

.fanflow-line {
  margin: 0 0 24px;
  font-size: 0.95rem;
  color: var(--ink);
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.stat__value {
  font-weight: 700;
  margin: 0 0 4px;
}

.stat__label {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.panel {
  background: var(--white);
  border-radius: 4px;
  padding: 32px;
  border: 1px solid var(--gray);
}

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

.panel__title {
  margin: 0;
  font-weight: 600;
}

.panel__subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.status {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--gray);
}

.status--idle {
  background: var(--paper);
  color: var(--ink);
}

.status--busy {
  background: rgba(0, 87, 255, 0.12);
  color: var(--accent);
}

.status--ready {
  background: var(--ink);
  color: var(--paper);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.field span {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--accent);
}

.field input,
.field select {
  padding: 12px 14px;
  border-radius: 4px;
  border: 1px solid var(--ink);
  background: var(--white);
  font-size: 0.95rem;
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

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

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 16px 0 24px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--paper);
  border-radius: 4px;
  border: 1px solid var(--gray);
  font-size: 0.9rem;
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.primary,
.ghost {
  border: 1px solid var(--ink);
  padding: 12px 20px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.primary:hover {
  transform: translateY(-1px);
  background: var(--ink);
  border-color: var(--ink);
}

.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.ghost {
  background: var(--white);
  color: var(--ink);
}

.progress {
  margin-top: 24px;
  height: 6px;
  background: var(--gray);
  border-radius: 0;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.3s ease;
}

.result {
  margin-top: 24px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--paper);
  border-radius: 4px;
  border: 1px solid var(--gray);
}

.result__title {
  margin: 0;
  font-weight: 600;
}

.result__meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  margin-top: 88px;
  align-items: center;
}

.steps {
  display: grid;
  gap: 16px;
}

.step {
  padding: 16px;
  background: var(--white);
  border-radius: 4px;
  border: 1px solid var(--gray);
  animation: rise 0.6s ease forwards;
}

.step__num {
  margin: 0;
  font-weight: 700;
  color: var(--accent);
}

.formats,
.queue {
  margin-top: 80px;
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.format-grid article {
  padding: 16px;
  border-radius: 4px;
  background: var(--white);
  border: 1px solid var(--gray);
  transition: transform 0.2s ease;
}

.format-grid article:hover {
  transform: translateY(-2px);
}

.queue__list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.queue__item,
.queue__empty {
  padding: 16px;
  border-radius: 4px;
  background: var(--white);
  border: 1px solid var(--gray);
}

.queue__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer {
  margin-top: 88px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--gray);
}

.footer__title {
  margin: 0;
  font-weight: 600;
}

.footer__text {
  margin: 8px 0 0;
  color: var(--muted);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(18px);
  }
}

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

@media (max-width: 860px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar__links {
    flex-wrap: wrap;
  }

  .panel {
    padding: 22px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
