:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --border: #e5e5e5;
  --border-light: #f0f0f0;
  --text: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #999999;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --accent-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #ca8a04;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08);
  --max-width: 1200px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-dark); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* Header */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo svg { width: 28px; height: 28px; }

nav { display: flex; align-items: center; gap: 32px; }

nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover, nav a.active { color: var(--text); }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn svg { width: 24px; height: 24px; color: var(--text); }

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

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text);
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-ctas { display: flex; gap: 16px; justify-content: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--text);
  color: #fff;
}

.btn-primary:hover { background: #000; color: #fff; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--text); }

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover { background: var(--accent-dark); color: #fff; }

.btn-sm { padding: 8px 16px; font-size: 0.875rem; }

/* Section spacing */
section { padding: 64px 0; }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Top picks cards */
.top-picks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 64px;
}

.pick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.2s;
}

.pick-card:hover {
  border-color: var(--text-muted);
  box-shadow: var(--shadow-lg);
}

.pick-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  margin-bottom: 16px;
}

.badge-free { background: #dcfce7; color: #166534; }
.badge-paygo { background: #fef9c3; color: #854d0e; }
.badge-sub { background: #dbeafe; color: #1e40af; }
.badge-multi { background: #f3e8ff; color: #6b21a8; }

.pick-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pick-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.pick-provider {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

/* Search and filters */
.filters-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 32px;
}

.search-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.filter-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.filter-tag {
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tag:hover { border-color: var(--text-muted); }

.filter-tag.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

/* Comparison table */
.comparison-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

th {
  background: var(--bg);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

td { font-size: 0.9rem; }

tr:last-child td { border-bottom: none; }

tr:hover td { background: var(--bg); }

.provider-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.provider-name { font-weight: 600; }

.category-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 4px;
}

.cat-first { background: #dbeafe; color: #1e40af; }
.cat-inference { background: #f3e8ff; color: #6b21a8; }

.free-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #dcfce7;
  color: #166534;
  border-radius: 4px;
}

.modality-tag {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.7rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin: 2px;
}

.table-link {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
}

.table-link:hover { text-decoration: underline; }

.result-count {
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}

/* Featured section */
.featured-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 48px 0;
}

.featured-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.editors-pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
}

.featured-content { display: grid; grid-template-columns: 1fr 320px; gap: 40px; }

.featured-main h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.featured-main p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.7;
}

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

.strength-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.strength-item svg { color: var(--success); flex-shrink: 0; }

.ideal-user {
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.ideal-user strong { display: block; margin-bottom: 4px; }

.caveat {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 16px;
}

.featured-cta {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}

.featured-cta h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.featured-cta p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.discount-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

/* Methodology */
.methodology-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.method-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.method-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.method-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.weight-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 48px;
}

.scoring-profiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.score-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.score-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.score-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.score-item:last-child { border-bottom: none; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
  border-bottom: 1px solid var(--border-light);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.faq-question:hover { color: var(--accent); }

.faq-question svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-item.open .faq-question svg { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer { max-height: 500px; }

.faq-answer-inner {
  padding-bottom: 20px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s;
}

.blog-card:hover {
  border-color: var(--text-muted);
  box-shadow: var(--shadow-lg);
}

.blog-card-image {
  height: 160px;
  background: linear-gradient(135deg, var(--accent-light), #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card-image svg { width: 48px; height: 48px; color: var(--accent); }

.blog-card-content { padding: 20px; }

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.blog-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.blog-card h3 a { color: var(--text); }
.blog-card h3 a:hover { color: var(--accent); }

.blog-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Footer */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  color: var(--text);
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 10px; }

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-disclosure {
  max-width: 600px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Last updated badge */
.last-updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
  .top-picks { grid-template-columns: repeat(2, 1fr); }
  .featured-content { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .methodology-grid { grid-template-columns: 1fr; }
  .scoring-profiles { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  nav { display: none; }
  .mobile-menu-btn { display: block; }
  .top-picks { grid-template-columns: 1fr; }
  .strengths { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  th, td { padding: 10px 12px; font-size: 0.8rem; }
  .table-scroll { overflow-x: auto; }
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 99;
}

.mobile-nav.open { display: block; }

.mobile-nav a {
  display: block;
  padding: 12px 0;
  font-size: 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}

.mobile-nav a:last-child { border-bottom: none; }

/* Utility */
.text-center { text-align: center; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

.check-icon { width: 16px; height: 16px; }

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 4px;
  margin-left: 24px;
}

.lang-switcher button {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.lang-switcher button:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
}

.lang-switcher button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.mobile-lang-switcher {
  display: flex;
  gap: 8px;
  padding-top: 12px;
}

.mobile-lang-switcher button {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.mobile-lang-switcher button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Hero Image */
.hero {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 80px 24px 64px;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--text);
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

/* Blog card image */
.blog-card-image {
  height: 180px;
  background: var(--bg);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-image svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .lang-switcher {
    display: none;
  }
  .hero h1 { font-size: 2rem; }
  .hero-content { padding: 48px 24px 40px; }
}

/* Blog Header Image */
.blog-header {
  position: relative;
  padding: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
}

.blog-header-image {
  width: 100%;
  height: 300px;
  overflow: hidden;
  position: relative;
}

.blog-header-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.blog-header .container {
  position: relative;
  z-index: 1;
  padding-top: 40px;
  padding-bottom: 40px;
}

.blog-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.blog-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.blog-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

/* Blog Content */
.blog-content {
  padding: 48px 24px;
  max-width: 800px;
  margin: 0 auto;
}

.blog-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.blog-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

.blog-content p {
  margin-bottom: 16px;
  line-height: 1.7;
}

.blog-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 0.9rem;
}

.blog-content pre code {
  background: none;
  padding: 0;
  font-size: 0.9rem;
}

.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}

.blog-content th,
.blog-content td {
  padding: 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.blog-content th {
  background: var(--bg);
  font-weight: 600;
}

.blog-content .faq-item {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
}

.blog-content .faq-item:last-child {
  border-bottom: none;
}

.blog-content .faq-item h3 {
  margin-top: 0;
}

@media (max-width: 768px) {
  .blog-header-image { height: 200px; }
  .blog-header h1 { font-size: 1.75rem; }
  .blog-content { padding: 32px 16px; }
}


/* SEO / IA polish */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.breadcrumbs a {
  color: var(--text-secondary);
}

.breadcrumbs a:hover {
  color: var(--text);
}

.next-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.next-step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.next-step-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.next-step-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.use-case-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.use-case-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.use-case-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

@media (max-width: 1024px) {
  .use-case-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .next-steps-grid,
  .use-case-grid { grid-template-columns: 1fr; }
}
