:root {
  --bg: #f7f8fb;
  --bg-strong: #eceff5;
  --surface: #ffffff;
  --surface-soft: #f9fafc;
  --ink: #111827;
  --ink-soft: #283449;
  --muted: #677285;
  --muted-strong: #4b5567;
  --line: #dde3ec;
  --line-strong: #c5cedb;
  --accent: #1f4fd8;
  --accent-strong: #173aa3;
  --accent-soft: #eaf0ff;
  --green: #126c5a;
  --green-soft: #e4f3ee;
  --amber: #8c5b12;
  --amber-soft: #fff3dc;
  --red: #b42318;
  --red-soft: #ffe7e4;
  --dark: #0d1320;
  --dark-2: #151d2b;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(18, 23, 34, 0.06);
  --shadow-md: 0 16px 40px rgba(18, 23, 34, 0.12);
  --container: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.container {
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  color: var(--ink);
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #0d1320, var(--accent));
  box-shadow: var(--shadow-sm);
}

.brand-mark::before {
  content: "Q";
  font-size: 0.92rem;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links a {
  color: var(--muted-strong);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
  background: var(--bg-strong);
  outline: none;
}

.btn,
.button,
button.btn {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  color: #ffffff;
  background: var(--accent);
  text-decoration: none;
  font-weight: 760;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.btn:hover,
.button:hover,
button.btn:hover {
  background: var(--accent-strong);
}

.btn.secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-strong);
}

.btn.secondary:hover {
  background: var(--bg-strong);
}

.btn.ghost {
  color: var(--muted-strong);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.btn.ghost:hover {
  color: var(--ink);
  background: var(--bg-strong);
}

.nav-links a.btn:not(.ghost) {
  color: #ffffff;
  background: var(--accent);
}

.nav-links a.btn:not(.ghost):hover,
.nav-links a.btn:not(.ghost):focus-visible {
  color: #ffffff;
  background: var(--accent-strong);
}

.hero-scene {
  position: relative;
  min-height: 76svh;
  overflow: hidden;
  color: #ffffff;
  background: var(--dark);
  display: grid;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 19, 32, 0.96), rgba(13, 19, 32, 0.74) 54%, rgba(13, 19, 32, 0.38)),
    linear-gradient(180deg, rgba(31, 79, 216, 0.20), rgba(18, 108, 90, 0.10));
  pointer-events: none;
}

.hero-scene canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
  padding: 72px 0 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 720;
}

.hero-copy h1 {
  margin: 22px 0 18px;
  font-size: 4.35rem;
  line-height: 0.95;
  color: #ffffff;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 600px;
  margin: 0;
  color: rgba(255, 255, 255, 0.80);
  font-size: 1.18rem;
  line-height: 1.7;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-note {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.88rem;
}

.metric-band {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.metric {
  min-height: 116px;
  padding: 24px;
  background: var(--surface);
}

.metric strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 1.75rem;
  line-height: 1;
}

.metric span {
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  padding: 76px 0;
}

.section.alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 720px;
  margin-bottom: 32px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: 2.2rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.section-head p,
.lead {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.panel,
.plan,
.legal-panel,
.operator-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.panel {
  padding: 24px;
}

.panel h3,
.plan h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1rem;
}

.panel p,
.plan p {
  margin: 0;
  color: var(--muted);
}

.numbered {
  counter-reset: steps;
}

.numbered .panel {
  position: relative;
  padding-left: 76px;
}

.numbered .panel::before {
  counter-increment: steps;
  content: counter(steps);
  position: absolute;
  left: 24px;
  top: 24px;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 850;
}

.split {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 36px;
  align-items: start;
}

.evidence-list {
  display: grid;
  gap: 10px;
}

.evidence-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.green {
  color: var(--green);
  background: var(--green-soft);
}

.status-pill.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-pill.blue {
  color: var(--accent);
  background: var(--accent-soft);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.plan {
  min-height: 100%;
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.plan.featured {
  border-color: rgba(51, 92, 255, 0.44);
  box-shadow: var(--shadow-md);
}

.plan-label {
  width: fit-content;
  margin-bottom: 18px;
  color: var(--accent);
  background: var(--accent-soft);
}

.price {
  margin: 14px 0 4px;
  color: var(--ink);
  font-size: 2.45rem;
  line-height: 1;
  font-weight: 850;
}

.price-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.payment-status {
  width: fit-content;
  max-width: 100%;
  min-height: 34px;
  margin: 18px auto 0;
  padding: 7px 12px;
  color: var(--muted-strong);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 720;
}

.payment-status[data-state="ready"] {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(8, 122, 99, 0.24);
}

.payment-status[data-state="error"] {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(180, 35, 24, 0.24);
}

.payment-status[data-state="fallback"] {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(169, 107, 0, 0.24);
}

.btn.is-loading {
  opacity: 0.78;
  pointer-events: none;
}

.plan ul {
  padding: 0;
  margin: 24px 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.plan li {
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.plan li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--green);
  vertical-align: 1px;
}

.plan .btn {
  margin-top: auto;
}

.faq {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-item {
  padding: 22px 24px;
  background: var(--surface);
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
}

.final-cta {
  color: #ffffff;
  background: var(--dark);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.final-cta h2,
.final-cta p {
  color: #ffffff;
}

.final-cta p {
  color: rgba(255, 255, 255, 0.74);
}

.site-footer {
  padding: 32px 0;
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 14px;
}

.footer-links a {
  color: var(--muted-strong);
  text-decoration: none;
}

.legal-layout {
  padding: 56px 0 80px;
}

.legal-panel {
  max-width: 820px;
  margin: 0 auto;
  padding: 44px;
}

.legal-panel h1 {
  margin: 0;
  color: var(--ink);
  font-size: 2.35rem;
}

.legal-panel h2 {
  margin-top: 32px;
  font-size: 1.08rem;
}

.legal-panel p,
.legal-panel li {
  color: var(--muted-strong);
}

.legal-panel a {
  color: var(--accent);
}

.updated {
  color: var(--muted);
  font-size: 0.9rem;
}

.app-body {
  min-height: 100vh;
  background: var(--bg);
}

.operator-shell {
  min-height: 100vh;
}

.operator-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.operator-main {
  width: min(100% - 40px, 1320px);
  margin: 0 auto;
  padding: 28px 0 56px;
}

.operator-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.operator-hero > .status-pill {
  justify-self: start;
}

.operator-hero h1 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 2rem;
}

.operator-hero p {
  margin: 0;
  color: var(--muted);
}

.operator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 18px;
  align-items: start;
}

.operator-card {
  padding: 22px;
}

.operator-card + .operator-card {
  margin-top: 18px;
}

.operator-card h2,
.operator-card h3 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted-strong);
  font-size: 0.83rem;
  font-weight: 760;
}

.field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
}

.field input:focus {
  border-color: rgba(51, 92, 255, 0.75);
  box-shadow: 0 0 0 4px rgba(51, 92, 255, 0.12);
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.upload-zone {
  min-height: 184px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 20px;
  text-align: left;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  cursor: pointer;
}

.upload-zone:hover,
.upload-zone.drag {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upload-zone input {
  display: none;
}

.upload-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 850;
}

.upload-zone strong {
  color: var(--ink);
}

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

.file-list {
  min-height: 22px;
  color: var(--green);
  font-size: 0.83rem;
  font-weight: 720;
}

.run-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.progress-wrap {
  display: none;
}

.progress-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-strong);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--green));
  transition: width 220ms ease;
}

.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted-strong);
  font-size: 0.88rem;
}

.result-grid {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.result-stat {
  min-height: 86px;
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.result-stat strong {
  display: block;
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1;
}

.result-stat span {
  color: var(--muted);
  font-size: 0.82rem;
}

.download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.dl-btn {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 0 13px;
  color: var(--ink);
  background: var(--surface);
  font-weight: 760;
  cursor: pointer;
}

.dl-btn:hover {
  background: var(--bg-strong);
}

.review-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.review-item {
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.review-item strong {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
}

.review-item span {
  display: block;
  margin-top: 4px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 760;
}

.cover-letter {
  max-height: 250px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--muted-strong);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 0.9rem;
}

.error-msg {
  display: none;
  margin-top: 14px;
  padding: 14px;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid rgba(180, 35, 24, 0.25);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

.checklist {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  gap: 10px;
  color: var(--muted-strong);
  font-size: 0.9rem;
}

.checklist li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
}

.empty-state {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .hero-copy h1 {
    font-size: 3.1rem;
  }

  .metric-grid,
  .grid-2,
  .grid-3,
  .plan-grid,
  .split,
  .operator-grid,
  .field-grid,
  .upload-grid {
    grid-template-columns: 1fr;
  }

  .operator-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .container,
  .operator-main {
    width: min(100% - 28px, var(--container));
  }

  .nav-inner,
  .footer-inner,
  .operator-header,
  .run-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px 6px;
    justify-content: flex-start;
    overflow: visible;
  }

  .nav-links a {
    padding-inline: 8px;
  }

  .site-nav .nav-links a[href="#process"],
  .site-nav .nav-links a[href="#deliverables"] {
    display: none;
  }

  .hero-scene {
    min-height: 72svh;
  }

  .hero-copy {
    padding: 52px 0 42px;
  }

  .hero-copy h1 {
    font-size: 2.5rem;
  }

  .hero-copy p {
    font-size: 1rem;
  }

  .section {
    padding: 56px 0;
  }

  h2 {
    font-size: 1.65rem;
  }

  .legal-panel {
    padding: 28px;
  }

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