/* ==========================================================================
   KipenO — design system v2 (crypto perp education; light financial media)
   Inspired by CoinDesk / The Block / Bloomberg — clean, authoritative,
   readable. Light background, deep blue headings, amber orange CTAs.
   ========================================================================== */

:root {
  /* ---- surfaces ---- */
  --bg:          #f8f9fa;   /* page background, soft gray-white */
  --surface:     #ffffff;   /* cards / panels */
  --surface-alt: #f1f3f5;   /* subtle separator bands */
  --input-bg:    #ffffff;   /* form fields */

  /* ---- borders ---- */
  --line:        #e5e7eb;   /* default hairline */
  --line-strong: #d1d5db;   /* stronger borders */

  /* ---- text ---- */
  --text:        #1a1a1a;   /* body text */
  --text-dim:    #4b5563;   /* secondary */
  --text-faint:  #9ca3af;   /* tertiary / metadata */

  /* ---- brand palette ---- */
  --primary:     #1a3a5c;   /* deep blue — headings, authority */
  --primary-dk:  #0f2744;   /* darker blue — hover */
  --primary-lt:  #e8eef5;   /* light blue tint */

  --accent:      #f59e0b;   /* amber orange — CTA buttons */
  --accent-hover:#d97706;   /* darker amber */
  --accent-ink:  #ffffff;   /* text on amber */

  /* ---- data colors (lowered saturation) ---- */
  --long:        #059669;   /* muted green — positive / longs */
  --short:       #dc2626;   /* muted red — negative / shorts */
  --long-bg:     #ecfdf5;   /* light green bg */
  --short-bg:    #fef2f2;   /* light red bg */

  /* ---- warning / risk ---- */
  --warn:        #d97706;
  --warn-bg:     #fffbeb;   /* light amber bg for risk boxes */

  --danger:      #dc2626;
  --danger-bg:   #fef2f2;

  /* ---- geometry: small rounded corners ---- */
  --r: 6px;
  --r-sm: 4px;
  --r-lg: 8px;

  /* ---- type ---- */
  --font-display: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body:    "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* ---- layout ---- */
  --max: 1180px;
  --article-max: 720px;

  /* ---- motion ---- */
  --t: .18s ease;

  /* ---- shadow ---- */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--primary);
  line-height: 1.25;
  font-weight: 700;
}
h1 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.02em; margin: 0 0 16px; }
h2 { font-size: 22px; letter-spacing: -.01em; margin: 40px 0 14px; }
h3 { font-size: 18px; margin: 28px 0 10px; }
p  { margin: 0 0 16px; }
a  { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dk); text-decoration: underline; text-underline-offset: 3px; }

code { font-size: .9em; background: var(--surface-alt); padding: 2px 6px; border-radius: var(--r-sm); }

/* eyebrow / label ----------------------------------------------------------- */
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

/* ==========================================================================
   Risk disclaimer — bottom of every page (subtle, after footer)
   ========================================================================== */
.risk-ticker {
  background: var(--surface-alt);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  padding: 12px 0;
}
.risk-ticker .wrap {
  display: flex; gap: 8px; align-items: center; justify-content: center;
  flex-wrap: wrap;
}
.risk-ticker .rt-tag {
  color: var(--text-faint);
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 1px 6px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .05em;
  flex: none;
}
.risk-ticker a { color: var(--text-dim); text-decoration: underline; flex: none; font-weight: 500; }

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 26px;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--primary); flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; flex: none;
  background: var(--primary);
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
  color: #fff;
}
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -.01em; color: var(--primary); }
.brand-name b { color: var(--accent); font-weight: 700; }
.brand-sub { font-size: 10px; color: var(--text-faint); letter-spacing: .1em; text-transform: uppercase; }

.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  padding: 7px 12px;
  border-radius: var(--r-sm);
  transition: color var(--t), background var(--t);
}
.main-nav a:hover { color: var(--primary); background: var(--surface-alt); text-decoration: none; }
.main-nav a.active { color: var(--primary); background: var(--primary-lt); font-weight: 600; }
.nav-tools { border: 1px solid var(--line-strong) !important; color: var(--primary) !important; font-weight: 600; }

.nav-toggle { display: none; }

/* ==========================================================================
   Generic UI
   ========================================================================== */
.section { padding: 52px 0; }
.section-tight { padding: 28px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin-bottom: 22px;
}
.section-head h2 { margin: 0; font-size: 22px; }
.section-head .hint { font-size: 13px; color: var(--text-faint); font-style: italic; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--surface-alt);
  border-radius: 100px;
  padding: 3px 10px;
}
.chip.long   { color: var(--long);  background: var(--long-bg); }
.chip.short  { color: var(--short); background: var(--short-bg); }
.chip.accent { color: var(--primary); background: var(--primary-lt); }

/* buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t), box-shadow var(--t);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); font-weight: 700; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-lt); }
.btn .arr { font-size: 16px; }

/* exchange CTA card */
.exchange-cta {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex; align-items: center; gap: 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.exchange-cta .ec-copy { flex: 1; min-width: 240px; }
.exchange-cta h3 { margin: 0 0 6px; font-size: 18px; }
.exchange-cta p { margin: 0; font-size: 14px; color: var(--text-dim); }
.exchange-cta .ec-note {
  flex-basis: 100%;
  font-size: 12px; color: var(--text-faint); margin-top: 8px;
}

/* callouts ----------------------------------------------------------------- */
.callout {
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: 16px 18px;
  margin: 20px 0;
  font-size: 15px;
}
.callout .co-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}
.callout.warn   { border-left-color: var(--warn);   background: var(--warn-bg); }
.callout.warn .co-label   { color: var(--warn); }
.callout.danger { border-left-color: var(--danger); background: var(--danger-bg); }
.callout.danger .co-label { color: var(--danger); }
.callout p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Hero (home)
   ========================================================================== */
.hero {
  padding: 60px 0 48px;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  max-width: 760px;
}
.hero h1 .hl { color: var(--primary); position: relative; }
.hero h1 .hl::after {
  content: "";
  position: absolute;
  bottom: 2px; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.hero p.lead { font-size: 17px; color: var(--text-dim); max-width: 600px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; margin-top: 32px; flex-wrap: wrap; }
.hero-stat .v { font-size: 28px; font-weight: 700; color: var(--primary); }
.hero-stat .k { font-size: 13px; color: var(--text-faint); margin-top: 2px; }

/* Hero data card (replaces terminal window) */
.hero-data-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  max-width: 560px;
  margin: 0 auto;
}
.hero-data-card .hdc-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 16px;
}
.hero-data-card table { width: 100%; border-collapse: collapse; }
.hero-data-card th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid var(--line);
}
.hero-data-card td {
  font-size: 14px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.hero-data-card th.r, .hero-data-card td.r { text-align: right; }
.hero-data-card .pos { color: var(--long); font-weight: 600; }
.hero-data-card .neg { color: var(--short); font-weight: 600; }
.hero-data-card .hdc-foot { font-size: 12px; color: var(--text-faint); margin-top: 12px; }

/* ==========================================================================
   Pillar grid
   ========================================================================== */
.pillar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pillar-card {
  display: block; padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), transform var(--t), border-color var(--t);
}
.pillar-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--line-strong); text-decoration: none; }
.pillar-card .pc-icon {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--primary-lt);
  border-radius: var(--r);
  font-size: 16px; font-weight: 700; color: var(--primary);
  margin-bottom: 14px;
}
.pillar-card h3 { margin: 0 0 8px; font-size: 16px; color: var(--primary); }
.pillar-card p { margin: 0; font-size: 14px; color: var(--text-dim); line-height: 1.6; }
.pillar-card .pc-count { font-size: 11px; font-weight: 600; color: var(--text-faint); margin-top: 14px; display: block; letter-spacing: .06em; }

/* article lists ------------------------------------------------------------ */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), transform var(--t);
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.post-card .pc-meta { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }
.post-card h3 { margin: 0 0 8px; font-size: 16px; line-height: 1.35; }
.post-card p { margin: 0; font-size: 14px; color: var(--text-dim); flex: 1; line-height: 1.6; }
.post-card .pc-foot { margin-top: 16px; font-size: 12px; color: var(--text-faint); display: flex; justify-content: space-between; }

.list-rows { display: grid; gap: 12px; }
.post-row {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; align-items: center;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t);
}
.post-row:hover { box-shadow: var(--shadow); text-decoration: none; }
.post-row .pr-pillar { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.post-row h3 { margin: 0 0 4px; font-size: 15px; }
.post-row .pr-desc { margin: 0; font-size: 14px; color: var(--text-dim); }
.post-row .pr-date { font-size: 13px; color: var(--text-faint); font-weight: 500; }

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.crumbs {
  font-size: 13px;
  color: var(--text-faint);
  padding: 20px 0 0;
}
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li::after { content: "›"; margin-left: 6px; color: var(--text-faint); }
.crumbs li:last-child::after { content: ""; }
.crumbs a { color: var(--text-dim); }
.crumbs li:last-child span { color: var(--text); font-weight: 500; }

/* ==========================================================================
   Article
   ========================================================================== */
.article-layout { padding: 30px 0 56px; }
.article-head { max-width: var(--article-max); margin: 0 auto; }
.article-head h1 { margin: 14px 0 16px; font-size: clamp(26px, 3.5vw, 38px); }
.article-head .dek { font-size: 17px; color: var(--text-dim); line-height: 1.7; }

.byline {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0 0; padding-top: 18px;
  border-top: 1px solid var(--line);
}
.avatar {
  width: 40px; height: 40px; flex: none;
  background: var(--primary-lt);
  border-radius: var(--r);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--primary);
}
.byline .bl-name { font-size: 14px; font-weight: 600; color: var(--text); }
.byline .bl-meta { font-size: 13px; color: var(--text-faint); }

.article-body { max-width: var(--article-max); margin: 32px auto 0; font-size: 16px; line-height: 1.7; }
.article-body h2 { padding-top: 14px; }
.article-body ul, .article-body ol { padding-left: 22px; margin: 0 0 18px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
  margin: 24px 0; padding: 16px 20px;
  border-left: 4px solid var(--primary);
  background: var(--surface);
  border-radius: var(--r-sm);
  color: var(--text-dim); font-size: 15px;
  box-shadow: var(--shadow-sm);
}
.article-body table {
  width: 100%; border-collapse: collapse; margin: 20px 0;
  font-size: 14px;
}
.article-body th, .article-body td {
  border: 1px solid var(--line); padding: 10px 14px; text-align: left;
}
.article-body th {
  background: var(--surface-alt);
  font-size: 12px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-dim);
}
.article-body td.num { text-align: right; font-weight: 500; }

/* TOC */
.toc {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: 18px 20px;
  margin: 28px 0;
  box-shadow: var(--shadow-sm);
}
.toc .toc-title { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; font-size: 14px; }
.toc a { color: var(--primary); }

/* FAQ */
.faq-block { max-width: var(--article-max); margin: 40px auto 0; }
.faq-block > h2 { margin-top: 0; }
details.faq {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
details.faq summary {
  cursor: pointer; list-style: none;
  padding: 16px 18px;
  font-weight: 600; font-size: 15px;
  color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 20px; color: var(--primary); font-weight: 300; }
details.faq[open] summary::after { content: "−"; }
details.faq .faq-a { padding: 0 18px 16px; font-size: 15px; color: var(--text-dim); line-height: 1.7; }
details.faq .faq-a p:last-child { margin-bottom: 0; }

/* article footer disclosures */
.article-disclosures {
  max-width: var(--article-max);
  margin-top: 36px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1.7;
}
.article-disclosures p { margin-bottom: 10px; }
.article-disclosures a { color: var(--primary); }

/* Risk disclosure box (special styling for compliance) */
.risk-disclosure-box {
  background: var(--warn-bg);
  border: 1px solid #fde68a;
  border-left: 4px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 18px 20px;
  margin: 24px 0;
  font-size: 14px;
  color: #92400e;
}

.related { margin-top: 50px; }
.related h2 { font-size: 20px; margin-bottom: 18px; }

/* ==========================================================================
   Topic / pillar landing
   ========================================================================== */
.topic-hero {
  padding: 44px 0 34px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.topic-hero p { max-width: 720px; color: var(--text-dim); font-size: 16px; line-height: 1.7; }
.topic-hero .topic-tags { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* ==========================================================================
   Calculator (tool)
   ========================================================================== */
.tool-layout { padding: 36px 0 56px; }
.calc-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: start; }

.calc-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.field { margin-bottom: 20px; }
.input-wrap { position: relative; }
.input-wrap .suffix {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--text-faint); font-weight: 500;
}
.calc-form input, .calc-form select {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 60px 12px 14px;
  transition: border-color var(--t), box-shadow var(--t);
}
.calc-form select { padding-right: 14px; appearance: none; }
.calc-form input:focus, .calc-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,58,92,.1);
}

.side-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-toggle button {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  color: var(--text-dim);
  padding: 12px;
  cursor: pointer;
  font-size: 14px; font-weight: 500;
  transition: all var(--t);
}
.side-toggle button:hover { border-color: var(--primary); }
.side-toggle button.on.long-btn { background: var(--long-bg); border-color: var(--long); color: var(--long); font-weight: 600; }
.side-toggle button.on.short-btn { background: var(--short-bg); border-color: var(--short); color: var(--short); font-weight: 600; }

.calc-result {
  padding: 26px;
  position: sticky; top: 84px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.result-main {
  font-size: 32px; font-weight: 700;
  color: var(--primary);
  margin: 4px 0 4px;
}
.result-sub { font-size: 13px; color: var(--text-dim); margin-bottom: 18px; }
.result-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 12px; }
.result-table th, .result-table td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.result-table th {
  text-align: left; font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.result-table td { text-align: right; font-weight: 500; }
.formula-box {
  margin-top: 18px; padding: 14px 16px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 13px;
  color: var(--text-dim);
  overflow-x: auto;
}

/* ---------- P0-1: comparison block (yearly / savings / difference) ---------- */
.result-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.result-compare-item {
  padding: 14px 16px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.result-compare-item.savings {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.result-compare-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.result-compare-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.result-compare-item.savings .result-compare-value {
  color: #16a34a;
}
.result-compare-note {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.4;
}

/* ==========================================================================
   Simple prose page (about / risk / disclaimer)
   ========================================================================== */
.prose-page { padding: 36px 0 60px; max-width: 800px; }
.prose-page h2 { margin-top: 36px; }
.prose-page .updated { font-size: 13px; color: var(--text-faint); }
.legal-list li { margin-bottom: 10px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px;
  padding: 44px 0 32px;
}
.footer-brand p { font-size: 14px; color: var(--text-dim); max-width: 300px; margin-top: 12px; line-height: 1.6; }
.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 14px;
}
.footer-col a { display: block; color: var(--text-dim); font-size: 14px; margin-bottom: 10px; }
.footer-col a:hover { color: var(--primary); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  font-size: 13px;
  color: var(--text-faint);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1020px) {
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { max-width: 100%; }
  .calc-grid { grid-template-columns: 1fr; }
  .calc-result { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 15px; }
  .main-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 8px;
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; }
  .nav-toggle {
    display: inline-grid; place-items: center;
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--line-strong);
    color: var(--text);
    border-radius: var(--r);
    width: 40px; height: 36px;
    cursor: pointer;
    font-size: 18px;
  }
  .post-row { grid-template-columns: 1fr; gap: 6px; }
  .post-row .pr-date { order: 3; }
  .post-grid, .pillar-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-stats { gap: 24px; }
  .article-body { overflow-x: visible; }
  .article-body table { display: block; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .article-body th, .article-body td { white-space: normal; word-break: break-word; }
}

/* OKX affiliate CTA (gold, reuses .btn .btn-primary) ----------------------- */
.hero-okx { display: flex; align-items: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.btn-okx {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 55%, #d97706 100%);
  color: #1a1a1a; font-weight: 700; font-size: 15px; padding: 13px 26px;
  border: 1px solid #b45309;
}
.btn-okx:hover { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: #1a1a1a; }
.okx-hero-cta { display: flex; align-items: center; gap: 12px; margin: 18px 0 4px; flex-wrap: wrap; }
.cta-aff { font-size: 12px; color: var(--text-faint); }

/* Planned / coming-soon items (no href) */
.pillar-card.planned {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}
.pillar-card.planned .pc-count {
  color: var(--text-faint);
}
.post-row.planned {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
  position: relative;
}
.post-row.planned::after {
  content: "Coming soon";
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-faint);
}
a.footer-planned {
  color: var(--text-faint);
  cursor: default;
  pointer-events: none;
  text-decoration: none;
}

/* ==========================================================================
   Exchange Review & Comparison Components (v3 — inspired by G2/NerdWallet/Capterra)
   ========================================================================== */

/* ---- Trust bar: key stats strip ---- */
.trust-bar {
  display: flex; gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 24px 0;
}
.trust-bar .tb-item {
  flex: 1;
  padding: 18px 16px;
  text-align: center;
  border-right: 1px solid var(--line);
}
.trust-bar .tb-item:last-child { border-right: none; }
.trust-bar .tb-value { font-size: 22px; font-weight: 700; color: var(--primary); }
.trust-bar .tb-label { font-size: 12px; color: var(--text-faint); margin-top: 4px; letter-spacing: .03em; }

/* ---- Score circle ---- */
.score-circle {
  width: 72px; height: 72px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 24px; font-weight: 800;
  color: #fff;
  background: var(--primary);
  position: relative;
}
.score-circle.sc-gold { background: linear-gradient(135deg, #f59e0b, #d97706); }
.score-circle.sc-silver { background: linear-gradient(135deg, #94a3b8, #64748b); }
.score-circle.sc-bronze { background: linear-gradient(135deg, #d97706, #92400e); }
.score-circle.sc-default { background: var(--primary); }
.score-circle .sc-max { font-size: 11px; font-weight: 500; opacity: .7; position: absolute; bottom: 10px; }

/* ---- Score bar (horizontal) ---- */
.score-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.score-bar .sb-label { font-size: 13px; color: var(--text-dim); width: 120px; flex: none; text-align: right; }
.score-bar .sb-track { flex: 1; height: 8px; background: var(--surface-alt); border-radius: 4px; overflow: hidden; }
.score-bar .sb-fill { height: 100%; border-radius: 4px; background: var(--primary); transition: width .3s ease; }
.score-bar .sb-fill.sb-high { background: var(--long); }
.score-bar .sb-fill.sb-mid  { background: var(--accent); }
.score-bar .sb-fill.sb-low  { background: var(--short); }
.score-bar .sb-value { font-size: 13px; font-weight: 700; color: var(--text); width: 36px; }

/* ---- Ranking table (homepage) ---- */
.rank-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.rank-table thead th {
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 14px 16px;
  text-align: left;
  border: none;
}
.rank-table tbody tr {
  transition: background var(--t);
}
.rank-table tbody tr:hover { background: var(--primary-lt); }
.rank-table tbody tr:not(:last-child) td { border-bottom: 1px solid var(--line); }
.rank-table td {
  padding: 16px;
  font-size: 14px;
  vertical-align: middle;
}
.rank-table td.rt-cta {
  vertical-align: middle;
}
.rt-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  vertical-align: middle;
}
.rank-table .rt-rank {
  width: 48px; text-align: center;
  font-size: 18px; font-weight: 800;
  color: var(--text-faint);
}
.rank-table .rt-rank.rt-top { color: var(--accent); }
.rank-table .rt-exchange {
  display: flex; align-items: center; gap: 14px;
}
.rank-table .rt-logo {
  width: 40px; height: 40px;
  border-radius: var(--r);
  background: var(--surface-alt);
  display: grid; place-items: center;
  font-size: 18px; font-weight: 700;
  color: var(--primary);
  flex: none;
}
.rank-table .rt-name { font-weight: 600; font-size: 16px; color: var(--text); }
.rank-table .rt-tagline { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.rank-table .rt-score {
  font-size: 20px; font-weight: 800; color: var(--primary);
  text-align: center;
}
.rank-table .rt-score small { font-size: 12px; font-weight: 500; color: var(--text-faint); }
.rank-table .rt-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
}
.rt-badge.rt-best { background: #fef3c7; color: #92400e; }
.rt-badge.rt-good { background: var(--long-bg); color: var(--long); }
.rt-badge.rt-neut { background: var(--surface-alt); color: var(--text-dim); }
.rank-table .rt-cta .btn { font-size: 13px; padding: 8px 18px; }

/* ---- Award badges ---- */
.award-row {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin: 28px 0;
}
.award-card {
  flex: 1; min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), transform var(--t);
}
.award-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.award-card .ac-icon { font-size: 28px; margin-bottom: 8px; }
.award-card .ac-title { font-size: 14px; font-weight: 700; color: var(--primary); }
.award-card .ac-exchange { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.award-card .ac-score { font-size: 18px; font-weight: 800; color: var(--accent); margin-top: 6px; }

/* ---- Exchange review page ---- */
.exchange-hero {
  display: flex; gap: 28px; align-items: flex-start;
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--line);
}
.exchange-hero .eh-info { flex: 1; }
.exchange-hero .eh-logo {
  width: 64px; height: 64px; flex: none;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  display: grid; place-items: center;
  font-size: 28px; font-weight: 800;
  color: var(--primary);
}
.exchange-hero h1 { margin: 0 0 8px; font-size: clamp(24px, 3.5vw, 36px); }
.exchange-hero .eh-tagline { font-size: 16px; color: var(--text-dim); margin-bottom: 12px; }
.exchange-hero .eh-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-faint); }

.score-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
  margin: 24px 0;
}

/* ---- Pros & Cons ---- */
.pros-cons {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  margin: 28px 0;
}
.pros-box, .cons-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.pros-box { border-top: 3px solid var(--long); }
.cons-box { border-top: 3px solid var(--short); }
.pros-box h3, .cons-box h3 { margin: 0 0 14px; font-size: 16px; }
.pros-box h3 { color: var(--long); }
.cons-box h3 { color: var(--short); }
.pros-box li, .cons-box li {
  font-size: 14px; line-height: 1.6;
  margin-bottom: 8px; padding-left: 4px;
  list-style: none;
  position: relative;
}
.pros-box li::before { content: "✓"; color: var(--long); font-weight: 700; margin-right: 8px; }
.cons-box li::before { content: "✗"; color: var(--short); font-weight: 700; margin-right: 8px; }

/* ---- Verdict box ---- */
.verdict-box {
  background: linear-gradient(135deg, var(--primary-lt) 0%, #fff 100%);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  margin: 32px 0;
}
.verdict-box h3 { margin: 0 0 10px; color: var(--primary); font-size: 18px; }
.verdict-box p { margin: 0; font-size: 15px; color: var(--text-dim); line-height: 1.7; }
.verdict-box .vb-score {
  font-size: 32px; font-weight: 800; color: var(--accent);
  float: right; margin-left: 16px;
}

/* ---- Comparison page ---- */
.compare-header {
  display: flex; align-items: center; justify-content: center;
  gap: 32px;
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--line);
}
.compare-side {
  text-align: center;
  flex: 0 0 200px;
}
.compare-side .cs-logo {
  width: 56px; height: 56px;
  margin: 0 auto 10px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  display: grid; place-items: center;
  font-size: 24px; font-weight: 800;
  color: var(--primary);
}
.compare-side h2 { margin: 0; font-size: 20px; }
.compare-side .cs-score { font-size: 24px; font-weight: 800; color: var(--accent); margin-top: 4px; }
.compare-vs {
  font-size: 20px; font-weight: 800;
  color: var(--text-faint);
  flex: none;
}

.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: 28px 0;
  box-shadow: var(--shadow-sm);
}
.compare-table thead th {
  background: var(--surface-alt);
  font-size: 13px; font-weight: 700;
  color: var(--primary);
  padding: 14px 16px;
  text-align: center;
  border-bottom: 2px solid var(--line);
}
.compare-table thead th:first-child { text-align: left; }
.compare-table tbody td {
  padding: 14px 16px;
  font-size: 14px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.compare-table tbody td:first-child {
  text-align: left; font-weight: 500; color: var(--text-dim);
}
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table .ct-check { color: var(--long); font-weight: 700; font-size: 18px; }
.compare-table .ct-cross { color: var(--short); font-weight: 700; font-size: 18px; }
.compare-table .ct-winner { background: #f0fdf4; }
.compare-table .ct-category {
  background: var(--surface-alt);
  font-size: 12px; font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 10px 16px;
}
.compare-table .ct-category td { border-bottom: 1px solid var(--line); }

/* ---- When to choose box ---- */
.choose-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  margin: 28px 0;
}
.choose-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.choose-item h3 { margin: 0 0 12px; font-size: 16px; }
.choose-item ul { margin: 0; padding-left: 18px; }
.choose-item li { font-size: 14px; margin-bottom: 6px; color: var(--text-dim); }

/* ==========================================================================
   Exchange/Comparison Responsive
   ========================================================================== */
@media (max-width: 1020px) {
  .score-grid { grid-template-columns: 1fr; }
  .pros-cons { grid-template-columns: 1fr; }
  .choose-box { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .brand-sub { display: none; }
  .trust-bar { flex-wrap: wrap; }
  .trust-bar .tb-item { flex: 1 1 33%; border-bottom: 1px solid var(--line); }
  .exchange-hero { flex-direction: column; }
  .compare-header { flex-direction: column; gap: 16px; }
  .compare-side { flex: none; }
  .award-row { flex-direction: column; }
  .rank-table { font-size: 13px; }
  .rank-table td, .rank-table th { padding: 10px 8px; }
  .rank-table .rt-logo { width: 32px; height: 32px; font-size: 14px; }
  .hero-data-card { overflow-x: auto; }
}

/* ==========================================================================
   Deep Review Sections
   ========================================================================== */
.review-summary {
  background: linear-gradient(135deg, var(--primary-lt) 0%, var(--surface) 100%);
  border-left: 4px solid var(--primary);
  border-radius: var(--r);
  padding: 24px 28px;
  margin: 24px 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}
.review-summary p { margin: 0; }

.review-section {
  margin: 32px 0;
}
.review-section h2 {
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-lt);
}
.review-section h3 {
  font-size: 17px;
  color: var(--primary-dk);
  margin: 16px 0 8px;
}
.review-section p {
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 12px;
}
.review-section ul {
  padding-left: 20px;
  margin-bottom: 12px;
}
.review-section li {
  line-height: 1.7;
  margin-bottom: 4px;
}

.review-highlight-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin: 16px 0;
}
.review-highlight-box h4 {
  color: var(--primary);
  font-size: 15px;
  margin: 0 0 8px;
}
.review-highlight-box p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}

.best-for-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}
@media (max-width: 768px) {
  .best-for-section { grid-template-columns: 1fr; }
}
.best-for-card {
  border-radius: var(--r-lg);
  padding: 20px 24px;
}
.best-for-card.pro {
  background: var(--long-bg);
  border: 1px solid #a7f3d0;
}
.best-for-card.con {
  background: var(--short-bg);
  border: 1px solid #fecaca;
}
.best-for-card h4 {
  margin: 0 0 8px;
  font-size: 15px;
}
.best-for-card.pro h4 { color: var(--long); }
.best-for-card.con h4 { color: var(--short); }
.best-for-card p {
  margin: 0;
  line-height: 1.7;
  font-size: 14px;
}

/* ==========================================================================
   Ranking Table Buttons — Read Review (primary) / Visit (secondary)
   ========================================================================== */
.rt-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  min-height: 80px;
}
.rt-cta .btn-review {
  font-size: 13px;
  padding: 8px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--r);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}
.rt-cta .btn-review:hover {
  background: var(--primary-dk);
}
.rt-cta .btn-visit {
  font-size: 13px;
  padding: 7px 20px;
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--r);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: all 0.2s;
  cursor: pointer;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}
.rt-cta .btn-visit:hover {
  background: var(--primary);
  color: #fff;
}

/* ==========================================================================
   Fee Calculator — data trust badges (Phase 1)
   Green = verified exchange data (exchanges.json, status confirmed)
   Amber = user-provided data, never displayed as verified
   ========================================================================== */
.data-legend { display:flex; flex-wrap:wrap; gap:10px 18px; margin:14px 0 0; font-size:12.5px; color:var(--text-dim); }
.data-legend span { display:inline-flex; align-items:center; gap:6px; }
.data-badge {
  display:inline-block; font-size:11px; font-weight:600; line-height:1;
  padding:4px 8px; border-radius:999px; white-space:nowrap; vertical-align:middle;
}
.data-badge.verified { color:var(--long); background:var(--long-bg); border:1px solid #a7f3d0; }
.data-badge.user      { color:var(--warn); background:var(--warn-bg); border:1px solid #fde68a; }
.data-badge.unverified{ color:var(--text-faint); background:var(--surface-alt); border:1px solid var(--line); }
.field.is-user .input-wrap input,
.field.is-user .input-wrap select { background:var(--warn-bg); }
.fee-source { font-size:12px; color:var(--text-faint); margin-top:6px; line-height:1.4; }
.fee-source.verified { color:var(--long); }
.mode-toggle { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:20px; }
.mode-toggle button {
  padding:11px 8px; border:1.5px solid var(--line-strong); background:var(--surface);
  border-radius:var(--r); font-weight:600; font-size:13.5px; color:var(--text-dim); cursor:pointer; transition:all .15s;
}
.mode-toggle button:hover { border-color:var(--primary); }
.mode-toggle button.on { background:var(--primary-lt); border-color:var(--primary); color:var(--primary); }

/* ==========================================================================
   Accessibility + footer legal row（2026-10-29）
   1) worker.js injectSkipNav 注入的 <a class="skip-to-content"> 之前没有 CSS，
      渲染成页面顶部一条可见链接，把 sticky header 顶下去 27px。这里补隐藏规则，
      Tab 聚焦时显示。
   2) footer 底部统一补法务链接行（Terms/Disclaimer/Privacy），原来这两页几乎无内链。
   ========================================================================== */
.skip-to-content {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden; z-index: 99999;
  padding: 12px 24px; background: var(--primary); color: #fff;
  text-decoration: none; font-size: 14px; font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-to-content:focus,
.skip-to-content:focus-visible {
  position: fixed; left: 0; top: 0;
  width: auto; height: auto; overflow: visible;
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.footer-legal a { color: var(--text-faint); text-decoration: none; }
.footer-legal a:hover { color: var(--primary); text-decoration: underline; }
