/* ─── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --bg:         #0d1117;
  --surface:    #161b22;
  --surface2:   #21262d;
  --border:     #30363d;
  --text:       #c9d1d9;
  --text-h:     #f0f6fc;
  --muted:      #8b949e;
  --accent:     #58a6ff;
  --accent-h:   #79c0ff;
  --accent-bg:  #0d2338;
  --green:      #3fb950;
  --orange:     #d29922;
  --radius:     8px;
  --shadow:     0 4px 16px rgba(0,0,0,.4);
  --header-h:   56px;
  --ex-changenow:    #3b82f6;
  --ex-stealthex:    #a855f7;
  --ex-simpleswap:   #14b8a6;
  --ex-letsexchange: #f97316;
  --ex-fixedfloat:   #ef4444;
  --ex-compare:      #58a6ff;
}

html { font-size: 16px; scroll-behavior: smooth; color-scheme: dark; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.nav-open { overflow: hidden; }

main { flex: 1; }

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

/* P3-5: keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
header {
  background: #010409;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}

.header-top {
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  height: var(--header-h);
  gap: 1rem;
}

.site-title {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  white-space: nowrap;
  letter-spacing: -.01em;
}
.site-title:hover { color: var(--accent); text-decoration: none; }

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.lang-switcher {
  display: flex;
  gap: 0.25rem;
}

.lang-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.5rem 0.5rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  border: 1px solid transparent;
  text-decoration: none;
  letter-spacing: .02em;
}

.lang-link:hover { color: var(--accent); text-decoration: none; }
.lang-link.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-bg);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.site-nav {
  display: flex;
  gap: 0.5rem;
  padding: 0 1.5rem 0.5rem;
  overflow-x: auto;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.875rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.site-nav a:hover {
  color: #fff;
  background: var(--surface2);
  text-decoration: none;
}
.site-nav a.active {
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid rgba(88,166,255,.25);
  font-weight: 600;
  text-decoration: none;
}
.site-nav a[href*="changenow"].active    { color: var(--ex-changenow);    border-color: var(--ex-changenow); }
.site-nav a[href*="stealthex"].active    { color: var(--ex-stealthex);    border-color: var(--ex-stealthex); }
.site-nav a[href*="simpleswap"].active   { color: var(--ex-simpleswap);   border-color: var(--ex-simpleswap); }
.site-nav a[href*="letsexchange"].active { color: var(--ex-letsexchange); border-color: var(--ex-letsexchange); }
.site-nav a[href*="fixedfloat"].active   { color: var(--ex-fixedfloat);   border-color: var(--ex-fixedfloat); }

/* ─── Page wrap ───────────────────────────────────────────────────────────── */
.page-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ─── Article ─────────────────────────────────────────────────────────────── */
article h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--text-h);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.meta-chip {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.meta-chip.meta-action {
  color: var(--orange);
  border-color: var(--orange);
}

/* ─── Content ─────────────────────────────────────────────────────────────── */
/* P3-1: also style .content h1 in case Markdown emits one */
.content h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-h);
  margin: 2rem 0 0.75rem;
}

.content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-h);
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-h);
  margin: 1.5rem 0 0.5rem;
}

.content p { margin-bottom: 1rem; }

.content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.content ul li { margin-bottom: 0.35rem; }

/* Styled ordered list — how-to steps */
.content ol {
  list-style: none;
  padding-left: 0;
  counter-reset: step-counter;
  margin-bottom: 1.25rem;
}
.content ol li {
  counter-increment: step-counter;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.6rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
.content ol li::before {
  content: counter(step-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 1;
}

.content strong { color: var(--text-h); }

.content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  background: var(--accent-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1rem 0;
  color: var(--text);
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}

.content th {
  background: var(--surface2);
  color: var(--text-h);
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.content td {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.content tr:last-child td { border-bottom: none; }
.content tr:hover td { background: var(--surface2); }

/* ─── Live price line ─────────────────────────────────────────────────────── */
/* P3-2: flex + align-self instead of inline-flex */
.live-price-line {
  display: flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  max-width: 100%;
}

.live-badge {
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Loading skeleton animation */
@keyframes skeleton-pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.live-price-line.loading,
#live-price.loading { animation: skeleton-pulse 1.4s ease-in-out infinite; }

/* ─── Swap widget ─────────────────────────────────────────────────────────── */
/* P1-2: accent border + glow to make widget visible and prominent */
.swap-widget-section {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1rem 0 1.5rem;
  box-shadow: 0 0 0 3px rgba(88,166,255,.08), var(--shadow);
}

/* P1-3: directive CTA label */
.widget-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
  letter-spacing: .01em;
}

/* P3-6: use design token instead of hardcoded #1a1a2e */
.swap-widget-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}

.swap-widget-wrap iframe {
  display: block;
  width: 100%;
  height: 500px;
  border: none;
  border-radius: 0;
  margin: 0;
  vertical-align: top;
}

/* SimpleSwap official embed height */
.swap-widget-wrap[data-exchange="simpleswap"] iframe {
  height: 392px;
}

/* ChangeNOW: iframe body has white space below widget content at 500px */
.swap-widget-wrap[data-exchange="changenow"] iframe {
  height: 460px;
}

/* ─── Widget fallback (pair unavailable) ─────────────────────────────────── */
.widget-fallback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: rgba(234, 179, 8, 0.07);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.widget-fallback-label {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.widget-fallback-chip {
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.widget-fallback-chip:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ─── Breadcrumb ──────────────────────────────────────────────────────────── */
/* P3-3: add bottom margin */
.breadcrumb {
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--border); }

/* ─── Home page ───────────────────────────────────────────────────────────── */
.home-wrap { max-width: 1000px; }

.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-h);
  margin-bottom: 0.75rem;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 1.25rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-h);
}

.hero-badge-sep { color: var(--muted); }

.hero-badge-live { color: var(--green); }

.exchange-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

@media (min-width: 700px) {
  .exchange-grid { grid-template-columns: repeat(3, 1fr); }
}

.exchange-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color .2s, box-shadow .2s;
  text-decoration: none;
}

.exchange-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.exchange-card h2 {
  color: var(--text-h);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Exchange brand color dots and left borders */
.exchange-color-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
[data-exchange="changenow"]    { border-left: 3px solid var(--ex-changenow); }
[data-exchange="stealthex"]    { border-left: 3px solid var(--ex-stealthex); }
[data-exchange="simpleswap"]   { border-left: 3px solid var(--ex-simpleswap); }
[data-exchange="letsexchange"] { border-left: 3px solid var(--ex-letsexchange); }
[data-exchange="fixedfloat"]   { border-left: 3px solid var(--ex-fixedfloat); }
[data-exchange="changenow"]    .exchange-color-dot { background: var(--ex-changenow); }
[data-exchange="stealthex"]    .exchange-color-dot { background: var(--ex-stealthex); }
[data-exchange="simpleswap"]   .exchange-color-dot { background: var(--ex-simpleswap); }
[data-exchange="letsexchange"] .exchange-color-dot { background: var(--ex-letsexchange); }
[data-exchange="fixedfloat"]   .exchange-color-dot { background: var(--ex-fixedfloat); }
[data-exchange="compare"]      { border-left: 3px solid var(--ex-compare); }
[data-exchange="compare"]      .exchange-color-dot { background: var(--ex-compare); }

.exchange-card[data-exchange="changenow"]:hover    { border-color: var(--ex-changenow);    box-shadow: 0 4px 16px rgba(59,130,246,.2); }
.exchange-card[data-exchange="stealthex"]:hover    { border-color: var(--ex-stealthex);    box-shadow: 0 4px 16px rgba(168,85,247,.2); }
.exchange-card[data-exchange="simpleswap"]:hover   { border-color: var(--ex-simpleswap);   box-shadow: 0 4px 16px rgba(20,184,166,.2); }
.exchange-card[data-exchange="letsexchange"]:hover { border-color: var(--ex-letsexchange); box-shadow: 0 4px 16px rgba(249,115,22,.2); }
.exchange-card[data-exchange="fixedfloat"]:hover   { border-color: var(--ex-fixedfloat);   box-shadow: 0 4px 16px rgba(239,68,68,.2); }
.exchange-card[data-exchange="compare"]:hover      { border-color: var(--ex-compare);      box-shadow: 0 4px 16px rgba(88,166,255,.2); }

.exchange-card p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.card-cta {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
}

/* ─── List page ───────────────────────────────────────────────────────────── */
.section-desc {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.page-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
}
@media (min-width: 480px) { .page-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 700px) { .page-list { grid-template-columns: repeat(3, 1fr); } }

.page-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  transition: border-color .15s, background .15s;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.page-card:hover { border-color: var(--accent); background: var(--surface2); }

.page-card a {
  font-weight: 600;
  color: var(--text-h);
  font-size: 0.95rem;
  text-decoration: none;
}

.page-card p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Pair-style card (exchange list pages) */
.card-pair { display: block; text-decoration: none; }
.card-pair-row { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.3rem; }
.card-title-link { font-weight: 600; color: var(--text-h); }

.coin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.45rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-h);
  letter-spacing: .03em;
  font-family: "SF Mono", "Consolas", "Menlo", monospace;
  line-height: 1.4;
}
.coin-badge--from { border-color: var(--accent); color: var(--accent); }
.coin-badge--to   { border-color: var(--green);  color: var(--green); }

.pair-arrow { color: var(--muted); font-size: 0.85rem; padding: 0 0.1rem; }
.pair-sep-arrow { color: var(--muted); margin: 0 3px; }

.pair-exchanges {
  font-size: .82rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}

/* ─── Converter ───────────────────────────────────────────────────────────── */
.converter-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 0 0 2rem;
}

.converter-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-h);
  margin-bottom: 0.75rem;
}

.converter-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.conv-input {
  width: 90px;
  padding: 0.45rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-h);
  font-size: 0.95rem;
}

.conv-select {
  padding: 0.45rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-h);
  font-size: 0.9rem;
  flex: 1;
  min-width: 140px;
  max-width: 260px;
}

.conv-arrow {
  color: var(--muted);
  font-size: 1.1rem;
}

.conv-result {
  margin-top: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
}

.conv-note {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ─── Newsletter form ─────────────────────────────────────────────────────── */
.newsletter-wrap {
  margin: 3rem auto 2rem;
  max-width: 520px;
  text-align: center;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.newsletter-title { margin: 0 0 0.4rem; font-size: 1.2rem; }
.newsletter-sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 1rem; }
.newsletter-form { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.newsletter-input {
  flex: 1 1 220px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
}
.newsletter-btn {
  padding: 0.55rem 1.2rem;
  background: linear-gradient(135deg, #1f6feb 0%, #58a6ff 100%);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 600;
  transition: box-shadow .2s;
}
.newsletter-btn:hover { box-shadow: 0 0 14px rgba(88,166,255,.45); }
.newsletter-note { font-size: 0.78rem; color: var(--muted); margin-top: 0.6rem; }
.hidden { display: none; }

/* ─── Skip nav ────────────────────────────────────────────────────────────── */
.skip-nav {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-nav:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  z-index: 999;
}

/* ─── Related links ───────────────────────────────────────────────────────── */
.related-links {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.related-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.related-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.related-chip {
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}

.related-chip:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.related-chip--browse {
  background: var(--surface2);
  border-color: var(--border);
  color: var(--text-h);
  font-weight: 700;
}
.related-chip--browse:hover {
  background: var(--surface2);
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Compare card variant ────────────────────────────────────────────────── */
.exchange-card--compare {
  border-color: var(--accent);
  background: var(--accent-bg);
}

/* ─── Compact widget (compare pages — 2 widgets on one page) ──────────────── */
.swap-widget-section.compact .swap-widget-wrap iframe { height: 300px; }

@media (max-width: 640px) {
  .swap-widget-section.compact .swap-widget-wrap iframe { height: 320px; }

  .conv-select { max-width: 100%; }
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */
footer {
  background: #010409;
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}

.footer-inner { max-width: 1000px; margin: 0 auto; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-links a:hover { color: var(--accent); }

.footer-copy {
  color: var(--muted);
  font-size: 0.8rem;
}

/* ─── Pagination ──────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.page-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.page-link:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
  text-decoration: none;
}

.page-info {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ─── Footer grid ─────────────────────────────────────────────────────────── */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-col-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-h);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 0.2rem;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}
.footer-col a:hover { color: var(--accent); }

.footer-col--tagline { align-items: flex-start; }

.footer-brand-name { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 0.3rem; }
.footer-brand-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.55; }

/* ─── Blog ────────────────────────────────────────────────────────────────── */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color .15s;
}
.blog-card:hover { border-color: var(--accent); }

.blog-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-h);
  text-decoration: none;
  line-height: 1.3;
}
.blog-card-title:hover { color: var(--accent); text-decoration: none; }

.blog-date {
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.blog-excerpt {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.blog-read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-top: 0.25rem;
  align-self: flex-start;
}
.blog-read-more:hover { text-decoration: underline; }

.blog-meta {
  margin-bottom: 0.5rem;
}

.blog-lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  background: var(--accent-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.75rem 1rem;
}

/* ─── Hub controls (filter + search) ──────────────────────────────────────── */
.hub-controls {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hub-search {
  width: 100%;
  max-width: 420px;
  padding: 0.5rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}
.hub-search:focus { border-color: var(--accent); }
.hub-search::placeholder { color: var(--muted); }

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cat-tab {
  padding: 0.3rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.cat-tab:hover { background: var(--surface2); color: var(--text); }
.cat-tab--active {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent);
}

.cat-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  background: var(--surface2);
  border-radius: 10px;
  color: var(--muted);
  margin-top: 0.25rem;
  text-transform: capitalize;
}

.card-price {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.hub-empty {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
}
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
}

/* ─── Arbitrage compare header ─────────────────────────────────────────────── */
.arb-header {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  margin: 1rem 0 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.arb-exchange {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.2s;
}

.arb-exchange--winner {
  border-color: var(--green);
  background: rgba(63, 185, 80, 0.06);
}

.arb-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-h);
}

.arb-fee {
  font-size: 0.8rem;
  color: var(--muted);
}

.arb-badge {
  font-size: 0.75rem;
  font-weight: 600;
  min-height: 1.2rem;
}

.arb-badge--best { color: var(--green); }
.arb-badge--equal { color: var(--muted); }

.arb-vs {
  display: flex;
  align-items: center;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0 0.25rem;
}

.arb-tip {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1rem;
  padding: 0.6rem 1rem;
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ─── Compare widgets side by side ─────────────────────────────────────────── */
.compare-widgets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.compare-widget-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.exchange-label {
  padding-left: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

/* Link card — replaces iframe for non-embeddable exchanges */
.exchange-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 300px;
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
  padding: 2rem 1rem;
}

.exchange-link-card:hover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}

.exchange-link-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.exchange-link-card__action {
  font-size: 0.95rem;
  color: var(--muted);
}

.exchange-link-card__cta {
  margin-top: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ─── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
    gap: 0.25rem;
  }
  .site-nav.open { display: flex; }

  .page-wrap { padding: 1.25rem 1rem; }

  article h1 { font-size: 1.35rem; }

  .hero h1 { font-size: 1.5rem; }

  /* P1-4: more room for widget on mobile */
  .swap-widget-section { padding: 0.75rem; }
  .swap-widget-wrap iframe { height: 420px; }

  .exchange-grid { grid-template-columns: 1fr; }

  .converter-row { flex-direction: column; align-items: stretch; }
  .conv-input { width: 100%; }
  .conv-select { max-width: 100%; }
  .conv-arrow { text-align: center; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .footer-col--tagline { grid-column: 1 / -1; }

  .page-list { grid-template-columns: 1fr; }

  .compare-widgets { grid-template-columns: 1fr; }

  .arb-header { flex-direction: column; }
  .arb-vs { justify-content: center; }
}

