/* MogBots: shared styles. MTGO-inspired, premium aesthetic. */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700;800&family=Montserrat:wght@600;700;800;900&family=JetBrains+Mono:wght@500;700&family=Cinzel:wght@500;700;900&display=swap');

:root {
  --bg-darkest: #050505;
  --bg-darker: #0d0d0d;
  --bg-dark: #1a1a1a;
  --bg-mid: #2a2a2a;
  --bg-soft: #383838;
  --line-dark: #2f2f2f;
  --line-darker: #1a1a1a;
  --bg-light: #ffffff;
  --bg-page: #f0f1f3;
  --bg-row-alt: #fafafa;
  --line: #e5e5e5;
  --line-strong: #d4d4d4;
  --text: #131313;
  --text-muted: #5b5b5b;
  --text-dim: #9d9d9d;
  --text-on-dark: #ffffff;
  --text-on-dark-muted: #b8b8b8;
  --text-on-dark-dim: #6b6b6b;
  --orange: #e94c13;
  --orange-bright: #ff6427;
  --orange-hover: #c8400f;
  --orange-soft: #fff2ec;
  --gold: #ffe067;
  --gold-deep: #ed8b00;
  --green: #18a957;
  --green-deep: #047857;
  --red: #d83737;
  --red-deep: #b91c1c;
  --discord: #5865f2;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 10px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 24px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.08);
  --grad-dark: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
  --grad-orange: linear-gradient(135deg, var(--orange-bright) 0%, var(--orange) 50%, #c8400f 100%);
  --grad-hero: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #2a1810 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--orange); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--orange-hover); text-decoration: underline; }
code {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  background: var(--bg-light);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.88em;
  font-weight: 500;
}
.container {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Top bar */
.topbar {
  background: var(--grad-dark);
  color: var(--text-on-dark);
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line-dark);
  box-shadow: 0 2px 0 var(--orange), 0 4px 14px rgba(0,0,0,0.3);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 1.25rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-on-dark) !important;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  background: var(--grad-orange);
  color: var(--text-on-dark);
  width: 40px;
  height: 40px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 1.3rem;
  box-shadow: 0 2px 8px rgba(233, 76, 19, 0.4), inset 0 1px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.2);
  position: relative;
  letter-spacing: -0.04em;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 5px;
  pointer-events: none;
}
.brand-text { background: linear-gradient(180deg, #fff 60%, #c8c8c8 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.topnav {
  display: flex;
  gap: 0.15rem;
  align-items: center;
  margin-left: 1rem;
}
.topnav a {
  color: var(--text-on-dark-muted);
  padding: 0.55rem 1rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all 0.15s ease;
}
.topnav a:hover {
  color: var(--text-on-dark);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
}
.topnav a.active {
  color: var(--text-on-dark);
  background: var(--bg-mid);
  box-shadow: inset 0 -2px 0 var(--orange);
}
.nav-discord {
  background: var(--discord) !important;
  color: var(--text-on-dark) !important;
  margin-left: 0.5rem;
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
}
.nav-discord:hover { background: #4752c4 !important; color: var(--text-on-dark) !important; }
.cart-btn {
  margin-left: auto;
  background: var(--grad-orange);
  color: var(--text-on-dark) !important;
  padding: 0.6rem 1.1rem;
  border-radius: 5px;
  font-weight: 800;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(233, 76, 19, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.15s ease;
}
.cart-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(233, 76, 19, 0.45), inset 0 1px 0 rgba(255,255,255,0.2); text-decoration: none; }
.cart-count {
  background: var(--text-on-dark);
  color: var(--orange);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.7rem;
  font-weight: 900;
  min-width: 20px;
  text-align: center;
}
.cart-total {
  font-weight: 700;
  font-size: 0.83rem;
  opacity: 0.95;
}
.icon { width: 14px; height: 14px; vertical-align: middle; flex-shrink: 0; }

/* Status strip */
.status-strip {
  background: var(--bg-darker);
  color: var(--text-on-dark-muted);
  border-bottom: 1px solid var(--line-dark);
  font-size: 0.82rem;
}
.status-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.25rem;
  flex-wrap: wrap;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.online {
  background: #1cd65c;
  box-shadow: 0 0 0 0 rgba(28, 214, 92, 0.6), 0 0 8px rgba(28, 214, 92, 0.5);
  animation: pulse 2s infinite;
}
.status-dot.offline { background: #6b6b6b; }
.status-strip strong { color: var(--text-on-dark); font-weight: 700; }
.status-strip code {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: var(--gold);
}
.status-sep { color: #444; margin: 0 0.25rem; }
.status-update { color: var(--text-on-dark-muted); margin-left: auto; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   rgba(28, 214, 92, 0.6), 0 0 8px rgba(28, 214, 92, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(28, 214, 92, 0), 0 0 8px rgba(28, 214, 92, 0.5); }
  100% { box-shadow: 0 0 0 0   rgba(28, 214, 92, 0), 0 0 8px rgba(28, 214, 92, 0.5); }
}

/* Hero */
.hero {
  background:
    radial-gradient(ellipse 800px 400px at 80% 30%, rgba(233, 76, 19, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 600px 500px at 15% 70%, rgba(109, 40, 217, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 500px 400px at 50% 0%, rgba(255, 224, 103, 0.08) 0%, transparent 70%),
    linear-gradient(135deg, #0a0a0a 0%, #15100c 40%, #1a0f0a 100%);
  color: var(--text-on-dark);
  padding: 3rem 0 2.75rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-dark);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
  mix-blend-mode: overlay;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 180px;
  background:
    linear-gradient(45deg, transparent 49.5%, rgba(255,255,255,0.02) 49.5%, rgba(255,255,255,0.02) 50.5%, transparent 50.5%),
    linear-gradient(-45deg, transparent 49.5%, rgba(255,255,255,0.02) 49.5%, rgba(255,255,255,0.02) 50.5%, transparent 50.5%);
  background-size: 18px 18px;
  pointer-events: none;
  z-index: 1;
}
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--orange-bright);
  margin-bottom: 0.85rem;
}
.hero-eyebrow::before {
  content: '';
  width: 24px; height: 2px;
  background: var(--orange);
  display: inline-block;
}
.hero h1 {
  font-family: 'Cinzel', 'Montserrat', serif;
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 0.8rem;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
.hero h1 .accent {
  background: linear-gradient(135deg, #ffd47a 0%, #ff7a2a 50%, #e94c13 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
  filter: drop-shadow(0 2px 8px rgba(233, 76, 19, 0.4));
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-on-dark-muted);
  max-width: 620px;
  margin: 0 0 1.5rem;
  line-height: 1.55;
}
.hero-stats {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0.85rem;
  max-width: 820px;
}
.hero-stats .stat-tile.wide { grid-row: span 2; display: flex; flex-direction: column; }
.hero-stats .stat-tile.wide .chart-wrap { flex: 1; margin-top: 0.6rem; min-height: 80px; position: relative; }
.hero-stats .stat-tile.wide svg.volume-chart { width: 100%; height: 100%; display: block; }
.hero-stats .stat-tile.wide .chart-x-labels { display: flex; justify-content: space-between; font-size: 0.6rem; color: var(--text-on-dark-dim); margin-top: 0.4rem; font-weight: 700; letter-spacing: 0.04em; }
.stat-tile {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  backdrop-filter: blur(4px);
}
.stat-tile .stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-on-dark-muted);
  margin-bottom: 0.3rem;
}
.stat-tile .stat-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-on-dark);
  line-height: 1;
  letter-spacing: -0.01em;
}
.stat-tile .stat-value .stat-unit {
  font-size: 0.75rem;
  color: var(--text-on-dark-muted);
  font-weight: 600;
  margin-left: 0.2rem;
}
.stat-tile .stat-trend {
  font-size: 0.72rem;
  color: var(--green);
  font-weight: 700;
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.stat-tile .stat-trend.down { color: var(--red); }

/* Featured row */
.featured-strip {
  background: var(--bg-light);
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0 1.25rem;
}
.featured-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.85rem;
}
.featured-header h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.featured-header h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--orange);
  border-radius: 2px;
}
.featured-header .featured-link {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}
.featured-card {
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.85rem 0.95rem;
  position: relative;
  overflow: hidden;
  transition: all 0.15s ease;
  display: block;
  color: inherit;
}
.featured-card:hover {
  text-decoration: none;
  color: inherit;
  border-color: var(--orange);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.featured-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--orange);
}
.featured-card .fc-name {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.featured-card .fc-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.55rem;
  font-weight: 600;
}
.featured-card .fc-price-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.4rem;
}
.featured-card .fc-price {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
}
.featured-card .fc-trend {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
}
.featured-card .fc-trend.up { color: var(--green); background: rgba(24, 169, 87, 0.08); }
.featured-card .fc-trend.down { color: var(--red); background: rgba(216, 55, 55, 0.08); }
.featured-card svg.sparkline { display: block; width: 100%; height: 28px; margin-top: 0.5rem; }

/* Sparkline (table) */
.sparkline-cell svg { display: block; width: 64px; height: 18px; }
.spark-up { stroke: var(--green); fill: none; stroke-width: 1.5; }
.spark-down { stroke: var(--red); fill: none; stroke-width: 1.5; }
.spark-up-fill { fill: rgba(24, 169, 87, 0.1); stroke: none; }
.spark-down-fill { fill: rgba(216, 55, 55, 0.1); stroke: none; }

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  align-items: start;
}

/* Sidebar */
.sidebar {
  background: var(--bg-light);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.86rem;
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}
.sidebar-search {
  padding: 0.7rem 0.8rem;
  background: var(--bg-darker);
  border-radius: 6px 6px 0 0;
}
.sidebar-search input {
  width: 100%;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line-dark);
  background: var(--bg-mid);
  color: var(--text-on-dark);
  border-radius: 4px;
  font: inherit;
  font-size: 0.85rem;
}
.sidebar-search input::placeholder { color: var(--text-on-dark-dim); }
.sidebar-section {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.sidebar-section:last-child { border-bottom: none; }
.sidebar-section h4 {
  margin: 0 0 0.4rem;
  padding: 0 0.85rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  font-weight: 800;
  font-family: 'Montserrat', sans-serif;
}
.set-list { list-style: none; margin: 0; padding: 0; }
.set-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.36rem 0.85rem;
  color: var(--text);
  font-size: 0.84rem;
  border-left: 3px solid transparent;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.1s ease;
}
.set-list a:hover { background: var(--bg-page); text-decoration: none; }
.set-list a.active {
  background: var(--orange-soft);
  border-left-color: var(--orange);
  color: var(--orange);
  font-weight: 800;
}
.set-list a.disabled { color: var(--text-dim); cursor: not-allowed; font-weight: 500; }
.set-list a.disabled:hover { background: transparent; }
.set-code {
  background: var(--bg-dark);
  color: var(--gold);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.set-list a.active .set-code { background: var(--orange); color: var(--text-on-dark); }
.set-list a.disabled .set-code { background: var(--line); color: var(--text-dim); }
.badge-live {
  margin-left: auto;
  background: var(--orange);
  color: var(--text-on-dark);
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: 2px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 0 8px rgba(233, 76, 19, 0.4);
}
.badge-soon {
  margin-left: auto;
  background: var(--gold);
  color: var(--bg-darker);
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: 2px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Main content card */
.main-content {
  background: var(--bg-light);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.set-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.4rem;
  background: var(--grad-dark);
  color: var(--text-on-dark);
  flex-wrap: wrap;
  gap: 0.85rem;
  border-bottom: 1px solid var(--line-dark);
  position: relative;
}
.set-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 80px; height: 2px;
  background: var(--orange);
}
.set-header h2 {
  margin: 0 0 0.25rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--text-on-dark);
}
.set-header h2 .set-tag {
  color: var(--orange-bright);
  font-size: 0.85em;
  margin-left: 0.4rem;
}
.set-meta {
  font-size: 0.8rem;
  color: var(--text-on-dark-muted);
}
.set-meta strong { color: var(--gold); font-weight: 700; }
.set-actions { display: flex; gap: 0.6rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.82rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all 0.15s ease;
}
.btn-primary { background: var(--grad-orange); color: var(--text-on-dark) !important; box-shadow: 0 2px 6px rgba(233, 76, 19, 0.3), inset 0 1px 0 rgba(255,255,255,0.2); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(233, 76, 19, 0.4), inset 0 1px 0 rgba(255,255,255,0.2); text-decoration: none; }
.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text-on-dark) !important;
  border: 1px solid rgba(255,255,255,0.18);
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); text-decoration: none; }

/* Mode tabs */
.mode-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-mid);
  border-bottom: 1px solid var(--line-dark);
}
.mode-tabs a {
  padding: 0.7rem 1.3rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-on-dark-dim);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all 0.15s ease;
}
.mode-tabs a:hover { color: var(--text-on-dark); text-decoration: none; background: rgba(255,255,255,0.04); }
.mode-tabs a.active {
  color: var(--text-on-dark);
  border-bottom-color: var(--orange);
  background: var(--bg-soft);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.4rem;
  background: var(--bg-page);
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  flex-wrap: wrap;
}
.filter-search {
  flex: 1 1 240px;
  padding: 0.5rem 0.75rem 0.5rem 2.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font: inherit;
  font-size: 0.85rem;
  background-color: var(--bg-light);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235b5b5b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.7rem center;
}
.filter-search:focus, .filter:focus {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
  border-color: var(--orange);
}
.filter {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font: inherit;
  background: var(--bg-light);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.result-count { color: var(--text-muted); margin-left: auto; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }

/* Card table */
.card-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.card-table th, .card-table td {
  padding: 0.5rem 0.95rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.card-table th {
  background: var(--bg-darker);
  color: var(--text-on-dark);
  font-weight: 800;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: sticky;
  top: 0;
  font-family: 'Montserrat', sans-serif;
  border-bottom: none;
}
.card-table tbody tr { transition: background 0.08s ease; }
.card-table tbody tr:nth-child(even) td { background: var(--bg-row-alt); }
.card-table tbody tr:hover td { background: var(--orange-soft); }
.card-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.card-table .col-rarity   { width: 105px; }
.card-table .col-treat    { width: 75px; }
.card-table .col-trend    { width: 90px; }
.card-table .col-add      { width: 130px; text-align: right; }

.price-buy  { color: var(--green-deep); font-weight: 800; font-family: 'JetBrains Mono', monospace; font-size: 0.92em; }
.price-sell { color: var(--red-deep); font-weight: 800; font-family: 'JetBrains Mono', monospace; font-size: 0.92em; }
.card-name  { font-weight: 700; color: var(--text); }
.set-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--grad-orange);
  color: var(--text-on-dark);
  font-size: 0.6rem;
  border-radius: 4px;
  font-weight: 900;
  margin-right: 0.55rem;
  vertical-align: middle;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}
.rarity-cell { display: flex; align-items: center; gap: 0.45rem; }
.rarity-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.3);
  background: var(--bg-mid);
  position: relative;
}
.rarity-mythic   { background: linear-gradient(135deg, #ff7a2a 0%, #c8400f 100%); }
.rarity-rare     { background: linear-gradient(135deg, #ffe067 0%, #ed8b00 100%); }
.rarity-uncommon { background: linear-gradient(135deg, #e0e6eb 0%, #9aa5b1 100%); }
.rarity-common   { background: linear-gradient(135deg, #4a4a4a 0%, #1a1a1a 100%); }
.rarity-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: capitalize;
  font-weight: 700;
}
.treatment-foil    { color: #6d28d9; font-weight: 800; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; background: linear-gradient(135deg, #6d28d9, #c026d3, #ec4899, #6d28d9); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; background-size: 200% 100%; }
.treatment-nonfoil { color: var(--text-muted); font-size: 0.78rem; }
.stock-cell { font-weight: 700; }
.stock-cell.zero { color: var(--red-deep); font-weight: 800; }
.stock-cell.low  { color: var(--gold-deep); font-weight: 800; }

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: flex-end;
}
.qty-input {
  width: 46px;
  padding: 0.28rem 0.3rem;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  text-align: center;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
}
.qty-add {
  background: var(--grad-orange);
  color: var(--text-on-dark);
  border: none;
  border-radius: 3px;
  padding: 0.32rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 1px 3px rgba(233, 76, 19, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.12s ease;
}
.qty-add:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(233, 76, 19, 0.45), inset 0 1px 0 rgba(255,255,255,0.2); text-decoration: none; color: var(--text-on-dark); }
.qty-add.disabled, .qty-add:disabled {
  background: var(--line-strong);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

/* Bottom footer */
.bottom-footer {
  margin-top: 2.5rem;
  padding: 2.5rem 0 1.5rem;
  background: var(--bg-darkest);
  color: var(--text-on-dark-muted);
  font-size: 0.85rem;
  border-top: 3px solid var(--orange);
  position: relative;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand .brand { margin-bottom: 0.75rem; }
.footer-brand p { color: var(--text-on-dark-dim); margin: 0; max-width: 280px; line-height: 1.55; }
.footer-col h5 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-on-dark);
  margin: 0 0 0.85rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { color: var(--text-on-dark-muted); font-weight: 500; }
.footer-col a:hover { color: var(--orange-bright); text-decoration: none; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-dark);
  font-size: 0.8rem;
  color: var(--text-on-dark-dim);
}
.muted { color: var(--text-dim); }

/* Static-page content */
.static-layout { padding: 2rem 0 0; }
.page-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.1rem;
  margin: 0 0 0.4rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--text);
}
.page-title::after {
  content: '';
  display: block;
  width: 70px;
  height: 4px;
  background: var(--grad-orange);
  margin-top: 0.6rem;
  border-radius: 2px;
}
.page-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 1.8rem;
  font-weight: 400;
  max-width: 700px;
}
.content-section {
  background: var(--bg-light);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.4rem 1.7rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.content-section h2 {
  margin: 0 0 0.85rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  border-left: 4px solid var(--orange);
  padding-left: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.content-section h2 .step-num {
  background: var(--grad-orange);
  color: var(--text-on-dark);
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 900;
  margin-right: 0.4rem;
  box-shadow: 0 2px 6px rgba(233, 76, 19, 0.3);
}
.content-section h3 {
  margin: 1.45rem 0 0.45rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.content-section h3:first-child { margin-top: 0; }
.content-section p { margin: 0 0 0.85rem; color: var(--text); }
.content-section p:last-child { margin-bottom: 0; }
.content-section ul, .content-section ol {
  margin: 0 0 0.95rem;
  padding-left: 1.4rem;
}
.content-section li { margin-bottom: 0.35rem; }

/* Mobile */
@media (max-width: 1100px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .featured-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    max-height: none;
    margin-bottom: 0.85rem;
  }
  .topbar-inner { flex-wrap: wrap; gap: 0.6rem; }
  .topnav { gap: 0.1rem; flex-wrap: wrap; order: 3; width: 100%; margin-left: 0; }
  .topnav a { padding: 0.35rem 0.6rem; font-size: 0.76rem; }
  .cart-btn { margin-left: auto; order: 2; }
  .hero { padding: 1.5rem 0 1.5rem; }
  .hero h1 { font-size: 1.85rem; }
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { font-size: 0.78rem; }
  .main-content { overflow-x: auto; }
  .card-table { font-size: 0.78rem; min-width: 880px; }
  .page-title { font-size: 1.55rem; }
  .set-header h2 { font-size: 1.1rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .mtg-tile { min-height: 240px; }
}

/* ===========================================
   v3 additions: activity ticker, MTG-style
   featured tiles, mana symbols, hero orbs
   =========================================== */

/* Hero mana orb decoration */
.hero { position: relative; }
.hero .mana-orbs {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  width: 50%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.hero .mana-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  border: 2px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 -4px 8px rgba(0,0,0,0.2), inset 0 4px 8px rgba(255,255,255,0.25), 0 0 24px rgba(0,0,0,0.4);
}
.hero .mana-orb.w { background: radial-gradient(circle at 30% 30%, #fffbd5, #e8dfa8 70%, #b9ad6b); color: #6b5d2e; width: 78px; height: 78px; top: 14%; right: 32%; animation: float-1 7s ease-in-out infinite; }
.hero .mana-orb.u { background: radial-gradient(circle at 30% 30%, #d4f0fc, #4d9ed3 70%, #1f6b9c); color: #0f2a45; width: 96px; height: 96px; top: 4%; right: 6%; animation: float-2 9s ease-in-out infinite; }
.hero .mana-orb.b { background: radial-gradient(circle at 30% 30%, #8a8a8a, #2a2a2a 70%, #050505); color: #d6d6d6; width: 68px; height: 68px; bottom: 20%; right: 42%; animation: float-3 8s ease-in-out infinite; }
.hero .mana-orb.r { background: radial-gradient(circle at 30% 30%, #ffc8b6, #e94c13 65%, #8a2009); color: #5a0f08; width: 84px; height: 84px; bottom: 4%; right: 14%; animation: float-1 10s ease-in-out infinite reverse; }
.hero .mana-orb.g { background: radial-gradient(circle at 30% 30%, #d6f0e0, #4ea76b 70%, #1f6b3a); color: #103820; width: 72px; height: 72px; top: 44%; right: 2%; animation: float-2 7.5s ease-in-out infinite reverse; }
.hero .mana-orb {
  font-size: 1.6rem;
  border: 2px solid rgba(255,255,255,0.25);
  box-shadow:
    inset 0 -6px 12px rgba(0,0,0,0.3),
    inset 0 4px 12px rgba(255,255,255,0.35),
    0 4px 24px rgba(0,0,0,0.45),
    0 0 40px rgba(255,255,255,0.05);
}
@keyframes float-1 {
  0%, 100% { transform: translate(0, 0) rotate(-8deg); }
  50%      { transform: translate(-8px, -12px) rotate(-4deg); }
}
@keyframes float-2 {
  0%, 100% { transform: translate(0, 0) rotate(8deg); }
  50%      { transform: translate(6px, -16px) rotate(14deg); }
}
@keyframes float-3 {
  0%, 100% { transform: translate(0, 0) rotate(20deg); }
  50%      { transform: translate(-4px, -8px) rotate(28deg); }
}
.hero-inner { position: relative; z-index: 2; }

/* Activity ticker */
.activity-ticker {
  background: var(--bg-darkest);
  border-bottom: 1px solid var(--line-dark);
  color: var(--text-on-dark-muted);
  font-size: 0.82rem;
  overflow: hidden;
  position: relative;
}
.activity-ticker .ticker-inner {
  display: flex;
  align-items: center;
  padding: 0.45rem 0;
  gap: 1rem;
}
.activity-ticker .ticker-label {
  flex-shrink: 0;
  background: var(--orange);
  color: var(--text-on-dark);
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.35rem 1.25rem 0.35rem 1.25rem;
  margin-left: -1px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: -0.45rem 0;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 50%, 100% 100%, 0 100%);
  padding-right: 1.6rem;
}
.activity-ticker .ticker-label .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: pulse-fast 1.2s ease-in-out infinite;
}
@keyframes pulse-fast {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
.activity-ticker .ticker-track {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
}
.activity-ticker .ticker-content {
  display: inline-flex;
  gap: 2.5rem;
  animation: ticker-scroll 60s linear infinite;
  padding-right: 2.5rem;
}
.activity-ticker .ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.activity-ticker .ticker-item .ticker-action {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 1px 7px;
  border-radius: 3px;
}
.activity-ticker .ticker-item .ticker-action.bought { color: var(--green); background: rgba(24, 169, 87, 0.14); }
.activity-ticker .ticker-item .ticker-action.sold { color: #e94c13; background: rgba(233, 76, 19, 0.14); }
.activity-ticker .ticker-item .ticker-card { color: var(--text-on-dark); font-weight: 600; }
.activity-ticker .ticker-item .ticker-time { color: var(--text-on-dark-dim); font-size: 0.78rem; margin-left: 0.25rem; }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* MTG-card-style featured tile (replaces .featured-card) */
.featured-grid.tiles {
  grid-template-columns: repeat(5, 1fr);
  gap: 0.85rem;
}
.mtg-tile {
  background: linear-gradient(145deg, #1a1a1a 0%, #2a2a2a 100%);
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  padding: 6px;
  position: relative;
  overflow: hidden;
  transition: all 0.18s ease;
  display: block;
  color: var(--text-on-dark);
  text-decoration: none;
  box-shadow: var(--shadow-md);
}
.mtg-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--orange);
  text-decoration: none;
  color: var(--text-on-dark);
}
.mtg-tile.r-mythic { background: linear-gradient(145deg, #2a1810 0%, #3d1f10 100%); }
.mtg-tile.r-rare   { background: linear-gradient(145deg, #2a2410 0%, #3d3315 100%); }
.mtg-tile.r-uncommon { background: linear-gradient(145deg, #18222e 0%, #1f3142 100%); }
.mtg-tile.r-common { background: linear-gradient(145deg, #1a1a1a 0%, #2a2a2a 100%); }
.mtg-tile-inner {
  background: var(--bg-page);
  border-radius: 5px;
  padding: 0.6rem 0.7rem;
  color: var(--text);
  position: relative;
}
.mtg-tile-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.4rem;
}
.mtg-tile-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  flex: 1;
}
.mana-cost {
  display: inline-flex;
  gap: 2px;
  flex-shrink: 0;
}
.mana {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 0.62rem;
  border: 1px solid rgba(0,0,0,0.15);
  box-shadow: inset 0 -1.5px 0 rgba(0,0,0,0.18), inset 0 1.5px 0 rgba(255,255,255,0.35);
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}
.mana.w { background: linear-gradient(135deg, #fffbd5, #e8dfa8); color: #6b5d2e; }
.mana.u { background: linear-gradient(135deg, #aae0fa, #4d9ed3); color: #1e3a5f; }
.mana.b { background: linear-gradient(135deg, #cbc2bf, #6b6b6b); color: #1a1a1a; }
.mana.r { background: linear-gradient(135deg, #ffb09e, #e94c13); color: #6b1414; }
.mana.g { background: linear-gradient(135deg, #c5e8d2, #4ea76b); color: #1f4a30; }
.mana.c { background: linear-gradient(135deg, #e8e6e2, #a8a39a); color: #4a4640; }
.mana.x { background: linear-gradient(135deg, #d6d6d6, #888); color: #2a2a2a; }
.mana.num { background: linear-gradient(135deg, #d6d6d6, #888); color: #2a2a2a; }

.mtg-tile-art {
  height: 56px;
  border-radius: 3px;
  margin-bottom: 0.45rem;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.1);
}
.mtg-tile.r-mythic .mtg-tile-art { background: linear-gradient(135deg, #ff7a2a 0%, #c8400f 50%, #6b1814 100%); }
.mtg-tile.r-rare .mtg-tile-art   { background: linear-gradient(135deg, #ffe067 0%, #ed8b00 60%, #6b3a00 100%); }
.mtg-tile.r-uncommon .mtg-tile-art { background: linear-gradient(135deg, #d2dde7 0%, #6b8294 60%, #2a3a4a 100%); }
.mtg-tile.r-common .mtg-tile-art { background: linear-gradient(135deg, #6b6b6b 0%, #2a2a2a 100%); }
.mtg-tile-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.18) 0%, transparent 40%),
    linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.08) 50%, transparent 60%);
}
.mtg-tile-typeline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(0,0,0,0.04);
  padding: 3px 6px;
  border-radius: 2px;
  margin-bottom: 0.5rem;
}
.mtg-tile-typeline .set-symbol {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.mtg-tile-typeline .rarity-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.35);
}
.mtg-tile.r-mythic .rarity-dot   { background: linear-gradient(135deg, #ff7a2a, #c8400f); }
.mtg-tile.r-rare .rarity-dot     { background: linear-gradient(135deg, #ffe067, #ed8b00); }
.mtg-tile.r-uncommon .rarity-dot { background: linear-gradient(135deg, #e0e6eb, #9aa5b1); }
.mtg-tile.r-common .rarity-dot   { background: linear-gradient(135deg, #4a4a4a, #1a1a1a); }
.mtg-tile-foot {
  background: rgba(0,0,0,0.06);
  margin: 0.5rem -0.7rem -0.6rem;
  padding: 0.55rem 0.7rem 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.mtg-tile-price {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}
.mtg-tile-price .currency {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-left: 2px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  vertical-align: super;
}
.mtg-tile-trend {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 3px;
}
.mtg-tile-trend.up   { color: var(--green); background: rgba(24, 169, 87, 0.14); }
.mtg-tile-trend.down { color: var(--red); background: rgba(216, 55, 55, 0.14); }
.mtg-tile-spark { padding: 0.4rem 0.7rem 0; margin: 0 -0.7rem; }
.mtg-tile-spark svg { display: block; width: 100%; height: 22px; }

/* Mana cost in table */
.card-table .col-cost, .card-table .mana-col { width: 110px; }
.mana-cost.in-row { gap: 1px; }
.mana-cost.in-row .mana { width: 15px; height: 15px; font-size: 0.6rem; }
.mana.hybrid { color: #2a2a2a !important; font-size: 0.5rem !important; line-height: 1; }
.mana.h-u-r { background: linear-gradient(90deg, #aae0fa 0%, #aae0fa 50%, #ffb09e 50%, #ffb09e 100%); }
.mana.h-w-b { background: linear-gradient(90deg, #fffbd5 0%, #fffbd5 50%, #6b6b6b 50%, #6b6b6b 100%); }
.mana.h-b-g { background: linear-gradient(90deg, #6b6b6b 0%, #6b6b6b 50%, #c5e8d2 50%, #c5e8d2 100%); }
.mana.h-r-w { background: linear-gradient(90deg, #ffb09e 0%, #ffb09e 50%, #fffbd5 50%, #fffbd5 100%); }
.mana.h-g-w { background: linear-gradient(90deg, #c5e8d2 0%, #c5e8d2 50%, #fffbd5 50%, #fffbd5 100%); }
.mana.h-r-g { background: linear-gradient(90deg, #ffb09e 0%, #ffb09e 50%, #c5e8d2 50%, #c5e8d2 100%); }

/* Card thumbnails in table rows */
.card-thumb {
  width: 28px;
  height: 39px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 0.55rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.06);
  object-fit: cover;
  background: #1a1a1a;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  position: relative;
}
.card-thumb:hover {
  transform: scale(4) translate(20%, 0);
  z-index: 100;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,0,0,0.2);
  border-radius: 8px;
}
.card-table tr { position: relative; }

/* MTG tile art with real card image */
.mtg-tile-art.has-art {
  height: 110px;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
.mtg-tile-art.has-art::after {
  background-image:
    linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.2) 100%);
}

/* Set symbol (real STX shape, fallback works as filled circle) */
.set-symbol-real {
  display: inline-block;
  width: 16px;
  height: 13px;
  vertical-align: middle;
  background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 29 23' xmlns='http://www.w3.org/2000/svg' fill='%23e94c13'%3E%3Cpath d='M27.304.24l.002.053c.058 1.743-.32 3.162-1.138 4.257-1.015.074-1.784.487-2.307 1.238 1.312-.886 2.744-1.077 4.296-.573-.527 1.475-1.12 2.559-1.782 3.25-1.042-.348-1.855-.239-2.44.33.951-.299 1.943-.2 2.976.298-.673 1.31-1.751 2.237-3.235 2.783.905.172 1.62.662 2.147 1.47-1.146.722-2.417 1.09-3.814 1.103.678.703 1.141 1.264 1.388 1.682-1.113.18-2.165.106-3.157-.223.287.46.477.903.57 1.329-.99-.093-1.796-.379-2.418-.856.014.555-.117 1.054-.394 1.498-.567-.85-.978-1.59-1.232-2.222-.568.518-.964 1.184-1.187 2 .024-.66-.144-1.218-.503-1.674-.36.456-.527 1.014-.503 1.673-.223-.815-.62-1.481-1.187-1.999-.254.632-.665 1.371-1.232 2.222-.277-.444-.408-.943-.394-1.498-.622.477-1.428.763-2.418.856.093-.426.283-.869.57-1.33-.992.33-2.044.405-3.157.224.247-.418.71-.979 1.388-1.682-1.397-.013-2.668-.381-3.814-1.104.527-.807 1.242-1.297 2.147-1.469-1.484-.546-2.562-1.473-3.235-2.783 1.033-.499 2.025-.597 2.976-.298-.585-.57-1.398-.679-2.44-.33-.661-.692-1.255-1.776-1.782-3.25 1.552-.505 2.984-.314 4.296.572-.523-.751-1.292-1.164-2.307-1.238C.014 3.455-.364 2.036-.306.293L-.305.24h27.609z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.3));
}
.set-symbol-real.r-mythic { filter: drop-shadow(0 1px 1px rgba(0,0,0,0.3)) hue-rotate(0deg); }
.set-symbol-real.r-rare {
  background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 29 23' xmlns='http://www.w3.org/2000/svg' fill='%23ed8b00'%3E%3Cpath d='M27.304.24l.002.053c.058 1.743-.32 3.162-1.138 4.257-1.015.074-1.784.487-2.307 1.238 1.312-.886 2.744-1.077 4.296-.573-.527 1.475-1.12 2.559-1.782 3.25-1.042-.348-1.855-.239-2.44.33.951-.299 1.943-.2 2.976.298-.673 1.31-1.751 2.237-3.235 2.783.905.172 1.62.662 2.147 1.47-1.146.722-2.417 1.09-3.814 1.103.678.703 1.141 1.264 1.388 1.682-1.113.18-2.165.106-3.157-.223.287.46.477.903.57 1.329-.99-.093-1.796-.379-2.418-.856.014.555-.117 1.054-.394 1.498-.567-.85-.978-1.59-1.232-2.222-.568.518-.964 1.184-1.187 2 .024-.66-.144-1.218-.503-1.674-.36.456-.527 1.014-.503 1.673-.223-.815-.62-1.481-1.187-1.999-.254.632-.665 1.371-1.232 2.222-.277-.444-.408-.943-.394-1.498-.622.477-1.428.763-2.418.856.093-.426.283-.869.57-1.33-.992.33-2.044.405-3.157.224.247-.418.71-.979 1.388-1.682-1.397-.013-2.668-.381-3.814-1.104.527-.807 1.242-1.297 2.147-1.469-1.484-.546-2.562-1.473-3.235-2.783 1.033-.499 2.025-.597 2.976-.298-.585-.57-1.398-.679-2.44-.33-.661-.692-1.255-1.776-1.782-3.25 1.552-.505 2.984-.314 4.296.572-.523-.751-1.292-1.164-2.307-1.238C.014 3.455-.364 2.036-.306.293L-.305.24h27.609z'/%3E%3C/svg%3E");
}
.set-symbol-real.r-uncommon {
  background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 29 23' xmlns='http://www.w3.org/2000/svg' fill='%23a8b2bc'%3E%3Cpath d='M27.304.24l.002.053c.058 1.743-.32 3.162-1.138 4.257-1.015.074-1.784.487-2.307 1.238 1.312-.886 2.744-1.077 4.296-.573-.527 1.475-1.12 2.559-1.782 3.25-1.042-.348-1.855-.239-2.44.33.951-.299 1.943-.2 2.976.298-.673 1.31-1.751 2.237-3.235 2.783.905.172 1.62.662 2.147 1.47-1.146.722-2.417 1.09-3.814 1.103.678.703 1.141 1.264 1.388 1.682-1.113.18-2.165.106-3.157-.223.287.46.477.903.57 1.329-.99-.093-1.796-.379-2.418-.856.014.555-.117 1.054-.394 1.498-.567-.85-.978-1.59-1.232-2.222-.568.518-.964 1.184-1.187 2 .024-.66-.144-1.218-.503-1.674-.36.456-.527 1.014-.503 1.673-.223-.815-.62-1.481-1.187-1.999-.254.632-.665 1.371-1.232 2.222-.277-.444-.408-.943-.394-1.498-.622.477-1.428.763-2.418.856.093-.426.283-.869.57-1.33-.992.33-2.044.405-3.157.224.247-.418.71-.979 1.388-1.682-1.397-.013-2.668-.381-3.814-1.104.527-.807 1.242-1.297 2.147-1.469-1.484-.546-2.562-1.473-3.235-2.783 1.033-.499 2.025-.597 2.976-.298-.585-.57-1.398-.679-2.44-.33-.661-.692-1.255-1.776-1.782-3.25 1.552-.505 2.984-.314 4.296.572-.523-.751-1.292-1.164-2.307-1.238C.014 3.455-.364 2.036-.306.293L-.305.24h27.609z'/%3E%3C/svg%3E");
}
.set-symbol-real.r-common {
  background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 29 23' xmlns='http://www.w3.org/2000/svg' fill='%23131313'%3E%3Cpath d='M27.304.24l.002.053c.058 1.743-.32 3.162-1.138 4.257-1.015.074-1.784.487-2.307 1.238 1.312-.886 2.744-1.077 4.296-.573-.527 1.475-1.12 2.559-1.782 3.25-1.042-.348-1.855-.239-2.44.33.951-.299 1.943-.2 2.976.298-.673 1.31-1.751 2.237-3.235 2.783.905.172 1.62.662 2.147 1.47-1.146.722-2.417 1.09-3.814 1.103.678.703 1.141 1.264 1.388 1.682-1.113.18-2.165.106-3.157-.223.287.46.477.903.57 1.329-.99-.093-1.796-.379-2.418-.856.014.555-.117 1.054-.394 1.498-.567-.85-.978-1.59-1.232-2.222-.568.518-.964 1.184-1.187 2 .024-.66-.144-1.218-.503-1.674-.36.456-.527 1.014-.503 1.673-.223-.815-.62-1.481-1.187-1.999-.254.632-.665 1.371-1.232 2.222-.277-.444-.408-.943-.394-1.498-.622.477-1.428.763-2.418.856.093-.426.283-.869.57-1.33-.992.33-2.044.405-3.157.224.247-.418.71-.979 1.388-1.682-1.397-.013-2.668-.381-3.814-1.104.527-.807 1.242-1.297 2.147-1.469-1.484-.546-2.562-1.473-3.235-2.783 1.033-.499 2.025-.597 2.976-.298-.585-.57-1.398-.679-2.44-.33-.661-.692-1.255-1.776-1.782-3.25 1.552-.505 2.984-.314 4.296.572-.523-.751-1.292-1.164-2.307-1.238C.014 3.455-.364 2.036-.306.293L-.305.24h27.609z'/%3E%3C/svg%3E");
}

/* Replace generic rarity icon with set-symbol style */
.rarity-cell .rarity-icon { display: none; }
.rarity-cell::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 11px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
  margin-right: 0.25rem;
}
.rarity-cell:has(.rarity-icon.rarity-mythic)::before { background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 29 23' xmlns='http://www.w3.org/2000/svg' fill='%23ff6427'%3E%3Cpath d='M27.304.24l.002.053c.058 1.743-.32 3.162-1.138 4.257-1.015.074-1.784.487-2.307 1.238 1.312-.886 2.744-1.077 4.296-.573-.527 1.475-1.12 2.559-1.782 3.25-1.042-.348-1.855-.239-2.44.33.951-.299 1.943-.2 2.976.298-.673 1.31-1.751 2.237-3.235 2.783.905.172 1.62.662 2.147 1.47-1.146.722-2.417 1.09-3.814 1.103.678.703 1.141 1.264 1.388 1.682-1.113.18-2.165.106-3.157-.223.287.46.477.903.57 1.329-.99-.093-1.796-.379-2.418-.856.014.555-.117 1.054-.394 1.498-.567-.85-.978-1.59-1.232-2.222-.568.518-.964 1.184-1.187 2 .024-.66-.144-1.218-.503-1.674-.36.456-.527 1.014-.503 1.673-.223-.815-.62-1.481-1.187-1.999-.254.632-.665 1.371-1.232 2.222-.277-.444-.408-.943-.394-1.498-.622.477-1.428.763-2.418.856.093-.426.283-.869.57-1.33-.992.33-2.044.405-3.157.224.247-.418.71-.979 1.388-1.682-1.397-.013-2.668-.381-3.814-1.104.527-.807 1.242-1.297 2.147-1.469-1.484-.546-2.562-1.473-3.235-2.783 1.033-.499 2.025-.597 2.976-.298-.585-.57-1.398-.679-2.44-.33-.661-.692-1.255-1.776-1.782-3.25 1.552-.505 2.984-.314 4.296.572-.523-.751-1.292-1.164-2.307-1.238C.014 3.455-.364 2.036-.306.293L-.305.24h27.609z'/%3E%3C/svg%3E"); }
.rarity-cell:has(.rarity-icon.rarity-rare)::before     { background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 29 23' xmlns='http://www.w3.org/2000/svg' fill='%23ed8b00'%3E%3Cpath d='M27.304.24l.002.053c.058 1.743-.32 3.162-1.138 4.257-1.015.074-1.784.487-2.307 1.238 1.312-.886 2.744-1.077 4.296-.573-.527 1.475-1.12 2.559-1.782 3.25-1.042-.348-1.855-.239-2.44.33.951-.299 1.943-.2 2.976.298-.673 1.31-1.751 2.237-3.235 2.783.905.172 1.62.662 2.147 1.47-1.146.722-2.417 1.09-3.814 1.103.678.703 1.141 1.264 1.388 1.682-1.113.18-2.165.106-3.157-.223.287.46.477.903.57 1.329-.99-.093-1.796-.379-2.418-.856.014.555-.117 1.054-.394 1.498-.567-.85-.978-1.59-1.232-2.222-.568.518-.964 1.184-1.187 2 .024-.66-.144-1.218-.503-1.674-.36.456-.527 1.014-.503 1.673-.223-.815-.62-1.481-1.187-1.999-.254.632-.665 1.371-1.232 2.222-.277-.444-.408-.943-.394-1.498-.622.477-1.428.763-2.418.856.093-.426.283-.869.57-1.33-.992.33-2.044.405-3.157.224.247-.418.71-.979 1.388-1.682-1.397-.013-2.668-.381-3.814-1.104.527-.807 1.242-1.297 2.147-1.469-1.484-.546-2.562-1.473-3.235-2.783 1.033-.499 2.025-.597 2.976-.298-.585-.57-1.398-.679-2.44-.33-.661-.692-1.255-1.776-1.782-3.25 1.552-.505 2.984-.314 4.296.572-.523-.751-1.292-1.164-2.307-1.238C.014 3.455-.364 2.036-.306.293L-.305.24h27.609z'/%3E%3C/svg%3E"); }
.rarity-cell:has(.rarity-icon.rarity-uncommon)::before { background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 29 23' xmlns='http://www.w3.org/2000/svg' fill='%23a8b2bc'%3E%3Cpath d='M27.304.24l.002.053c.058 1.743-.32 3.162-1.138 4.257-1.015.074-1.784.487-2.307 1.238 1.312-.886 2.744-1.077 4.296-.573-.527 1.475-1.12 2.559-1.782 3.25-1.042-.348-1.855-.239-2.44.33.951-.299 1.943-.2 2.976.298-.673 1.31-1.751 2.237-3.235 2.783.905.172 1.62.662 2.147 1.47-1.146.722-2.417 1.09-3.814 1.103.678.703 1.141 1.264 1.388 1.682-1.113.18-2.165.106-3.157-.223.287.46.477.903.57 1.329-.99-.093-1.796-.379-2.418-.856.014.555-.117 1.054-.394 1.498-.567-.85-.978-1.59-1.232-2.222-.568.518-.964 1.184-1.187 2 .024-.66-.144-1.218-.503-1.674-.36.456-.527 1.014-.503 1.673-.223-.815-.62-1.481-1.187-1.999-.254.632-.665 1.371-1.232 2.222-.277-.444-.408-.943-.394-1.498-.622.477-1.428.763-2.418.856.093-.426.283-.869.57-1.33-.992.33-2.044.405-3.157.224.247-.418.71-.979 1.388-1.682-1.397-.013-2.668-.381-3.814-1.104.527-.807 1.242-1.297 2.147-1.469-1.484-.546-2.562-1.473-3.235-2.783 1.033-.499 2.025-.597 2.976-.298-.585-.57-1.398-.679-2.44-.33-.661-.692-1.255-1.776-1.782-3.25 1.552-.505 2.984-.314 4.296.572-.523-.751-1.292-1.164-2.307-1.238C.014 3.455-.364 2.036-.306.293L-.305.24h27.609z'/%3E%3C/svg%3E"); }
.rarity-cell:has(.rarity-icon.rarity-common)::before   { background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 29 23' xmlns='http://www.w3.org/2000/svg' fill='%23131313'%3E%3Cpath d='M27.304.24l.002.053c.058 1.743-.32 3.162-1.138 4.257-1.015.074-1.784.487-2.307 1.238 1.312-.886 2.744-1.077 4.296-.573-.527 1.475-1.12 2.559-1.782 3.25-1.042-.348-1.855-.239-2.44.33.951-.299 1.943-.2 2.976.298-.673 1.31-1.751 2.237-3.235 2.783.905.172 1.62.662 2.147 1.47-1.146.722-2.417 1.09-3.814 1.103.678.703 1.141 1.264 1.388 1.682-1.113.18-2.165.106-3.157-.223.287.46.477.903.57 1.329-.99-.093-1.796-.379-2.418-.856.014.555-.117 1.054-.394 1.498-.567-.85-.978-1.59-1.232-2.222-.568.518-.964 1.184-1.187 2 .024-.66-.144-1.218-.503-1.674-.36.456-.527 1.014-.503 1.673-.223-.815-.62-1.481-1.187-1.999-.254.632-.665 1.371-1.232 2.222-.277-.444-.408-.943-.394-1.498-.622.477-1.428.763-2.418.856.093-.426.283-.869.57-1.33-.992.33-2.044.405-3.157.224.247-.418.71-.979 1.388-1.682-1.397-.013-2.668-.381-3.814-1.104.527-.807 1.242-1.297 2.147-1.469-1.484-.546-2.562-1.473-3.235-2.783 1.033-.499 2.025-.597 2.976-.298-.585-.57-1.398-.679-2.44-.33-.661-.692-1.255-1.776-1.782-3.25 1.552-.505 2.984-.314 4.296.572-.523-.751-1.292-1.164-2.307-1.238C.014 3.455-.364 2.036-.306.293L-.305.24h27.609z'/%3E%3C/svg%3E"); }

/* Refinements */
.hero { padding: 2.5rem 0 2.25rem; }
.hero h1 { font-size: 2.85rem; }
.featured-strip { padding: 1.4rem 0 1.6rem; background: linear-gradient(180deg, #fff 0%, #f7f7f9 100%); }

/* ===========================================
   Operator Analytics Dashboard
   =========================================== */

.operator-badge {
  background: rgba(233, 76, 19, 0.15);
  border: 1px solid rgba(233, 76, 19, 0.3);
  color: var(--orange-bright);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 3px;
  margin-left: 0.6rem;
}

.page-subheader {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-bottom: 1px solid var(--line-dark);
  padding: 1rem 0 0;
}
.page-subheader-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0;
}
.subheader-title h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 0.2rem;
  text-transform: uppercase;
  color: var(--text-on-dark);
}
.subheader-title .subheader-meta {
  font-size: 0.8rem;
  color: var(--text-on-dark-muted);
}
.subheader-controls { display: flex; gap: 0.5rem; align-items: center; }
.date-picker {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text-on-dark);
  padding: 0.45rem 0.85rem;
  border-radius: 4px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.date-picker:hover { background: rgba(255,255,255,0.1); }
.date-picker svg { width: 14px; height: 14px; opacity: 0.7; }

.range-tabs { display: flex; gap: 0; background: rgba(255,255,255,0.04); border-radius: 4px; padding: 2px; }
.range-tabs a {
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-on-dark-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 3px;
}
.range-tabs a:hover { color: var(--text-on-dark); text-decoration: none; }
.range-tabs a.active { background: var(--orange); color: var(--text-on-dark); }

.view-tabs {
  display: flex;
  gap: 0;
  margin-top: 1rem;
  border-bottom: 1px solid var(--line-dark);
  margin-bottom: -1px;
}
.view-tabs a {
  padding: 0.7rem 1.4rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-on-dark-muted);
  border-bottom: 3px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.view-tabs a:hover { color: var(--text-on-dark); text-decoration: none; }
.view-tabs a.active { color: var(--text-on-dark); border-bottom-color: var(--orange); }
.view-tabs .tab-count {
  background: rgba(255,255,255,0.08);
  color: var(--text-on-dark);
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 700;
}
.view-tabs a.active .tab-count { background: var(--orange); color: #fff; }

.dashboard {
  background: var(--bg-page);
  padding: 1.25rem 0 2.5rem;
}

/* KPI grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.kpi-card {
  background: var(--bg-light);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1rem 1.1rem;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 36px; height: 3px;
  background: var(--orange);
  border-radius: 0 0 3px 0;
}
.kpi-card .kpi-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.kpi-card .kpi-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--text);
}
.kpi-card .kpi-value .kpi-unit {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kpi-card .kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.74rem;
  font-weight: 700;
  margin-top: 0.45rem;
  padding: 1px 7px;
  border-radius: 3px;
}
.kpi-card .kpi-trend.up { color: var(--green); background: rgba(24, 169, 87, 0.1); }
.kpi-card .kpi-trend.down { color: var(--red); background: rgba(216, 55, 55, 0.1); }
.kpi-card .kpi-trend.flat { color: var(--text-muted); background: var(--bg-page); }
.kpi-card .kpi-spark { margin-top: 0.5rem; height: 22px; }
.kpi-card .kpi-spark svg { display: block; width: 100%; height: 100%; }

/* Two-column dashboard row */
.dash-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.dash-card {
  background: var(--bg-light);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.dash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.dash-card-header h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dash-card-header h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--orange);
  border-radius: 2px;
}
.dash-card-header .dash-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Funnel */
.funnel { display: flex; flex-direction: column; gap: 0.7rem; }
.funnel-row { position: relative; }
.funnel-row .fn-bar {
  height: 42px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange-bright) 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  color: var(--text-on-dark);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(233,76,19,0.2);
}
.funnel-row.s2 .fn-bar { background: linear-gradient(90deg, #c8400f 0%, #e94c13 100%); }
.funnel-row.s3 .fn-bar { background: linear-gradient(90deg, #962d09 0%, #c8400f 100%); }
.funnel-row.s4 .fn-bar { background: linear-gradient(90deg, #6b1f06 0%, #962d09 100%); }
.funnel-row .fn-label {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.funnel-row .fn-step {
  background: rgba(255,255,255,0.18);
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.funnel-row .fn-meta {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.funnel-row .fn-meta .fn-pct {
  background: rgba(255,255,255,0.18);
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 700;
}
.funnel-arrow {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0;
}

/* Hourly bar chart */
.hourly-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 180px;
  padding-top: 1rem;
}
.hourly-chart .hr-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--orange-bright) 0%, var(--orange) 100%);
  border-radius: 2px 2px 0 0;
  position: relative;
  transition: background 0.15s ease;
  cursor: pointer;
}
.hourly-chart .hr-bar:hover { background: linear-gradient(180deg, #ff6427 0%, #e94c13 100%); }
.hourly-chart .hr-bar.peak { background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%); }
.hourly-x-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 0.4rem;
  padding: 0 2px;
}

/* Cohort retention */
.cohort-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.cohort-table th, .cohort-table td {
  padding: 0.55rem 0.7rem;
  text-align: center;
  border: 1px solid var(--line);
}
.cohort-table th {
  background: var(--bg-darker);
  color: var(--text-on-dark);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: 'Montserrat', sans-serif;
}
.cohort-table td.cohort-name {
  text-align: left;
  font-weight: 700;
  background: var(--bg-row-alt);
  font-family: 'Open Sans', sans-serif;
  width: 165px;
}
.cohort-table td.cohort-size {
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-row-alt);
}
.cohort-table td.retention {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--text-on-dark);
  position: relative;
}
.cohort-table td.retention.r-100 { background: #047857; }
.cohort-table td.retention.r-90  { background: #0e7c44; }
.cohort-table td.retention.r-80  { background: #2e8b3a; }
.cohort-table td.retention.r-70  { background: #5a9a30; }
.cohort-table td.retention.r-60  { background: #8aa128; color: #1a1a1a; }
.cohort-table td.retention.r-50  { background: #c2a020; color: #1a1a1a; }
.cohort-table td.retention.r-40  { background: #d97c20; color: #fff; }
.cohort-table td.retention.r-30  { background: #c8400f; }
.cohort-table td.retention.r-20  { background: #962d09; }
.cohort-table td.retention.empty { background: #f0f0f0; color: #ccc; font-weight: 400; }

/* Leaderboards */
.leaderboard { display: flex; flex-direction: column; }
.lb-row {
  display: grid;
  grid-template-columns: 28px 38px 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
.lb-row:last-child { border-bottom: none; }
.lb-row .lb-rank {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
}
.lb-row .lb-rank.top1 { color: var(--orange); }
.lb-row .lb-thumb {
  width: 28px;
  height: 39px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  background: #1a1a1a;
}
.lb-row .lb-name {
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-row .lb-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 1px;
}
.lb-row .lb-value {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 0.92rem;
  text-align: right;
}
.lb-row .lb-value .lb-unit { font-size: 0.68rem; color: var(--text-muted); font-weight: 600; margin-left: 2px; }
.lb-row .lb-trend {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 0.3rem;
}
.lb-row .lb-trend.up { color: var(--green); background: rgba(24, 169, 87, 0.1); }
.lb-row .lb-trend.down { color: var(--red); background: rgba(216, 55, 55, 0.1); }

/* Bot health table */
.bot-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.bot-table th {
  background: var(--bg-darker);
  color: var(--text-on-dark);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.6rem 0.95rem;
  text-align: left;
}
.bot-table th.num { text-align: right; }
.bot-table td {
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.bot-table tr:nth-child(even) td { background: var(--bg-row-alt); }
.bot-table tr:hover td { background: var(--orange-soft); }
.bot-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.bot-table td.bot-name { font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.bot-table td.bot-name code {
  background: var(--bg-dark);
  color: var(--gold);
  padding: 3px 8px;
  border: 1px solid var(--line-dark);
  font-size: 0.85rem;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-pill::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.status-pill.online { color: var(--green); background: rgba(24, 169, 87, 0.1); }
.status-pill.online::before { background: #1cd65c; box-shadow: 0 0 4px rgba(28, 214, 92, 0.6); }
.status-pill.restart { color: var(--gold-deep); background: rgba(237, 139, 0, 0.1); }
.status-pill.restart::before { background: var(--gold-deep); }
.status-pill.offline { color: var(--text-dim); background: var(--bg-page); }
.status-pill.offline::before { background: #6b6b6b; }
.uptime-bar {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.78rem;
  font-weight: 700;
}
.uptime-bar .ub-fill {
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
  position: relative;
  width: 80px;
}
.uptime-bar .ub-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  width: var(--pct, 100%);
  background: linear-gradient(90deg, var(--green) 0%, #2e8b3a 100%);
  border-radius: 2px;
}
.uptime-bar.low .ub-fill::after { background: linear-gradient(90deg, var(--gold-deep) 0%, var(--orange) 100%); }
.error-count { font-weight: 800; }
.error-count.zero { color: var(--green); }
.error-count.has { color: var(--red); }

.bot-table-card {
  background: var(--bg-light);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.bot-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1300px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-row { grid-template-columns: 1fr; }
  .bot-summary { grid-template-columns: repeat(2, 1fr); }
  .page-subheader-inner { flex-direction: column; align-items: flex-start; }
}

/* Mobile additions */
@media (max-width: 1100px) {
  .featured-grid.tiles { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .featured-grid.tiles { grid-template-columns: repeat(2, 1fr); }
  .activity-ticker .ticker-label { font-size: 0.62rem; padding-right: 1.4rem; }
  .hero .mana-orbs { opacity: 0.5; }
}

