/* Funds Benchmark — page shell shared across all design canvas artboards */

* { box-sizing: border-box; }

.fb-page {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Header is LOCKED to dark per the design contract */
.fb-header {
  background: #0a0a0b;
  color: #f4f4f6;
  border-bottom: 1px solid #2a2a2f;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.fb-header-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: #f4f4f6;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fb-header-logo .logo-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, #c9a962, #a68b3d);
  display: inline-flex; align-items: center; justify-content: center;
  color: #0a0a0b; font-size: 12px; font-weight: 800;
}
.fb-header nav { display: flex; gap: 22px; flex: 1; }
.fb-header nav a {
  font-size: 13px; font-weight: 500;
  color: #c4c4cc; text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.fb-header nav a:hover { color: #c9a962; }
.fb-header nav a.is-active { color: #c9a962; }

.fb-header-right { display: flex; gap: 10px; align-items: center; }

.fb-search-mini {
  display: flex; align-items: center; gap: 8px;
  background: #1c1c1f; border: 1px solid #2a2a2f;
  border-radius: 8px; padding: 7px 12px;
  width: 240px; color: #8a8a94; font-size: 13px;
}
.fb-search-mini svg { width: 14px; height: 14px; }

.fb-theme-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: transparent; border: 1px solid #2a2a2f;
  color: #8a8a94; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.fb-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #c9a962, #a68b3d);
  color: #0a0a0b; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}

/* === containers — full-width, header-aligned 36px gutters === */
.fb-container      { width: 100%; margin: 0 auto; padding: 32px 36px; }
.fb-container-wide { width: 100%; margin: 0 auto; padding: 32px 36px; }

/* === buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: 12px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  transition: all var(--dur) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--gold-light); }
.btn-secondary { background: var(--surface-2); border-color: transparent; color: var(--text); }
.btn-secondary:hover { background: var(--surface); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 8px; }

/* === pills === */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px;
  font-size: 12px; font-weight: 600;
  border-radius: 9999px;
  background: var(--surface-2); border: 1px solid transparent;
  color: var(--text-2);
  cursor: pointer; transition: all var(--dur) var(--ease);
}
.pill:hover { color: var(--text); background: var(--surface); }
.pill.is-active {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* === card === */
.card {
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.card-tight { padding: 16px; }
.card-flush { padding: 0; overflow: hidden; }

.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
}
.card-head h2 { font-size: 18px; }

/* === eyebrow / labels === */
.eyebrow {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
}

/* === stats === */
.stat-hero {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 700;
  letter-spacing: -0.015em; line-height: 1;
}
.stat-md {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.01em; line-height: 1.1;
}
.delta-up { color: var(--pos); }
.delta-down { color: var(--neg); }

.kv { display: flex; flex-direction: column; gap: 4px; }
.kv-label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted); }
.kv-value { font-size: 14px; font-weight: 500; color: var(--text); }
.mono { font-family: var(--font-mono); font-size: 11px; }

/* === AI prompt block (the reusable nudge) === */
.ai-card {
  position: relative;
  background:
    radial-gradient(circle at 0% 0%, rgba(201,169,98,.10), transparent 60%),
    var(--surface);
  border: 1px solid var(--accent-soft);
  border-radius: 14px;
  padding: 20px 22px;
  overflow: hidden;
}
.ai-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--accent), transparent);
}
.ai-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px; border-radius: 9999px;
}
.ai-pill::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 currentColor;
  animation: ai-pulse 2.4s var(--ease) infinite;
}
@keyframes ai-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(201,169,98,.5); }
  50% { box-shadow: 0 0 0 6px rgba(201,169,98,0); }
}

/* === voting (sentiment circles) === */
.vote-row { display: flex; align-items: center; gap: 12px; }
.vote-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9999px;
  cursor: pointer; transition: all var(--dur) var(--ease);
  font-size: 12px; font-weight: 600;
  color: var(--text-2);
}
.vote-btn:hover { border-color: var(--text-dim); color: var(--text); }
.vote-btn .ring {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid currentColor;
}
.vote-btn .ring svg { width: 12px; height: 12px; }
.vote-btn--bull { color: var(--pos); }
.vote-btn--bull.is-active { background: rgba(74,222,128,.10); border-color: var(--pos); }
.vote-btn--bear { color: var(--neg); }
.vote-btn--bear.is-active { background: rgba(248,113,113,.10); border-color: var(--neg); }
.vote-tally { font-size: 11px; color: var(--text-muted); }

/* === table-ish list === */
.list-row {
  display: grid; align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--border-soft);
  transition: background var(--dur) var(--ease);
}
.list-row:hover { background: var(--surface-2); }
.list-row:first-of-type { border-top: 0; }
.list-row .name { font-size: 14px; font-weight: 600; color: var(--text); }
.list-row .meta { font-size: 12px; color: var(--text-muted); }
.list-row .delta { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* === sparkline / chart shells === */
.chart-frame {
  position: relative;
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
}

/* === scroll containers within mock viewports === */
.scroll-frame {
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.scroll-frame::-webkit-scrollbar { width: 8px; }
.scroll-frame::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }

/* status dot */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.live {
  background: var(--pos);
  box-shadow: 0 0 0 0 currentColor;
  animation: ai-pulse 2.4s var(--ease) infinite;
  color: var(--pos);
}

/* number coloring */
.num-pos { color: var(--pos); }
.num-neg { color: var(--neg); }

/* === segmented control === */
.seg {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.seg-btn {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.seg-btn:hover { color: var(--text); }
.seg-btn.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

/* === toggle buttons (overlay activators on chart) === */
.toggle-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body);
  font-size: 11.5px; font-weight: 500;
  padding: 6px 11px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 9999px;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.toggle-btn:hover { color: var(--text); background: var(--surface); }
.toggle-btn .toggle-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--text-muted);
  transition: all var(--dur) var(--ease);
}
.toggle-btn.is-active {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}
.toggle-btn.is-active .toggle-dot {
  background: var(--accent);
  border-color: var(--accent);
}

/* === fund grid + card === */
.fund-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.fund-card {
  display: flex; flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.fund-card__head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 18px 18px 14px;
}
.fund-card__id {
  display: flex; align-items: center; gap: 8px;
  padding: 0 18px 14px;
}
.fund-card__stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 16px 18px;
  text-align: center;
  background: rgba(0,0,0,0.015);
}
.fund-card__stats > div { min-width: 0; }
.fund-card__sectors {
  padding: 16px 18px;
  flex: 1;
}
.fund-card__actions {
  display: flex; gap: 10px;
  padding: 14px 18px;
}

/* === skeleton loading === */
.skel {
  display: block;
  background: linear-gradient(
    90deg,
    var(--surface-2) 0%,
    rgba(0,0,0,0.04) 50%,
    var(--surface-2) 100%
  );
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s ease-in-out infinite;
  border-radius: 4px;
}
@keyframes skel-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.fund-card--skel { opacity: 0.85; }

/* dotted ai-suggestion underline */
.ai-link {
  color: var(--accent);
  border-bottom: 1px dotted var(--accent);
  cursor: pointer;
  font-weight: 600;
}
