/* Bitcoin Daily - shared styles for the /charts/ indicator pages (paired with /styles.css). */
.ch-crumb { color: var(--muted); font-size: .85rem; margin: 8px 0 14px; }
.ch-crumb a { color: var(--muted); } .ch-crumb a:hover { color: var(--text); }

/* horizontal "go through them quickly" chip bar */
.ch-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; margin-bottom: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.ch-chips::-webkit-scrollbar { height: 6px; } .ch-chips::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.ch-chip { flex: 0 0 auto; background: var(--panel); border: 1px solid var(--line); color: var(--muted); padding: 7px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.ch-chip:hover { color: var(--text); border-color: var(--muted); text-decoration: none; }
.ch-chip.active { background: var(--accent); border-color: var(--accent); color: #1a1206; }

/* two-column layout: left side menu + main content */
.ch-layout { display: grid; grid-template-columns: 208px 1fr; gap: 36px; align-items: start; margin-top: 6px; }
.ch-side { position: sticky; top: 78px; max-height: calc(100vh - 92px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.ch-side::-webkit-scrollbar { width: 7px; }
.ch-side::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.ch-side-inner { display: flex; flex-direction: column; gap: 1px; }
.ch-side .grp { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .5px; margin: 10px 0 2px; opacity: .75; }
.ch-side a { display: block; color: var(--muted); padding: 3.5px 11px; border-radius: 8px; font-size: .855rem; line-height: 1.25; border-left: 2px solid transparent; }
.ch-side a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.ch-side a.active { color: var(--accent); border-left-color: var(--accent); background: var(--panel); font-weight: 600; }
.ch-side .ch-side-all { color: var(--text); font-weight: 600; margin-bottom: 2px; }
.ch-main { min-width: 0; }

/* full-width layout for wide content (returns heatmap): menu becomes a top strip so the table gets the whole page */
.ch-wide { display: block; }
.ch-wide .ch-side { position: static; margin-bottom: 14px; max-height: none; overflow: visible; }
.ch-wide .ch-side-inner { flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.ch-wide .ch-side .grp, .ch-wide .ch-side .ch-side-all { display: none; }
.ch-wide .ch-side a { flex: 0 0 auto; white-space: nowrap; border: 1px solid var(--line); background: var(--panel); }
.ch-wide .ch-side a.active { border-color: var(--accent); color: var(--accent); }

.ch-hero { padding: 40px 0 6px; }
.ch-hint { color: var(--muted); font-size: .82rem; margin: 6px 0 0; opacity: .82; }

/* Fear & Greed dial hero */
.fng-hero { padding-bottom: 8px; }
.fng-dial { position: relative; width: 300px; max-width: 100%; margin: 14px 0 4px; }
.fng-dial canvas { display: block; width: 100%; height: auto; }
.fng-readout { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; pointer-events: none; }
.fng-num { font-size: 3.6rem; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.fng-cls { font-size: 1.02rem; font-weight: 600; letter-spacing: .3px; margin-top: 3px; }

/* correlation-number hero cards (M2 / PMI / S&P) */
.corr-stats { display: flex; gap: 14px; flex-wrap: wrap; margin: 18px 0 8px; }
.corr-stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; min-width: 160px; }
.corr-stat .n { font-size: 2.7rem; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.corr-stat .l { color: var(--muted); font-size: .88rem; margin-top: 8px; max-width: 230px; line-height: 1.35; }
.corr-stat.myth .n { color: var(--muted); text-decoration: line-through; opacity: .6; }
.ch-hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.1; letter-spacing: -.4px; margin-bottom: 12px; }
.ch-hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 760px; }
.ch-asof { color: var(--muted); font-size: .92rem; margin-top: 12px; }

.ch-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 26px 0 6px; }
.ch-stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.ch-stat .l { color: var(--muted); font-size: .84rem; letter-spacing: .3px; }
.ch-stat .n { font-size: 2rem; font-weight: 700; margin-top: 6px; line-height: 1.05; }
.ch-stat .s { color: var(--muted); font-size: .82rem; margin-top: 5px; }
.ch-stat .n.up { color: var(--accent-2); } .ch-stat .n.down { color: var(--accent); } .ch-stat .n.neg { color: #e2574a; }

/* ETF summary cards, sitting inside the panel: elevate them off the panel background + collapse on small screens */
.etf-stats { grid-template-columns: repeat(3, 1fr); margin: 2px 0 22px; }
.etf-stats .ch-stat { background: rgba(255,255,255,.028); padding: 16px 18px; }
.etf-stats .ch-stat .l { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.etf-stats .ch-stat .n { font-size: 1.6rem; font-weight: 800; letter-spacing: -.5px; margin-top: 12px; }
@media (max-width: 820px) { .etf-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .etf-stats { grid-template-columns: 1fr; } }
/* live "net over the range shown" readout under the ETF chart, updates on zoom */
.ch-winsum { margin: 14px 0 0; padding: 12px 16px; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: .95rem; line-height: 1.5; }

.ch-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-top: 18px; }
.ch-panel .cap { color: var(--muted); font-size: .98rem; margin-bottom: 14px; max-width: 780px; }
.ch-read { font-size: 1.02rem; color: var(--text); margin: 4px 0 16px; }
.ch-read b { color: var(--accent); } .ch-read.up b { color: var(--accent-2); }
.ch-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: .9rem; color: var(--muted); margin-bottom: 12px; }
.ch-legend span { display: flex; align-items: center; gap: 7px; }
.ch-sw { width: 15px; height: 15px; border-radius: 4px; display: inline-block; }
.ch-sw.line { height: 4px; border-radius: 2px; }
.ch-controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.ch-btn { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .82rem; font-weight: 600; cursor: pointer; font-family: inherit; }
.ch-btn:hover { color: var(--text); border-color: var(--muted); }
.ch-btn.active { background: var(--accent); color: #1a1206; border-color: var(--accent); }
/* monthly / quarterly returns heatmap */
#returns_table { overflow-x: auto; }
.ch-heat { width: 100%; min-width: 760px; border-collapse: collapse; font-size: .96rem; font-variant-numeric: tabular-nums; }
.ch-heat th, .ch-heat td { padding: 12px 8px; text-align: center; border: 2px solid #0b0e14; white-space: nowrap; border-radius: 3px; }
.ch-heat th { color: var(--muted); font-weight: 600; font-size: .84rem; padding: 8px; }
.ch-heat td.yr { color: var(--text); font-weight: 700; text-align: left; padding-left: 12px; }
.ch-heat td.st { color: var(--text); font-weight: 700; background: rgba(255,255,255,.06); }

.ch-chart { position: relative; width: 100%; height: 460px; }
/* split price-over-indicator panels (e.g. PMI) sharing one timeline */
.ch-split { display: flex; flex-direction: column; gap: 4px; }
.ch-split .ch-chart-price { height: 330px; }
.ch-split .ch-chart-sub { height: 150px; }

.ch-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: .92rem; }
.ch-table th, .ch-table td { text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--line); color: var(--text); }
.ch-table th { color: var(--muted); font-weight: 600; }
.ch-table td:first-child, .ch-table th:first-child { text-align: left; }
.ch-table tr:last-child td { border-bottom: 0; }
.ch-note { color: var(--muted); font-size: .84rem; margin-top: 12px; max-width: 800px; }
.ch-assume { display: inline-block; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: .8rem; color: var(--muted); margin: 0 6px 8px 0; }

.ch-bigdate { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -.5px; color: var(--muted); margin: 4px 0 18px; line-height: 1.05; }
.ch-bigdate b { color: var(--accent); }
.ch-count { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; max-width: 560px; margin: 6px 0 16px; }
.ch-count div { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 16px 10px; text-align: center; }
.ch-count .cn { font-size: 2rem; font-weight: 700; color: var(--accent); line-height: 1; }
.ch-count .cl { color: var(--muted); font-size: .8rem; margin-top: 6px; letter-spacing: .4px; text-transform: uppercase; }
.ch-prog { height: 12px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); overflow: hidden; max-width: 560px; }
.ch-prog > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* index page grid of chart cards */
.ch-grouphead { margin: 30px 0 2px; }
.ch-grouphead h2 { font-size: clamp(1.4rem,3vw,1.9rem); letter-spacing:-.3px; margin-bottom: 6px; }
.ch-grouphead p { color: var(--muted); max-width: 720px; }
.ch-index-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.ch-index-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.ch-index-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); transition: .15s; }
.ch-index-card h3 { color: var(--text); font-size: 1.12rem; margin-bottom: 6px; }
.ch-index-card p { color: var(--muted); font-size: .92rem; }
.ch-index-card .now { color: var(--accent); font-weight: 600; font-size: .86rem; margin-top: 10px; display: block; }

.ch-prevnext { display: flex; justify-content: space-between; gap: 14px; margin-top: 26px; }
.ch-prevnext a { flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; color: var(--text); }
.ch-prevnext a:hover { border-color: var(--accent); text-decoration: none; }
.ch-prevnext .dir { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; }
.ch-prevnext a.next { text-align: right; }

.ch-cta { background: linear-gradient(180deg, rgba(247,147,26,.10), transparent); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; text-align: center; margin-top: 30px; }
.ch-cta h2 { border: 0; margin-bottom: 10px; }
.ch-cta p { color: var(--muted); max-width: 620px; margin: 0 auto 20px; }

@media (max-width: 860px) {
  .ch-cards { grid-template-columns: repeat(2,1fr); }
  .ch-index-grid { grid-template-columns: 1fr; }
  .ch-chart { height: 340px; }
  .ch-split .ch-chart-price { height: 240px; }
  .ch-split .ch-chart-sub { height: 120px; }
  /* side menu collapses to a horizontal scrolling row above the content.
     use block (not grid) so the scroll strip can't drive grid track sizing and overflow the page */
  .ch-layout { display: block; }
  .ch-side { position: static; margin-bottom: 8px; }
  .ch-side-inner { flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
  .ch-side .grp { display: none; }
  .ch-side .ch-side-all { display: none; }
  .ch-side a { flex: 0 0 auto; white-space: nowrap; border: 1px solid var(--line); background: var(--panel); }
  .ch-side a.active { border-color: var(--accent); }
}
