/* AI Tools Insider - Main Stylesheet */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --text: #1e293b;
  --text-muted: #64748b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --success: #059669;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --max-w: 1200px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

/* ── Navigation ── */
.site-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.site-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}
.site-nav a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.site-nav a:hover { color: var(--primary); }

/* ── Container ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 768px) {
  .container { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ── Hero ── */
.hero {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.hero h1 { font-size: 2rem; margin-bottom: 0.75rem; }
.hero p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* ── Article Grid ── */
.article-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--bg);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card h2 a { color: var(--text); text-decoration: none; }
.card h2 a:hover { color: var(--primary); }
.card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.category {
  font-size: 0.75rem;
  background: #eff6ff;
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 100px;
}

/* ── Article ── */
.article-content { min-width: 0; }
.article-content header { margin-bottom: 2rem; }
.article-content h1 {
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
.article-meta {
  display: flex;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ── Article Body ── */
.article-body h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.article-body h3 { font-size: 1.2rem; margin: 1.5rem 0 0.75rem; }
.article-body p { margin-bottom: 1.25rem; }
.article-body ul, .article-body ol {
  margin: 1rem 0 1.25rem 1.5rem;
}
.article-body li { margin-bottom: 0.35rem; }
.article-body a { color: var(--primary); text-decoration: underline; }
.article-body a:hover { color: var(--primary-dark); }
.article-body blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  background: #eff6ff;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article-body blockquote p { margin: 0; }
.article-body em { font-size: 0.85rem; color: var(--text-muted); display: block; margin-bottom: 1.5rem; }

/* ── Table of Contents ── */
.toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
}
.toc h2 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; border: none; margin-top: 0; padding-top: 0; }
.toc ol { margin-left: 1.25rem; }
.toc li { margin-bottom: 0.3rem; }
.toc a { color: var(--text-muted); font-size: 0.9rem; text-decoration: none; }
.toc a:hover { color: var(--primary); }

/* ── Comparison Table ── */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.comparison-table th, .comparison-table td {
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  text-align: left;
}
.comparison-table th { background: var(--bg-alt); font-weight: 600; }
.comparison-table tr:hover td { background: #f8fafc; }

/* ── Sidebar ── */
.sidebar { position: sticky; top: 80px; }
.sidebar-widget {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.sidebar-widget h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.75rem; }
.sidebar-widget ul { list-style: none; }
.sidebar-widget li { margin-bottom: 0.5rem; }
.sidebar-widget a { color: var(--text); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.sidebar-widget a:hover { color: var(--primary); }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.site-footer a { color: var(--text-muted); }
