/* ============================================================
   KakoBuy Spreadsheet — Main Stylesheet
   ============================================================ */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #dbeafe;
  --color-accent: #f59e0b;
  --color-accent-dark: #d97706;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-bg-card: #ffffff;
  --color-text: #1e293b;
  --color-text-secondary: #64748b;
  --color-text-muted: #94a3b8;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #3b82f6;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --header-height: 72px;
  --max-width: 1200px;
  --content-width: 780px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-height);
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.header-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.header-nav a:hover,
.header-nav a:focus-visible {
  color: var(--color-primary);
  background: var(--color-primary-light);
  outline: none;
}
.header-nav a.nav-cta {
  color: var(--color-bg);
  background: var(--color-primary);
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
}
.header-nav a.nav-cta:hover,
.header-nav a.nav-cta:focus-visible {
  background: var(--color-primary-dark);
}
/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.15s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 56px 24px 32px;
  margin-top: 80px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand p { color: var(--color-text-secondary); margin-top: 8px; font-size: 0.9rem; }
.footer-col h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 14px; color: var(--color-text); }
.footer-col a {
  display: block;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 4px 0;
  font-size: 0.9rem;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--color-primary); }
.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* ============================================================
   Container & Layout
   ============================================================ */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.content-narrow { max-width: var(--content-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-hero { padding: 80px 0 64px; }
.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  color: var(--color-text);
}
.section-subtitle {
  text-align: center;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  display: flex;
  align-items: center;
  gap: 48px;
  min-height: calc(60vh - var(--header-height));
}
.hero-content { flex: 1; }
.hero-image { flex: 1; display: flex; justify-content: center; align-items: center; }
.hero-image img {
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
}
.hero h1 {
  font-size: 2.8rem;
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--color-text);
}
.hero h1 .highlight {
  color: var(--color-primary);
}
.hero p.hero-desc {
  font-size: 1.15rem;
  color: var(--color-text-secondary);
  margin-bottom: 28px;
  max-width: 520px;
  line-height: 1.6;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37,99,235,0.3);
}
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,0.35); }
.btn-secondary {
  background: var(--color-bg);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-secondary:hover { background: var(--color-primary-light); }
.btn-accent {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(245,158,11,0.3);
}
.btn-accent:hover { background: var(--color-accent-dark); }
.btn-sm { padding: 8px 18px; font-size: 0.9rem; border-radius: var(--radius-sm); }
.btn-block { display: flex; justify-content: center; width: 100%; }

/* ============================================================
   Category Grid
   ============================================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.category-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.category-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--color-primary);
}
.category-card .cat-icon { font-size: 1.4rem; flex-shrink: 0; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--color-text-secondary); font-size: 0.95rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }

/* ============================================================
   SEO Content Block
   ============================================================ */
.seo-content { max-width: var(--content-width); margin: 0 auto; }
.seo-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 14px;
  color: var(--color-text);
}
.seo-content h3 { font-size: 1.2rem; font-weight: 700; margin: 28px 0 10px; }
.seo-content p { margin-bottom: 16px; color: var(--color-text-secondary); line-height: 1.75; }
.seo-content ul, .seo-content ol { margin: 0 0 16px 24px; }
.seo-content li { margin-bottom: 6px; color: var(--color-text-secondary); }
.seo-content a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }
.seo-content a:hover { color: var(--color-primary-dark); }

/* ============================================================
   Tip / Alert Boxes
   ============================================================ */
.tip-box {
  border-left: 4px solid var(--color-info);
  background: #eff6ff;
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
  font-size: 0.95rem;
  color: #1e40af;
}
.tip-box strong { display: block; margin-bottom: 4px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }
.warning-box { border-left-color: var(--color-warning); background: #fffbeb; color: #92400e; }
.success-box { border-left-color: var(--color-success); background: #ecfdf5; color: #065f46; }
.danger-box { border-left-color: var(--color-danger); background: #fef2f2; color: #991b1b; }

/* ============================================================
   FAQ Accordion
   ============================================================ */
.faq-list { max-width: var(--content-width); margin: 0 auto; }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 20px;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  transition: background 0.15s;
}
.faq-question:hover { background: var(--color-bg-alt); }
.faq-question:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }
.faq-question .faq-icon {
  font-size: 1.2rem;
  transition: transform 0.25s;
  color: var(--color-text-muted);
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-item.open .faq-question .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}
.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 20px 18px;
}
.faq-answer p { color: var(--color-text-secondary); font-size: 0.95rem; line-height: 1.65; }

/* ============================================================
   Steps / Timeline
   ============================================================ */
.steps { max-width: var(--content-width); margin: 0 auto; }
.step {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
}
.step-num {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.step-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.step-body p { color: var(--color-text-secondary); font-size: 0.95rem; }

/* ============================================================
   Table
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  -webkit-overflow-scrolling: touch;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
}
.table-wrap th {
  background: var(--color-bg-alt);
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}
.table-wrap td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
}
.table-wrap tr:hover td { background: var(--color-primary-light); }

/* ============================================================
   Comparison Cards
   ============================================================ */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.compare-card {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}
.compare-card.featured {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  position: relative;
}
.compare-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}
.compare-card h4 { font-size: 1.05rem; margin-bottom: 8px; }
.compare-card p { color: var(--color-text-secondary); font-size: 0.9rem; }

/* ============================================================
   Checklist
   ============================================================ */
.checklist { list-style: none; padding: 0; }
.checklist li {
  padding: 10px 0 10px 32px;
  position: relative;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border-light);
}
.checklist li::before {
  content: '☐';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

/* ============================================================
   Blog List
   ============================================================ */
.blog-list { max-width: var(--content-width); margin: 0 auto; }
.blog-list-item {
  display: block;
  padding: 28px 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.2s;
}
.blog-list-item:hover { padding-left: 8px; }
.blog-list-item h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-text);
  transition: color 0.15s;
}
.blog-list-item:hover h2 { color: var(--color-primary); }
.blog-list-item .blog-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.blog-list-item p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================================
   Blog Article
   ============================================================ */
.article-header {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 48px 24px 32px;
  text-align: center;
}
.article-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}
.article-meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.article-body {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}
.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 14px;
  padding-top: 8px;
}
.article-body h3 { font-size: 1.2rem; font-weight: 700; margin: 28px 0 10px; }
.article-body p { margin-bottom: 18px; color: var(--color-text-secondary); line-height: 1.8; }
.article-body ul, .article-body ol { margin: 0 0 18px 24px; }
.article-body li { margin-bottom: 6px; color: var(--color-text-secondary); }
.article-body a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--color-primary-dark); }
/* Article TOC */
.article-toc {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 32px;
}
.article-toc h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.article-toc ol { margin: 0 0 0 20px; }
.article-toc li { margin-bottom: 6px; font-size: 0.925rem; }
.article-toc a { color: var(--color-primary); text-decoration: none; }
.article-toc a:hover { text-decoration: underline; }

/* ============================================================
   Related Articles
   ============================================================ */
.related-articles {
  max-width: var(--content-width);
  margin: 56px auto 0;
  padding: 32px 24px;
  border-top: 1px solid var(--color-border);
}
.related-articles h2 { font-size: 1.35rem; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.related-card {
  display: block;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.925rem;
  transition: all 0.2s;
}
.related-card:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ============================================================
   Article CTA
   ============================================================ */
.article-cta {
  max-width: var(--content-width);
  margin: 40px auto 0;
  padding: 32px 24px;
  text-align: center;
  background: var(--color-primary-light);
  border-radius: var(--radius-lg);
}
.article-cta h2 { font-size: 1.35rem; margin-bottom: 8px; }
.article-cta p { color: var(--color-text-secondary); margin-bottom: 18px; }

/* ============================================================
   Footer CTA
   ============================================================ */
.footer-cta {
  text-align: center;
  padding: 64px 24px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  border-radius: var(--radius-lg);
  margin: 0 24px;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}
.footer-cta h2 { font-size: 1.75rem; margin-bottom: 10px; }
.footer-cta p { opacity: 0.9; margin-bottom: 24px; font-size: 1.05rem; }
.footer-cta .btn-primary { background: #fff; color: var(--color-primary); box-shadow: none; }
.footer-cta .btn-primary:hover { background: #f1f5f9; }

/* ============================================================
   Breadcrumbs
   ============================================================ */
.breadcrumbs {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.breadcrumbs a { color: var(--color-primary); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { margin: 0 8px; color: var(--color-text-muted); }

/* ============================================================
   Contact Form
   ============================================================ */
.contact-form { max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.925rem; }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.15s;
  background: var(--color-bg);
  color: var(--color-text);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.form-group textarea { min-height: 140px; resize: vertical; }

/* ============================================================
   Privacy Policy
   ============================================================ */
.policy-content { max-width: var(--content-width); margin: 0 auto; padding: 0 24px; }
.policy-content h2 { font-size: 1.35rem; font-weight: 700; margin: 32px 0 12px; }
.policy-content h3 { font-size: 1.1rem; font-weight: 700; margin: 24px 0 8px; }
.policy-content p { margin-bottom: 14px; color: var(--color-text-secondary); line-height: 1.75; }
.policy-content ul { margin: 0 0 16px 24px; }
.policy-content li { color: var(--color-text-secondary); margin-bottom: 4px; }

/* ============================================================
   Back to Top
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  box-shadow: var(--shadow-lg);
  z-index: 90;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--color-primary-dark); }
.back-to-top:focus-visible { outline: 3px solid var(--color-primary-dark); outline-offset: 2px; }

/* ============================================================
   Theme Toggle (dark mode)
   ============================================================ */
.theme-toggle {
  background: none;
  border: 1px solid var(--color-border);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  transition: background 0.15s;
  margin-left: 4px;
}
.theme-toggle:hover { background: var(--color-bg-alt); }
.theme-toggle:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .hero { flex-direction: column; text-align: center; min-height: auto; }
  .hero h1 { font-size: 2.2rem; }
  .hero p.hero-desc { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-image { order: -1; }
  .hero-image img { max-width: 320px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .header-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 99;
    border-top: 1px solid var(--color-border);
  }
  .header-nav.open { transform: translateX(0); }
  .header-nav a { padding: 14px 16px; font-size: 1rem; border-radius: var(--radius-sm); }
  .nav-toggle { display: flex; }
  .hero h1 { font-size: 1.8rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .section { padding: 40px 0; }
  .article-header h1 { font-size: 1.6rem; }
  .compare-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .category-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.5rem; }
  .section-title { font-size: 1.4rem; }
  .footer-cta { margin: 0 12px; padding: 40px 20px; }
}

/* ============================================================
   Utility
   ============================================================ */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-secondary); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ============================================================
   Dark Theme Overrides
   ============================================================ */
html.dark-theme {
  --color-bg: #0f172a;
  --color-bg-alt: #1e293b;
  --color-bg-card: #1e293b;
  --color-text: #e2e8f0;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  --color-border: #334155;
  --color-border-light: #1e293b;
}
html.dark-theme .site-header { background: #0f172a; }
html.dark-theme .site-footer { background: #1e293b; }
html.dark-theme .faq-question:hover { background: #1e293b; }
html.dark-theme .table-wrap th { background: #1e293b; }
html.dark-theme .tip-box { background: #172554; color: #93c5fd; }
html.dark-theme .warning-box { background: #451a03; color: #fde68a; }
html.dark-theme .success-box { background: #052e16; color: #6ee7b7; }
html.dark-theme .danger-box { background: #450a0a; color: #fca5a5; }
html.dark-theme .article-toc { background: #1e293b; }
html.dark-theme .compare-card.featured { background: #172554; }
html.dark-theme .card { background: #1e293b; }
html.dark-theme .category-card { background: #1e293b; }
