/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ── Design Tokens ───────────────────────────────────────────────────────── */
:root {
  /* Light article surface */
  --bg:          #FFFFFF;
  --surface:     #F8FAFC;
  --surface-2:   #F1F5F9;
  --border:      #E2E8F0;
  --text:        #111827;
  --text-muted:  #6B7280;

  /* Brand accent — accessible on light bg */
  --accent:      #00D9F5;   /* decorative only on light bg */
  --accent-text: #0E7490;   /* 4.93:1 on white — tags, labels */
  --accent-link: #0369A1;   /* 5.44:1 on white — body links */

  /* Semantic colors (light bg) */
  --green:       #059669;
  --green-bg:    #ECFDF5;
  --red:         #DC2626;
  --red-bg:      #FEF2F2;

  /* Brand dark — header / footer */
  --brand-bg:      #07070D;
  --brand-surface: #0C0C16;
  --brand-border:  #1C1C2E;
  --brand-text:    #DDDDF0;
  --brand-muted:   #8585A8;
}

/* ── Skip nav ────────────────────────────────────────────────────────────── */
.skip-nav {
  position: absolute; top: -100%; left: 16px; z-index: 9999;
  background: var(--accent); color: var(--brand-bg);
  font-family: 'IBM Plex Mono', monospace; font-size: 0.82rem; font-weight: 600;
  padding: 10px 20px; text-decoration: none;
}
.skip-nav:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
body {
  font-family: 'IBM Plex Mono', monospace;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
.container       { max-width: 780px;  margin: 0 auto; padding: 0 24px; }
.container--wide { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ── Site Header (dark branded) ──────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,7,13,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--brand-border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.logo {
  font-family: 'Bebas Neue', cursive; font-size: 1.65rem;
  letter-spacing: 0.06em; color: var(--accent); text-decoration: none;
}
.logo span { color: var(--brand-text); }
.header-nav { display: flex; align-items: center; gap: 24px; }
.nav-link {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem;
  font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; color: var(--brand-muted); transition: color 0.2s;
}
.nav-link:hover, .nav-link--active { color: var(--accent); }
.nav-cta {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem;
  font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; color: var(--brand-bg); background: var(--accent);
  padding: 8px 20px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: background 0.2s;
}
.nav-cta:hover { background: #fff; }

/* ── Article Header Band (light gray) ────────────────────────────────────── */
.article-header {
  padding: 64px 0 48px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.article-tag {
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-text);
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.article-tag::before { content: ''; width: 24px; height: 1px; background: var(--accent); }
.article-title {
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.05; letter-spacing: 0.02em;
  color: var(--text); margin-bottom: 16px;
}
.article-meta { font-size: 0.75rem; color: var(--text-muted); }

/* ── Article Body (white) ────────────────────────────────────────────────── */
.article-body { padding: 56px 0 80px; }

.article-body h2 {
  font-family: 'Bebas Neue', cursive; font-size: 1.8rem;
  letter-spacing: 0.03em; color: var(--text); margin: 48px 0 16px;
}
.article-body h3 {
  font-family: 'Bebas Neue', cursive; font-size: 1.25rem;
  letter-spacing: 0.03em; color: var(--accent-text); margin: 28px 0 10px;
}
.article-body p {
  font-size: 0.88rem; color: var(--text-muted); line-height: 1.95; margin-bottom: 20px;
}
.article-body strong { color: var(--text); font-weight: 600; }
.article-body em { font-style: italic; }
.article-body ul, .article-body ol { margin: 0 0 20px 0; padding: 0; list-style: none; }
.article-body li {
  font-size: 0.87rem; color: var(--text-muted); line-height: 1.85;
  padding: 8px 0 8px 24px; border-bottom: 1px solid var(--border); position: relative;
}
.article-body li:last-child { border-bottom: none; }
.article-body ul li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }
.article-body ol { counter-reset: item; }
.article-body ol li { counter-increment: item; }
.article-body ol li::before {
  content: counter(item) '.'; position: absolute; left: 0;
  color: var(--accent-text); font-weight: 600;
}
.article-body a {
  color: var(--accent-link); text-decoration: none;
  border-bottom: 1px solid rgba(3,105,161,0.3);
}
.article-body a:hover { border-bottom-color: var(--accent-link); }
.article-body code {
  font-family: 'IBM Plex Mono', monospace;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 2px 7px; font-size: 0.82rem; color: var(--accent-text); word-break: break-all;
}

/* ── Callout Boxes ───────────────────────────────────────────────────────── */
.callout {
  padding: 20px 24px; border-left: 3px solid var(--accent);
  background: #F0FDFF; margin: 32px 0;
  font-size: 0.85rem; color: var(--text); line-height: 1.85;
}
.callout strong {
  display: block; margin-bottom: 6px; font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text);
}
.callout--red { border-left-color: var(--red); background: var(--red-bg); }
.callout--red strong { color: var(--red); }
.callout--green { border-left-color: var(--green); background: var(--green-bg); }
.callout--green strong { color: var(--green); }

/* ── Comparison / Cost Tables ────────────────────────────────────────────── */
.comparison-table, .cost-table {
  width: 100%; border: 1px solid var(--border); border-collapse: collapse;
  margin: 32px 0; font-size: 0.82rem;
}
.comparison-table th, .cost-table th,
.comparison-table td, .cost-table td {
  padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: left;
}
.comparison-table th, .cost-table th {
  background: var(--surface); color: var(--accent-text);
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.72rem;
}
.comparison-table td, .cost-table td { color: var(--text-muted); }
.comparison-table td:first-child,
.cost-table td:first-child { color: var(--text); font-weight: 500; }
.comparison-table tr:last-child td,
.cost-table tr:last-child td { border-bottom: none; }
.comparison-table .win   { color: var(--green); font-weight: 600; }
.comparison-table .lose  { color: var(--red); }
.comparison-table .tie   { color: var(--text-muted); }
.cost-table .price       { color: var(--text); font-weight: 600; }
.cost-table .price-red   { color: var(--red); font-weight: 600; }
.cost-table .price-green { color: var(--green); font-weight: 600; }
.cost-table tfoot td { background: var(--surface-2); font-weight: 600; color: var(--text); }

/* ── Step Cards ──────────────────────────────────────────────────────────── */
.step-card {
  background: var(--surface); border: 1px solid var(--border);
  padding: 28px 32px; margin: 28px 0; position: relative;
}
.step-card::before {
  content: attr(data-step); position: absolute; top: -14px; left: 24px;
  background: var(--accent); color: var(--brand-bg);
  font-family: 'Bebas Neue', cursive; font-size: 0.9rem; letter-spacing: 0.08em;
  padding: 2px 12px;
}
.step-card h3 {
  font-family: 'Bebas Neue', cursive; font-size: 1.25rem;
  letter-spacing: 0.03em; color: var(--text); margin: 0 0 12px;
}
.step-card p {
  font-size: 0.85rem; color: var(--text-muted); line-height: 1.85;
  margin: 0 0 12px;
}
.step-card p:last-child { margin-bottom: 0; }
.step-card code {
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 2px 7px; font-size: 0.82rem; color: var(--accent-text); word-break: break-all;
}
.step-card a { color: var(--accent-link); border-bottom: 1px solid rgba(3,105,161,0.3); }
.step-card a:hover { border-bottom-color: var(--accent-link); }

/* ── Scenario Cards ──────────────────────────────────────────────────────── */
.scenario {
  background: var(--surface); border: 1px solid var(--border);
  border-top: 3px solid var(--red); padding: 24px 28px; margin: 20px 0;
}
.scenario.resolved { border-top-color: var(--green); }
.scenario-label {
  font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 10px; display: block;
}
.scenario .scenario-label { color: var(--red); }
.scenario.resolved .scenario-label { color: var(--green); }
.scenario h3 {
  font-family: 'Bebas Neue', cursive; font-size: 1.15rem;
  color: var(--text); margin-bottom: 10px;
}
.scenario p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.85; margin: 0; }

/* ── Highlight Box ───────────────────────────────────────────────────────── */
.highlight-box {
  background: var(--surface); border: 1px solid var(--border);
  padding: 32px; margin: 40px 0; text-align: center;
}
.highlight-box .big-number {
  font-family: 'Bebas Neue', cursive; font-size: 4rem;
  color: var(--green); letter-spacing: 0.02em; line-height: 1; display: block;
}
.highlight-box .big-label {
  font-size: 0.78rem; color: var(--text-muted);
  letter-spacing: 0.1em; text-transform: uppercase; margin-top: 6px;
}

/* ── CTA Block (dark branded) ────────────────────────────────────────────── */
.cta-block {
  background: var(--brand-surface); border: 1px solid var(--brand-border);
  padding: 48px 40px; text-align: center; margin: 64px 0 0;
}
.cta-block h2 {
  font-family: 'Bebas Neue', cursive; font-size: 2.2rem;
  color: var(--brand-text); margin-bottom: 12px;
}
.cta-block p {
  font-size: 0.85rem; color: var(--brand-muted);
  max-width: 440px; margin: 0 auto 28px; line-height: 1.85;
}
.btn-primary {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.82rem;
  font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; border: none; color: var(--brand-bg);
  background: var(--accent); padding: 14px 32px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: background 0.2s;
}
.btn-primary:hover { background: #fff; }
.btn-primary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ── Related Articles ────────────────────────────────────────────────────── */
.related {
  padding: 48px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.related-inner { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.related h3 {
  font-family: 'Bebas Neue', cursive; font-size: 1.4rem;
  letter-spacing: 0.04em; color: var(--text); margin-bottom: 20px;
}
.related-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--border);
}
.related-card {
  background: var(--bg); padding: 24px; text-decoration: none;
  transition: background 0.2s; display: block;
}
.related-card:hover { background: var(--surface-2); }
.related-card .rc-tag {
  font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: 8px; display: block;
}
.related-card .rc-title { font-size: 0.85rem; color: var(--text); line-height: 1.5; }

/* ── Site Footer (dark branded) ──────────────────────────────────────────── */
.site-footer {
  padding: 28px 0;
  background: var(--brand-bg);
  border-top: 1px solid var(--brand-border);
}
.footer-inner {
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 10px;
}
.site-footer p, .site-footer a {
  font-size: 0.78rem; color: var(--brand-muted); text-decoration: none;
}
.site-footer a:hover { color: var(--accent); }
.footer-disclaimer {
  font-size: 0.7rem; color: var(--brand-muted);
  opacity: 0.5; margin-top: 14px; text-align: center;
}

/* ── Blog Index Page ─────────────────────────────────────────────────────── */
.page-header {
  padding: 72px 0 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.section-label {
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-text);
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px;
}
.section-label::before { content: ''; width: 24px; height: 1px; background: var(--accent); }
.page-title {
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1; letter-spacing: 0.02em; color: var(--text); margin-bottom: 16px;
}
.page-sub { font-size: 0.88rem; color: var(--text-muted); max-width: 480px; line-height: 1.9; }

.articles-section { padding: 56px 0 96px; }
.articles-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--border); margin-top: 40px;
}
.article-card {
  background: var(--surface); padding: 36px 32px; text-decoration: none;
  display: flex; flex-direction: column; transition: background 0.2s;
}
.article-card:hover { background: var(--surface-2); }
.card-tag {
  font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: 16px; display: block;
}
.card-title {
  font-family: 'Bebas Neue', cursive; font-size: 1.6rem;
  letter-spacing: 0.02em; line-height: 1.1; color: var(--text); margin-bottom: 14px;
}
.card-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.85; flex: 1; }
.card-read {
  font-size: 0.72rem; color: var(--accent-text);
  letter-spacing: 0.1em; text-transform: uppercase; margin-top: 20px;
}

.cta-strip {
  background: var(--brand-surface);
  border-top: 1px solid var(--brand-border);
  border-bottom: 1px solid var(--brand-border);
  padding: 48px 0; margin-top: 40px;
}
.cta-strip-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.cta-strip h2 {
  font-family: 'Bebas Neue', cursive; font-size: 2rem;
  letter-spacing: 0.02em; color: var(--brand-text);
}
.cta-strip p { font-size: 0.82rem; color: var(--brand-muted); max-width: 380px; line-height: 1.85; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .articles-grid { grid-template-columns: 1fr; }
  .cta-strip-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .related-grid { grid-template-columns: 1fr; }
  .cta-block { padding: 32px 24px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .comparison-table, .cost-table { font-size: 0.75rem; }
  .comparison-table th, .cost-table th,
  .comparison-table td, .cost-table td { padding: 10px 12px; }
  .step-card { padding: 20px 20px; }
  .article-card { padding: 28px 20px; }
}
