/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:    #2563EB;
  --blue-dk: #1D4ED8;
  --slate:   #1C1917;
  --mid:     #78716C;
  --light:   #FAFAF7;
  --white:   #FFFFFF;
  --green:   #16A34A;
  --amber:   #D97706;
  --red:     #DC2626;
  --purple:  #7C3AED;
  --border:  #E7E5E0;
  --shadow:  0 1px 3px rgba(0,0,0,.07), 0 2px 6px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.05);
  --radius:  10px;
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--slate);
  background: var(--light);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

.hidden { display: none !important; }

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--blue);
  letter-spacing: -.3px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.logo:hover { text-decoration: underline; }

.header-tag {
  font-size: .8rem;
  color: var(--mid);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-size: .95rem;
  font-weight: 600;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.btn-primary:hover { background: var(--blue-dk); transform: translateY(-1px) scale(1.02); }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--mid);
  font-size: .9rem;
  padding: 10px 0;
  border: none;
  cursor: pointer;
  margin-top: 16px;
}
.btn-secondary:hover { color: var(--slate); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: var(--light);
  padding: 80px 0 72px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.8px;
  color: var(--slate);
  margin-bottom: 18px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--mid);
  max-width: 560px;
  margin: 0 auto 32px;
}

/* ── Quiz ─────────────────────────────────────────────────── */
.quiz-section {
  padding: 48px 0;
}

.quiz-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 36px 32px;
  max-width: 620px;
  margin: 0 auto;
}

.progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), #6366F1);
  border-radius: 2px;
  transition: width .3s ease;
  width: 0%;
}

.progress-label {
  font-size: .8rem;
  color: var(--mid);
  margin-bottom: 24px;
}

.quiz-step { animation: fadeIn .2s ease; }

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

.quiz-step h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--slate);
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-btn {
  width: 100%;
  text-align: left;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: .95rem;
  color: var(--slate);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.option-btn:hover {
  border-color: var(--blue);
  background: #EFF6FF;
}

.option-btn.selected {
  border-color: var(--blue);
  background: #EFF6FF;
  color: var(--blue);
  font-weight: 600;
}

.option-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  color: var(--mid);
  border-color: var(--border);
  background: var(--light);
}

.coming-soon-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  background: var(--light);
  color: var(--mid);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 8px;
  margin-left: 10px;
  vertical-align: middle;
}

/* ── Result ───────────────────────────────────────────────── */
.result-section {
  padding: 48px 0 32px;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.result-header .section-heading { margin-bottom: 0; }

.btn-retake {
  font-size: .85rem;
  font-weight: 600;
  color: var(--mid);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn-retake:hover { border-color: var(--blue); color: var(--blue); }

.section-heading {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -.4px;
  margin-bottom: 8px;
  color: var(--slate);
}

.section-sub {
  font-size: .95rem;
  color: var(--mid);
  margin-bottom: 28px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 600px) {
  .result-grid {
    grid-template-columns: 3fr 2fr;
  }
}

.result-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
}

.result-card.primary {
  border-top: 4px solid var(--blue);
}

.result-card.alt {
  border-top: 4px solid var(--border);
}

.result-badge {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--blue);
  margin-bottom: 8px;
}

.result-card.alt .result-badge {
  color: var(--mid);
}

.result-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.result-tagline {
  font-size: .9rem;
  color: var(--mid);
  margin-bottom: 12px;
}

.result-reason {
  font-size: .92rem;
  color: var(--slate);
  background: var(--light);
  border-left: 3px solid var(--blue);
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 16px;
}

.result-card.alt .result-reason {
  border-left-color: var(--border);
}

.result-price {
  font-size: .85rem;
  color: var(--mid);
  margin-bottom: 16px;
}

.result-cta {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
  font-size: .9rem;
  padding: 10px 20px;
  border-radius: 8px;
  transition: background .15s;
}
.result-cta:hover { background: var(--blue-dk); text-decoration: none; }

.result-card.alt .result-cta {
  background: var(--light);
  color: var(--slate);
}
.result-card.alt .result-cta:hover { background: var(--border); }

.anti-rec-block { display: none; }
.stability-warning { display: none; }

.inline-caution {
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-left: 3px solid var(--amber);
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: .85rem;
  color: #92400E;
  line-height: 1.5;
}

.inline-caution strong { color: #92400E; }

/* ── Stack result cards ───────────────────────────────────── */
.result-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-width: 480px;
  margin: 0 auto 24px;
}

.stack-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

/* Three-layer semantic accent system: purple=model, blue=harness/product, green=plan */
.model-card   { border-top: 4px solid var(--purple); }
.harness-card { border-top: 4px solid var(--blue); }
.plan-card    { border-top: 4px solid var(--green); }
.product-card { border-top: 4px solid var(--blue); }

.stack-connector {
  text-align: center;
  color: var(--border);
  font-size: 1.3rem;
  line-height: 1;
  padding: 6px 0;
}

.stack-layer-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--mid);
  margin-bottom: 6px;
}

.stack-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.total-cost {
  font-size: .9rem;
  font-weight: 700;
  color: var(--slate);
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 20px;
  text-align: center;
  margin-top: 10px;
}

.result-constraint {
  font-size: .82rem;
  color: var(--amber);
  margin-top: 6px;
}

.swap-btn {
  display: inline-block;
  background: none;
  border: none;
  color: var(--mid);
  font-size: .8rem;
  cursor: pointer;
  padding: 0;
  margin-top: 14px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.swap-btn:hover { color: var(--blue); }

.swap-section { margin-bottom: 24px; }

.swap-alts-inline {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  animation: fadeIn .15s ease;
}

.swap-alternatives {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 10px;
  animation: fadeIn .15s ease;
}

.swap-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--mid);
  margin-bottom: 12px;
}

.swap-alt-card {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.swap-alt-card:last-child { border-bottom: none; }
.swap-alt-card strong { font-size: .95rem; color: var(--slate); }

.swap-provider {
  font-size: .82rem;
  color: var(--mid);
  margin-left: 6px;
}
.swap-price {
  font-size: .82rem;
  font-weight: 700;
  color: var(--green);
  margin-left: 6px;
}
.swap-why {
  font-size: .85rem;
  color: var(--mid);
  margin-top: 4px;
}

.loading {
  color: var(--mid);
  text-align: center;
  padding: 40px 0;
  font-size: .95rem;
}

.result-card.holding {
  border-top: 4px solid var(--border);
  text-align: center;
}

/* ── Subscribe ────────────────────────────────────────────── */
.subscribe-block {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.subscribe-block h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.subscribe-block p {
  font-size: .9rem;
  color: var(--mid);
  margin-bottom: 14px;
}

.subscribe-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.subscribe-form input {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  outline: none;
  transition: border-color .15s;
}

.subscribe-form input:focus { border-color: var(--blue); }

.sub-feedback {
  font-size: .88rem;
  margin-top: 8px;
  color: var(--green);
}

.sub-feedback.error { color: var(--red); }

/* ── Comparison Table ─────────────────────────────────────── */
.table-section {
  padding: 56px 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.tab-row {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 18px;
  border: 2px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  font-size: .88rem;
  font-weight: 600;
  color: var(--mid);
  cursor: pointer;
  transition: all .15s;
}

.tab-btn.active, .tab-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: #EFF6FF;
}

.table-wrapper { overflow-x: auto; }

#comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

#comparison-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--mid);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

#comparison-table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

#comparison-table tr:last-child td { border-bottom: none; }
#comparison-table tr:hover td { background: #F8FAFC; }

.tool-name {
  font-weight: 700;
  color: var(--slate);
}

.tool-tagline-sm {
  font-size: .8rem;
  color: var(--mid);
  margin-top: 2px;
}

.score-cell {
  text-align: center;
  font-weight: 700;
  font-size: .9rem;
  min-width: 44px;
}

.score-0, .score-1 { color: var(--red); }
.score-2, .score-3 { color: var(--amber); }
.score-4, .score-5 { color: var(--green); }

.status-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.badge-evaluated { background: #DCFCE7; color: #166534; }
.badge-stub      { background: #FEF9C3; color: #854D0E; }
.badge-on_radar  { background: var(--light); color: var(--mid); }

.free-yes { color: var(--green); font-weight: 700; }
.free-no  { color: var(--mid); }

.tool-link {
  font-size: .82rem;
  white-space: nowrap;
}

/* ── Table — mobile ──────────────────────────────────────── */
@media (max-width: 599px) {
  #comparison-table th:nth-child(n+4):nth-child(-n+8),
  #comparison-table td:nth-child(n+4):nth-child(-n+8) {
    display: none;
  }
  #comparison-table th,
  #comparison-table td {
    padding: 10px 8px;
  }
}

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-section {
  padding: 56px 0;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-item summary {
  font-weight: 700;
  font-size: .98rem;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--mid);
  flex-shrink: 0;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item p {
  padding: 0 20px 18px;
  font-size: .93rem;
  color: var(--mid);
  line-height: 1.65;
}

.faq-item strong { color: var(--slate); }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--slate);
  color: #94A3B8;
  padding: 28px 0;
  font-size: .85rem;
  text-align: center;
}

.site-footer p { margin-bottom: 4px; }
.site-footer a { color: #94A3B8; }
.site-footer a:hover { color: var(--white); }

