/* DailyCoinTA design system */
:root {
  --bg: #07070f;
  --bg-elev: rgba(12, 16, 28, 0.78);
  --bg-soft: rgba(17, 23, 36, 0.72);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eef5;
  --text-dim: #9aa8b7;
  --text-mute: #6d7b8a;
  --accent: #7aa2ff;
  --accent-2: #9b8cff;
  --teal: #4ecdc4;
  --up: #3ecf8e;
  --up-bg: rgba(62, 207, 142, 0.14);
  --down: #f0616d;
  --down-bg: rgba(240, 97, 109, 0.14);
  --warn: #e6b84d;
  --warn-bg: rgba(230, 184, 77, 0.12);
  --info: #6ec8ff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  --max: 1180px;
  --header-h: 68px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 36px;
  --space-6: 56px;
}
*, *::before, *::after { box-sizing: border-box; }
html {
  background:
    radial-gradient(ellipse at 18% 8%, rgba(72, 40, 120, 0.45) 0%, transparent 52%),
    radial-gradient(ellipse at 82% 88%, rgba(12, 70, 90, 0.38) 0%, transparent 48%),
    radial-gradient(ellipse at 50% 50%, rgba(20, 28, 70, 0.35) 0%, transparent 60%),
    #07070f;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--text);
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }
.nebula-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.03em; line-height: 1.2; }
h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0 0 14px; }
h2 { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); margin: 0 0 12px; font-weight: 650; }
.wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* Sticky header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 10, 18, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: #0b0f14; font-weight: 750; font-size: 12px; letter-spacing: -0.04em;
  display: grid; place-items: center;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 14px; font-weight: 700; }
.brand-text span { font-size: 11px; color: var(--text-mute); font-weight: 500; }

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}
.nav-link, .nav-drop-btn {
  appearance: none;
  background: none;
  border: 0;
  color: var(--text-dim);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.nav-link:hover, .nav-drop-btn:hover,
.nav-link.active, .nav-drop.is-active .nav-drop-btn {
  color: var(--text);
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}
.nav-drop { position: relative; }
.drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 230px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(12, 16, 28, 0.94);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  z-index: 50;
}
.nav-drop:hover .drop-menu,
.nav-drop:focus-within .drop-menu,
.nav-drop.is-open .drop-menu { display: flex; flex-direction: column; gap: 2px; }
.drop-menu a, .drawer-group a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
}
.drop-menu a:hover, .drawer-group a:hover, .drop-menu a.active, .drawer-group a.active {
  background: rgba(122, 162, 255, 0.12);
  color: var(--text);
  text-decoration: none;
}

.header-search { margin-left: auto; flex: 0 1 220px; }
.header-search input, .search, .coin-search {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
}
.header-search input:focus, .search:focus, .coin-search:focus {
  outline: 2px solid rgba(122, 162, 255, 0.45);
  border-color: var(--accent);
}
.updated-pill { flex: 0 0 auto; }
.pill {
  display: inline-flex; align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  white-space: nowrap;
}
.menu-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 10px 9px;
  cursor: pointer;
}
.menu-toggle span {
  display: block; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px;
}
.mobile-drawer {
  display: none;
  padding: 8px 16px 20px;
  border-top: 1px solid var(--line);
}
.drawer-group { margin: 12px 0 16px; }
.drawer-label {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 650;
}

main { padding: 28px 0 64px; position: relative; z-index: 1; }

/* Glass panels */
.hero, .pulse-card, .cat-card, .table-wrap, .writeup, .chart-card, .panel,
.faq, .related, .explore, .tax-cta, .cl-cta, .tv-cta, .disclosure-copy,
.empty-list, .coin-hero, .levels {
  background: var(--bg-elev);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.hero { padding: 28px 28px 26px; margin: 0 0 var(--space-4); }
.hero .eyebrow { margin: 0 0 10px; color: var(--text-mute); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 650; }
.lede { color: var(--text-dim); max-width: 68ch; margin: 0; font-size: 1.05rem; }

/* Market pulse */
.pulse {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 var(--space-4);
}
.pulse-card { padding: 16px 16px 14px; min-width: 0; }
a.pulse-card, a.pulse-card:hover { color: inherit; text-decoration: none; }
a.pulse-card:hover { border-color: var(--accent); }
.pulse-card .label { font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-mute); font-weight: 650; margin: 0 0 8px; }
.pulse-card .value { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.03em; margin: 0; color: var(--text); }
.pulse-card .sub { margin: 6px 0 0; font-size: 12px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pulse-card a { color: inherit; }

/* Category cards */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 var(--space-5);
}
.cat-card {
  display: block;
  padding: 16px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.cat-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.cat-card .cat-icon {
  width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(122, 162, 255, 0.12);
  color: var(--accent);
  margin-bottom: 10px;
  font-size: 14px;
}
.cat-card h3 { margin: 0 0 6px; font-size: 15px; letter-spacing: -0.02em; text-transform: none; color: var(--text); }
.cat-card p { margin: 0; font-size: 13px; color: var(--text-dim); }
.cat-card .count { color: var(--text-mute); font-weight: 600; }

.toolbar { display: flex; gap: 14px; align-items: center; margin: 0 0 14px; flex-wrap: wrap; }
.toolbar .search { flex: 1 1 240px; max-width: 360px; }
.hint { color: var(--text-mute); font-size: 12px; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 22px; }
table.coins { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 14px; }
table.coins th, table.coins td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); }
table.coins thead th {
  position: sticky; top: 0;
  background: rgba(14, 18, 30, 0.94);
  color: var(--text-mute);
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 650;
  cursor: pointer; white-space: nowrap; z-index: 2;
}
table.coins th:hover { color: var(--text); }
table.coins tbody tr:nth-child(even) td { background: rgba(255,255,255,0.025); }
table.coins tbody tr:hover td { background: rgba(122, 162, 255, 0.08); }
table.coins td.rank, table.coins td.num { font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 13px; }
table.coins td.rank { color: var(--text-mute); width: 48px; }
table.coins td.num { text-align: right; }
table.coins th.num { text-align: right; }
.coin-cell { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.coin-cell:hover { text-decoration: none; }
.coin-cell img, .coin-icon { width: 28px; height: 28px; border-radius: 50%; background: #1b2430; flex: 0 0 auto; }
.coin-cell .name { font-weight: 650; color: var(--text); }
.coin-cell .sym { color: var(--text-mute); font-size: 12px; text-transform: uppercase; margin-left: 6px; font-weight: 550; }
.chg { font-weight: 650; }
.chg.up, .pill-up { color: var(--up); }
.chg.down, .pill-down { color: var(--down); }
.chg-pill {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: 2px 8px; font-weight: 650; font-size: 12px;
}
.chg-pill.up { background: var(--up-bg); color: var(--up); }
.chg-pill.down { background: var(--down-bg); color: var(--down); }
.tag { display: inline-flex; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 650; }
.tag.above { background: var(--up-bg); color: var(--up); }
.tag.below { background: var(--down-bg); color: var(--down); }
.tag.na { background: rgba(255,255,255,0.06); color: var(--text-mute); }
.rsi.hot { color: var(--warn); }
.rsi.cold { color: var(--info); }
.spark { display: block; width: 72px; height: 24px; }
td.spark-cell { width: 80px; }

/* Coin + list pages */
.crumb { font-size: 13px; color: var(--text-mute); margin-bottom: 18px; }
.crumb a { color: var(--text-dim); }
.coin-hero, .writeup, .chart-card, .panel, .faq, .related, .explore { padding: 20px 22px; margin: 0 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.stat {
  background: var(--bg-elev);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-width: 0;
}
.stat .k { font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-mute); font-weight: 650; }
.stat .v { font-size: 1.2rem; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .s { color: var(--text-mute); font-size: 12px; margin-top: 4px; }
.chart-wrap { height: 340px; position: relative; }
.legend-note { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-mute); font-size: 12px; margin-left: 8px; }
.writeup p { margin: 0 0 12px; font-size: 1.02rem; max-width: 72ch; color: var(--text-dim); }
.writeup p:last-child { margin-bottom: 0; }
.faq-item { margin: 0 0 14px; }
.faq-item h3 { font-size: 15px; letter-spacing: -0.01em; text-transform: none; color: var(--text); margin: 0 0 6px; }
.faq-item p { margin: 0; color: var(--text-dim); }
.related-list, .explore-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.related-list a, .explore-list a { font-weight: 650; }
.method { color: var(--text-dim); font-size: 14px; }
.levels { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; background: none; border: 0; backdrop-filter: none; }
.list-count { color: var(--text-mute); font-size: 13px; margin: 0 0 12px; }
.empty-list { padding: 20px; color: var(--text-dim); }

/* Affiliate CTAs — cards, not ads */
.tv-cta, .tax-cta, .cl-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 16px 0 0;
  padding: 16px 18px;
}
.tv-cta a, .tax-cta a, .cl-cta-link a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(122, 162, 255, 0.4);
  background: rgba(122, 162, 255, 0.10);
  color: var(--text);
  font-weight: 650;
  font-size: 14px;
  text-decoration: none;
}
.tax-cta a, .cl-cta-link a {
  border-color: rgba(155, 140, 255, 0.45);
  background: rgba(155, 140, 255, 0.10);
}
.tv-cta a:hover, .tax-cta a:hover, .cl-cta-link a:hover { border-color: var(--accent); text-decoration: none; }
.tv-mention, .tax-mention, .cl-mention {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-mute);
}
.tv-mention a, .tax-mention a, .cl-mention a { font-weight: 600; }
.tax-cta-kicker { margin: 0; width: 100%; font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-mute); font-weight: 650; }
.tax-cta-lead { margin: 0; color: var(--text-dim); font-size: 14px; }
.tax-sep { color: var(--text-mute); margin: 0 2px; }
.aff-note { color: var(--text-mute); font-size: 12px; font-weight: 500; }
.disclosure-copy { padding: 22px; max-width: 72ch; color: var(--text-dim); font-size: 1.02rem; line-height: 1.65; }
.disclosure-copy p { margin: 0; }

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: rgba(8, 10, 18, 0.78);
  backdrop-filter: blur(16px);
  padding: 36px 0 28px;
  font-size: 13px;
  color: var(--text-dim);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 24px 20px;
}
.footer-grid h2, .footer-col h2 { margin: 0 0 10px; }
.footer-col a, .footer-grid a { display: block; color: var(--text-dim); padding: 3px 0; }
.footer-col a:hover { color: var(--text); }
.footer-brand strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 8px; }
.footer-brand p { margin: 0 0 10px; }
.disclaimer { color: var(--text-dim); }
.disclaimer strong { color: var(--warn); font-weight: 750; }
.footer-bottom { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--text-mute); font-size: 12px; }
.footer-bottom .tv-mention, .footer-bottom .tax-mention { margin: 8px 0; }
.footer-legal { margin: 8px 0; }
.footer-legal a { color: var(--text-dim); }

/* Mobile */
@media (max-width: 980px) {
  .desktop-nav, .updated-pill { display: none; }
  .menu-toggle { display: block; }
  .header-search { flex: 1 1 auto; max-width: none; margin-left: 0; }
  .site-header.is-open .mobile-drawer { display: block; }
  .pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pulse .pulse-card:last-child { grid-column: 1 / -1; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .wrap { width: min(var(--max), calc(100% - 20px)); }
  .hero { padding: 20px 16px; }
  .pulse, .cat-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-text span { display: none; }
  .chart-wrap { height: 240px; }
  table.coins { min-width: 640px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cat-card { transition: none; }
}
