/* shadcn-style tokens */
:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 9%;
  --card: 0 0% 98%;
  --card-foreground: 0 0% 9%;
  --primary: 0 0% 9%;
  --primary-foreground: 0 0% 98%;
  --secondary: 0 0% 96%;
  --secondary-foreground: 0 0% 9%;
  --muted: 0 0% 96%;
  --muted-foreground: 0 0% 45%;
  --accent: 0 0% 96%;
  --border: 0 0% 90%;
  --input: 0 0% 90%;
  --ring: 0 0% 9%;
  --destructive: 0 72% 51%;
  --radius: 0.5rem;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  margin: 0;
  line-height: 1.6;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.topbar {
  margin-bottom: 2rem;
  text-align: center;
}

.topbar h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}

.tag {
  color: hsl(var(--muted-foreground));
  margin-top: 0.25rem;
}

.step {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 2rem;
}

.step h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
}

.hint {
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
  margin: -1rem 0 1.5rem;
}

.field {
  margin-bottom: 1.5rem;
}

.field > label:first-child {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
}

input[type="number"], select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  background: hsl(var(--background));
  font-size: 1rem;
  color: hsl(var(--foreground));
  font-family: inherit;
}

input[type="number"]:focus, select:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: -1px;
}

.checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.checks label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 400;
  padding: 0.5rem 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--secondary));
  cursor: pointer;
}

.checks input[type="checkbox"] {
  accent-color: hsl(var(--primary));
}

.nav {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  gap: 1rem;
}

.btn {
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover { opacity: 0.9; }

.btn-ghost {
  background: transparent;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
}

.btn-ghost:hover { background: hsl(var(--secondary)); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.result-card {
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.result-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.big-number {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: hsl(var(--primary));
  line-height: 1;
}

#lexRange, #lexBaseline {
  color: hsl(var(--muted-foreground));
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

#negatives li, #positives li, #tips li {
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

#negatives li { color: hsl(var(--destructive)); }
#positives li { color: #15803d; }
#tips li { color: hsl(var(--foreground)); }

.disclaimer {
  color: hsl(var(--muted-foreground));
  font-size: 0.8rem;
  margin-top: 1.5rem;
  border-top: 1px solid hsl(var(--border));
  padding-top: 1rem;
}

/* SEO content */
.seo-content {
  max-width: 720px;
  margin: 3rem auto 0;
  padding: 0 1rem;
}

.seo-content section { margin-bottom: 2.5rem; }

.seo-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.seo-content p {
  color: #475569;
  font-size: 0.9375rem;
  margin: 0 0 0.75rem;
}

.seo-content details {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
  margin-bottom: 0.5rem;
  padding: 0.75rem 1rem;
}

.seo-content summary {
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
}

.seo-content details p {
  margin: 0.75rem 0 0.25rem;
}

/* What-if grid */
.card-sub {
  color: hsl(var(--muted-foreground));
  font-size: 0.85rem;
  margin: -0.5rem 0 0.75rem;
}

.whatif-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.625rem;
}

.whatif-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.whatif-item strong { color: #15803d; white-space: nowrap; }

.whatif-item.whatif-locked strong {
  color: transparent;
  text-shadow: 0 0 6px rgba(21, 128, 61, 0.55);
}

.whatif-cta {
  grid-column: 1 / -1;
  text-align: center;
  padding: 0.5rem 0 0.25rem;
}

/* Upgrade card */
.upgrade-card {
  background: hsl(var(--foreground));
  color: hsl(var(--primary-foreground));
  text-align: center;
}

.upgrade-card h3 { color: inherit; }
.upgrade-card p {
  color: hsl(var(--muted-foreground));
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

/* Payment modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal {
  position: relative;
  background: hsl(var(--background));
  border-radius: 0.75rem;
  padding: 2rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.modal h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}

.modal-sub {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  margin: 0 0 1rem;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
}

.paywall-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.paywall-features li {
  padding: 0.5rem 0 0.5rem 1.625rem;
  position: relative;
  font-size: 0.9rem;
  border-bottom: 1px solid hsl(var(--border));
}

.paywall-features li:last-child { border-bottom: none; }

.paywall-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #15803d;
  font-weight: 700;
}

.price {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.price span {
  font-size: 0.875rem;
  font-weight: 400;
  color: hsl(var(--muted-foreground));
  margin-left: 0.25rem;
}

.btn-wide {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
}

.modal-note {
  color: hsl(var(--muted-foreground));
  font-size: 0.78rem;
  text-align: center;
  margin: 0.75rem 0 0;
}

/* Sources */
.tip-source {
  color: hsl(var(--muted-foreground));
  font-size: 0.8rem;
  white-space: nowrap;
}

.source-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
}

.source-list li {
  padding: 0.375rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid hsl(var(--border));
}

.source-list a {
  color: #0f172a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 640px) {
  .step { padding: 1.25rem; }
  .big-number { font-size: 2.75rem; }
  .checks { grid-template-columns: 1fr; }
  .modal { padding: 1.5rem; }
  .whatif-grid { grid-template-columns: 1fr; }
}
.le-table { width: 100%; border-collapse: collapse; margin: 1rem 0 .5rem; font-size: .95rem; }
.le-table th, .le-table td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid #e2e8f0; }
.le-table th { background: #f1f5f9; font-weight: 600; }
.table-note { font-size: .85rem; color: #64748b; }
.site-footer { max-width: 760px; margin: 0 auto; padding: 1.5rem 1rem 3rem; font-size: .85rem; color: #64748b; text-align: center; border-top: 1px solid #e2e8f0; }
.site-footer p { margin: .25rem 0; }
