/* ============================================================
   Findingwise — brand stylesheet
   Single-file CSS. No build step. No CDN dependency.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette — deep indigo + neutral grays. Builder-audience appropriate. */
  --brand-900: #1e1b4b;
  --brand-700: #4338ca;
  --brand-600: #4f46e5;
  --brand-500: #6366f1;
  --brand-100: #e0e7ff;
  --brand-50:  #eef2ff;

  /* Score tiers */
  --score-exceptional: #059669;  /* 9.5+ */
  --score-excellent:   #16a34a;  /* 9.0-9.4 */
  --score-very-good:   #2563eb;  /* 8.5-8.9 */
  --score-good:        #ca8a04;  /* 8.0-8.4 */

  /* Surface */
  --bg:        #ffffff;
  --bg-soft:   #f9fafb;
  --bg-muted:  #f3f4f6;
  --border:    #e5e7eb;
  --border-strong: #d1d5db;

  /* Text */
  --text:      #0f172a;
  --text-muted:#475569;
  --text-soft: #64748b;

  /* Compliance bar */
  --compliance-bg: #fffbeb;
  --compliance-fg: #78350f;
  --compliance-border: #fde68a;

  /* Layout */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --shadow:    0 4px 6px -1px rgba(15,23,42,.06), 0 10px 15px -3px rgba(15,23,42,.04);
  --shadow-lg: 0 20px 25px -5px rgba(15,23,42,.10), 0 10px 10px -5px rgba(15,23,42,.04);

  --container-max: 1180px;
  --container-pad: 24px;

  /* Type scale */
  --fs-display: clamp(2rem, 4vw, 3rem);
  --fs-h1:      clamp(1.625rem, 3vw, 2.25rem);
  --fs-h2:      clamp(1.375rem, 2vw, 1.75rem);
  --fs-h3:      1.25rem;
  --fs-body:    1rem;
  --fs-small:   0.875rem;
  --fs-tiny:    0.8125rem;

  --line-tight: 1.2;
  --line-base:  1.55;
  --line-loose: 1.7;
}

/* ---------- Reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: var(--line-base);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: var(--line-tight); color: var(--text); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p  { margin: 0 0 1em; }
ul { margin: 0 0 1em 1.25em; padding: 0; }
li { margin: 0.25em 0; }

/* ---------- Layout primitives ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
.container-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
.section { padding: 56px 0; }
.section-soft { background: var(--bg-soft); }
.stack > * + * { margin-top: 1rem; }

/* ---------- Compliance bar (NI element #1) ---------- */
.compliance-bar {
  background: var(--compliance-bg);
  color: var(--compliance-fg);
  border-bottom: 1px solid var(--compliance-border);
  font-size: var(--fs-tiny);
  padding: 8px 0;
}
.compliance-bar .container {
  display: flex; gap: 12px; flex-wrap: wrap;
  justify-content: space-between; align-items: center;
}
.compliance-bar a { color: var(--compliance-fg); text-decoration: underline; }

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: 14px 0;
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,.92);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand-mark {
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--brand-900);
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.brand-mark .brand-dot {
  width: 24px; height: 24px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-900));
  border-radius: 6px;
}
.site-nav {
  display: flex; gap: 24px;
}
.site-nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}
.site-nav a:hover { color: var(--brand-700); }

/* ---------- Page hero ---------- */
.chart-hero {
  padding: 40px 0 16px;
}
.last-updated {
  font-size: var(--fs-tiny);
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 8px;
}
.chart-hero h1 {
  font-size: var(--fs-display);
  margin: 0 0 12px;
  color: var(--brand-900);
}
.chart-hero .lede {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0;
}

/* ---------- Quick picks bar (NI element #6) ---------- */
.quick-picks {
  margin: 28px 0 8px;
  padding: 16px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius);
}
.quick-picks-label {
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-700);
  font-weight: 700;
  margin-bottom: 10px;
}
.quick-picks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.quick-pick {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: white;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.quick-pick-name {
  font-weight: 700;
  font-size: 0.9375rem;
}
.quick-pick-score {
  color: var(--score-excellent);
  font-weight: 800;
  font-size: 1rem;
}
.quick-pick .cta-sm {
  padding: 6px 12px; font-size: 0.8125rem;
}

/* ---------- Ranked list (NI element #7) ---------- */
.ranked-list {
  display: flex; flex-direction: column;
  gap: 16px;
  margin: 32px 0;
}
.rank-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 20px;
  align-items: stretch;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: box-shadow .15s, border-color .15s;
}
.rank-row:hover { box-shadow: var(--shadow); border-color: var(--brand-100); }
.rank-row.is-top {
  border-color: var(--brand-100);
  background: linear-gradient(180deg, var(--brand-50) 0%, white 30%);
}
.rank-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--brand-900);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  align-self: start;
  padding-top: 4px;
}
.rank-body { min-width: 0; }
.rank-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.rank-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}
.rank-vendor {
  font-size: var(--fs-tiny);
  color: var(--text-soft);
  background: var(--bg-muted);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
}
.rank-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fef3c7;
  color: #78350f;
  font-size: var(--fs-tiny);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.rank-tagline {
  color: var(--text-muted);
  margin: 4px 0 10px;
}
.rank-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 4px 16px;
}
.rank-features li {
  position: relative;
  padding-left: 18px;
  font-size: var(--fs-small);
  color: var(--text);
}
.rank-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-600);
  font-weight: 700;
}
.rank-cta-col {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  min-width: 140px;
}
.score-badge {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 14px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.score-badge .score-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--score-excellent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.score-badge.exceptional .score-num { color: var(--score-exceptional); }
.score-badge.excellent .score-num   { color: var(--score-excellent); }
.score-badge.very-good .score-num   { color: var(--score-very-good); }
.score-badge.good .score-num        { color: var(--score-good); }
.score-badge .score-tier {
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-soft);
  margin-top: 4px;
}
.cta-button {
  background: var(--brand-600);
  color: white;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: none;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  white-space: nowrap;
  transition: background .15s, transform .15s;
}
.cta-button:hover { background: var(--brand-700); text-decoration: none; transform: translateY(-1px); }
.cta-button.cta-sm { padding: 7px 12px; font-size: 0.8125rem; }
.cta-button.cta-secondary { background: white; color: var(--brand-700); border: 1px solid var(--brand-100); }
.cta-button.cta-secondary:hover { background: var(--brand-50); }

@media (max-width: 640px) {
  .rank-row { grid-template-columns: 48px 1fr; }
  .rank-cta-col { grid-column: 1 / -1; flex-direction: row; }
}

/* ---------- Comparison table (NI element #9) ---------- */
.comparison-table-wrap {
  margin: 32px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: white;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
  min-width: 700px;
}
.comparison-table thead th {
  background: var(--brand-900);
  color: white;
  text-align: left;
  padding: 12px 14px;
  font-weight: 700;
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.comparison-table tbody td {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
.comparison-table tbody tr:hover { background: var(--bg-soft); }
.comparison-table .col-brand { font-weight: 700; color: var(--text); }
.comparison-table .col-score {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--score-excellent);
}
.comparison-table .col-cta {
  text-align: right;
}

/* ---------- Popular pick reinforcement (NI element #10) ---------- */
.popular-pick {
  background: linear-gradient(135deg, var(--brand-50), white);
  border: 2px solid var(--brand-100);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 40px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.popular-pick-label {
  display: inline-block;
  background: var(--brand-600);
  color: white;
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.popular-pick h3 { margin: 0 0 8px; font-size: 1.5rem; }
.popular-pick p { color: var(--text-muted); margin: 0 0 16px; }
@media (max-width: 640px) {
  .popular-pick { grid-template-columns: 1fr; }
}

/* ---------- FAQ (NI element #11) ---------- */
.faq-block {
  margin: 48px 0;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: white;
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--brand-600);
  font-weight: 400;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item-content {
  padding: 0 20px 16px;
  color: var(--text-muted);
}

/* ---------- Detail block (NI element #12) ---------- */
.detail-block {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}
.detail-block .detail-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 16px;
}
.detail-block .detail-rank {
  font-size: 0.875rem;
  color: var(--text-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.detail-block h3 { font-size: 1.5rem; margin: 4px 0 8px; }
.detail-block .stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
  padding: 16px;
  background: var(--bg-soft);
  border-radius: var(--radius);
}
.stats-row dt {
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  font-weight: 700;
  margin: 0;
}
.stats-row dd {
  font-size: 0.9375rem;
  color: var(--text);
  margin: 4px 0 0;
  font-weight: 500;
}
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 20px 0;
}
@media (max-width: 640px) {
  .pros-cons { grid-template-columns: 1fr; }
}
.pros-cons h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid;
}
.pros-cons .pros h4 { color: var(--score-excellent); border-color: var(--score-excellent); }
.pros-cons .cons h4 { color: #dc2626; border-color: #dc2626; }
.pros-cons ul { list-style: none; padding: 0; margin: 0; }
.pros-cons li {
  padding: 4px 0 4px 22px;
  position: relative;
  font-size: var(--fs-small);
}
.pros-cons .pros li::before { content: "+"; position: absolute; left: 0; color: var(--score-excellent); font-weight: 800; }
.pros-cons .cons li::before { content: "−"; position: absolute; left: 0; color: #dc2626; font-weight: 800; }

/* ---------- Social proof (NI element #13) ---------- */
.social-proof {
  text-align: center;
  padding: 24px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  margin: 40px 0;
  font-size: var(--fs-small);
  color: var(--text-muted);
}
.social-proof strong { color: var(--text); font-size: 1rem; font-weight: 800; }

/* ---------- Methodology box (NI element #14) ---------- */
.methodology-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 40px 0;
  background: var(--bg-soft);
}
.methodology-box h3 { font-size: 1.25rem; margin-bottom: 8px; }
.methodology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.methodology-item h4 {
  font-size: 0.9375rem;
  color: var(--brand-700);
  margin: 0 0 6px;
}
.methodology-item p {
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Author / about ---------- */
.editorial-strip {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 24px 0;
  font-size: var(--fs-small);
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0b0a1f;
  color: #cbd5e1;
  padding: 48px 0 24px;
  margin-top: 64px;
  font-size: var(--fs-small);
}
.site-footer h4 { color: white; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: white; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 6px 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 32px; padding-top: 16px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: var(--fs-tiny);
  color: #94a3b8;
}
.footer-disclaimer {
  font-size: var(--fs-tiny);
  color: #94a3b8;
  margin-top: 16px;
  max-width: 700px;
  line-height: 1.6;
}

/* ---------- Utility ---------- */
.text-muted { color: var(--text-muted); }
.text-soft  { color: var(--text-soft); }
.text-small { font-size: var(--fs-small); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
