/* FlowEra Marketing — Amber/Zinc dark theme, editorial aesthetic */

/* ========================================
   Reset & Custom Properties
   ======================================== */

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

:root {
  /* Backgrounds */
  --bg: #09090b;
  --bg-elevated: #111113;
  --bg-card: #18181b;
  --bg-subtle: #1c1c20;
  /* Text */
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-dim: #71717a;
  /* Brand — warm amber */
  --brand: #f59e0b;
  --brand-hover: #d97706;
  --brand-subtle: rgba(245, 158, 11, 0.08);
  --brand-border: rgba(245, 158, 11, 0.2);
  /* Semantic */
  --success: #22c55e;
  --border: #27272a;
  --border-subtle: #1e1e22;
  /* Layout */
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 150ms ease-out;
  --section-gap: 120px;
  --font: 'Inter', -apple-system, system-ui, sans-serif;
  --max-w: 1200px;
}

/* ========================================
   Base & Typography
   ======================================== */

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-secondary);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 { color: var(--text); }

a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--brand); }

ul { list-style: none; }

img { max-width: 100%; display: block; }

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ========================================
   Layout
   ======================================== */

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

.content-narrow {
  max-width: 800px;
  margin: 0 auto;
}

/* ========================================
   Buttons
   ======================================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  color: #000;
  background: var(--brand);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition),
              transform var(--transition);
}

.btn-primary:hover {
  background: var(--brand-hover);
  color: #000;
  transform: scale(1.02);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition),
              color var(--transition),
              transform var(--transition);
}

.btn-ghost:hover {
  border-color: var(--text-dim);
  color: var(--text);
  transform: scale(1.02);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: var(--radius);
}

/* ========================================
   Header
   ======================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 300ms ease;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
}

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

/* Keep .logo-icon in DOM but style as amber text instead of gradient */
.logo-icon {
  color: var(--brand);
  font-size: 1.25rem;
}

.logo-text { white-space: nowrap; }

.main-nav {
  display: flex;
  gap: 28px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.nav-link:hover { color: var(--text); }

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

/* ========================================
   Hero Section
   ======================================== */

.hero {
  padding: 100px 0 var(--section-gap);
  text-align: center;
  background:
    radial-gradient(
      ellipse 60% 50% at 50% 40%,
      rgba(245, 158, 11, 0.03) 0%,
      transparent 70%
    );
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  margin-bottom: 24px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--brand);
  background: var(--brand-subtle);
  border: 1px solid var(--brand-border);
  border-radius: 999px;
}

.hero-title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 24px;
}

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

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-proof {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.hero-screenshot {
  margin-top: 48px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.hero-screenshot img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   Page Hero (inner pages)
   ======================================== */

.page-hero {
  padding: 80px 0 60px;
  text-align: center;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
  margin-bottom: 12px;
}

.page-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 16px;
}

.page-sub {
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ========================================
   Section Titles (shared)
   ======================================== */

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  text-align: center;
  margin-bottom: 48px;
}

/* ========================================
   Problem Section
   ======================================== */

.problem-section {
  padding: 0 0 var(--section-gap);
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.problem-card {
  padding: 36px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.problem-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.tool-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tool-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.tool-tag-brand {
  color: var(--brand);
  border-color: var(--brand-border);
  background: var(--brand-subtle);
}

.problem-price {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dim);
}

.problem-price-brand {
  color: var(--brand);
}

.problem-note {
  font-size: 0.875rem;
  color: var(--text-dim);
}

.problem-benefits {
  margin: 0;
  padding: 0;
}

.problem-benefits li {
  padding: 4px 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.problem-benefits li::before {
  content: "\2713 ";
  color: var(--success);
  margin-right: 6px;
}

.problem-after {
  border-color: var(--brand-border);
}

/* ========================================
   Features Grid (home page)
   ======================================== */

.features-grid-section {
  padding-bottom: var(--section-gap);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.feature-card:hover {
  border-color: var(--brand-border);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 16px;
  color: var(--brand);
  background: var(--brand-subtle);
  border-radius: var(--radius-sm);
}

.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* ========================================
   Features Expanded (features page)
   ======================================== */

.features-expanded {
  padding-bottom: var(--section-gap);
}

.feature-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.feature-detail:last-child {
  border-bottom: none;
}

.feature-detail:nth-child(even) {
  direction: rtl;
}

.feature-detail:nth-child(even) > * {
  direction: ltr;
}

.feature-detail-text h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.feature-detail-text p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 20px;
}

.feature-bullets {
  padding: 0;
  margin: 0;
}

.feature-bullets li {
  padding: 6px 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.feature-bullets li::before {
  content: "\2713 ";
  color: var(--brand);
  margin-right: 8px;
}

.feature-detail-img {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.feature-detail-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   Use Cases (features page)
   ======================================== */

.usecases-section {
  padding-bottom: var(--section-gap);
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.usecase-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.usecase-card:hover {
  border-color: var(--brand-border);
}

.usecase-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* ========================================
   Pricing
   ======================================== */

.pricing-cards-section {
  padding-bottom: var(--section-gap);
}

.pricing-preview-section {
  padding-bottom: var(--section-gap);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}

.pricing-card {
  padding: 36px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.pricing-card.featured {
  border-color: var(--brand-border);
  position: relative;
  padding-top: 48px;
}

.pricing-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.price {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--text);
}

.price-period {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.pricing-features {
  text-align: left;
  margin-bottom: 28px;
}

.pricing-features li {
  padding: 6px 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

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

.pricing-card .btn-primary,
.pricing-card .btn-ghost {
  width: 100%;
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #000;
  background: var(--brand);
  border-radius: 999px;
  white-space: nowrap;
}

.pricing-link-center {
  text-align: center;
  margin-top: 32px;
}

.pricing-link-center a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--brand);
}

.pricing-link-center a:hover {
  text-decoration: underline;
}

/* ========================================
   Comparison
   ======================================== */

.comparison-list-section {
  padding-bottom: var(--section-gap);
}

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

.comparison-card {
  display: block;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.comparison-card:hover {
  border-color: var(--brand-border);
}

.comparison-card h3 {
  font-size: 1rem;
  font-weight: 600;
}

.comparison-card-sub {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Comparison Table */
.comparison-table-section {
  padding-bottom: var(--section-gap);
}

.comparison-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.comparison-table th,
.comparison-table td {
  padding: 14px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  background: var(--bg-elevated);
}

.comparison-table td:first-child,
.comparison-table th:first-child {
  text-align: left;
}

.comparison-table .brand-col {
  color: var(--brand);
  font-weight: 600;
}

.comparison-table th.brand-col {
  color: var(--brand);
  background: var(--brand-subtle);
}

.comparison-legend {
  text-align: center;
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--text-dim);
}

/* Comparison Wins */
.comparison-wins-section {
  padding-bottom: var(--section-gap);
}

.wins-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.wins-card {
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.wins-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.wins-ours {
  border-color: var(--brand-border);
}

.wins-list {
  padding: 0;
  margin: 0;
}

.wins-list li {
  padding: 8px 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.wins-list li:last-child { border-bottom: none; }

.wins-list li::before {
  content: "\2022 ";
  color: var(--text-dim);
  margin-right: 8px;
}

.wins-ours .wins-list li::before {
  color: var(--brand);
}

/* ========================================
   Stats
   ======================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
  padding: 48px 0;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========================================
   FAQ
   ======================================== */

.faq-section {
  padding-bottom: var(--section-gap);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 700px;
  margin: 0 auto;
}

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

/* Support both class names used in templates */
.faq-question,
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  list-style: none;
  transition: color var(--transition);
}

.faq-question::-webkit-details-marker,
.faq-q::-webkit-details-marker {
  display: none;
}

.faq-question::after,
.faq-q::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--brand);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item[open] .faq-question::after,
.faq-item[open] .faq-q::after {
  content: "\2212";
}

.faq-question:hover,
.faq-q:hover {
  color: var(--brand);
}

.faq-answer,
.faq-a {
  padding: 0 0 20px;
}

.faq-answer p,
.faq-a {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   CTA Banner
   ======================================== */

.cta-section {
  padding-bottom: var(--section-gap);
}

.cta-banner {
  text-align: center;
  padding: 64px 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.cta-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.3;
}

.cta-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cta-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
}

.article-cta {
  text-align: center;
  padding: 56px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 32px;
}

.article-cta .cta-sub {
  margin-bottom: 28px;
}

/* ========================================
   Blog List
   ======================================== */

.blog-list-section {
  padding-bottom: var(--section-gap);
}

.blog-filters {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 48px;
}

.filter-btn {
  padding: 8px 20px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
}

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

.filter-active {
  color: #000;
  background: var(--brand);
  border-color: var(--brand);
}

.filter-active:hover {
  color: #000;
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

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

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition),
              transform var(--transition);
}

.blog-card:hover {
  border-color: var(--brand-border);
  transform: translateY(-4px);
  color: var(--text);
}

.blog-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 28px 24px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.blog-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 6px;
}

.badge-product {
  color: var(--brand);
  background: var(--brand-subtle);
  border: 1px solid var(--brand-border);
}

.badge-review {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.blog-date {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.blog-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  color: var(--text);
}

.blog-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.read-time {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.read-more {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand);
  transition: color var(--transition);
}

.blog-card:hover .read-more {
  color: var(--brand-hover);
}

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 60px 0;
}

/* ========================================
   Blog Article
   ======================================== */

.blog-article {
  padding: 0 0 var(--section-gap);
}

/* Breadcrumb (article page) */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 32px 0 24px;
  font-size: 0.8125rem;
}

.breadcrumb a {
  color: var(--text-dim);
  transition: color var(--transition);
}

.breadcrumb a:hover { color: var(--brand); }

.breadcrumb-sep { color: var(--border); }
.breadcrumb-cat { color: var(--text-dim); }

.breadcrumb-current {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}

/* Breadcrumb nav (base template) */
.breadcrumb-nav {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.breadcrumb-list li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb-list li a:hover { color: var(--brand); }

.breadcrumb-list li:last-child a {
  color: var(--text-dim);
  pointer-events: none;
}

/* Article Header */
.article-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.article-header .page-title {
  text-align: left;
  margin-bottom: 20px;
}

.article-meta-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-dim);
}

.meta-dot { color: var(--border); }

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--brand);
  z-index: 200;
  transition: width 100ms linear;
}

/* Article TOC sidebar */
.article-layout {
  display: flex;
  gap: 48px;
}

.article-toc {
  position: sticky;
  top: 80px;
  width: 220px;
  flex-shrink: 0;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.article-toc nav {
  padding: 16px 0;
}

.toc-link {
  display: block;
  padding: 6px 12px;
  font-size: 0.8125rem;
  color: var(--text-dim);
  border-left: 2px solid transparent;
  transition: color var(--transition),
              border-color var(--transition);
}

.toc-link:hover {
  color: var(--text);
}

.toc-link.active {
  color: var(--brand);
  border-left-color: var(--brand);
}

/* Back link */
.back-link {
  margin-bottom: 24px;
}

/* Related Articles */
.related-articles {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.related-articles h2 {
  font-size: 1.125rem;
  margin-bottom: 16px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color var(--transition);
}

.related-card:hover { border-color: var(--brand-border); }

.related-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
}

.related-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ========================================
   Prose (article body typography)
   ======================================== */

.prose {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 64px;
}

.prose p { margin-bottom: 24px; }

.prose h2 {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 56px;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.prose h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 40px;
  margin-bottom: 16px;
  line-height: 1.35;
}

.prose h4 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 12px;
}

.prose ul,
.prose ol {
  padding-left: 0;
  margin-bottom: 24px;
}

.prose ul li,
.prose ol li {
  position: relative;
  padding: 8px 0 8px 28px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 17px;
  width: 6px;
  height: 6px;
  background: var(--brand);
  border-radius: 50%;
}

.prose ol {
  counter-reset: prose-ol;
}

.prose ol li {
  counter-increment: prose-ol;
}

.prose ol li::before {
  content: counter(prose-ol) ".";
  position: absolute;
  left: 4px;
  top: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--brand);
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.prose a:hover { color: var(--brand-hover); }

.prose blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--brand);
  background: var(--bg-elevated);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text);
}

.prose blockquote p:last-child { margin-bottom: 0; }

.prose code {
  padding: 2px 8px;
  font-size: 0.875em;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.prose pre {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

.prose pre code {
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9375rem;
}

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

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

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

.prose .article-intro {
  font-size: 1.1875rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 32px;
}

/* ========================================
   About
   ======================================== */

.about-content {
  padding-bottom: var(--section-gap);
}

.about-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.about-content p {
  color: var(--text-secondary);
  line-height: 1.75;
}

.values-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.value-item h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.value-item p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   Legal Pages
   ======================================== */

.legal-section {
  padding-bottom: var(--section-gap);
}

.legal-section h2 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 16px;
}

.legal-section p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
}

/* ========================================
   Footer
   ======================================== */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 64px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}

.footer-heading {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 16px;
}

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

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-dim);
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

/* ========================================
   Responsive — Tablet
   ======================================== */

@media (max-width: 1024px) {
  .features-grid,
  .pricing-grid,
  .comparison-grid,
  .usecases-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-toc {
    display: none;
  }

  .article-layout {
    display: block;
  }
}

/* ========================================
   Responsive — Mobile
   ======================================== */

@media (max-width: 768px) {
  :root { --section-gap: 80px; }

  .main-nav { display: none; }

  .hero { padding-top: 64px; }

  .hero-title {
    font-size: clamp(32px, 8vw, 40px);
    letter-spacing: -0.03em;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .features-grid,
  .pricing-grid,
  .comparison-grid,
  .footer-grid,
  .usecases-grid,
  .problem-grid,
  .values-grid,
  .wins-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-filters {
    flex-wrap: wrap;
  }

  .blog-card:hover {
    transform: none;
  }

  .content-narrow {
    max-width: 100%;
    padding: 0 20px;
  }

  .prose { font-size: 1rem; }

  .prose h2 {
    font-size: 1.375rem;
    margin-top: 40px;
  }

  .prose h3 {
    font-size: 1.125rem;
    margin-top: 32px;
  }

  .article-cta { padding: 40px 24px; }

  .article-header .page-title {
    font-size: 1.625rem;
  }

  .breadcrumb-current { max-width: 160px; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .stat-number { font-size: 2rem; }

  .header-inner { gap: 16px; }

  .page-hero { padding: 48px 0 40px; }

  .cta-banner { padding: 40px 24px; }

  .comparison-table { font-size: 0.8125rem; }

  .comparison-table th,
  .comparison-table td {
    padding: 10px 8px;
  }

  .feature-detail {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .feature-detail:nth-child(even) {
    direction: ltr;
  }

  .faq-list {
    max-width: 100%;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}
