/* StakeRadar — minimalist white staking guide site */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-tint: #eef1fc;
  --border: #e4e6eb;
  --text: #14151a;
  --text-muted: #5b5f6b;
  --accent: #1b3fd6;
  --accent-dark: #12299e;
  --accent-soft: #edf0ff;
  --green: #1a8a4a;
  --green-soft: #e8f7ee;
  --red: #c22d2d;
  --red-soft: #fbeaea;
  --radius: 10px;
  --radius-lg: 16px;
  --maxw: 1120px;
  --shadow-sm: 0 1px 2px rgba(20,21,26,0.04), 0 1px 1px rgba(20,21,26,0.03);
  --shadow-md: 0 8px 24px rgba(20,21,26,0.07), 0 2px 6px rgba(20,21,26,0.04);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

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

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

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  z-index: 50;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand span { color: var(--accent); }
.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a {
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
}
.main-nav a:hover { color: var(--accent); text-decoration: none; }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    gap: 14px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .nav-toggle {
    display: inline-flex;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(720px 320px at 85% -10%, rgba(27,63,214,0.08), transparent 60%),
    radial-gradient(480px 260px at 10% 0%, rgba(27,63,214,0.05), transparent 55%),
    var(--bg);
}
.hero h1 {
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  max-width: 760px;
}
.hero p.lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 0 28px;
}
.hero .stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.hero .stat b { display: block; font-size: 26px; letter-spacing: -0.02em; }
.hero .stat span { color: var(--text-muted); font-size: 13.5px; }

.search-box {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin-top: 28px;
}
.search-box input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: var(--font);
}
.search-box input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

/* ---------- Sections ---------- */
section { padding: 56px 0; }
section.tight { padding: 40px 0; }
section + section { border-top: 1px solid var(--border); }

.section-head { margin-bottom: 28px; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.section-head h2 { font-size: 26px; letter-spacing: -0.01em; margin: 0; }
.section-head p { color: var(--text-muted); margin: 6px 0 0; max-width: 640px; }
.section-head .see-all { font-size: 14px; font-weight: 600; white-space: nowrap; }

/* ---------- Category chips ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.chip {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.chip.accent { background: var(--accent-soft); color: var(--accent-dark); border-color: transparent; }

/* ---------- Cards / grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card:hover { border-color: var(--accent); text-decoration: none; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card .sym, .logo-badge {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), #ffffff);
  color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
}
.logo-stack { position: relative; width: 40px; height: 40px; flex-shrink: 0; }
.logo-stack.lg { width: 64px; height: 64px; }
.logo-stack img.coin-logo-img {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: contain; background: #fff; border: 1px solid var(--border);
  padding: 6px;
  position: relative; z-index: 2;
}
.logo-stack .logo-badge {
  position: absolute; inset: 0; width: 100%; height: 100%;
  font-size: 13px; z-index: 1;
}
.logo-stack.lg .logo-badge { font-size: 19px; }
.provider-logo {
  width: 34px; height: 34px; border-radius: 8px;
  object-fit: contain; background: #fff; border: 1px solid var(--border);
  padding: 4px; flex-shrink: 0;
}
.provider-logo-fallback {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--bg-tint); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; flex-shrink: 0; border: 1px solid var(--border);
}
.card h3 { margin: 4px 0 0; font-size: 17px; color: var(--text); }
.card .ticker { color: var(--text-muted); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.card p { margin: 0; font-size: 13.5px; color: var(--text-muted); }
.card .tag { font-size: 12px; color: var(--accent-dark); font-weight: 600; }

.guide-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.guide-card h3 { margin: 0 0 8px; font-size: 17px; }
.guide-card p { color: var(--text-muted); font-size: 14px; margin: 0 0 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }
.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); text-decoration: none; }

/* ---------- Coin page ---------- */
.coin-hero {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.coin-hero .sym-lg {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px; flex-shrink: 0;
}
.coin-hero .meta { flex: 1; min-width: 260px; }
.coin-hero h1 { font-size: 32px; margin: 0 0 8px; letter-spacing: -0.02em; }
.coin-hero .sub { color: var(--text-muted); font-size: 15px; }
.coin-hero .cta { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.coin-hero .cta small { color: var(--text-muted); max-width: 240px; }

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 32px 0;
}
.facts-grid .fact { background: var(--bg); padding: 18px 20px; }
.facts-grid .fact .k { font-size: 12.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.facts-grid .fact .v { font-size: 15px; font-weight: 600; }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  margin-top: 10px;
}
.live-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #2ea043; }

article.prose h2 { font-size: 22px; margin: 40px 0 14px; letter-spacing: -0.01em; }
article.prose h3 { font-size: 18px; margin: 26px 0 10px; }
article.prose p { color: var(--text); margin: 0 0 16px; max-width: 760px; }
article.prose ol, article.prose ul { max-width: 760px; padding-left: 22px; margin: 0 0 20px; }
article.prose li { margin-bottom: 8px; }

.callout {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 14.5px;
  color: var(--text-muted);
  max-width: 760px;
}

.steps { counter-reset: step; list-style: none; padding: 0; max-width: 760px; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin-bottom: 18px;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}

.faq-item { border-top: 1px solid var(--border); padding: 18px 0; max-width: 760px; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 15.5px; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--text-muted); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: 12px 0 0; color: var(--text-muted); }

.cta-box {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 36px 0;
  text-align: center;
}
.cta-box p { color: var(--text-muted); margin: 0 0 16px; }

.related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.related a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13.5px;
  color: var(--text);
}
.related a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 13px; color: var(--text-muted); padding: 18px 0 0; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- Table (sitemap / lists) ---------- */
.link-list { columns: 3; column-gap: 32px; max-width: 980px; }
.link-list li { break-inside: avoid; margin-bottom: 8px; font-size: 14px; }
@media (max-width: 760px) { .link-list { columns: 2; } }
@media (max-width: 480px) { .link-list { columns: 1; } }

/* ---------- Disclaimer strip ---------- */
.disclaimer-strip {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 32px; background: var(--bg-soft); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 0 0 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; font-size: 14px; }
.footer-grid a { color: var(--text); }
.footer-grid a:hover { color: var(--accent); }
.footer-about p { color: var(--text-muted); font-size: 13.5px; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 10px;
}

/* ---------- Sub-nav tabs (coin page) ---------- */
.subnav {
  position: sticky;
  top: 68px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  z-index: 40;
}
.subnav .wrap { display: flex; gap: 8px; overflow-x: auto; }
.subnav a {
  padding: 14px 4px;
  margin-right: 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.subnav a:hover { color: var(--text); text-decoration: none; }
.subnav a.js-active-tab { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Live market widget ---------- */
.live-market {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--bg-tint), #fff 60%);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  margin: 28px 0;
  display: none; /* revealed by script.js only once live data actually loads */
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.live-market.is-ready { display: flex; }
.live-market .lm-price { min-width: 140px; }
.live-market .lm-price .k { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); display:flex; align-items:center; gap:6px; }
.live-market .lm-price .v { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin-top: 2px; }
.live-market .lm-change { font-size: 13.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.live-market .lm-change.up { color: var(--green); background: var(--green-soft); }
.live-market .lm-change.down { color: var(--red); background: var(--red-soft); }
.live-market .lm-chart { flex: 1; min-width: 200px; height: 56px; }
.live-market .lm-chart svg { width: 100%; height: 100%; display: block; }
.live-market .lm-source { font-size: 11.5px; color: var(--text-muted); width: 100%; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; box-shadow: 0 0 0 3px var(--green-soft); }

/* ---------- Provider table ---------- */
.provider-table { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); max-width: 100%; }
.provider-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.provider-row:first-child { border-top: none; }
.provider-row .p-info { flex: 1; min-width: 0; }
.provider-row .p-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.provider-row .p-tag {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  background: var(--accent-soft); color: var(--accent-dark); padding: 3px 8px; border-radius: 999px;
}
.provider-row .p-note { font-size: 13px; color: var(--text-muted); margin-top: 4px; max-width: 560px; }
.provider-row .btn { flex-shrink: 0; padding: 9px 16px; font-size: 13.5px; }
@media (max-width: 640px) {
  .provider-row { flex-wrap: wrap; }
  .provider-row .btn { margin-left: 48px; }
}

/* ---------- Market ticker (homepage) ---------- */
.ticker-wrap { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-tint); display: none; }
.ticker-wrap.is-ready { display: block; }
.ticker { display: flex; gap: 0; overflow-x: auto; padding: 0; }
.ticker-item { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-right: 1px solid var(--border); white-space: nowrap; font-size: 13.5px; }
.ticker-item .t-sym { font-weight: 700; }
.ticker-item .t-price { color: var(--text-muted); }
.ticker-item .t-chg { font-weight: 700; }
.ticker-item .t-chg.up { color: var(--green); }
.ticker-item .t-chg.down { color: var(--red); }

/* ---------- Richer stat tiles ---------- */
.stat-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px; font-size: 15px; font-weight: 700;
}

/* ---------- Trust bar (homepage) ---------- */
.trust-bar { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; margin-top: 28px; }
.trust-bar .item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); font-weight: 600; }
.trust-bar .dot-ok { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
