:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-card: #ffffff;
  --ink: #0f172a;
  --ink-mid: #475569;
  --ink-soft: #64748b;
  --ink-light: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --brand: #1e40af;
  --brand-bright: #2563eb;
  --brand-light: #dbeafe;
  --green: #047857;
  --green-bg: #d1fae5;
  --amber: #b45309;
  --amber-bg: #fef3c7;
  --red: #b91c1c;
  --red-bg: #fee2e2;
  --steel: #334155;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-soft);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== APP LAYOUT (matches live site) ===== */
.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

@media (max-width: 968px) {
  .app { grid-template-columns: 1fr; }
}

/* ===== SIDEBAR ===== */
.sidebar {
  background: white;
  border-right: 1px solid var(--line);
  padding: 28px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

@media (max-width: 968px) {
  .sidebar { position: relative; height: auto; border-right: none; border-bottom: 1px solid var(--line); }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 4px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  background: var(--brand);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.brand-tag {
  font-size: 11px;
  color: var(--ink-soft);
  margin-bottom: 28px;
  margin-left: 48px;
  letter-spacing: 0.02em;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 10px;
  font-weight: 600;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--ink-mid);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 2px;
  transition: all 0.15s;
}

.sidebar-link:hover {
  background: var(--bg-soft);
  color: var(--ink);
  text-decoration: none;
}

.sidebar-link.active {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}

.stats-block {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.sidebar-stat {
  margin-bottom: 12px;
}

.sidebar-stat:last-child { margin-bottom: 0; }

.sidebar-stat-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.sidebar-stat-label {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.sidebar-footer {
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.5;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

/* ===== MAIN ===== */
.main {
  background: var(--bg-soft);
}

/* ===== TOP STATUS BAR ===== */
.top-status {
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 10px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-soft);
  flex-wrap: wrap;
  gap: 8px;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.system-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px rgba(4, 120, 87, 0.4);
}

.system-meta {
  display: flex;
  gap: 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .system-meta { font-size: 10px; gap: 10px; }
  .system-meta span:nth-child(2) { display: none; }
}

/* ===== BREADCRUMB ===== */
.blog-breadcrumb {
  padding: 14px 32px;
  background: white;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-soft);
}

.blog-breadcrumb a { color: var(--brand); }
.blog-breadcrumb .sep { margin: 0 8px; color: var(--ink-light); }

/* ===== ARTICLE CONTAINER ===== */
.article-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px;
}

@media (max-width: 640px) {
  .article-container { padding: 20px; }
}

/* ===== ARTICLE ===== */
.article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.article-header {
  padding: 40px 48px 28px;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 640px) {
  .article-header { padding: 28px 24px 20px; }
}

.article-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-light);
  color: var(--brand);
  padding: 6px 12px;
  border-radius: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.article-header h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

@media (max-width: 640px) {
  .article-header h1 { font-size: 26px; }
}

.article-subtitle {
  font-size: 18px;
  color: var(--ink-mid);
  line-height: 1.5;
  margin-bottom: 24px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-soft);
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.author-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 32px;
  height: 32px;
  background: var(--brand);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.author-name {
  color: var(--ink);
  font-weight: 600;
}

/* ===== CONTENT ===== */
.article-content {
  padding: 36px 48px 48px;
}

@media (max-width: 640px) {
  .article-content { padding: 28px 24px 32px; }
}

.article-content > p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 16px;
}

.article-content h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  margin: 36px 0 14px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.article-content h2 .step-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  color: var(--brand);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.article-content h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin: 24px 0 10px;
  letter-spacing: -0.01em;
}

.article-content ul, .article-content ol {
  margin: 14px 0 18px 24px;
  font-size: 16px;
  line-height: 1.7;
}

.article-content li { margin-bottom: 6px; }

.article-content strong { color: var(--ink); font-weight: 600; }

/* ===== KEY POINT BOX ===== */
.key-point {
  background: var(--brand-light);
  border-left: 4px solid var(--brand);
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  margin: 22px 0;
}

.key-point-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.key-point p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--steel);
  margin: 0;
}

/* ===== CALLOUT (variations) ===== */
.callout {
  border-left: 4px solid;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 20px 0;
}

.callout-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.callout p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--steel);
  margin: 0;
}

.callout.success { border-color: var(--green); background: var(--green-bg); }
.callout.success .callout-label { color: var(--green); }

.callout.warning { border-color: var(--amber); background: var(--amber-bg); }
.callout.warning .callout-label { color: var(--amber); }

.callout.alert { border-color: var(--red); background: var(--red-bg); }
.callout.alert .callout-label { color: var(--red); }

/* ===== STAT GRID ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.stat-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  text-align: left;
}

.stat-card .num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-card .label {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* ===== STEPS BLOCK ===== */
.steps-block {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 26px;
  margin: 22px 0;
}

.steps-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.step {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}

.step:last-child { border-bottom: none; }

.step-num-badge {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  background: var(--brand);
  color: white;
  border-radius: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== COMPARISON TABLE ===== */
.comparison {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin: 22px 0;
  background: white;
}

.comparison-header {
  background: var(--ink);
  color: white;
  padding: 12px 18px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.comparison-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.comparison-row:last-child { border-bottom: none; }

.comparison-row .col-label {
  font-weight: 600;
  color: var(--ink);
}

.comparison-row .col-value {
  color: var(--ink-mid);
}

@media (max-width: 640px) {
  .comparison-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ===== CTA ===== */
.cta-block {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-bright) 100%);
  color: white;
  border-radius: 12px;
  padding: 32px;
  margin: 32px 0;
  text-align: left;
}

.cta-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-light);
  margin-bottom: 8px;
}

.cta-block h3 {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.cta-block p {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 18px;
  line-height: 1.5;
}

.cta-btn {
  background: white;
  color: var(--brand);
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.15s;
}

.cta-btn:hover {
  background: var(--bg-soft);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ===== FAQ ===== */
.faq-block {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 32px;
  margin: 32px 0;
}

.faq-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 4px;
}

.faq-block h2 {
  font-size: 24px;
  margin: 0 0 20px !important;
}

.faq-item {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 10px;
}

.faq-item:last-child { margin-bottom: 0; }

.faq-q {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.faq-a {
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.6;
}

/* ===== SHARE ===== */
.share-block {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.share-block h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-btn {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
}

.share-btn:hover {
  background: var(--bg-soft);
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
}

.share-btn svg { width: 14px; height: 14px; }

/* ===== FOOTER (matches live site) ===== */
.footer-disclaimer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 36px 0 24px;
  margin-top: 0;
  font-size: 13px;
}

.footer-disclaimer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

.footer-disclaimer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 968px) {
  .footer-disclaimer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .footer-disclaimer-grid { grid-template-columns: 1fr; }
}

.footer-brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.footer-brand-icon {
  width: 36px;
  height: 36px;
  background: var(--brand);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}

.footer-brand-text {
  font-size: 18px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
}

.footer-disclaimer-text {
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255,255,255,0.6);
  max-width: 380px;
}

.footer-col h6 {
  color: white;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  font-weight: 700;
}

.footer-col ul { list-style: none; padding: 0; }

.footer-col li { margin-bottom: 8px; font-size: 13px; }

.footer-col a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  cursor: pointer;
}

.footer-col a:hover { color: white; }

.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

/* ===== READING PROGRESS ===== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--brand-bright);
  z-index: 9999;
  transition: width 0.1s ease;
  width: 0;
}