:root {
  --bg-0: #07121e;
  --bg-1: #0d1b2c;
  --bg-2: #132943;
  --surface: rgba(11, 24, 39, 0.84);
  --surface-strong: rgba(14, 28, 47, 0.96);
  --surface-soft: rgba(255, 255, 255, 0.04);
  --stroke: rgba(159, 214, 255, 0.14);
  --text: #eef7ff;
  --text-soft: #a8bbcd;
  --text-muted: #708398;
  --accent: #67dfff;
  --accent-strong: #1db4ff;
  --accent-warm: #ffba52;
  --danger: #ff8f8f;
  --success: #8df0b1;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: 'Hanken Grotesk', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(103, 223, 255, 0.1), transparent 30%),
    radial-gradient(circle at 90% 0%, rgba(255, 186, 82, 0.08), transparent 22%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1));
}

a,
button,
input,
select,
textarea {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.wrap {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(7, 18, 30, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.brand span {
  color: var(--accent);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.nav a {
  color: var(--text-soft);
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
}

.hero {
  padding: 72px 0 42px;
}

.hero-grid,
.workspace-grid,
.info-grid {
  display: grid;
  gap: 24px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid rgba(103, 223, 255, 0.18);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.88rem;
}

.eyebrow::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}

.eyebrow-soft {
  margin-bottom: 10px;
  color: var(--accent-warm);
  border-color: rgba(255, 186, 82, 0.18);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: 'Bricolage Grotesque', sans-serif;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(2.7rem, 5.1vw, 5rem);
  line-height: 0.98;
  max-width: 12ch;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.9rem);
  line-height: 1.04;
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.9rem);
}

p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.72;
}

.hero-copy > p {
  max-width: 60ch;
  margin-top: 18px;
  font-size: 1.06rem;
}

.hero-actions,
.cta-row,
.preset-row,
.provider-pills,
.disclaimer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 24px;
}

.btn-primary,
.btn-secondary,
.ghost-button,
.preset-chip {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #02131f;
}

.btn-secondary,
.ghost-button,
.preset-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.btn-primary:hover,
.btn-secondary:hover,
.ghost-button:hover,
.preset-chip:hover {
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

.hero-metrics {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.metric-card,
.hero-panel,
.panel,
.eta-box,
.result-figure,
.status-card,
.result-card,
.error-card {
  border: 1px solid var(--stroke);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  border-radius: 18px;
  padding: 18px;
}

.metric-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.hero-panel {
  min-height: 100%;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(160deg, rgba(16, 34, 56, 0.94), rgba(9, 20, 33, 0.92)),
    radial-gradient(circle at top right, rgba(29, 180, 255, 0.18), transparent 30%);
}

.hero-panel-content {
  display: grid;
  gap: 18px;
  padding: 28px;
}

.hero-panel-kicker {
  color: var(--accent);
  font-weight: 600;
}

.hero-list,
.flow-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
  color: var(--text-soft);
  line-height: 1.7;
}

.provider-pills span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 0.92rem;
}

.workspace-section {
  padding: 0 0 36px;
}

.workspace-grid {
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  align-items: start;
}

.panel,
.status-card,
.result-card,
.error-card {
  border-radius: var(--radius-xl);
}

.panel {
  padding: 24px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 20px;
}

.panel-note {
  max-width: 28ch;
  font-size: 0.94rem;
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 22px;
  overflow: hidden;
  border: 1px dashed rgba(103, 223, 255, 0.3);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at top, rgba(103, 223, 255, 0.12), transparent 35%);
  cursor: pointer;
}

.dropzone.is-dragover {
  border-color: rgba(255, 186, 82, 0.5);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    radial-gradient(circle at top, rgba(255, 186, 82, 0.15), transparent 38%);
}

.dropzone-copy {
  display: grid;
  gap: 8px;
  text-align: center;
  color: var(--text-soft);
}

.dropzone-copy strong {
  color: var(--text);
  font-size: 1.08rem;
}

.dropzone img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 18px;
}

.input-meta,
.status-meta,
.result-facts,
.disclaimer {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

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

.field span {
  color: var(--text);
  font-weight: 600;
}

textarea,
select,
input[type='range'] {
  width: 100%;
}

textarea,
select {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 14px 16px;
}

textarea {
  min-height: 136px;
  resize: vertical;
}

select {
  min-height: 52px;
}

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

.field small {
  color: var(--text-soft);
}

.status-empty {
  color: var(--text-soft);
  border-radius: 24px;
  padding: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.status-card,
.result-card,
.error-card {
  margin-top: 18px;
  padding: 20px;
}

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

.status-badge,
.status-provider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 600;
}

.status-badge {
  background: rgba(103, 223, 255, 0.12);
  color: var(--accent);
}

.status-provider {
  background: rgba(255, 186, 82, 0.12);
  color: var(--accent-warm);
}

.status-title {
  margin-top: 14px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.24rem;
}

.status-detail {
  margin-top: 6px;
}

.eta-grid,
.compare-grid,
.info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.eta-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.eta-box {
  border-radius: 18px;
  padding: 16px;
}

.eta-box span,
.eta-box small {
  color: var(--text-muted);
}

.eta-box strong {
  display: block;
  margin: 8px 0 6px;
  color: var(--text);
  font-size: 1.4rem;
}

.progress-track {
  height: 10px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-bar {
  width: 18%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 0.2s ease;
}

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

.ghost-button {
  min-height: 42px;
  padding: 0 16px;
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.compare-grid {
  display: grid;
  gap: 14px;
}

.result-figure {
  border-radius: 24px;
  overflow: hidden;
}

.result-figure figcaption {
  padding: 14px 16px;
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.result-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.result-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.result-facts span {
  display: block;
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.error-card {
  color: var(--danger);
  background: rgba(93, 18, 24, 0.28);
  border-color: rgba(255, 143, 143, 0.22);
}

.info-section {
  padding: 0 0 80px;
}

.info-grid {
  display: grid;
  gap: 24px;
}

.info-panel {
  min-height: 100%;
}

@media (max-width: 980px) {
  .hero-grid,
  .workspace-grid,
  .info-grid,
  .controls-grid,
  .compare-grid,
  .hero-metrics,
  .result-facts {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .panel-head,
  .result-head,
  .status-meta,
  .status-topline {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(100% - 24px, 1220px);
  }

  .hero {
    padding-top: 48px;
  }

  .panel,
  .status-card,
  .result-card,
  .error-card {
    padding: 18px;
  }

  .dropzone {
    min-height: 240px;
    padding: 14px;
  }

  h1 {
    max-width: none;
  }
}
