*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  color: #3c3c43;
  background: #f2f2f7;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 16px 24px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.card {
  width: 100%;
  max-width: 450px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 24px 20px 28px;
  flex-shrink: 0;
}

.screen {
  display: none;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  animation: screen-in 0.35s ease;
}

.screen--active {
  display: flex;
}

.screen[hidden] {
  display: none !important;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f2f2f7;
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 28px;
  font-size: 13px;
  color: #3c3c43;
}

.alert-badge__icon {
  display: flex;
  color: #8e8e93;
  flex-shrink: 0;
}

.alert-badge__sep {
  color: #c7c7cc;
  margin: 0 2px;
}

.alert-badge strong {
  font-weight: 600;
  color: #34c759;
}

.hero-icon {
  margin: 0 auto 20px;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f2f2f7 0%, #ffffff 100%);
  border-radius: 20px;
}

.title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #000000;
  line-height: 1.25;
}

.title--sm {
  font-size: 20px;
  margin-bottom: 24px;
}

.text-accent {
  color: #ff3b30;
}

.subtitle {
  margin: 0 0 28px;
  font-size: 15px;
  color: #8e8e93;
  line-height: 1.5;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.98);
  opacity: 0.92;
}

.btn--full {
  width: 100%;
  min-height: 50px;
  padding: 14px 20px;
}

.btn--primary {
  background: #007aff;
  color: #ffffff;
}

.btn--cta {
  background: #007aff;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.45);
  animation: pulse-cta 2s ease-in-out infinite;
}

@keyframes pulse-cta {
  0%,
  100% {
    box-shadow: 0 4px 14px rgba(0, 122, 255, 0.45);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 6px 22px rgba(0, 122, 255, 0.55);
    transform: scale(1.02);
  }
}

.progress-wrap {
  margin-bottom: 20px;
}

.progress-bar {
  height: 8px;
  background: #e5e5ea;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #007aff, #5ac8fa);
  border-radius: 4px;
  transition: width 0.08s linear;
}

.progress-percent {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #007aff;
  font-variant-numeric: tabular-nums;
}

.scan-step {
  margin: 0;
  font-size: 14px;
  color: #8e8e93;
  min-height: 2.8em;
  transition: opacity 0.2s ease;
}

.warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.12) 0%, rgba(255, 59, 48, 0.1) 100%);
  border: 1px solid rgba(255, 149, 0, 0.35);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 15px;
  font-weight: 600;
  color: #c93400;
}

.warning-banner__icon {
  flex-shrink: 0;
  line-height: 1.3;
}

.metrics-card {
  background: #f9f9fb;
  border-radius: 16px;
  padding: 4px 0;
  margin-bottom: 20px;
  text-align: left;
}

.metric {
  padding: 14px 16px;
}

.metric__label {
  display: block;
  font-size: 13px;
  color: #8e8e93;
  margin-bottom: 4px;
}

.metric__value {
  font-size: 16px;
  font-weight: 600;
  color: #3c3c43;
}

.metric__value--danger {
  color: #ff3b30;
}

.metric__value--warning {
  color: #ff9500;
}

.metric__badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 59, 48, 0.12);
  color: #ff3b30;
  border-radius: 8px;
  vertical-align: middle;
}

.metric-divider {
  height: 1px;
  background: #e5e5ea;
  margin: 0 16px;
}

.results-copy {
  margin: 0 0 24px;
  font-size: 15px;
  color: #3c3c43;
  line-height: 1.5;
  text-align: left;
}

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

.site-footer {
  width: 100%;
  max-width: 450px;
  margin-top: 20px;
  padding: 20px 8px 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.55;
  color: #8e8e93;
}

.footer-nav {
  margin-bottom: 14px;
}

.footer-nav a {
  color: #007aff;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-nav__dot {
  margin: 0 6px;
  color: #c7c7cc;
}

.footer-entity {
  margin: 0 0 10px;
}

.footer-entity strong {
  color: #3c3c43;
  font-weight: 600;
}

.footer-copy {
  margin: 0 0 12px;
}

.footer-disclaimer {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: #aeaeb2;
}

/* Legal pages */
.legal-page {
  max-width: 450px;
  width: 100%;
}

.legal-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  padding: 24px 20px 28px;
  text-align: left;
}

.legal-card h1 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: #000;
  letter-spacing: -0.02em;
}

.legal-meta {
  margin: 0 0 20px;
  font-size: 13px;
  color: #8e8e93;
}

.legal-card h2 {
  margin: 22px 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: #3c3c43;
}

.legal-card p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: #3c3c43;
}

.legal-card a {
  color: #007aff;
  text-decoration: none;
}

.legal-card a:hover {
  text-decoration: underline;
}

.legal-back {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 15px;
  color: #007aff;
  text-decoration: none;
}

.legal-back:hover {
  text-decoration: underline;
}

@media (min-width: 481px) {
  body {
    background: #e5e5ea;
  }

  .page {
    justify-content: center;
  }
}
