/* SS Optimizer - Shared styles */
:root {
  /* Palette: deep professional teal for a financial/advisor feel */
  --brand: #0f766e;
  --brand-hover: #0b5e58;
  --brand-soft: #ecfdf5;
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --danger: #b91c1c;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, 0.12);
  --font-body: ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces", "Iowan Old Style", "Charter", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-size: 16px;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a:not(.btn) { color: var(--ink-2); font-size: 14px; font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--ink); text-decoration: none; }
.nav-links a.btn-primary { color: #fff; }
.nav-links a.btn-primary:hover { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(180deg, var(--brand-soft) 0%, #ffffff 70%);
}
.hero-inner { text-align: center; max-width: 820px; margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--brand); }
h1.headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 20px;
}
h1.headline em { font-style: italic; color: var(--brand); font-weight: 500; }
.subhead {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ink-2);
  margin: 0 0 32px;
  line-height: 1.55;
}
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-trust {
  margin-top: 28px;
  font-size: 13px;
  color: var(--ink-3);
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust svg { color: var(--brand); }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
section.tight { padding: 60px 0; }
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--ink);
}
.section-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.section-lead {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 620px;
  margin: 0 0 40px;
  line-height: 1.6;
}
.section-head-center { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head-center .section-lead { margin-left: auto; margin-right: auto; }

/* ---------- Features grid ---------- */
.features-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.feature-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}
.feature-card:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.feature-card p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }

/* ---------- How it works ---------- */
.steps {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  counter-reset: step;
}
.step {
  position: relative;
  padding-left: 52px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: -4px;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.step h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.step p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }

/* ---------- Pricing ---------- */
.pricing-wrap {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  align-items: center;
}
@media (max-width: 820px) { .pricing-wrap { grid-template-columns: 1fr; } }
.pricing-card {
  background: var(--surface);
  border: 2px solid var(--brand);
  border-radius: 18px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.pricing-label {
  font-size: 13px;
  color: var(--brand);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.pricing-amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 8px 0 4px;
}
.pricing-amount .price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 56px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.pricing-amount .per { color: var(--ink-3); font-size: 15px; }
.pricing-card h3 {
  margin: 20px 0 4px;
  font-size: 20px;
  font-weight: 600;
}
.pricing-card p.pricing-sub { color: var(--ink-2); margin: 0 0 24px; font-size: 14.5px; }
.pricing-features { list-style: none; padding: 0; margin: 0 0 28px; }
.pricing-features li {
  padding: 7px 0;
  padding-left: 28px;
  position: relative;
  color: var(--ink-2);
  font-size: 14.5px;
}
.pricing-features li::before {
  content: "";
  position: absolute;
  left: 0; top: 10px;
  width: 18px; height: 18px;
  border-radius: 999px;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f766e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") center/12px no-repeat;
}
.pricing-footnote { font-size: 13px; color: var(--ink-3); margin-top: 16px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 14px; max-width: 720px; margin: 0 auto; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.faq details[open] { border-color: var(--line-2); }
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--brand);
  font-weight: 500;
  font-size: 22px;
  line-height: 1;
  margin-left: 12px;
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
  margin: 14px 0 0;
  color: var(--ink-2);
  line-height: 1.6;
  font-size: 15px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 60px;
  color: var(--ink-3);
  font-size: 14px;
  background: var(--surface-2);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-col { flex: 1; min-width: 200px; }
.footer a { color: var(--ink-2); }
.footer h4 { font-size: 13px; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 12px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { padding: 4px 0; }
.footer-bottom { margin-top: 32px; font-size: 13px; color: var(--ink-3); }

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: linear-gradient(180deg, var(--brand-soft) 0%, #ffffff 70%);
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.auth-card p.auth-sub { color: var(--ink-2); margin: 0 0 24px; font-size: 15px; }
.form-field { display: block; margin-bottom: 16px; }
.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.form-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s ease;
}
.form-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.code-input {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: 0.35em;
  font-weight: 600;
}
.form-error {
  color: var(--danger);
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
}
.form-success {
  color: #065f46;
  background: var(--brand-soft);
  border: 1px solid #a7f3d0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
}
.btn-block { width: 100%; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--ink-3); }

/* ---------- App gate ---------- */
.access-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .hero { padding: 56px 0 40px; }
  section { padding: 60px 0; }
  .nav-links a:not(.btn) { display: none; }
  .pricing-card { padding: 28px; }
  .pricing-amount .price { font-size: 44px; }
}
