/* bitcoinetf.guru — shared styles. Light, clean financial-data aesthetic. */
:root {
  --navy: #0b1e3f;
  --navy-soft: #14305c;
  --orange: #f7931a;
  --orange-dark: #d97c0b;
  --bg: #ffffff;
  --ink: #1a2332;
  --muted: #5b6b85;
  --line: #e6ebf2;
  --card: #f7f9fc;
  --green: #1a7f4b;
  --red: #c0392b;
  --radius: 10px;
  --font: -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(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.prose-wrap { max-width: 760px; }
h1, h2, h3 { color: var(--navy); line-height: 1.25; }
h1 { font-size: 2.1rem; margin: 0 0 0.6rem; }
h2 { font-size: 1.5rem; margin: 2.2rem 0 0.7rem; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 0.5rem; }
p { margin: 0 0 1rem; }
a { color: var(--navy-soft); }
a:hover { color: var(--orange-dark); }
.lede { font-size: 1.15rem; color: var(--muted); }

/* Header */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
}
.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand:hover { color: #fff; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-weight: 800;
}
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: #d7e0ef;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.95rem;
}
.site-nav a:hover, .site-nav a.active { color: #fff; background: var(--navy-soft); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid #3a4f76;
  color: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 1rem;
  cursor: pointer;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #fff;
  padding: 56px 0 48px;
}
.hero h1 { color: #fff; font-size: 2.4rem; }
.hero .lede { color: #c6d3e8; }
.hero .btn-primary { margin-top: 1.2rem; }
.accent { color: var(--orange); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--navy); background: #fff; }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

/* Sections */
.section { padding: 48px 0; }
.section-alt { background: var(--card); }

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 1.5rem 0;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.stat-value { font-size: 1.7rem; font-weight: 700; color: var(--navy); }
.stat-value.neg { color: var(--red); }
.stat-value.pos { color: var(--green); }
.stat-label { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 1.5rem 0;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.card h3 { margin-top: 0; }
.card p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.card .btn { align-self: flex-start; margin-top: 0.6rem; }

/* Tables */
.table-scroll { overflow-x: auto; margin: 1.2rem 0; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 640px;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.data-table th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { background: var(--navy-soft); }
.data-table tr:nth-child(even) td { background: var(--card); }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.ticker { font-weight: 700; color: var(--navy); }

/* Calculator */
.calculator {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 24px;
  margin: 1.5rem 0;
}
.calculator label { font-weight: 600; display: block; margin-bottom: 6px; }
.calculator input[type="number"] {
  font-size: 1.1rem;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 100%;
  max-width: 280px;
  font-family: var(--font);
}

/* Newsletter */
.newsletter-band {
  background: var(--navy);
  color: #fff;
  padding: 48px 0;
  margin-top: 48px;
}
.newsletter-band h2 { color: #fff; margin-top: 0; }
.newsletter-band p { color: #c6d3e8; }
.newsletter-form { display: flex; gap: 10px; margin-top: 1rem; flex-wrap: wrap; }
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #3a4f76;
  font-size: 1rem;
  font-family: var(--font);
}
.newsletter-note { font-size: 0.85rem; color: #93a5c4; margin-top: 10px; }

/* Disclaimer */
.disclaimer-box {
  border-left: 4px solid var(--orange);
  background: #fff8ef;
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  font-size: 0.92rem;
  color: var(--muted);
  margin: 1.5rem 0;
}

/* Prose (articles) */
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.5rem; }
.prose .meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.breadcrumb { font-size: 0.9rem; color: var(--muted); margin: 1.2rem 0 0; }
.breadcrumb a { color: var(--muted); }

/* Footer */
.site-footer {
  background: var(--navy);
  color: #c6d3e8;
  padding: 36px 0;
  font-size: 0.9rem;
}
.site-footer .disclaimer { color: #93a5c4; font-size: 0.85rem; }
.site-footer nav a { color: #c6d3e8; text-decoration: none; margin-right: 6px; }
.site-footer nav a:hover { color: #fff; }
.site-footer .copyright { margin-top: 12px; color: #7d8fb0; font-size: 0.82rem; }

/* Directory */
.dir-card { margin-bottom: 14px; }
.dir-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.fee-badge {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

/* Misc */
.footnote { font-size: 0.82rem; color: var(--muted); margin-top: 1rem; }
.updated { font-size: 0.85rem; color: var(--muted); }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--orange-dark);
  margin-bottom: 0.4rem;
}
.flow-chart-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  font-size: 0.9rem;
}
.flow-bar-track { flex: 1; background: var(--card); border-radius: 4px; height: 18px; position: relative; }
.flow-bar-fill { height: 18px; border-radius: 4px; }
.flow-bar-fill.neg { background: var(--red); }
.flow-bar-fill.pos { background: var(--green); }

/* Charts (Chart.js enhancements) */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin: 1.5rem 0;
}
.chart-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 20px 20px 12px;
}
.chart-card h3 { margin-top: 0; }
.chart-wrap {
  position: relative;
  height: 300px;
  margin: 0.8rem 0 0.4rem;
}
.chart-wrap-tall { height: 320px; }
.chart-note { font-size: 0.82rem; color: var(--muted); margin-top: 0.6rem; }

/* Social wall (X embed) */
.social-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #fff;
  margin-top: 48px;
}
.social-band h2 { color: #fff; margin-top: 0.4rem; }
.kicker-light { color: var(--orange); }
.social-lede { color: #c6d3e8; font-size: 1.05rem; max-width: 640px; }
.social-embed {
  max-width: 520px;
  margin: 1.5rem auto;
}
.social-embed iframe { max-height: 480px !important; }
.x-fallback {
  border: 1px solid #3a4f76;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  padding: 22px;
  text-align: center;
}
.x-fallback a { color: #fff; font-weight: 600; }
.x-fallback-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 0.5rem;
}
.footnote-light { font-size: 0.82rem; color: #93a5c4; margin-top: 0.8rem; }
.social-follow { text-align: center; margin-top: 1.2rem; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  .hero h1 { font-size: 1.9rem; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 10px 20px 16px;
  }
  .site-nav.open { display: flex; }
  .site-header { position: relative; }
  .header-inner { position: relative; }
  .newsletter-form { flex-direction: column; }
}
