:root {
  color-scheme: light;
  --bg: #eef4ff;
  --card: #ffffff;
  --ink: #101828;
  --muted: #5f6b7a;
  --primary: #1167ff;
  --primary-dark: #0647bd;
  --accent: #17b26a;
  --warning: #f79009;
  --line: #d9e4f5;
  --shadow: 0 20px 60px rgba(16, 24, 40, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  padding-bottom: 86px;
  font-family: "Inter", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(17, 103, 255, 0.24), transparent 34rem),
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%);
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 10px;
  transition: filter 300ms ease, opacity 300ms ease;
}

body.has-savings-result::before {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: rgba(16, 24, 40, 0.42);
  content: "";
}

body.has-savings-result .page-shell {
  filter: blur(8px);
  opacity: 0.72;
  pointer-events: none;
}

.card {
  border: 1px solid rgba(217, 228, 245, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
}

.hero-card::after {
  position: absolute;
  inset: auto -48px -86px auto;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(23, 178, 106, 0.12);
  content: "";
}

.brand-logo {
  display: block;
  width: min(199px, 64vw);
  height: auto;
  margin: 0 auto 12px;
  object-fit: contain;
}

.trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  padding: 7px 10px;
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-size: 0.76rem;
  font-weight: 700;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(23, 178, 106, 0.16);
}

.eyebrow {
  margin: 18px 0 7px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.prefill-card {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
}

.prefill-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(207, 224, 246, 0.85);
  background: rgba(255, 255, 255, 0.72);
}

.prefill-card span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.prefill-card strong {
  color: var(--ink);
  font-size: 0.86rem;
  text-align: right;
}

.prefill-card strong.is-missing {
  color: #d92d20;
}

.prefill-card b {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 10px;
  font-size: clamp(1.9rem, 9.4vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.subhead {
  max-width: 680px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.42;
}

.status-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 247, 255, 0.96) 100%);
}

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

.status-header span,
.queue-box span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.status-header strong {
  color: var(--warning);
  font-size: 0.86rem;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbeafe;
}

.progress-track span {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  transition: width 800ms ease;
}

.queue-grid {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 10px;
}

.queue-box {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 15px;
  border: 1px solid rgba(207, 224, 246, 0.85);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
}

.queue-box strong {
  color: var(--primary);
  font-size: clamp(1.28rem, 6.75vw, 2rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.queue-box strong.is-reviewing {
  font-size: clamp(1rem, 5vw, 1.35rem);
  letter-spacing: -0.02em;
}

.eta-box span {
  font-size: 0.68rem;
}

.eta-box strong {
  color: var(--accent);
  font-size: clamp(1.28rem, 6.75vw, 2rem);
}

.queue-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.42;
}

.loading-buffer {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 9;
  display: grid;
  grid-template-columns: auto 1fr;
  width: min(calc(100% - 28px), 420px);
  gap: 12px;
  align-items: center;
  padding: 22px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(17, 103, 255, 0.25);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(16, 24, 40, 0.28);
}

.loading-buffer[hidden] {
  display: none;
}

.loader-ring {
  width: 46px;
  height: 46px;
  border: 4px solid #dbeafe;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

.loading-buffer strong {
  display: block;
  color: var(--ink);
  font-size: 1.02rem;
}

.loading-buffer p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.buffer-track {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbeafe;
}

.buffer-track span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  transform-origin: left;
  animation: fillBuffer 6s linear forwards;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fillBuffer {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.savings-result {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 9;
  display: grid;
  width: min(calc(100% - 28px), 420px);
  gap: 10px;
  padding: 22px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(23, 178, 106, 0.35);
  border-radius: 24px;
  background: linear-gradient(180deg, #ecfdf3 0%, #ffffff 100%);
  box-shadow: 0 28px 80px rgba(16, 24, 40, 0.28);
  text-align: center;
}

.savings-result[hidden] {
  display: none;
}

.savings-result span {
  color: #067647;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.savings-result strong {
  color: #067647;
  font-size: clamp(2.4rem, 14vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.savings-result p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.42;
}

.claim-cta {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(180deg, var(--accent), #079455);
  box-shadow: 0 14px 30px rgba(23, 178, 106, 0.28);
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
}

.primary-cta {
  display: inline-flex;
  width: 100%;
  min-height: 60px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  box-shadow: 0 14px 28px rgba(17, 103, 255, 0.28);
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.primary-cta.is-disabled {
  pointer-events: none;
  background: linear-gradient(180deg, #98a2b3, #667085);
  box-shadow: none;
  cursor: not-allowed;
}

.primary-cta {
  position: fixed;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 3;
  width: auto;
}

.primary-cta:active {
  transform: translateY(1px);
}

.microcopy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

@media (min-width: 780px) {
  body {
    padding-bottom: 0;
  }

  .page-shell {
    padding: 42px;
  }

  .card {
    border-radius: 28px;
  }

  .hero-card {
    padding: 42px;
  }

  .brand-logo {
    width: min(274px, 84vw);
    margin: 0 auto 18px;
  }

  .trust-strip {
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  .eyebrow {
    margin: 26px 0 8px;
    font-size: 0.82rem;
  }

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

  .prefill-card div {
    display: grid;
    align-content: center;
    justify-content: stretch;
  }

  .prefill-card strong {
    text-align: left;
  }

  h1 {
    margin-bottom: 14px;
    font-size: clamp(2.1rem, 8vw, 4.8rem);
    line-height: 0.94;
    letter-spacing: -0.07em;
  }

  .subhead {
    margin-bottom: 24px;
    font-size: clamp(1rem, 2.8vw, 1.28rem);
    line-height: 1.5;
  }

  .status-panel {
    gap: 16px;
    margin: 0 0 20px;
    padding: 18px;
    border-radius: 22px;
  }

  .status-panel {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }

  .status-header {
    grid-column: 1;
  }

  .status-header span,
  .queue-box span {
    font-size: 0.9rem;
  }

  .status-header strong {
    font-size: 0.94rem;
  }

  .progress-track,
  .queue-copy {
    grid-column: 1;
  }

  .queue-grid {
    grid-row: 1 / span 3;
    grid-column: 2;
    grid-template-columns: 1fr;
  }

  .queue-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px;
    border-radius: 18px;
  }

  .queue-box strong {
    font-size: clamp(1.35rem, 5.25vw, 2.18rem);
  }

  .queue-box strong.is-reviewing {
    font-size: clamp(1.1rem, 3.8vw, 1.6rem);
  }

  .eta-box span {
    font-size: 0.72rem;
  }

  .eta-box strong {
    font-size: clamp(1.35rem, 5.25vw, 2.18rem);
  }

  .queue-copy {
    font-size: 1rem;
    line-height: 1.5;
  }

  .loading-buffer {
    width: min(100% - 48px, 460px);
    padding: 28px;
  }

  .savings-result {
    width: min(100% - 48px, 460px);
    padding: 28px;
  }

  .primary-cta {
    position: static;
    width: auto;
    min-width: 310px;
    padding: 0 28px;
  }

  .microcopy {
    width: 310px;
    font-size: 0.88rem;
  }

}
