:root {
  --bg:        #0d0d0d;
  --surface:   #141414;
  --border:    #2a1a0e;
  --border2:   #3d2210;
  --accent:    #ff6b1a;
  --accent2:   #cc4400;
  --accent3:   #ffaa00;
  --grad:      linear-gradient(135deg, #ffaa00 0%, #ff6b1a 50%, #cc2200 100%);
  --grad-h:    linear-gradient(90deg, #ffaa00, #ff6b1a, #cc2200);
  --text:      #d4c4b0;
  --muted:     #7a6050;
  --white:     #f5ede4;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow Condensed', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,107,26,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,107,26,.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 3rem;
  background: rgba(13,13,13,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-logo img { height: 36px; display: block; }
nav ul { list-style: none; display: flex; gap: 2.2rem; }
nav ul a {
  color: var(--muted); text-decoration: none;
  font-size: .85rem; letter-spacing: .1em; text-transform: uppercase;
  transition: color .2s;
}
nav ul a:hover { color: var(--accent); }
.nav-cta {
  background: var(--grad); color: #fff;
  padding: .5rem 1.3rem; border-radius: 5px;
  font-size: .8rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; text-decoration: none;
  transition: opacity .2s, transform .2s;
}
.nav-cta:hover { opacity: .88; transform: translateY(-1px); }

/* ARTICLE HERO */
.article-hero {
  position: relative; z-index: 1;
  padding: 8rem 2rem 4rem;
  max-width: 860px; margin: 0 auto;
  text-align: left;
}
.back-link {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--muted); text-decoration: none;
  font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 2rem;
  transition: color .2s;
}
.back-link:hover { color: var(--accent); }
.article-tag {
  font-family: 'Space Mono', monospace;
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent3); border: 1px solid var(--border2);
  padding: .28rem .8rem; border-radius: 20px;
  display: inline-block; margin-bottom: 1.2rem;
}
.article-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800; color: var(--white);
  letter-spacing: -.02em; line-height: 1.1;
  margin-bottom: 1.2rem;
}
.article-hero .lead {
  font-size: 1.2rem; color: var(--muted); max-width: 640px; line-height: 1.7;
}
.grad-line {
  display: block; width: 48px; height: 3px; border-radius: 2px;
  background: var(--grad); margin: 1.5rem 0;
}

/* ARTICLE BODY */
.article-body {
  position: relative; z-index: 1;
  max-width: 860px; margin: 0 auto;
  padding: 0 2rem 6rem;
}
.article-body h2 {
  font-size: 1.7rem; font-weight: 800; color: var(--white);
  letter-spacing: -.01em; margin: 2.5rem 0 1rem;
}
.article-body h3 {
  font-size: 1.25rem; font-weight: 700; color: var(--white);
  margin: 2rem 0 .75rem;
}
.article-body p {
  font-size: 1.05rem; color: var(--muted);
  line-height: 1.8; margin-bottom: 1.1rem;
}
.article-body p strong { color: var(--white); }
.article-body a { color: var(--accent); }
.article-body a:hover { text-decoration: underline; }

.article-body ul, .article-body ol {
  margin: 1rem 0 1.2rem 1.2rem; color: var(--muted); font-size: 1.05rem;
}
.article-body ul { list-style: none; margin-left: 0; }
.article-body ul li { padding: .25rem 0; }
.article-body ul li::before { content: '→ '; color: var(--accent); }
.article-body ol li { padding: .25rem 0 .25rem .4rem; }
.article-body li strong { color: var(--white); }

pre, .code-block {
  background: #080808; border: 1px solid var(--border);
  border-radius: 10px; padding: 1.6rem;
  font-family: 'Space Mono', monospace;
  font-size: .73rem; line-height: 1.9;
  overflow-x: auto; margin: 1.2rem 0 1.5rem;
  white-space: pre;
}
code { font-family: 'Space Mono', monospace; font-size: .85em; color: var(--accent3); }
pre code { font-size: 1em; color: var(--text); }

/* COMPARISON TABLE */
.cmp-table {
  width: 100%; border-collapse: collapse;
  margin: 1.5rem 0; font-size: .95rem;
}
.cmp-table th {
  background: var(--surface); color: var(--white);
  padding: .85rem 1.1rem; text-align: left;
  border: 1px solid var(--border); font-weight: 700;
  font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
}
.cmp-table td {
  padding: .75rem 1.1rem; border: 1px solid var(--border);
  color: var(--muted); vertical-align: top;
}
.cmp-table tr:nth-child(even) td { background: rgba(255,107,26,.02); }
.cmp-table td strong { color: var(--white); }
.cmp-table td.good { color: #7edd9b; }
.cmp-table td.bad  { color: #e87070; }

/* CALLOUT BOX */
.callout {
  background: var(--surface); border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0; padding: 1.2rem 1.5rem;
  margin: 1.5rem 0; font-size: 1rem; color: var(--muted);
}
.callout strong { color: var(--white); }

/* STAT ROW */
.stat-row {
  display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 1.8rem 0;
}
.stat-box {
  flex: 1; min-width: 140px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 1.2rem; text-align: center;
}
.stat-box .num {
  font-family: 'Space Mono', monospace; font-size: 1.8rem; font-weight: 700;
  background: var(--grad-h); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  display: block;
}
.stat-box .lbl { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: .3rem; }

hr.divider { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* FOOTER */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2.5rem 3rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
footer p { font-size: .9rem; color: var(--muted); }
footer a { color: var(--muted); text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 2rem; }
.footer-links a { font-size: .9rem; }
.footer-logo img { height: 38px; }

/* RELATED CARDS */
.related { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.related h3 { font-size: 1.1rem; color: var(--white); font-weight: 700; margin-bottom: 1.2rem; }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.related-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.2rem;
  text-decoration: none; display: block;
  transition: border-color .2s;
}
.related-card:hover { border-color: var(--accent2); }
.related-card .rtag { font-family:'Space Mono',monospace; font-size:.6rem; letter-spacing:.12em; text-transform:uppercase; color:var(--accent3); margin-bottom:.4rem; }
.related-card h4 { font-size:.95rem; font-weight:700; color:var(--white); line-height:1.3; }

@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  nav ul { display: none; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .related-grid { grid-template-columns: 1fr; }
  .stat-row { flex-direction: column; }
  footer { flex-direction: column; align-items: flex-start; }
}
