:root {
  --bg: #020617;
  --bg-elevated: #02081f;
  --card: #020b2b;
  --accent: #22c55e;
  --accent-soft: #16a34a;
  --accent-blue: #38bdf8;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;
  --danger: #f97316;
  --radius-lg: 18px;
  --radius-full: 999px;
  --shadow-soft: 0 18px 45px rgba(15,23,42,0.65);
  --max-width: 980px;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

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

body.page {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  background: radial-gradient(circle at top, #0f172a 0, #020617 46%, #000 100%);
  color: var(--text);
}

main {
  max-width: var(--max-width);
  margin: 0 auto 72px;
  padding: 88px 16px 40px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(90deg, rgba(15,23,42,0.95), rgba(8,16,40,0.96));
  border-bottom: 1px solid rgba(30,64,175,0.5);
  box-shadow: 0 18px 30px rgba(15,23,42,0.7);
  padding: 10px 16px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 30% 20%, #38bdf8, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #e5f4ff;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-link:hover {
  border-color: rgba(148,163,184,0.4);
  color: #f9fafb;
}

.nav-link-primary {
  background: radial-gradient(circle at 10% 0, #22c55e, #16a34a 40%, #0ea5e9 100%);
  color: #f9fafb;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(34,197,94,0.45), 0 10px 25px rgba(8,47,73,0.85);
}

.nav-link-primary:hover {
  box-shadow: 0 0 0 1px rgba(34,197,94,0.65), 0 12px 30px rgba(8,47,73,0.95);
  transform: translateY(-1px);
}

.nav-link-primary.active {
  box-shadow: 0 0 0 1px rgba(56,189,248,0.75), 0 0 0 6px rgba(56,189,248,0.25);
}

/* Layout helpers */

.hero {
  background: radial-gradient(circle at top left, #1e293b, #020617 60%);
  border-radius: 24px;
  padding: 26px 18px 26px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148,163,184,0.25);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.35);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 26px;
}

.accent {
  color: var(--accent);
}

.hero-text {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.hero-meta {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.card-section {
  margin-top: 28px;
  padding: 24px 20px 28px;
  background: linear-gradient(145deg, rgba(15,23,42,0.96), rgba(2,6,23,0.98));
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(30,64,175,0.6);
  max-width: 960px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.card-section h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 20px;
}

.card-section p {
  color: var(--muted);
  line-height: 1.7;
  margin: 8px 0;
}

/* Form / wizard */

.wizard {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

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

.field label {
  font-size: 13px;
}

.field select {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(55,65,81,0.8);
  background: rgba(15,23,42,0.9);
  color: var(--text);
  font-size: 14px;
  width: 100%;
  max-width: 100%;
}

.result-card {
  margin-top: 16px;
  padding: 14px 14px 16px;
  border-radius: 18px;
  background: radial-gradient(circle at top, #0f172a, #020617);
  border: 1px solid rgba(52,211,153,0.45);
  color: var(--text);
  font-size: 14px;
}

/* Steps */

.steps {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.steps li {
  margin: 6px 0;
}

/* FAQ */

details {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(30,64,175,0.7);
}

summary {
  cursor: pointer;
  font-weight: 500;
}

.disclaimer {
  font-size: 13px;
  color: var(--muted);
}

/* Buttons */

.btn {
  border-radius: 999px;
  padding: 9px 16px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary {
  background: radial-gradient(circle at 10% 0, #22c55e, #16a34a 40%, #0ea5e9 100%);
  color: #0b1120;
  box-shadow: 0 14px 35px rgba(15,118,110,0.9);
}

.btn-secondary {
  background: rgba(15,23,42,0.9);
  color: var(--text);
  border: 1px solid rgba(148,163,184,0.6);
}

.btn-full {
  width: 100%;
  max-width: 100%;
}

/* Footer */

.site-footer {
  margin-top: 30px;
  padding: 18px 0 4px;
  font-size: 12px;
  color: var(--muted);
}

.legal-small {
  font-size: 11px;
}

/* Chat page - ChatGPT-style full-height layout */

.chat-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 8px 8px;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.ai-helper-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(145deg, rgba(15,23,42,0.98), rgba(2,6,23,0.98));
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(30,64,175,0.7);
  overflow: hidden;
}

.ai-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.ai-header h1 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 600;
}

.ai-header p {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.ai-warning {
  margin-top: 6px !important;
  font-size: 11px !important;
  color: #fbbf24 !important;
  line-height: 1.3 !important;
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  scroll-behavior: smooth;
}

.chat-message {
  margin-bottom: 12px;
  display: flex;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.chat-message.user .chat-bubble {
  background: radial-gradient(circle at 10% 0, #22c55e, #16a34a 40%, #0ea5e9 100%);
  color: #02101c;
}

.chat-message.assistant .chat-bubble {
  background: rgba(15,23,42,0.96);
  border: 1px solid rgba(30,64,175,0.9);
  color: var(--text);
}

.ai-input {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 10px 12px 12px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
}

.ai-input textarea {
  flex: 1;
  resize: none;
  min-height: 42px;
  max-height: 150px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(55,65,81,0.85);
  background: rgba(2,6,23,0.96);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

.ai-input .btn {
  flex-shrink: 0;
  padding: 10px 18px;
}

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

/* Affiliate links */

.affiliate-link {
  color: #38bdf8;
  text-decoration: underline;
  font-weight: 500;
  transition: all 0.2s ease;
}

.affiliate-link:hover {
  color: #22c55e;
  text-decoration: none;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

/* Responsive tweaks */

/* Mobile-first: stacked header for small screens */
@media (max-width: 767px) {
  .site-header {
    padding: 8px 12px;
  }

  .header-content {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .brand {
    width: 100%;
    justify-content: center;
    gap: 8px;
  }

  .brand-title {
    font-size: 14px;
  }

  .brand-subtitle {
    font-size: 10px;
  }

  .nav {
    width: 100%;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
  }

  .nav-link {
    padding: 5px 8px;
    font-size: 12px;
  }

  main {
    padding-top: 108px;
  }

  .chat-main {
    padding-top: 110px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .ai-header h1 {
    font-size: 16px;
  }

  .ai-header p {
    font-size: 12px;
  }

  .ai-warning {
    font-size: 10px !important;
  }

  .ai-messages {
    padding: 10px 12px;
  }

  .chat-bubble {
    max-width: 90%;
    font-size: 13px;
  }
}

@media (min-width: 720px) {
  .hero {
    padding: 28px 28px 28px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .nav {
    gap: 10px;
  }

  .nav-link {
    font-size: 14px;
  }

  main {
    padding-top: 96px;
  }

  .chat-main {
    padding-top: 80px;
  }

  .ai-header h1 {
    font-size: 20px;
  }

  .ai-messages {
    padding: 16px 20px;
  }

  .ai-input {
    padding: 12px 16px 14px;
  }
}
