*, *::before, *::after { box-sizing: border-box; }

html {
  background: #080f1e;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #080f1e;
  color: #cbd5e1;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
svg { flex-shrink: 0; }

.text-gradient {
  background: linear-gradient(120deg, #60a5fa 0%, #3b82f6 60%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar {
  background: rgba(8, 15, 30, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.12);
  transition: border-color 0.3s;
}

.navbar.scrolled { border-bottom-color: rgba(59, 130, 246, 0.22); }

.glass-card {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(59, 130, 246, 0.13);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(59, 130, 246, 0.28);
  box-shadow: 0 4px 32px rgba(59, 130, 246, 0.08);
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.45);
}

.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  border: 1.5px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  font-weight: 600;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.btn-outline:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.btn-primary, .btn-outline {
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: transparent;
  padding: 0.4rem 0.7rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.btn-login:hover {
  color: #e2e8f0;
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.08);
}

.form-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid rgba(59, 130, 246, 0.18);
  color: #e2e8f0;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  min-height: 44px;
}

.form-input::placeholder { color: #475569; }

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.chip {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
}

#mobile-nav {
  transition: max-height 0.35s ease, opacity 0.3s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

#mobile-nav.open { max-height: 640px; opacity: 1; }

.page-hero {
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(37, 99, 235, 0.18) 0%, transparent 65%),
    #080f1e;
}

.section-divider {
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.25), transparent);
  height: 1px;
  width: 100%;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
}

.guide-table th,
.guide-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  text-align: left;
  vertical-align: top;
}

.guide-table th {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.guide-table tbody tr:last-child td { border-bottom: none; }

.choice-grid {
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.choice-option {
  position: relative;
}

.choice-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choice-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1.5px solid rgba(59, 130, 246, 0.18);
  background: rgba(15, 23, 42, 0.55);
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.choice-option input:focus-visible + label {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.choice-option input:checked + label {
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(37, 99, 235, 0.18);
  color: #fff;
}

.validity-grid {
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .validity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.speed-override-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .speed-override-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.step-panel[hidden] { display: none !important; }

.form-error {
  color: #fca5a5;
  font-size: 0.875rem;
}

.recommend-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #bfdbfe;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
}

#consent-dialog {
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 1rem;
  padding: 0;
  background: rgba(15, 23, 42, 0.98);
  color: #cbd5e1;
  max-width: 32rem;
  width: calc(100% - 2rem);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

#consent-dialog::backdrop {
  background: rgba(8, 15, 30, 0.72);
}

.consent-inner { padding: 1.5rem; }

.wa-fab {
  position: fixed;
  bottom: max(16px, calc(env(safe-area-inset-bottom) + 8px));
  right: max(16px, calc(env(safe-area-inset-right) + 8px));
  z-index: 999;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.wa-fab:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
}

@media (max-width: 640px) {
  body { padding-bottom: 76px; }
  .wa-fab { width: 48px; height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
