/* ════════════════════════════════════════════════════
   ScopeScrape Design System
   scopescrape.earnedconviction.com
   ════════════════════════════════════════════════════ */

/* ─── TOKENS ─── */
:root {
  --bg: rgb(26, 26, 26);
  --bg-elevated: rgb(34, 34, 34);
  --bg-card: rgb(38, 38, 38);
  --bg-card-hover: rgb(44, 44, 44);
  --text: rgb(245, 240, 232);
  --text-90: rgba(245, 240, 232, 0.9);
  --text-85: rgba(245, 240, 232, 0.85);
  --text-70: rgba(245, 240, 232, 0.7);
  --text-50: rgba(245, 240, 232, 0.5);
  --text-30: rgba(245, 240, 232, 0.3);
  --muted: rgb(154, 154, 138);
  --accent: rgb(192, 57, 43);
  --accent-15: rgba(192, 57, 43, 0.15);
  --accent-25: rgba(192, 57, 43, 0.25);
  --accent-hover: rgb(210, 70, 55);
  --border: rgba(245, 240, 232, 0.08);
  --border-accent: rgba(192, 57, 43, 0.3);
  --green: rgb(39, 174, 96);
  --green-15: rgba(39, 174, 96, 0.15);
  --yellow: rgb(241, 196, 15);
  --yellow-15: rgba(241, 196, 15, 0.15);
  --blue: rgb(52, 152, 219);
  --blue-15: rgba(52, 152, 219, 0.15);
  --purple: rgb(155, 89, 182);
  --purple-15: rgba(155, 89, 182, 0.15);
}

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

/* ─── BASE ─── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* ─── NAV ─── */
nav {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.nav-logo svg { width: 28px; height: 28px; }
.nav-wordmark {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 0; }
.nav-links a {
  padding: 0.7rem 1rem;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-github svg { width: 15px; height: 15px; }

/* ─── MAIN ─── */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* ─── TYPOGRAPHY ─── */
h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1rem;
}
h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}
h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-90);
  margin-bottom: 0.5rem;
}
p {
  color: var(--text-85);
  margin-bottom: 1rem;
}
p:last-child { margin-bottom: 0; }

/* ─── SECTIONS ─── */
section { padding: 2.5rem 0; }
section + section { border-top: 1px solid var(--border); }

/* ─── PAGE HEADER ─── */
.page-header {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { margin-bottom: 0.5rem; }
.page-header p {
  font-size: 1.1rem;
  color: var(--text-70);
  max-width: 560px;
}

/* ─── TAGS ─── */
.tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: 'Source Serif 4', Georgia, serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}
.tag-accent {
  background: var(--accent-15);
  color: var(--accent);
  border: 1px solid var(--accent-25);
}
.tag-muted {
  background: rgba(154, 154, 138, 0.1);
  color: var(--muted);
  border: 1px solid rgba(154, 154, 138, 0.15);
}
.tag-green {
  background: var(--green-15);
  color: var(--green);
  border: 1px solid rgba(39, 174, 96, 0.25);
}
.tag-blue {
  background: var(--blue-15);
  color: var(--blue);
  border: 1px solid rgba(52, 152, 219, 0.25);
}
.tag-purple {
  background: var(--purple-15);
  color: var(--purple);
  border: 1px solid rgba(155, 89, 182, 0.25);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 6px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--accent);
  color: var(--text);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: transparent;
  color: var(--text-85);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: rgba(245, 240, 232, 0.2);
  color: var(--text);
}

/* ─── CARDS ─── */
.card {
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s;
  text-decoration: none;
  display: block;
}
.card:hover {
  border-color: rgba(245, 240, 232, 0.15);
  background: var(--bg-card-hover);
}

/* ─── FEATURE GRID ─── */
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}
.feature {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s;
}
.feature:hover {
  border-color: rgba(245, 240, 232, 0.12);
  background: var(--bg-card-hover);
}
.feature-icon { font-size: 1.3rem; margin-bottom: 0.6rem; display: block; }
.feature h3 { font-size: 0.9rem; margin-bottom: 0.35rem; }
.feature p { font-size: 0.85rem; color: var(--text-70); line-height: 1.55; }

/* ─── STEPS ─── */
.steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}
.step { display: flex; gap: 1.25rem; align-items: flex-start; }
.step-number {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-15);
  color: var(--accent);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--accent-25);
  margin-top: 0.15rem;
}
.step-content h3 { margin-bottom: 0.25rem; }
.step-content p { font-size: 0.95rem; color: var(--text-70); margin-bottom: 0; }

/* ─── PLATFORMS ─── */
.platforms {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.platform {
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
}
.platform:hover { border-color: rgba(245, 240, 232, 0.15); }
.platform-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.platform-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-90);
  margin-bottom: 0.25rem;
}
.platform-status {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-live { color: var(--green); }
.status-soon { color: var(--yellow); }

/* ─── CLI PREVIEW ─── */
.cli-preview {
  background: rgb(18, 18, 18);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 1rem;
}
.cli-header {
  background: rgb(30, 30, 30);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.cli-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(245, 240, 232, 0.15);
}
.cli-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-50);
  margin-left: 0.5rem;
}
.cli-body {
  padding: 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  overflow-x: auto;
}
.cli-prompt { color: var(--green); }
.cli-command { color: var(--text-90); }
.cli-flag { color: var(--blue); }
.cli-value { color: var(--yellow); }
.cli-comment { color: var(--text-50); font-style: italic; }
.cli-output { color: var(--text-70); }
.cli-highlight { color: var(--accent); font-weight: 500; }

/* ─── TABLES ─── */
.comparison-wrapper { margin-top: 1rem; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-70);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
thead th:first-child { border-radius: 8px 0 0 0; }
thead th:last-child { border-radius: 0 8px 0 0; }
tbody td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-85);
}
tbody tr:hover { background: rgba(245, 240, 232, 0.02); }
.check { color: var(--green); font-weight: bold; }
.cross { color: var(--text-50); }
.partial { color: var(--yellow); }
.col-highlight { background: rgba(192, 57, 43, 0.04); }
thead th.col-highlight { color: var(--accent); background: rgba(192, 57, 43, 0.08); }

/* ─── TECH PILLS ─── */
.tech-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.tech-pill {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-70);
}

/* ─── ROADMAP ─── */
.roadmap { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.roadmap-phase { display: flex; gap: 1rem; align-items: flex-start; }
.phase-marker {
  flex-shrink: 0; width: 4px; min-height: 60px;
  border-radius: 2px; align-self: stretch;
}
.phase-active { background: var(--accent); }
.phase-next { background: var(--yellow); }
.phase-future { background: var(--text-50); }
.phase-content { flex: 1; }
.phase-label {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 0.25rem;
}
.phase-label-active { color: var(--accent); }
.phase-label-next { color: var(--yellow); }
.phase-label-future { color: var(--text-50); }
.phase-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600; font-size: 0.95rem;
  color: var(--text-90); margin-bottom: 0.25rem;
}
.phase-desc { font-size: 0.85rem; color: var(--text-70); margin: 0; }

/* ─── BLOG CARDS ─── */
.blog-list { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1rem; }
.blog-card {
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s;
  text-decoration: none;
  display: block;
}
.blog-card:hover {
  border-color: rgba(245, 240, 232, 0.15);
  background: var(--bg-card-hover);
}
.blog-meta {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 0.5rem; font-size: 0.78rem; color: var(--muted);
}
.blog-author { color: var(--text-85); font-weight: 500; }
.blog-meta-dot {
  width: 3px; height: 3px; border-radius: 50%; background: var(--muted);
}
.blog-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem; font-weight: 400;
  color: var(--text); margin-bottom: 0.35rem;
}
.blog-card p {
  font-size: 0.9rem; color: var(--text-70);
  line-height: 1.6; margin: 0;
}
.blog-card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.65rem; }
.blog-card-tag {
  font-size: 0.65rem; padding: 0.1rem 0.5rem; border-radius: 3px;
  background: rgba(154, 154, 138, 0.1); color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.author-note {
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 1.25rem; padding: 0.75rem 1rem;
  background: var(--accent-15); border: 1px solid var(--accent-25);
  border-radius: 6px; font-size: 0.82rem; color: var(--text-70);
}
.author-note svg {
  flex-shrink: 0; width: 16px; height: 16px; color: var(--accent);
}
.view-all {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin-top: 1rem; font-size: 0.88rem; color: var(--accent);
  text-decoration: none; font-weight: 500; transition: gap 0.2s;
}
.view-all:hover { gap: 0.6rem; }

/* ─── CODE BLOCKS ─── */
code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: var(--bg-card);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--accent);
}
pre {
  background: rgb(18, 18, 18);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-85);
  margin: 1rem 0;
}
pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* ─── SIDEBAR LAYOUT (for docs) ─── */
.docs-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  margin-top: 1.5rem;
}
.docs-sidebar { position: sticky; top: 1.5rem; align-self: start; }
.docs-sidebar-section { margin-bottom: 1.5rem; }
.docs-sidebar-title {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted);
  margin-bottom: 0.5rem; font-weight: 600;
}
.docs-sidebar a {
  display: block; padding: 0.3rem 0; font-size: 0.85rem;
  color: var(--text-70); text-decoration: none; transition: color 0.15s;
}
.docs-sidebar a:hover { color: var(--text); }
.docs-sidebar a.active { color: var(--accent); }
.docs-content h2 { margin-top: 1.5rem; }
.docs-content h2:first-child { margin-top: 0; }
.docs-content h3 { margin-top: 1.25rem; }

/* ─── TREE VIEW (for codebase) ─── */
.tree { font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; line-height: 2; }
.tree-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.15rem 0.5rem; border-radius: 4px;
  color: var(--text-70); cursor: default;
}
.tree-item:hover { background: rgba(245, 240, 232, 0.04); }
.tree-icon { width: 16px; text-align: center; flex-shrink: 0; }
.tree-folder { color: var(--blue); }
.tree-file { color: var(--text-50); }
.tree-indent { padding-left: 1.25rem; }
.tree-indent-2 { padding-left: 2.5rem; }
.tree-indent-3 { padding-left: 3.75rem; }
.tree-desc {
  margin-left: auto; font-size: 0.72rem;
  color: var(--text-30); font-family: 'Source Serif 4', Georgia, serif;
}

/* ─── FOOTER CTA ─── */
.footer-cta {
  text-align: center; padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
}
.footer-cta h2 { margin-bottom: 0.75rem; }
.footer-cta p { color: var(--text-70); margin-bottom: 1.5rem; }
.footer-cta .ctas { justify-content: center; }

/* ─── FOOTER ─── */
footer {
  max-width: 720px; margin: 0 auto;
  padding: 2rem 1.5rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; color: var(--text-50);
}
footer a {
  color: var(--muted); text-decoration: none; transition: color 0.2s;
}
footer a:hover { color: var(--text); }

/* ─── UTILITY ─── */
.ctas { display: flex; gap: 1rem; flex-wrap: wrap; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 0.85rem; }

/* ─── BLOG ARTICLE ─── */
.blog-post { max-width: 720px; margin: 0 auto; padding: 2rem 1.5rem; }

.blog-post .page-header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}
.blog-post .page-header h1 {
  font-size: 2.25rem;
  margin: 0 0 1.25rem 0;
  line-height: 1.2;
  font-weight: 500;
}
.blog-post .meta-info {
  display: flex;
  gap: 1.5rem;
  font-size: 0.88rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.blog-post .meta-info strong {
  color: var(--text-85);
  font-weight: 600;
  margin-right: 0.25rem;
}

.article-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-85);
}
.article-body h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin: 2.5rem 0 1rem 0;
  color: var(--text);
}
.article-body h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem 0;
  color: var(--text-90);
}
.article-body p { margin-bottom: 1.25rem; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--accent-hover); }

.article-body ul, .article-body ol {
  margin: 1.25rem 0 1.25rem 1.5rem;
  line-height: 1.8;
  color: var(--text-85);
}
.article-body li { margin-bottom: 0.5rem; }
.article-body li strong { color: var(--text-90); }

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.88rem;
}
.article-body table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--text-70);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.article-body table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-85);
}
.article-body table tr:hover { background: rgba(245, 240, 232, 0.02); }
.article-body table code {
  font-size: 0.82em;
  background: var(--bg-card);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--accent);
}

.article-body .callout {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 6px 6px 0;
}
.article-body .callout p { margin-bottom: 0.5rem; color: var(--text-70); }
.article-body .callout p:last-child { margin-bottom: 0; }

.blog-footer-links {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}
.blog-footer-links a { color: var(--accent); text-decoration: none; }
.blog-footer-links a:hover { text-decoration: underline; }

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
  h1 { font-size: 2.25rem; }
  .features { grid-template-columns: 1fr; }
  .platforms { grid-template-columns: 1fr 1fr; }
  nav { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .nav-links { overflow-x: auto; }
  footer { flex-direction: column; gap: 0.75rem; text-align: center; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
}