* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: "Roboto", sans-serif;
  background: #f7f5f2;
  color: #1a1a1a;
}

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

button,
input,
a {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.audit-shell {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 18px 42px;
}

.audit-wrap {
  display: grid;
  gap: 22px;
}

.hero,
.tool-stage,
.support-band {
  position: relative;
  min-width: 0;
}

.hero {
  padding: 6px 2px 0;
}

.hero-copy {
  position: relative;
  display: grid;
  gap: 12px;
  max-width: 36rem;
}

.hero-copy::before {
  content: "";
  position: absolute;
  top: -24px;
  left: -8px;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(231, 224, 214, 0.82) 0%, rgba(247, 245, 242, 0) 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-title {
  margin: 0;
  font-size: clamp(3rem, 8vw, 4.1rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 500;
}

.hero-title span {
  display: block;
  white-space: nowrap;
}

.hero-subhead {
  margin: 0;
  max-width: 34rem;
  font-size: 18px;
  line-height: 1.45;
  color: #555;
}

.tool-stage {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(23, 23, 23, 0.06);
  border-radius: 28px;
  box-shadow: 0 18px 48px rgba(23, 23, 23, 0.04);
}

.tool-stage-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, rgba(235, 230, 221, 0.92), rgba(255, 255, 255, 0) 34%),
    radial-gradient(circle at bottom left, rgba(243, 239, 232, 0.9), rgba(255, 255, 255, 0) 34%);
}

.state-panel {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 26px 20px;
}

.state-panel[hidden] {
  display: none;
}

.state-panel-active {
  animation: panelRise 0.22s ease;
}

@keyframes panelRise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

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

.panel-copy,
.preview-header,
.support-band-copy {
  display: grid;
  gap: 8px;
}

.state-kicker,
.preview-label {
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #777;
}

.tool-title,
.support-title {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.25rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 500;
  color: #1a1a1a;
}

.support-title {
  max-width: 34rem;
}

.url-form,
.email-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

input {
  width: 100%;
  min-width: 0;
  min-height: 64px;
  border: 1px solid #e8e5df;
  border-radius: 22px;
  background: #fff;
  color: #1a1a1a;
  padding: 0 18px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder {
  color: #8b847b;
}

input:focus {
  border-color: #1a1a1a;
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 66px;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-position 0.2s ease;
}

.url-form .primary-button,
.email-form .primary-button {
  width: auto;
  min-width: 220px;
}

.primary-button {
  background: #111;
  color: #fff;
}

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

.primary-button:disabled {
  cursor: wait;
  opacity: 0.9;
  transform: none;
}

.primary-button.is-loading {
  background: linear-gradient(90deg, #111 0%, #2b2b2b 50%, #111 100%);
  background-size: 220% 100%;
  animation: buttonSweep 1.6s linear infinite;
}

.secondary-button {
  background: #f1efeb;
  color: #171717;
  border-color: rgba(23, 23, 23, 0.08);
}

.cta-link:link,
.cta-link:visited,
.primary-button:link,
.primary-button:visited,
.secondary-button:link,
.secondary-button:visited {
  text-decoration: none;
}

.form-message {
  grid-column: 1 / -1;
  min-height: 1.25rem;
  margin: -2px 0 0;
  font-size: 14px;
  line-height: 1.35;
  color: #b53d25;
}

.form-message.is-success {
  color: #555;
}

.state-loading {
  min-height: 320px;
  align-content: center;
}

.loading-visual {
  display: grid;
  gap: 12px;
}

.thinking-dots {
  display: inline-flex;
  gap: 8px;
}

.thinking-dots span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #111;
  opacity: 0.22;
  animation: thinkingPulse 1.05s infinite ease-in-out;
}

.thinking-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.thinking-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.thinking-track {
  position: relative;
  width: 100%;
  height: 2px;
  overflow: hidden;
  background: rgba(23, 23, 23, 0.08);
  border-radius: 999px;
}

.thinking-track-bar {
  position: absolute;
  inset: 0 auto 0 -35%;
  width: 35%;
  border-radius: inherit;
  background: #111;
  animation: thinkingSweep 1.55s ease-in-out infinite;
}

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

.loading-step {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
  line-height: 1.4;
  color: #7a746c;
}

.loading-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(23, 23, 23, 0.12);
  box-shadow: inset 0 0 0 1px rgba(23, 23, 23, 0.06);
}

.loading-step.is-active {
  color: #1a1a1a;
}

.loading-step.is-active::before {
  background: #111;
  box-shadow: 0 0 0 6px rgba(23, 23, 23, 0.06);
}

.state-preview {
  gap: 20px;
}

.preview-summary {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.preview-score-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.preview-score {
  font-size: 72px;
  line-height: 0.88;
  letter-spacing: -0.05em;
  font-weight: 500;
}

.preview-score-total {
  margin-bottom: 8px;
  font-size: 18px;
  color: #555;
}

.preview-status-wrap {
  display: grid;
  gap: 6px;
}

.preview-status {
  margin: 0;
  font-size: 28px;
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 500;
}

.preview-support,
.gate-copy,
.gate-reassurance,
.cta-copy,
.support-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.48;
  color: #555;
}

.preview-divider {
  width: 100%;
  height: 1px;
  background: rgba(23, 23, 23, 0.08);
}

.preview-findings-block {
  display: grid;
  gap: 10px;
}

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

.preview-findings li {
  padding: 14px 16px;
  border-radius: 18px;
  background: #faf8f4;
  border: 1px solid rgba(23, 23, 23, 0.05);
  font-size: 15px;
  line-height: 1.45;
}

.email-gate,
.delivery-success {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: #fcfbf9;
  border: 1px solid rgba(23, 23, 23, 0.06);
}

.email-gate-copy {
  display: grid;
  gap: 8px;
}

.gate-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 500;
}

.results-cta {
  display: grid;
  gap: 14px;
  padding: 6px 0 0;
}

.cta-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.support-band {
  display: grid;
  gap: 18px;
  padding: 24px 20px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.46));
  border: 1px solid rgba(23, 23, 23, 0.04);
}

.logo-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 18px;
  width: 100%;
}

.logo-item {
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.logo-item img {
  width: auto;
  max-width: 100%;
  max-height: 28px;
  object-fit: contain;
  object-position: center bottom;
}

.logo-item--gemini img {
  max-height: 26px;
  transform: translateY(-1px);
}

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

.support-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(23, 23, 23, 0.05);
}

.support-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 500;
}

@keyframes thinkingPulse {
  0%,
  100% {
    opacity: 0.22;
    transform: translateY(0);
  }

  50% {
    opacity: 0.95;
    transform: translateY(-1px);
  }
}

@keyframes thinkingSweep {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(390%);
  }
}

@keyframes buttonSweep {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -20% 0;
  }
}

@media (max-width: 640px) {
  .audit-shell {
    padding: 20px 14px 30px;
  }

  .audit-wrap {
    gap: 18px;
  }

  .hero {
    padding: 4px 0 0;
  }

  .hero-copy {
    gap: 10px;
  }

  .hero-title {
    font-size: clamp(2.35rem, 10vw, 3rem);
    line-height: 0.97;
  }

  .hero-subhead {
    max-width: none;
    font-size: 15px;
    line-height: 1.42;
  }

  .tool-stage {
    border-radius: 24px;
  }

  .state-panel {
    gap: 16px;
    padding: 22px 16px;
  }

  .tool-title,
  .support-title {
    font-size: 1.9rem;
    line-height: 1;
  }

  .url-form,
  .email-form {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .primary-button,
  .secondary-button {
    min-height: 62px;
    padding: 14px 16px;
    font-size: 15px;
  }

  .url-form .primary-button,
  .email-form .primary-button {
    width: 100%;
    min-width: 0;
  }

  .state-loading {
    min-height: 360px;
  }

  .loading-step {
    font-size: 14px;
  }

  .preview-summary {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .preview-score {
    font-size: 60px;
  }

  .preview-score-total {
    margin-bottom: 6px;
    font-size: 15px;
  }

  .preview-status {
    font-size: 24px;
  }

  .preview-findings li {
    padding: 13px 14px;
    border-radius: 16px;
  }

  .email-gate,
  .delivery-success {
    padding: 16px 14px;
    border-radius: 18px;
  }

  .gate-title {
    font-size: 22px;
  }

  .results-cta {
    padding-top: 4px;
  }

  .cta-actions,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .support-band {
    gap: 16px;
    padding: 22px 16px;
    border-radius: 24px;
  }

  .logo-row {
    gap: 12px;
    align-items: center;
  }

  .logo-item {
    min-height: 34px;
    align-items: center;
  }

  .logo-item img {
    max-height: 22px;
    object-position: center;
  }

  .logo-item--gemini img {
    max-height: 21px;
  }

  .support-card {
    padding: 16px 14px;
    border-radius: 18px;
  }

  .support-card h3 {
    font-size: 18px;
  }
}
