/* economy.html — page-specific styles */

/* ═══════════════════════════════════════════════════
       ECONOMY PAGE — v2 redesign (token_detail / lab aligned)
       ═══════════════════════════════════════════════════ */

    /* ── Animations (shared with token_detail / lab) ── */
    @keyframes rfSlideUp { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
    @keyframes rfPopIn { 0% { opacity:0; transform:translateY(8px) scale(0.985); } 100% { opacity:1; transform:translateY(0) scale(1); } }
    @keyframes rfBarGrow { from { transform:scaleX(0); } to { transform:scaleX(1); } }
    @keyframes rfFadeIn { from { opacity:0; } to { opacity:1; } }
    @keyframes rfPulse { 0%,100% { box-shadow:0 0 0 0 rgba(255,180,0,0.35); } 70% { box-shadow:0 0 0 8px rgba(255,180,0,0); } }

    /* ── Section headers (unified with token_detail .section h2) ── */
    .eco-sec {
      display:flex; align-items:center; gap:10px;
      font-family:var(--font-mono); font-size:12px; font-weight:600;
      letter-spacing:0.08em; text-transform:uppercase; color:var(--text-muted);
      margin:0 0 14px; padding:0 0 0 12px; border:none;
      scroll-margin-top:64px;
    }
    .eco-sec .sec-dot { width:6px; height:6px; border-radius:50%; background:#FFB400; flex-shrink:0; }
    .eco-sec .sec-line { flex:1; height:1px; background:var(--border-card); }
    .eco-sec .sec-right {
      margin-left:auto; font-weight:400; letter-spacing:0.04em;
      font-size:10px; text-transform:none; color:var(--text-muted);
    }
    .eco-sec .sec-live {
      display:inline-flex; align-items:center; gap:5px;
      color:var(--brand-amber-strong); font-weight:600; font-size:10px; letter-spacing:0.04em;
    }
    .eco-sec .sec-live::before {
      content:""; width:5px; height:5px; border-radius:50%;
      background:#FFB400; animation:rfPulse 2.4s cubic-bezier(0.4,0,0.6,1) infinite;
    }

    /* ── Sections ── */
    .eco-section { margin-top:28px; }

    /* ══════════════════════════════════════════════════
       TOP COINS STRIP (keep existing hover effects)
       ══════════════════════════════════════════════════ */
    .eco-coins { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin-bottom:14px; }
    .eco-coin {
      position:relative; text-decoration:none; display:flex; flex-direction:column; gap:8px;
      background:var(--surface); border:1px solid var(--border-card); border-radius:var(--radius);
      padding:13px 14px 14px; overflow:hidden;
      box-shadow:var(--shadow-xs);
      transition:border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
      animation:rfSlideUp 0.4s cubic-bezier(.16,1,.3,1) both;
    }
    .eco-coin:nth-child(1) { animation-delay:0.03s; }
    .eco-coin:nth-child(2) { animation-delay:0.06s; }
    .eco-coin:nth-child(3) { animation-delay:0.09s; }
    .eco-coin:nth-child(4) { animation-delay:0.12s; }
    .eco-coin:nth-child(5) { animation-delay:0.15s; }
    .eco-coin::after {
      content:""; position:absolute; inset:0;
      background:radial-gradient(circle at 100% 0%, rgba(255,180,0,0.10), transparent 60%);
      opacity:0; transition:opacity 0.2s; pointer-events:none;
    }
    /* hover matches the token-detail pillar cards: neutral lift, no amber */
    .eco-coin:hover { transform:translateY(-2px); box-shadow:var(--sh); border-color:var(--line-2); }
    .eco-coin-head { display:flex; align-items:center; gap:8px; }
    .eco-coin-logo { width:24px; height:24px; border-radius:999px; flex-shrink:0; background:var(--gray-100); box-shadow:0 0 0 1px var(--border-card); }
    .eco-coin-sym { font-family:var(--font-mono); font-size:11px; font-weight:700; letter-spacing:0.04em; color:var(--text); }
    .eco-coin-name { font-size:10.5px; color:var(--text-muted); font-weight:500; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .eco-coin-price { font-family:var(--font-mono); font-size:18px; font-weight:700; color:var(--text); letter-spacing:-0.02em; line-height:1.1; }
    .eco-coin-chg {
      display:inline-flex; align-items:center; gap:4px;
      font-family:var(--font-mono); font-size:10px; font-weight:700; letter-spacing:0.02em;
      padding:2px 7px 2px 5px; border-radius:999px; width:fit-content;
    }
    .eco-coin-chg::before { content:""; width:0; height:0; border-left:3px solid transparent; border-right:3px solid transparent; }
    .eco-coin-chg.up   { color:var(--green); background:rgba(22,163,74,0.10); }
    .eco-coin-chg.up::before   { border-bottom:4px solid var(--green); }
    .eco-coin-chg.down { color:var(--red); background:rgba(220,38,38,0.10); }
    .eco-coin-chg.down::before { border-top:4px solid var(--red); }

    /* ══════════════════════════════════════════════════
       HERO ROW — SCORE RING + MARKET CAP CHART
       ══════════════════════════════════════════════════ */
    .eco-hero { display:grid; grid-template-columns:240px 1fr; gap:14px; margin-bottom:14px; }

    /* Fear & Greed — DS score ring (120×120, 270° arc) */
    .eco-ring-card {
      background:var(--surface); border:1px solid var(--border-card); border-radius:var(--radius);
      box-shadow:var(--shadow-xs); overflow:hidden;
      animation:rfPopIn 0.4s cubic-bezier(.16,1,.3,1) both; animation-delay:0.05s;
      transition:border-color 0.18s, box-shadow 0.18s, transform 0.18s;
    }
    .eco-ring-card:hover { transform:translateY(-2px); box-shadow:var(--sh); border-color:var(--line-2); }
    .eco-ring-head {
      display:flex; justify-content:space-between; align-items:center;
      padding:10px 16px; border-bottom:1px solid var(--gray-100);
    }
    .eco-ring-label { font-family:var(--font-mono); font-size:9px; font-weight:600; letter-spacing:0.12em; text-transform:uppercase; color:var(--text-muted); }
    .eco-ring-meta { font-family:var(--font-mono); font-size:9.5px; color:var(--text-muted); }
    .eco-ring-body { padding:18px 16px 16px; display:flex; flex-direction:column; align-items:center; position:relative; }
    .eco-ring-svg { width:120px; height:120px; margin-bottom:8px; }
    .eco-ring-center {
      position:absolute; top:18px; left:50%; transform:translateX(-50%);
      width:120px; height:120px; display:flex; flex-direction:column;
      align-items:center; justify-content:center; pointer-events:none;
    }
    .eco-ring-val { font-family:var(--font-mono); font-size:28px; font-weight:700; color:var(--text); letter-spacing:-0.03em; line-height:1; }
    .eco-ring-of { font-family:var(--font-mono); font-size:10px; color:var(--text-muted); margin-top:2px; }
    .eco-ring-badge {
      font-family:var(--font-mono); font-size:9px; font-weight:600;
      letter-spacing:0.12em; text-transform:uppercase;
      padding:2px 9px; border-radius:999px;
      display:inline-flex; align-items:center; gap:5px; line-height:1.5;
    }
    .eco-ring-badge::before { content:""; width:5px; height:5px; border-radius:999px; background:currentColor; }

    /* Market cap chart card */
    .eco-chart-card {
      background:var(--surface); border:1px solid var(--border-card); border-radius:var(--radius);
      box-shadow:var(--shadow-xs); overflow:hidden; display:flex; flex-direction:column;
      animation:rfPopIn 0.4s cubic-bezier(.16,1,.3,1) both; animation-delay:0.08s;
    }
    .eco-chart-card-head {
      display:flex; justify-content:space-between; align-items:center;
      padding:12px 18px; border-bottom:1px solid var(--gray-100); gap:14px; flex-wrap:wrap;
    }
    .eco-chart-card-titlewrap { display:flex; flex-direction:column; gap:2px; }
    .eco-chart-card-eyebrow { font-family:var(--font-mono); font-size:9px; font-weight:600; letter-spacing:0.12em; text-transform:uppercase; color:var(--text-muted); }
    .eco-chart-card-title { font-size:13.5px; font-weight:700; color:var(--text); letter-spacing:-0.01em; }
    .eco-chart-card-stats { display:flex; align-items:baseline; gap:18px; margin-left:auto; }
    .eco-chart-card-stat { display:flex; flex-direction:column; gap:1px; }
    .eco-chart-card-lbl { font-family:var(--font-mono); font-size:9px; font-weight:600; letter-spacing:0.12em; text-transform:uppercase; color:var(--text-muted); }
    .eco-chart-card-num { font-family:var(--font-mono); font-size:16px; font-weight:700; color:var(--text); letter-spacing:-0.02em; }
    .eco-chart-area { width:100%; height:300px; }

    /* Period toggle */
    .chart-ctrl-group { display:inline-flex; gap:2px; padding:3px; background:var(--gray-100); border-radius:8px; }
    .chart-ctrl-btn {
      font-family:var(--font-mono); font-size:10px; font-weight:700;
      letter-spacing:0.06em; text-transform:uppercase;
      padding:4px 9px; border:none; background:transparent;
      color:var(--text-muted); cursor:pointer; border-radius:6px;
      transition:background 0.12s, color 0.12s;
    }
    .chart-ctrl-btn:hover { color:var(--text); }
    .chart-ctrl-btn.active { background:var(--surface); color:var(--text); box-shadow:var(--shadow-xs); }

    /* ══════════════════════════════════════════════════
       METRIC TILES with bar visualizations
       ══════════════════════════════════════════════════ */
    .eco-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:14px; }
    .eco-metric {
      position:relative; background:var(--surface); border:1px solid var(--border-card); border-radius:var(--radius);
      box-shadow:var(--shadow-xs); padding:14px 16px 15px; overflow:hidden;
      transition:border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
      animation:rfSlideUp 0.4s cubic-bezier(.16,1,.3,1) both;
    }
    .eco-metric:nth-child(1) { animation-delay:0.04s; }
    .eco-metric:nth-child(2) { animation-delay:0.08s; }
    .eco-metric:nth-child(3) { animation-delay:0.12s; }
    .eco-metric:nth-child(4) { animation-delay:0.16s; }
    .eco-metric:nth-child(5) { animation-delay:0.20s; }
    .eco-metric:nth-child(6) { animation-delay:0.24s; }
    .eco-metric:nth-child(7) { animation-delay:0.28s; }
    .eco-metric:nth-child(8) { animation-delay:0.32s; }
    .eco-metric:hover { transform:translateY(-2px); box-shadow:var(--sh); border-color:var(--line-2); }
    .eco-metric-label { font-family:var(--font-mono); font-size:9px; font-weight:600; letter-spacing:0.12em; text-transform:uppercase; color:var(--text-muted); margin-bottom:8px; }
    .eco-metric-row { display:flex; align-items:baseline; gap:8px; }
    .eco-metric-val { font-family:var(--font-mono); font-size:22px; font-weight:700; color:var(--text); letter-spacing:-0.02em; line-height:1.1; }
    .eco-metric-chg {
      display:inline-flex; align-items:center; gap:4px;
      font-family:var(--font-mono); font-size:10px; font-weight:700;
      padding:2px 7px 2px 6px; border-radius:999px; margin-top:6px; width:fit-content;
    }
    .eco-metric-chg::before { content:""; width:0; height:0; border-left:3px solid transparent; border-right:3px solid transparent; }
    .eco-metric-chg.up   { color:var(--green); background:rgba(22,163,74,0.10); }
    .eco-metric-chg.up::before   { border-bottom:4px solid var(--green); }
    .eco-metric-chg.down { color:var(--red); background:rgba(220,38,38,0.10); }
    .eco-metric-chg.down::before { border-top:4px solid var(--red); }
    .eco-metric-sub { font-family:var(--font-mono); font-size:9.5px; font-weight:500; color:var(--text-muted); margin-top:6px; letter-spacing:0.02em; }

    /* Mini bar visualization (DS validity bar: 6px, radius 3px, glowing dot) */
    .eco-metric-bar {
      height:6px; background:var(--gray-100); border-radius:3px;
      margin-top:10px; position:relative; overflow:visible;
    }
    .eco-metric-bar-fill {
      height:100%; border-radius:3px; transform-origin:left;
      animation:rfBarGrow 0.8s cubic-bezier(.16,1,.3,1) both; animation-delay:0.3s;
    }
    .eco-metric-bar-dot {
      position:absolute; top:50%; width:8px; height:8px; border-radius:50%;
      transform:translate(-50%,-50%);
      box-shadow:0 0 6px rgba(255,180,0,0.4), 0 0 0 2px var(--surface);
      animation:rfFadeIn 0.4s ease both; animation-delay:0.6s;
    }

    /* ══════════════════════════════════════════════════
       DOMINANCE + ALTCOIN SEASON — structured cards
       ══════════════════════════════════════════════════ */
    .eco-dom-row { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
    .eco-dom-card, .eco-alt-card {
      background:var(--surface); border:1px solid var(--border-card); border-radius:var(--radius);
      box-shadow:var(--shadow-xs); overflow:hidden;
      animation:rfSlideUp 0.4s cubic-bezier(.16,1,.3,1) both;
      transition:transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
    }
    .eco-dom-card:hover, .eco-alt-card:hover { transform:translateY(-2px); box-shadow:var(--sh); border-color:var(--line-2); }
    .eco-dom-card { animation-delay:0.06s; }
    .eco-alt-card { animation-delay:0.10s; display:flex; flex-direction:column; }
    .eco-dom-head, .eco-alt-head-bar {
      display:flex; justify-content:space-between; align-items:center;
      padding:12px 18px; border-bottom:1px solid var(--gray-100);
    }
    .eco-dom-title, .eco-alt-title {
      font-family:var(--font-mono); font-size:9px; font-weight:600;
      letter-spacing:0.12em; text-transform:uppercase; color:var(--text-muted);
    }
    .eco-dom-body, .eco-alt-body { padding:16px 18px; }
    .eco-dom-items { display:flex; gap:32px; margin-bottom:14px; flex-wrap:wrap; }
    .eco-dom-dot { width:8px; height:8px; border-radius:999px; flex-shrink:0; }
    .eco-dom-lbl { font-family:var(--font-mono); font-size:9px; font-weight:600; letter-spacing:0.08em; text-transform:uppercase; color:var(--text-muted); margin-bottom:4px; display:flex; align-items:center; gap:6px; }
    .eco-dom-pct { font-family:var(--font-mono); font-size:22px; font-weight:700; color:var(--text); letter-spacing:-0.02em; line-height:1.1; }
    .eco-dom-bar {
      height:6px; border-radius:3px; overflow:hidden; display:flex;
      background:var(--gray-100);
    }
    .eco-dom-bar > div { transition:flex 0.3s ease, width 0.3s ease; animation:rfBarGrow 0.8s cubic-bezier(.16,1,.3,1) both; transform-origin:left; }
    .eco-dom-bar > div:nth-child(1) { animation-delay:0.15s; }
    .eco-dom-bar > div:nth-child(2) { animation-delay:0.25s; }

    /* Altcoin season */
    .eco-alt-head { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin-bottom:auto; }
    .eco-alt-score { font-family:var(--font-mono); font-size:38px; font-weight:700; color:var(--text); letter-spacing:-0.03em; line-height:1; }
    .eco-alt-sub { font-family:var(--font-mono); font-size:13px; color:var(--text-muted); font-weight:600; margin-left:2px; }
    .eco-alt-status {
      font-family:var(--font-mono); font-size:9px; font-weight:700;
      letter-spacing:0.12em; text-transform:uppercase;
      padding:3px 9px 3px 8px; border-radius:999px;
      display:inline-flex; align-items:center; gap:6px;
    }
    .eco-alt-status::before { content:""; width:5px; height:5px; border-radius:999px; background:currentColor; }
    .eco-alt-bar { height:6px; border-radius:3px; overflow:hidden; display:flex; margin:18px 0 8px; background:var(--gray-100); }
    .eco-alt-bar > div { animation:rfBarGrow 0.6s cubic-bezier(.16,1,.3,1) both; transform-origin:left; }
    .eco-alt-bar > div:nth-child(1) { animation-delay:0.1s; }
    .eco-alt-bar > div:nth-child(2) { animation-delay:0.2s; }
    .eco-alt-bar > div:nth-child(3) { animation-delay:0.3s; }
    .eco-alt-bar > div:nth-child(4) { animation-delay:0.4s; }
    .eco-alt-marker { position:relative; height:14px; }
    .eco-alt-dot {
      position:absolute; transform:translateX(-50%); width:8px; height:8px; border-radius:50%;
      background:#FFB400;
      box-shadow:0 0 6px rgba(255,180,0,0.4), 0 0 0 2px var(--surface);
    }
    .eco-alt-labels { display:flex; justify-content:space-between; font-family:var(--font-mono); font-size:9px; font-weight:600; letter-spacing:0.08em; text-transform:uppercase; color:var(--text-muted); margin-top:2px; }

    /* ══════════════════════════════════════════════════
       DERIVATIVES — feed rows (narrative pulse pattern)
       ══════════════════════════════════════════════════ */
    .eco-deriv-card {
      background:var(--surface); border:1px solid var(--border-card); border-radius:var(--radius);
      box-shadow:var(--shadow-xs); overflow:hidden;
      animation:rfPopIn 0.4s cubic-bezier(.16,1,.3,1) both; animation-delay:0.05s;
    }
    .eco-deriv-head {
      display:flex; align-items:center; gap:10px;
      padding:10px 18px; border-bottom:1px solid var(--gray-100);
    }
    .eco-deriv-head .label {
      font-family:var(--font-mono); font-size:9px; font-weight:600;
      letter-spacing:0.12em; text-transform:uppercase; color:var(--text-muted);
    }
    .eco-deriv-head .count {
      margin-left:auto; font-family:var(--font-mono); font-size:9px;
      color:var(--text-muted); letter-spacing:0.04em;
    }
    .eco-deriv-rows { padding:0; }
    .eco-deriv-row {
      display:grid; grid-template-columns:1fr 100px 80px; column-gap:14px;
      align-items:center; padding:12px 18px;
      border-bottom:1px solid var(--gray-50);
      transition:background 0.15s;
      animation:rfSlideUp 0.4s cubic-bezier(.16,1,.3,1) both;
    }
    .eco-deriv-row:last-child { border-bottom:none; }
    .eco-deriv-row:hover { background:rgba(255,180,0,0.02); }
    .eco-deriv-row:nth-child(1) { animation-delay:0.04s; }
    .eco-deriv-row:nth-child(2) { animation-delay:0.08s; }
    .eco-deriv-row:nth-child(3) { animation-delay:0.12s; }
    .eco-deriv-row:nth-child(4) { animation-delay:0.16s; }
    .eco-deriv-row:nth-child(5) { animation-delay:0.20s; }
    .eco-deriv-row:nth-child(6) { animation-delay:0.24s; }
    .eco-deriv-row:nth-child(7) { animation-delay:0.28s; }
    .eco-deriv-row-name {
      font-size:12px; font-weight:600; color:var(--text); letter-spacing:-0.01em;
      display:flex; align-items:center; gap:8px;
    }
    .eco-deriv-row-name .sub {
      font-family:var(--font-mono); font-size:9px; font-weight:500;
      color:var(--text-muted); letter-spacing:0.02em;
    }
    .eco-deriv-row-val {
      font-family:var(--font-mono); font-size:14px; font-weight:700;
      color:var(--text); letter-spacing:-0.02em; text-align:right;
    }
    .eco-deriv-row-chg {
      display:inline-flex; align-items:center; gap:4px; justify-self:end;
      font-family:var(--font-mono); font-size:10px; font-weight:700;
      padding:2px 7px 2px 6px; border-radius:999px;
    }
    .eco-deriv-row-chg::before { content:""; width:0; height:0; border-left:3px solid transparent; border-right:3px solid transparent; }
    .eco-deriv-row-chg.up   { color:var(--green); background:rgba(22,163,74,0.10); }
    .eco-deriv-row-chg.up::before   { border-bottom:4px solid var(--green); }
    .eco-deriv-row-chg.down { color:var(--red); background:rgba(220,38,38,0.10); }
    .eco-deriv-row-chg.down::before { border-top:4px solid var(--red); }
    .eco-deriv-row-chg.neutral { color:var(--text-muted); background:var(--gray-100); }

    /* ══════════════════════════════════════════════════
       DOMINANCE TREND CHART
       ══════════════════════════════════════════════════ */
    .eco-trend-card {
      background:var(--surface); border:1px solid var(--border-card); border-radius:var(--radius);
      box-shadow:var(--shadow-xs); overflow:hidden;
      animation:rfPopIn 0.4s cubic-bezier(.16,1,.3,1) both; animation-delay:0.05s;
    }
    .eco-trend-head { padding:12px 18px; border-bottom:1px solid var(--gray-100); display:flex; align-items:center; gap:14px; }
    .eco-trend-titlewrap { display:flex; flex-direction:column; gap:2px; }
    .eco-trend-eyebrow { font-family:var(--font-mono); font-size:9px; font-weight:600; letter-spacing:0.12em; text-transform:uppercase; color:var(--text-muted); }
    .eco-trend-title { font-size:13.5px; font-weight:700; color:var(--text); letter-spacing:-0.01em; }
    .eco-trend-legend { display:flex; gap:14px; margin-left:auto; }
    .eco-trend-legend-i { display:inline-flex; align-items:center; gap:6px; font-family:var(--font-mono); font-size:10px; font-weight:600; letter-spacing:0.04em; color:var(--text-secondary); }
    .eco-trend-legend-i::before { content:""; width:8px; height:8px; border-radius:2px; background:var(--c, var(--text)); }
    .eco-trend-chart { width:100%; height:280px; }

    /* ══════════════════════════════════════════════════
       FRED INDICATOR GRID
       ══════════════════════════════════════════════════ */
    .eco-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:10px; }
    .eco-card {
      position:relative; background:var(--surface); border:1px solid var(--border-card); border-radius:var(--radius);
      box-shadow:var(--shadow-xs); padding:13px 14px 14px; cursor:pointer; overflow:hidden;
      transition:border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
      animation:rfSlideUp 0.4s cubic-bezier(.16,1,.3,1) both;
    }
    .eco-grid .eco-card:nth-child(1) { animation-delay:0.03s; }
    .eco-grid .eco-card:nth-child(2) { animation-delay:0.06s; }
    .eco-grid .eco-card:nth-child(3) { animation-delay:0.09s; }
    .eco-grid .eco-card:nth-child(4) { animation-delay:0.12s; }
    .eco-grid .eco-card:nth-child(5) { animation-delay:0.15s; }
    .eco-grid .eco-card:nth-child(6) { animation-delay:0.18s; }
    .eco-card::after {
      content:"→"; position:absolute; top:10px; right:12px;
      font-size:13px; color:var(--text-muted); line-height:1;
      opacity:0; transform:translateX(-4px);
      transition:opacity 0.18s, transform 0.18s, color 0.18s;
    }
    .eco-card:hover { transform:translateY(-2px); box-shadow:var(--sh); border-color:var(--line-2); }
    .eco-card:hover::after { opacity:1; transform:translateX(0); color:var(--brand-amber-strong, #B07A00); }
    .eco-card.active {
      border-color:#FFB400;
      box-shadow:0 0 0 3px rgba(255,180,0,0.12), 0 4px 14px rgba(255,180,0,0.10);
      background:linear-gradient(180deg, rgba(255,180,0,0.04), transparent 50%);
    }
    .eco-card.active::after { content:"▾"; opacity:1; transform:translateX(0); color:var(--brand-amber-strong, #B07A00); top:10px; }
    .eco-card-label { font-family:var(--font-mono); font-size:9px; font-weight:600; letter-spacing:0.12em; text-transform:uppercase; color:var(--text-muted); margin-bottom:8px; line-height:1.3; padding-right:18px; }
    .eco-card-row { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
    .eco-card-val { font-family:var(--font-mono); font-size:21px; font-weight:700; color:var(--text); letter-spacing:-0.02em; line-height:1.1; }
    .eco-card-chg {
      display:inline-flex; align-items:center; gap:4px;
      font-family:var(--font-mono); font-size:10px; font-weight:700;
      padding:2px 7px 2px 6px; border-radius:999px;
    }
    .eco-card-chg::before { content:""; width:0; height:0; border-left:3px solid transparent; border-right:3px solid transparent; }
    .eco-card-chg.up   { color:var(--green); background:rgba(22,163,74,0.10); }
    .eco-card-chg.up::before   { border-bottom:4px solid var(--green); }
    .eco-card-chg.down { color:var(--red); background:rgba(220,38,38,0.10); }
    .eco-card-chg.down::before { border-top:4px solid var(--red); }
    .eco-card-date { font-family:var(--font-mono); font-size:9px; font-weight:500; color:var(--text-muted); margin-top:6px; letter-spacing:0.04em; }
    .eco-card-spark { position:absolute; right:10px; bottom:8px; width:64px; height:26px; opacity:0.55; pointer-events:none; transition:opacity 0.18s; }
    .eco-card:hover .eco-card-spark { opacity:0.9; }
    .eco-card.active .eco-card-spark { opacity:0; }

    /* FRED card value bar (DS validity bar: 6px, radius 3px) */
    .eco-card-bar {
      height:6px; background:var(--gray-100); border-radius:3px;
      margin-top:8px; position:relative;
    }
    .eco-card-bar-fill {
      height:100%; border-radius:3px;
      background:linear-gradient(90deg, rgba(255,180,0,0.1) 0%, #FFB400 100%);
      transform-origin:left;
      animation:rfBarGrow 0.6s cubic-bezier(.16,1,.3,1) both; animation-delay:0.2s;
    }

    /* ══════════════════════════════════════════════════
       EXPANDED CHART PANEL
       ══════════════════════════════════════════════════ */
    .eco-expand {
      background:var(--surface); border:1px solid #FFB400; border-radius:var(--radius);
      box-shadow:0 4px 14px rgba(255,180,0,0.10), 0 0 0 3px rgba(255,180,0,0.06);
      margin:0 0 14px; overflow:hidden; display:none; animation:ecoSlide 0.25s ease-out;
    }
    .eco-expand.open { display:block; }
    @keyframes ecoSlide { from{opacity:0;transform:translateY(-8px);} to{opacity:1;transform:translateY(0);} }
    .eco-expand-head {
      display:flex; justify-content:space-between; align-items:center;
      padding:12px 18px; border-bottom:1px solid var(--gray-100);
      background:linear-gradient(180deg, rgba(255,180,0,0.04), transparent);
    }
    .eco-expand-titlewrap { display:flex; flex-direction:column; gap:2px; }
    .eco-expand-eyebrow {
      font-family:var(--font-mono); font-size:9px; font-weight:600;
      letter-spacing:0.12em; text-transform:uppercase; color:var(--brand-amber-strong, #B07A00);
      display:flex; align-items:center; gap:6px;
    }
    .eco-expand-eyebrow::before { content:""; width:6px; height:6px; border-radius:50%; background:#FFB400; }
    .eco-expand-title { font-size:13.5px; font-weight:700; color:var(--text); letter-spacing:-0.01em; }
    .eco-expand-close {
      width:30px; height:30px; border-radius:8px; border:1px solid transparent;
      background:transparent; cursor:pointer; color:var(--text-muted);
      display:flex; align-items:center; justify-content:center;
      transition:background 0.15s, color 0.15s, border-color 0.15s;
    }
    .eco-expand-close:hover { background:var(--gray-100); color:var(--text); border-color:var(--gray-200); }
    .eco-expand-close svg { width:14px; height:14px; }
    .eco-expand-chart { width:100%; height:320px; }

    /* ── Empty state ── */
    .eco-empty { text-align:center; padding:48px 24px; background:var(--surface); border:1px dashed var(--gray-200); border-radius:var(--radius); margin-top:24px; }
    .eco-empty h3 { font-size:15px; font-weight:700; color:var(--text); margin-bottom:6px; }
    .eco-empty p { font-size:12px; color:var(--text-muted); line-height:1.55; max-width:400px; margin:0 auto; }

    /* ══════════════════════════════════════════════════
       RESPONSIVE
       ══════════════════════════════════════════════════ */
    @media(max-width:1180px){
      .eco-coins { grid-template-columns:repeat(5,1fr); }
      .eco-metrics { grid-template-columns:repeat(2,1fr); }
    }
    @media(max-width:900px){
      .eco-coins { grid-template-columns:repeat(3,1fr); }
      .eco-hero { grid-template-columns:1fr; }
      .eco-metrics { grid-template-columns:repeat(2,1fr); }
      .eco-dom-row { grid-template-columns:1fr; }
      .eco-deriv-row { grid-template-columns:1fr 90px 70px; }
      .eco-chart-card-stats { width:100%; }
    }
    @media(max-width:640px){
      .eco-coins { grid-template-columns:repeat(2,1fr); gap:8px; }
      .eco-coin { padding:11px 12px; }
      .eco-coin-price { font-size:15px; }
      .eco-hero { gap:8px; }
      .eco-chart-area { height:240px; }
      .eco-metrics { grid-template-columns:1fr 1fr; gap:8px; }
      .eco-metric { padding:11px 12px; }
      .eco-metric-val { font-size:18px; }
      .eco-dom-items { gap:18px; }
      .eco-dom-pct { font-size:18px; }
      .eco-alt-score { font-size:30px; }
      .eco-trend-chart { height:220px; }
      .eco-grid { grid-template-columns:repeat(2,1fr); gap:8px; }
      .eco-card { padding:11px 12px; }
      .eco-card-val { font-size:17px; }
      .eco-sec { font-size:11px; }
      .eco-expand-close { width:36px; height:36px; }
      .eco-expand-chart { height:240px; }
      .eco-empty { padding:32px 16px; }
      .eco-deriv-row { grid-template-columns:1fr 80px; }
      .eco-deriv-row-chg { display:none; }
    }
    @media(max-width:480px){
      .eco-coins { grid-template-columns:1fr 1fr; }
      .eco-metrics { grid-template-columns:1fr; }
      .eco-grid { grid-template-columns:1fr; }
    }

/* ── Card hover = token-detail pillar cards ─────────────────────────────────
   Pillar cards hover with a border brighten (stronger in dark) + a subtle
   shadow — NO amber bg-tint, NO lift. The shared "default card hover"
   (component-colors.css, loaded after this file via nav.html) gives the eco
   cards a faint amber --hover-bg tint and a lift instead, so override it here.
   Scoped to /economy + !important so it wins without touching the shared files. */
.container .eco-coin:hover, .container .eco-card:hover, .container .eco-ring-card:hover,
.container .eco-metric:hover, .container .eco-dom-card:hover, .container .eco-alt-card:hover {
  background-image: none !important;
  transform: none !important;
  box-shadow: none;
}
/* dark: brighter border + subtle shadow, like the pillar cards (high specificity
   to beat the dark default-card-hover rules) */
body.dark .container .eco-coin:hover, body.dark .container .eco-card:hover, body.dark .container .eco-ring-card:hover,
body.dark .container .eco-metric:hover, body.dark .container .eco-dom-card:hover, body.dark .container .eco-alt-card:hover {
  background-image: none !important;
  transform: none !important;
  border-color: rgba(255,255,255,0.2) !important;
  box-shadow: var(--shadow-card-hover);
}

/* extracted free inline styles (css-verify) */
.ecof-1 { position:relative;z-index:1; }
.ecof-2 { transition:stroke-dasharray 1s cubic-bezier(.16,1,.3,1); }
.ecof-3 { --c:#f97316; }
.ecof-4 { --c:#6366f1; }
