@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap");

:root{
  --bg:#050912;
  --bg-soft:#09111f;
  --panel:#0b1423;
  --panel-2:#111c2f;
  --panel-3:#16253b;
  --line:rgba(255,255,255,.09);
  --line-strong:rgba(182,207,243,.3);
  --line-soft:rgba(255,255,255,.05);
  --text:#f3f7fe;
  --text-strong:#ffffff;
  --muted:#98adc9;
  --muted-2:#7086a3;
  --cyan:#63d3ff;
  --cyan-soft:rgba(99,211,255,.14);
  --green:#16c784;
  --green-soft:rgba(22,199,132,.12);
  --red:#ea3943;
  --red-soft:rgba(234,57,67,.12);
  --amber:#ffbf72;
  --amber-soft:rgba(255,191,114,.14);
  --violet:#96a7ff;
  --shadow:0 20px 60px rgba(0,0,0,.28);
  --shadow-soft:0 10px 32px rgba(0,0,0,.2);
  --radius-xl:20px;
  --radius-lg:16px;
  --radius-md:12px;
  --max:1560px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  color:var(--text);
  font-family:"IBM Plex Sans",system-ui,sans-serif;
  font-size:14px;
  text-rendering:optimizeLegibility;
  background:
    radial-gradient(circle at 10% 5%, rgba(99,211,255,.07), transparent 20%),
    radial-gradient(circle at 87% 8%, rgba(255,191,114,.05), transparent 16%),
    linear-gradient(180deg,#060b14 0%, #060a12 32%, #03060d 100%);
}
body.drawer-open{overflow:hidden}
section[id]{scroll-margin-top:100px}
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.08;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size:120px 120px;
  mask-image:linear-gradient(180deg, rgba(0,0,0,.6), transparent 80%);
}
a{color:inherit;text-decoration:none}
button,input{font:inherit}
button{cursor:pointer}
img{max-width:100%;display:block}
h1,h2,h3,h4,p,strong,small,td,th,li,span{overflow-wrap:anywhere}
a,button,input,.surface,.hero-story,.metric-card,.watch-card,.calendar-item,.exchange-row,.archive-card,.leader-row,.breadth-card,.heat-cell,.etf-card,.sector-heat-card,.rail-card,.deriv-card,.risk-card,.story-card,.lead-story{
  transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .18s ease,transform .18s ease,opacity .15s ease;
}
button:focus-visible,input:focus-visible,a:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(99,211,255,.15), 0 0 0 1px rgba(99,211,255,.4);
}
.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

/* ─── GLOBAL STATS BAR (CMC-style top strip) ─── */
.global-stats-bar{
  width:100%;
  height:36px;
  background:#050810;
  border-bottom:1px solid rgba(255,255,255,.07);
  display:flex;
  align-items:center;
  overflow:hidden;
  position:sticky;
  top:0;
  z-index:50;
}
.global-stats-bar-inner{
  display:flex;
  align-items:center;
  gap:0;
  padding:0 16px;
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
  overflow-x:auto;
  scrollbar-width:none;
}
.global-stats-bar-inner::-webkit-scrollbar{display:none}
.global-stats-bar-inner span{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:0 14px 0 0;
  border-right:1px solid rgba(255,255,255,.07);
  margin-right:14px;
  line-height:36px;
}
.global-stats-bar-inner span:last-child{border-right:none}
.global-stats-bar-inner b{color:var(--text);font-weight:600}
.global-stats-bar-inner .gs-label{color:var(--muted-2);font-size:11px;letter-spacing:.04em}

/* ─── SITE SHELL ─── */
.site-shell{
  width:min(var(--max), calc(100vw - 20px));
  margin:0 auto;
  padding:14px 0 48px;
}

/* ─── HEADER ─── */
.site-header{
  position:sticky;
  top:36px;
  z-index:40;
  backdrop-filter:blur(20px);
}

.utility-bar,.nav-bar,.surface,.ticker-row,.rail-card,.deriv-card,.risk-card,.sector-card{
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(9,15,26,.97), rgba(6,10,18,.98));
  box-shadow:var(--shadow);
}

.utility-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 18px;
  border-radius:14px 14px 0 0;
  min-height:56px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

/* ─── LOGO: shrunk to 36×36 CMC-style ─── */
.brand-mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  padding:0;
  border-radius:8px;
  background:rgba(12,20,34,.9);
  border:1px solid rgba(255,255,255,.1);
  overflow:hidden;
  flex:0 0 36px;
}
.brand-mark img{
  width:100%;
  height:100%;
  object-fit:contain;
  border-radius:6px;
  mix-blend-mode:screen;
  filter:saturate(1.1) contrast(1.05);
}

/* ─── BRAND LOCKUP ─── */
.brand-lockup{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.brand-lockup strong{
  font-family:"Space Grotesk",sans-serif;
  font-size:18px;
  letter-spacing:-.025em;
  line-height:1;
}
.brand-lockup span{
  color:var(--muted-2);
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.utility-meta,.surface-meta,.hero-actions,.card-head,.rail-head,.footer-bar,.footer-links,.mini-list-grid,.surface-head,.board-controls,.board-toolbar{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

/* ─── PILLS & CHIPS ─── */
.status-pill,.meta-chip,.source-inline,.ghost-button,.dashboard-link,.nav-bar a,.board-tabs button,.board-filters button,.sector-tabs button,.nav-search button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:34px;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(12,19,31,.9);
  color:#c3d4ea;
  font-size:11px;
  font-weight:700;
  letter-spacing:.1em;
  text-transform:uppercase;
}

.status-pill.live,.meta-chip.live{
  color:#dff8ed;
  border-color:rgba(22,199,132,.28);
  background:rgba(22,199,132,.1);
}
.status-pill.delayed,.meta-chip.delayed{
  color:#ffe6c1;
  border-color:rgba(255,191,114,.28);
  background:rgba(255,191,114,.1);
}
.status-pill.offline,.meta-chip.offline{
  color:#ffd2db;
  border-color:rgba(234,57,67,.28);
  background:rgba(234,57,67,.1);
}

.status-dot{
  width:7px;height:7px;
  border-radius:50%;
  background:currentColor;
  box-shadow:0 0 0 4px rgba(255,255,255,.05);
}

.dashboard-link{
  color:#08111f;
  border-color:transparent;
  background:linear-gradient(135deg, #8fe2ff, #ffd087);
}

/* ─── NAV BAR ─── */
.nav-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 18px 12px;
  margin-top:1px;
  border-radius:0 0 14px 14px;
}

.nav-links{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.nav-bar a{
  min-height:32px;
  padding:6px 10px;
  text-transform:none;
  letter-spacing:.01em;
  font-size:13px;
  color:#c8d8ef;
  font-weight:500;
}

.nav-bar a:hover,.board-tabs button:hover,.board-filters button:hover,.sector-tabs button:hover,.ghost-button:hover{
  border-color:rgba(99,211,255,.28);
  color:var(--text);
  background:rgba(16,26,42,.98);
}
.nav-bar a:focus-visible,
.board-tabs button:focus-visible,
.board-filters button:focus-visible,
.sector-tabs button:focus-visible,
.ghost-button:focus-visible{
  transform:translateY(-1px);
}

/* ─── SEARCH ─── */
.nav-search{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
}
.nav-search input,.board-search input{
  width:min(320px, 44vw);
  min-width:200px;
  min-height:38px;
  padding:0 12px;
  border-radius:10px;
  border:1px solid var(--line);
  background:rgba(4,8,16,.88);
  color:var(--text);
  outline:none;
  font-size:13px;
}
.nav-search input:focus,.board-search input:focus{
  border-color:rgba(99,211,255,.36);
  box-shadow:0 0 0 3px rgba(99,211,255,.08);
}
.nav-search button{
  color:#09101b;
  border-color:transparent;
  background:linear-gradient(135deg, rgba(99,211,255,.95), rgba(255,191,114,.95));
  font-size:12px;
}

/* ─── TICKER STACK (CMC global bar style) ─── */
.ticker-stack{
  display:grid;
  gap:10px;
  margin-top:16px;
}

.ticker-row{
  display:grid;
  grid-template-columns:140px 1fr;
  align-items:center;
  gap:10px;
  padding:8px 14px;
  border-radius:10px;
  overflow:hidden;
}
/* First ticker row styled like CMC's global stats bar */
.ticker-row:first-child{
  background:linear-gradient(180deg, rgba(8,13,22,.98), rgba(5,9,16,.99)) !important;
  border-color:rgba(99,211,255,.12) !important;
  padding:6px 14px;
}
.ticker-row:first-child .ticker-label{
  color:var(--cyan);
  font-size:10px;
  letter-spacing:.18em;
}
.ticker-row:first-child .ticker-pill{
  padding:7px 10px;
  border-radius:8px;
  gap:7px;
}
.ticker-row:first-child .ticker-pill strong{font-size:12px}
.ticker-row:first-child .ticker-pill span{font-size:12px}

.ticker-row.alt{background:linear-gradient(180deg, rgba(12,18,30,.96), rgba(6,10,18,.97))}
.ticker-label,.eyebrow{
  color:var(--cyan);
  font-size:10px;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
}
.ticker-mask{
  overflow:hidden;
  mask-image:linear-gradient(90deg, transparent, black 4%, black 96%, transparent);
}
.ticker-track{
  display:inline-flex;
  gap:10px;
  min-width:max-content;
  animation:ticker 42s linear infinite;
}
.ticker-row.alt .ticker-track{animation-duration:54s}
.ticker-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.05);
  background:rgba(6,11,20,.96);
  white-space:nowrap;
}
.ticker-pill strong{font-size:12px;color:var(--text-strong)}
.ticker-pill span{color:#c7d6ea;font-size:12px}
.pos{color:var(--green)!important}
.neg{color:var(--red)!important}

/* ─── PAGE CONTENT ─── */
.page-content{
  display:grid;
  gap:18px;
  margin-top:18px;
}

/* ─── HERO ─── */
.hero-grid{
  display:grid;
  grid-template-columns:minmax(0, 1.2fr) minmax(300px, .8fr);
  gap:18px;
}

.surface{
  position:relative;
  overflow:hidden;
  border-radius:var(--radius-xl);
  padding:22px;
}
.surface::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(180deg, rgba(255,255,255,.03), transparent 36%);
}
.surface > *{position:relative;z-index:1}
.surface:hover,
.rail-card:hover,
.deriv-card:hover,
.risk-card:hover,
.sector-card:hover{
  border-color:var(--line-strong);
  box-shadow:var(--shadow-soft);
}

.hero-panel{
  min-height:380px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  background:
    radial-gradient(circle at 85% 0%, rgba(255,191,114,.08), transparent 18%),
    radial-gradient(circle at 15% 15%, rgba(99,211,255,.08), transparent 20%),
    linear-gradient(140deg, rgba(10,16,27,.99), rgba(6,11,19,.99));
}
.hero-panel::after{
  content:"";
  position:absolute;
  inset:auto 0 0;
  height:2px;
  background:linear-gradient(90deg, rgba(99,211,255,0), rgba(99,211,255,.45), rgba(255,191,114,.35), rgba(255,191,114,0));
  pointer-events:none;
}

.surface-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.surface-head.compact h2{font-size:20px}

h1,h2,h3{
  margin:0;
  font-family:"Space Grotesk",sans-serif;
  letter-spacing:-.03em;
}
h1{
  font-size:clamp(28px, 3vw, 42px);
  line-height:.96;
  max-width:820px;
  color:var(--text-strong);
}
h2{
  font-size:clamp(20px, 2.2vw, 28px);
  line-height:1.06;
}
h3{
  font-size:17px;
  line-height:1.16;
}

.hero-copy-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-top:16px;
}
.hero-channel-strip{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:8px 0 16px;
}
.channel-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:32px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.07);
  background:rgba(255,255,255,.03);
  color:#d8e6f6;
  font-size:11px;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.channel-chip:hover{
  border-color:var(--line-strong);
  background:rgba(99,211,255,.07);
  transform:translateY(-1px);
}
.hero-copy{
  max-width:680px;
  margin:0;
  color:#cdddf0;
  font-size:15px;
  line-height:1.68;
}

.ghost-button{
  min-height:36px;
  font-size:11px;
  color:var(--text);
  text-transform:uppercase;
  background:rgba(10,18,30,.92);
}

.hero-news-stack{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:18px;
}

.hero-story{
  padding:14px 16px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.06);
  background:linear-gradient(180deg, rgba(9,15,26,.9), rgba(6,11,19,.88));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}
.hero-story:hover,
.story-card:hover,
.lead-story:hover,
.archive-card:hover,
.metric-card:hover,
.watch-card:hover,
.calendar-item:hover,
.etf-card:hover,
.breadth-card:hover,
.exchange-row:hover,
.sector-heat-card:hover{
  transform:translateY(-1px);
  border-color:var(--line-strong);
  box-shadow:var(--shadow-soft);
}
.hero-story.is-lead{
  grid-column:1 / -1;
  padding:18px;
  background:
    radial-gradient(circle at 90% 0%, rgba(255,191,114,.07), transparent 20%),
    linear-gradient(145deg, rgba(10,17,28,.98), rgba(7,12,20,.99));
}
.hero-story .story-top,.story-card .story-top,.lead-story .story-top{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:8px;
}
.story-tag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 9px;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
  border:1px solid rgba(255,255,255,.07);
  background:rgba(255,255,255,.04);
  color:#dbe7f8;
}
.story-tag.war{background:rgba(234,57,67,.1);color:#ffc1cd}
.story-tag.geopolitics{background:rgba(255,191,114,.1);color:#ffe0b2}
.story-tag.finance{background:rgba(150,167,255,.1);color:#d6deff}
.story-tag.crypto,.story-tag.market{background:rgba(99,211,255,.1);color:#b8ecff}
.story-tag.sentiment{background:rgba(255,191,114,.09);color:#ffd9a3}
.story-tag.macro{background:rgba(190,234,255,.09);color:#c1eeff}
.story-tag.onchain{background:rgba(22,199,132,.1);color:#b7f6d9}
.story-tag.breaking{background:rgba(255,159,129,.12);color:#ffd3c4}

.source-inline{
  min-height:26px;
  padding:4px 9px;
  border-radius:999px;
  text-transform:none;
  letter-spacing:0;
  font-size:11px;
  color:#d6e3f6;
  background:rgba(255,255,255,.04);
  white-space:nowrap;
}

.hero-story h3,.lead-story h3,.story-card h3{
  font-size:15px;
  line-height:1.3;
}
.hero-story.is-lead h3{
  font-size:18px;
  max-width:22ch;
}
.hero-story p,.lead-story p,.story-card p,.archive-card p,.calendar-item p,.macro-panel p,.sector-summary p,.risk-copy,.empty-state p,.metric-sub{
  margin:0;
  color:#c8d8ec;
  line-height:1.64;
  font-size:13px;
}

/* ─── HERO SIDE ─── */
.hero-side{
  display:grid;
  gap:18px;
}

.hero-metrics-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.metric-card{
  min-height:118px;
  padding:14px 14px 13px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.07);
  background:linear-gradient(180deg, rgba(8,13,22,.95), rgba(6,11,20,.86));
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.metric-card[data-coin]{cursor:pointer}
.metric-card.is-major{
  background:
    radial-gradient(circle at 100% 0%, rgba(99,211,255,.07), transparent 22%),
    linear-gradient(180deg, rgba(9,15,26,.98), rgba(7,12,21,.9));
}
.metric-card.is-wide{
  background:
    radial-gradient(circle at 100% 0%, rgba(255,191,114,.07), transparent 20%),
    linear-gradient(180deg, rgba(9,15,26,.96), rgba(7,12,21,.88));
}
.metric-card strong{
  font-family:"Space Grotesk",sans-serif;
  font-size:26px;
  letter-spacing:-.04em;
  line-height:1.04;
}
.metric-title{
  color:#8fa5c2;
  font-size:10px;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
}
.metric-sub{
  font-size:12px;
  color:#cad7eb;
}
.metric-source{
  color:var(--muted-2);
  font-size:11px;
}

/* ─── WATCH/CALENDAR/EXCHANGE CARDS ─── */
.watch-list,.calendar-list,.exchange-breakdown,.archive-wire,.leaderboard,.mini-list,.etf-board,.breadth-grid,.heatmap-grid,.sector-heat-grid{
  display:grid;
  gap:10px;
}

.watch-card,.calendar-item,.exchange-row,.archive-card,.leader-row,.breadth-card,.heat-cell,.etf-card,.sector-heat-card{
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.06);
  background:linear-gradient(180deg, rgba(8,13,22,.88), rgba(6,11,20,.82));
}
.watch-card strong,.calendar-item strong,.exchange-row strong,.archive-card strong,.breadth-card strong,.sector-heat-card strong{
  display:block;
  font-size:14px;
  margin-bottom:5px;
}

/* ─── MARKET BOARD ─── */
.market-board .board-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:16px;
  margin-top:16px;
}
.board-toolbar{
  margin-top:16px;
  justify-content:space-between;
}
.board-tabs,.board-filters{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.board-tabs button,.board-filters button,.sector-tabs button{
  min-height:32px;
  padding:6px 10px;
  text-transform:none;
  letter-spacing:0;
  font-size:12px;
}
.board-tabs button.is-active,.board-filters button.is-active,.sector-tabs button.is-active{
  color:#07101c;
  border-color:transparent;
  background:linear-gradient(135deg, #8fe2ff, #ffd087);
}
.board-search input{
  width:min(280px, 38vw);
  min-width:180px;
}

/* ─── MARKET TABLE ─── */
.table-shell{
  position:relative;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  background:linear-gradient(180deg, rgba(6,10,18,.94), rgba(5,9,16,.88));
  overflow:hidden;
}
.market-table{
  width:100%;
  border-collapse:collapse;
  font-variant-numeric:tabular-nums;
}
.market-table thead th{
  position:sticky;
  top:0;
  z-index:2;
  background:rgba(8,13,22,.99);
  border-bottom:1px solid rgba(255,255,255,.08);
  box-shadow:0 6px 18px rgba(1,4,10,.24);
}
.market-table th,.market-table td{
  padding:12px 14px;
  text-align:left;
  border-bottom:1px solid rgba(255,255,255,.04);
  font-size:13px;
}
.market-table th button{
  padding:0;
  background:none;
  border:0;
  color:#c8d8ee;
  font-size:11px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.market-table tbody tr:nth-child(even){
  background:rgba(255,255,255,.01);
}
.market-table tbody tr:hover{
  background:rgba(99,211,255,.04);
}
.pair-cell{
  display:flex;
  align-items:center;
  gap:10px;
}
.pair-open{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  padding:0;border:0;
  background:none;
  color:inherit;
  text-align:left;
}
.pair-open:hover .pair-meta strong,
.mini-coin:hover strong,
.coin-inline:hover strong{
  color:var(--cyan);
}

/* ─── COIN LOGO: circular CMC style ─── */
.coin-logo,
.coin-logo-fallback{
  width:32px;
  height:32px;
  border-radius:50%;
  flex:0 0 32px;
}
.coin-logo{
  object-fit:cover;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.1);
  box-shadow:0 4px 10px rgba(0,0,0,.16);
}
.coin-logo-fallback{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg, rgba(99,211,255,.18), rgba(255,191,114,.2));
  border:1px solid rgba(255,255,255,.08);
  color:#f7fbff;
  font-size:10px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}

/* ─── RANK CELL (CMC-style number column) ─── */
.rank-cell{
  color:var(--muted-2);
  font-size:12px;
  text-align:right;
  width:40px;
  padding-right:10px !important;
  font-variant-numeric:tabular-nums;
}

/* ─── CHANGE PILLS (CMC-style) ─── */
.change-positive{
  color:var(--green);
  background:var(--green-soft);
  padding:3px 8px;
  border-radius:6px;
  font-size:12px;
  font-weight:600;
  display:inline-block;
  white-space:nowrap;
}
.change-negative{
  color:var(--red);
  background:var(--red-soft);
  padding:3px 8px;
  border-radius:6px;
  font-size:12px;
  font-weight:600;
  display:inline-block;
  white-space:nowrap;
}

/* ─── MARKET CAP LABEL ─── */
.market-cap-label{
  color:var(--muted);
  font-size:11px;
  font-weight:500;
  display:block;
}

.cell-numeric{
  white-space:nowrap;
  font-feature-settings:"tnum" 1, "ss01" 1;
}
.watch-btn{
  width:28px;height:28px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.025);
  color:#c0cfdf;
  font-size:10px;
  font-weight:800;
  letter-spacing:.06em;
}
.watch-btn.is-active{
  color:#07101c;
  border-color:transparent;
  background:linear-gradient(135deg, #8fe2ff, #ffd087);
}
.watch-btn:hover{
  border-color:rgba(99,211,255,.3);
  background:rgba(99,211,255,.07);
}
.pair-meta{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}
.pair-meta strong{font-size:14px}
.pair-meta span{color:var(--muted);font-size:11px}
.mini-coin,.coin-inline{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  padding:0;border:0;
  background:none;
  color:inherit;
  text-align:left;
}
.metric-card .coin-inline{margin-bottom:8px}
.chip-inline{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.07);
  color:#c8d6e8;
  font-size:10px;
  font-weight:700;
  letter-spacing:.05em;
}
.spark-range{
  width:100px;height:6px;
  border-radius:999px;
  background:rgba(255,255,255,.07);
  overflow:hidden;
}
.spark-range span{
  display:block;height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg, #ea3943, #ffd087, #16c784);
}
.board-empty{padding:24px}

/* ─── BOARD SIDE RAIL ─── */
.board-side-rail{display:grid;gap:16px}
.rail-card{padding:16px;border-radius:16px}
.mini-list{display:grid;gap:8px}
.mini-row,.leader-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.mini-row strong,.leader-row strong{font-size:14px}
.leader-row span,.mini-row span{font-variant-numeric:tabular-nums}

.breadth-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.breadth-card strong{
  font-family:"Space Grotesk",sans-serif;
  font-size:24px;
}

/* ─── DERIVATIVES ─── */
.derivatives-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin-top:16px;
}
.deriv-card,.risk-card,.sector-card{
  padding:18px;
  border-radius:18px;
}
.risk-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin-top:16px;
}
.heatmap-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.heat-cell strong{display:block;margin-bottom:5px}
button.heat-cell{width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer}
.heat-cell.pos{
  border-color:rgba(22,199,132,.2);
  background:rgba(22,199,132,.07);
}
.heat-cell.neg{
  border-color:rgba(234,57,67,.2);
  background:rgba(234,57,67,.07);
}
.heat-cell.neutral{border-color:rgba(157,178,209,.12)}

/* ─── EDITORIAL ─── */
.editorial-grid{
  display:grid;
  grid-template-columns:minmax(0, 1.15fr) 370px;
  gap:18px;
}
.newsroom-surface{display:grid;gap:16px}
.lead-story,.story-card,.archive-card,.macro-panel{
  padding:18px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.06);
  background:linear-gradient(180deg, rgba(7,12,22,.9), rgba(6,11,20,.82));
}
.lead-story{
  background:
    radial-gradient(circle at 85% 0%, rgba(255,191,114,.08), transparent 20%),
    linear-gradient(140deg, rgba(10,17,28,.96), rgba(7,12,20,.99));
}
.secondary-stories{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.editorial-side{display:grid;gap:16px}
.side-card{display:grid;gap:12px}
.macro-panel strong{
  font-family:"Space Grotesk",sans-serif;
  display:block;
  font-size:32px;
  margin:10px 0;
}
.risk-note{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
}
.risk-note.live{background:rgba(22,199,132,.09);color:#c8ffe5}
.risk-note.delayed{background:rgba(255,191,114,.09);color:#ffe7c3}
.risk-card .watch-list{
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin-top:12px;
}
.risk-card .leaderboard{margin-top:12px}
.risk-card .risk-copy{margin-top:10px}
.risk-card .risk-copy:last-child{display:block;color:var(--muted-2)}

.etf-board{grid-template-columns:repeat(3,minmax(0,1fr))}
.etf-card strong{
  font-family:"Space Grotesk",sans-serif;
  font-size:24px;
  margin-bottom:5px;
}

.calendar-item small,.archive-card small,.watch-card small,.leader-row small,.etf-card small,.risk-copy small{
  color:var(--muted-2);
  display:block;
  margin-top:5px;
}

/* ─── NARRATIVE/SECTOR ─── */
.narrative-surface{display:grid;gap:16px}
.sector-tabs{display:flex;gap:8px;flex-wrap:wrap}
.sector-grid{
  display:grid;
  grid-template-columns:1.1fr .95fr .95fr;
  gap:16px;
}
.sector-summary strong{
  display:block;
  font-family:"Space Grotesk",sans-serif;
  font-size:32px;
  margin-bottom:6px;
}
.sector-heat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.sector-heat-card strong{font-size:15px}

/* ─── COIN DRAWER ─── */
.coin-drawer-backdrop{
  position:fixed;
  inset:0;z-index:80;
  background:rgba(1,4,10,.55);
  backdrop-filter:blur(10px);
}
.coin-drawer{
  position:fixed;
  top:14px;right:14px;bottom:14px;
  width:min(520px, calc(100vw - 28px));
  z-index:90;
  transform:translateX(calc(100% + 16px));
  opacity:0;
  pointer-events:none;
}
.coin-drawer.is-open{
  transform:translateX(0);
  opacity:1;
  pointer-events:auto;
}
.coin-drawer-shell{
  height:100%;
  display:grid;
  grid-template-rows:auto 1fr;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(circle at 100% 0%, rgba(255,191,114,.08), transparent 22%),
    radial-gradient(circle at 0% 0%, rgba(99,211,255,.08), transparent 24%),
    linear-gradient(180deg, rgba(9,15,26,.98), rgba(5,10,16,.99));
  box-shadow:0 28px 70px rgba(0,0,0,.38);
  overflow:hidden;
}
.coin-drawer-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:18px 20px 14px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.coin-drawer-title h2{margin-top:5px;font-size:28px}
.coin-drawer-close{
  min-height:36px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
  color:#d4e2f2;
  font-size:11px;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.coin-drawer-close:hover{
  border-color:var(--line-strong);
  background:rgba(99,211,255,.07);
}
.coin-drawer-body{
  overflow:auto;
  padding:18px 20px 22px;
  display:grid;
  gap:16px;
}
.coin-detail-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.coin-detail-title{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.coin-detail-title .coin-logo,
.coin-detail-title .coin-logo-fallback{
  width:48px;height:48px;
  border-radius:50%;
  flex-basis:48px;
}
.coin-detail-title h3{font-size:26px}
.coin-detail-sub{
  color:var(--muted);
  font-size:12px;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.coin-price-stack{text-align:right}
.coin-price-stack strong{
  display:block;
  font-family:"Space Grotesk",sans-serif;
  font-size:28px;
  line-height:1;
}
.coin-price-stack span{
  display:block;
  margin-top:5px;
  font-size:13px;
}
.coin-detail-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.detail-card{
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.06);
  background:linear-gradient(180deg, rgba(8,13,22,.9), rgba(5,10,18,.92));
}
.detail-card.is-wide{grid-column:1 / -1}
.detail-card h4{
  margin:0 0 10px;
  font-family:"Space Grotesk",sans-serif;
  font-size:16px;
  letter-spacing:-.02em;
}
.detail-card p{margin:0;color:#cad8ec;line-height:1.64}
.detail-meta{display:grid;gap:8px}
.detail-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:#d8e5f6;
  font-size:13px;
}
.detail-row small{color:var(--muted)}
.sr-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.sr-card{
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.06);
  background:rgba(255,255,255,.02);
}
.sr-card h5{
  margin:0 0 10px;
  font-size:13px;
  letter-spacing:.07em;
  text-transform:uppercase;
  color:#b2c6dc;
}
.sr-block{display:grid;gap:6px}
.sr-block strong{display:block;font-size:12px;color:#edf4ff}
.sr-block small{display:block;color:var(--muted)}
.provider-grid{display:grid;gap:8px}
.provider-link{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.06);
  background:rgba(255,255,255,.022);
}
.provider-link:hover{
  border-color:var(--line-strong);
  background:rgba(99,211,255,.05);
}
.provider-link strong{display:block;margin-bottom:3px}
.provider-link small{color:var(--muted)}

/* ─── FOOTER ─── */
.site-footer{
  margin-top:18px;
  padding:22px 0 10px;
}
.footer-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}
.footer-grid > div{
  padding:16px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.06);
  background:rgba(7,12,20,.78);
}
.footer-grid p,.footer-grid li,.footer-bar{
  color:#b8ccdf;
  line-height:1.7;
  font-size:13px;
}
.footer-grid ul{margin:10px 0 0;padding-left:16px}
.footer-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:12px;
}
.footer-links a{color:var(--cyan)}

/* ─── EMPTY / ERROR / SKELETON ─── */
.empty-state,.error-state,.skeleton-state{
  padding:18px;
  border-radius:16px;
  border:1px dashed rgba(255,255,255,.1);
  background:rgba(255,255,255,.018);
}
.empty-state strong,.error-state strong{display:block;margin-bottom:6px}
.retry-button{
  margin-top:12px;
  min-height:36px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(99,211,255,.22);
  background:rgba(99,211,255,.07);
  color:#dff4ff;
  font-weight:700;
}

/* ─── SKELETON ANIMATIONS ─── */
.skeleton-line,.skeleton-block{
  border-radius:999px;
  background:linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04));
  background-size:200% 100%;
  animation:shimmer 1.4s infinite linear;
}
.skeleton-line{height:12px}
.skeleton-block{height:82px;border-radius:16px}

/* ─── KEYFRAMES ─── */
@keyframes shimmer{
  0%{background-position:200% 0}
  100%{background-position:-200% 0}
}
@keyframes ticker{
  0%{transform:translateX(0)}
  100%{transform:translateX(-50%)}
}

/* ─── RESPONSIVE: 1320px ─── */
@media (max-width:1320px){
  .hero-grid,.editorial-grid,.market-board .board-layout,.sector-grid,.risk-grid,.derivatives-grid{grid-template-columns:1fr}
  .board-side-rail,.editorial-side{grid-template-columns:repeat(2,minmax(0,1fr))}
  .footer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hero-news-stack{grid-template-columns:1fr 1fr}
  .risk-card .watch-list{grid-template-columns:1fr}
}

/* ─── RESPONSIVE: 960px ─── */
@media (max-width:960px){
  .site-shell{width:min(100vw - 14px, 100%)}
  .utility-bar,.nav-bar,.surface,.deriv-card,.risk-card,.sector-card{padding:14px}
  .utility-bar,.surface-head,.hero-copy-row,.footer-bar{flex-direction:column;align-items:flex-start}
  .nav-bar{align-items:stretch}
  .nav-links{
    width:100%;
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:4px;
    scrollbar-width:none;
  }
  .nav-links::-webkit-scrollbar{display:none}
  .nav-search,.board-controls{width:100%}
  .nav-search input,.board-search input{width:100%}
  .breadth-grid,.secondary-stories,.etf-board,.heatmap-grid,.footer-grid,.sector-heat-grid,.board-side-rail{grid-template-columns:1fr}
  .hero-metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ticker-row{grid-template-columns:1fr}
  .board-toolbar{align-items:flex-start}
  .hero-news-stack{grid-template-columns:1fr}
  .hero-story.is-lead{grid-column:auto}
  .coin-drawer{inset:10px;width:auto}
  .coin-detail-top{flex-direction:column;align-items:flex-start}
  .coin-price-stack{text-align:left}
  .sr-grid,.coin-detail-grid{grid-template-columns:1fr}
}

/* ─── RESPONSIVE: 768px ─── */
@media (max-width:768px){
  .hero-grid{grid-template-columns:1fr}
  .brand-lockup span{display:none}
  .global-stats-bar{display:none}
  section[id]{scroll-margin-top:80px}
}

/* ─── RESPONSIVE: 480px ─── */
@media (max-width:480px){
  .nav-links{display:none}
  .nav-search input{min-width:160px}
  .brand-mark{width:30px;height:30px;flex:0 0 30px}
  .brand-lockup strong{font-size:15px}
  h1{font-size:26px}
  h2{font-size:20px}
  .hero-copy{font-size:14px;line-height:1.6}
  .hero-metrics-grid{grid-template-columns:1fr}
  .surface{padding:14px}
  .metric-card strong,.macro-panel strong,.sector-summary strong{font-size:22px}
  .market-table thead{display:none}
  .market-table,
  .market-table tbody,
  .market-table tr,
  .market-table td{
    display:block;width:100%;
  }
  .market-table tbody{padding:10px}
  .market-table tbody tr{
    margin-bottom:10px;
    padding:12px;
    border:1px solid rgba(255,255,255,.06);
    border-radius:14px;
    background:rgba(7,12,20,.76);
  }
  .market-table tbody tr:last-child{margin-bottom:0}
  .market-table td{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:7px 0;
    border-bottom:0;
    font-size:12px;
  }
  .market-table td::before{
    content:attr(data-label);
    color:#8298b8;
    font-size:10px;
    font-weight:800;
    letter-spacing:.11em;
    text-transform:uppercase;
  }
  .market-table td:first-child{padding-top:0;display:block}
  .market-table td:first-child::before{display:none}
  .pair-cell{justify-content:space-between;align-items:flex-start}
  .spark-range{width:90px}
  .coin-drawer{inset:0;width:100vw}
  .coin-drawer-shell{border-radius:0}
  .coin-drawer-head,.coin-drawer-body{padding:14px}
}

/* ─── LEGACY: 640px (kept for compatibility) ─── */
@media (max-width:640px){
  .hero-channel-strip{width:100%}
}
