/* Stock page ------------------------------------------------------------- */

.stock-head { padding: 34px 0 22px; }
.stock-head .top-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.stock-head .tk {
  font-family: var(--mono); font-weight: 500; font-size: 13px; letter-spacing: 0.06em;
  color: var(--brass);
}
.stock-head .tk::before { content: "$"; opacity: 0.7; }
.stock-head .venue { font-size: 12.5px; color: var(--faint); }

.stock-head h1 {
  font-family: var(--serif); font-optical-sizing: auto; font-weight: 500;
  font-size: clamp(30px, 5vw, 46px); line-height: 1.02; margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.price-row { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.price {
  font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 5vw, 42px);
  font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -0.01em;
}
.price .cur { font-size: 0.5em; color: var(--faint); font-family: var(--mono); margin-left: 8px; letter-spacing: 0; }
.chg {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 14px; margin-bottom: 4px;
}
.chg.pos { color: var(--up); background: var(--up-dim); }
.chg.neg { color: var(--down); background: var(--down-dim); }
.chg .arrow { font-size: 12px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; color: var(--muted); font-size: 13px; }
.meta-row .k { color: var(--faint); }

/* layout grid */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 22px; padding-bottom: 20px; align-items: start; }
.rail { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 940px) { .layout { grid-template-columns: 1fr; } .rail { position: static; } }

/* chart */
.chart-card .card-h { margin-bottom: 8px; }
.tf-tabs { display: flex; gap: 2px; background: rgba(236,233,223,0.04); border: 1px solid var(--line); border-radius: 999px; padding: 3px;
  max-width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.tf-tabs::-webkit-scrollbar { display: none; }
.tf-tabs button { flex: 0 0 auto; }
@media (max-width: 620px) {
  .chart-card .card-h { flex-wrap: wrap; row-gap: 10px; }
  .chart-card .card-h .tf-tabs { width: 100%; }   /* full-width scroll strip below the title */
}
.tf-tabs button {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--muted);
  background: none; border: 0; padding: 5px 11px; border-radius: 999px; cursor: pointer; transition: color .15s, background .15s;
}
.tf-tabs button:hover { color: var(--text); }
.tf-tabs button.active { color: var(--bg); background: var(--text); }
/* Latest-news list (rail) */
.news-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.news-list li { border-top: 1px solid var(--line); }
.news-list li:first-child { border-top: 0; }
.news-list a { display: block; padding: 9px 2px; text-decoration: none; }
.news-list .nw-t { display: block; font-size: 13px; color: var(--text); line-height: 1.4; }
.news-list a:hover .nw-t { color: var(--accent-2); }
.news-list .nw-m { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--faint); margin-top: 3px; }
/* Multi-year segment/geography stacked bars */
.sb-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 12px; }
.sb-lg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.sb-sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: 0 0 auto; }
.sb-wrap { width: 100%; overflow-x: auto; }
.sb-chart { width: 100%; height: auto; display: block; min-width: 340px; }
.sb-chart rect { transition: opacity .12s; }
.sb-chart rect:hover { opacity: .82; }
.sb-grid { stroke: var(--line); stroke-width: 1; }
.sb-yl { fill: var(--faint); font-family: var(--mono); font-size: 10px; text-anchor: end; }
.sb-xl { fill: var(--muted); font-family: var(--mono); font-size: 11px; text-anchor: middle; }
.chart-wrap { position: relative; width: 100%; }
svg.chart { display: block; width: 100%; height: 260px; touch-action: none; }
.chart-foot { display: flex; justify-content: space-between; margin-top: 8px; color: var(--faint); font-size: 12px; }
.chart-foot .mono { color: var(--muted); }
.crosshair-tip {
  position: absolute; pointer-events: none; opacity: 0; transform: translate(-50%, -120%);
  background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 6px 10px; font-size: 12px; white-space: nowrap; transition: opacity .12s; z-index: 5;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.crosshair-tip .d { color: var(--faint); font-family: var(--mono); font-size: 10.5px; }
.crosshair-tip .v { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* mercatus angle */
.angle-card {
  border: 1px solid rgba(199,169,108,0.28);
  background:
    linear-gradient(180deg, rgba(199,169,108,0.05), rgba(199,169,108,0) 46%),
    var(--surface);
  position: relative; overflow: hidden;
}
.angle-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--brass), transparent); }
.angle-card .card-h h3 { color: #f0e7d3; }
.angle-card .quill { font-family: var(--mono); font-size: 10px; letter-spacing:.16em; text-transform: uppercase; color: var(--brass); border:1px solid rgba(199,169,108,0.3); border-radius:999px; padding:3px 9px; }
.angle-card .prose p { font-family: var(--serif); font-size: 16.5px; line-height: 1.62; color: #e7e2d4; font-optical-sizing: auto; }

/* score card */
.score-card { text-align: center; }
.score-card .card-h { justify-content: center; }
.score-ring { position: relative; width: 168px; height: 168px; margin: 6px auto 4px; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-ring .num { font-family: var(--serif); font-size: 44px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.score-ring .num.pending { color: var(--faint); font-size: 30px; letter-spacing: 0.04em; }
.score-ring .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); margin-top: 6px; }
.subscores { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; text-align: left; }
.subscore .sr-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.subscore .sr-top .k { color: var(--muted); }
.subscore .sr-top .v { font-family: var(--mono); color: var(--faint); }
.subscore .bar { height: 5px; border-radius: 999px; background: rgba(236,233,223,0.07); overflow: hidden; }
.subscore .bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.subscore.pending .bar > i { background: repeating-linear-gradient(45deg, rgba(236,233,223,0.12) 0 6px, transparent 6px 12px); width: 100% !important; }
.score-note { margin-top: 16px; font-size: 12px; color: var(--faint); line-height: 1.5; border-top: 1px solid var(--line); padding-top: 12px; }

/* score: quant tag + peer label */
.score-card .card-h { justify-content: space-between; align-items: center; }
.quant-tag { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 8px; }
.subscore .peer { font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em; color: var(--faint); text-transform: none; }
.score-note strong { color: var(--muted); }
.score-note em { color: var(--accent); font-style: normal; }

/* sentiment bar (Perspectives) */
.sentiment { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.sent-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; }
.sent-h .lbl { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sent-h .src { font-size: 11px; color: var(--faint); }
.sent-bar { display: flex; gap: 3px; height: 9px; }
.sent-bar .seg { border-radius: 999px; min-width: 3px; }
.sent-bar .bull { background: var(--up); }
.sent-bar .neut { background: #6c7568; }
.sent-bar .bear { background: var(--down); }
.sent-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.sent-legend .bull { color: var(--up); }
.sent-legend .neut { color: var(--muted); }
.sent-legend .bear { color: var(--down); }

/* documents (Earnings) */
.docs { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.docs .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.doc-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.doc { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text);
  background: rgba(236,233,223,0.04); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; transition: border-color .18s, background .18s; }
.doc:hover { border-color: rgba(91,185,139,0.4); background: var(--accent-dim); }
.doc .ic { color: var(--accent); font-size: 13px; }
.doc .dt { color: var(--faint); font-family: var(--mono); font-size: 10.5px; }

/* stats grid */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.stat { background: var(--surface); padding: 12px 14px; }
.stat .k { font-size: 11.5px; color: var(--faint); letter-spacing: 0.02em; }
.stat .v { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 15px; margin-top: 3px; color: var(--text); }
.stat .v.na { color: var(--faint); }

/* range bar (52w) */
.range { margin-top: 6px; }
.range .track { position: relative; height: 5px; border-radius: 999px; background: rgba(236,233,223,0.08); margin: 14px 0 6px; }
.range .fill { position: absolute; height: 100%; border-radius: 999px; background: linear-gradient(90deg, rgba(91,185,139,0.35), var(--accent)); }
.range .mark { position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--text); border: 2px solid var(--surface); transform: translate(-50%, -50%); }
.range .ends { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.range .ends .lab { color: var(--faint); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; display:block; }

/* about */
.about p { color: #d3cfc3; font-size: 14px; line-height: 1.62; margin: 0; }
.about.clamp p { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.about .more { margin-top: 10px; background: none; border: 0; color: var(--accent); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; cursor: pointer; padding: 0; }
.about .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; }
.tag.esg { color: var(--accent); border-color: rgba(91,185,139,0.3); }

/* ============ tabs (Overview / Financials / Analysts) ============ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 8px 0 24px; position: sticky; top: 62px; background: linear-gradient(to bottom, var(--bg) 60%, transparent); z-index: 20; }
.tab-btn { font-family: var(--sans); font-size: 14px; letter-spacing: .01em; color: var(--muted); background: none; border: 0; padding: 12px 4px; margin-right: 22px; cursor: pointer; position: relative; transition: color .16s; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--text); }
.tab-btn.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }

.full-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }

/* statement tables */
.stmt-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.seg-toggle { display: inline-flex; background: rgba(236,233,223,0.04); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg-toggle button { font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: none; border: 0; padding: 5px 13px; border-radius: 999px; cursor: pointer; }
.seg-toggle button.active { color: var(--bg); background: var(--text); }
.stmt-scroll { overflow-x: auto; }
.stmt-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 460px; }
.stmt-table th, .stmt-table td { padding: 10px 12px; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; border-bottom: 1px solid var(--line); }
.stmt-table th:first-child, .stmt-table td:first-child { text-align: left; font-family: var(--sans); color: var(--muted); position: sticky; left: 0; background: var(--surface); }
.stmt-table thead th { color: var(--faint); font-size: 11px; letter-spacing: .06em; font-weight: 400; }
.stmt-table tr.derived td { color: var(--accent-2); }
.stmt-table tr.derived td:first-child { color: var(--accent); }
.stmt-table tr:hover td { background: var(--surface-2); }
.stmt-table tr:hover td:first-child { background: var(--surface-2); }
.stmt-table td.na { color: var(--faint); }

.trend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.trend { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.trend .k { font-size: 12px; color: var(--faint); }
.trend .v { font-family: var(--mono); font-size: 18px; margin: 3px 0 8px; }
.trend .v small { color: var(--muted); font-size: 12px; }
.trend svg { width: 100%; height: 44px; display: block; }

/* analysts */
.pt-range { margin: 6px 0 4px; }
.pt-track { position: relative; height: 6px; border-radius: 999px; background: linear-gradient(90deg, rgba(224,125,95,.4), rgba(236,233,223,.15), rgba(92,192,143,.5)); margin: 30px 0 8px; }
.pt-mark { position: absolute; top: 50%; transform: translate(-50%,-50%); }
.pt-mark.cur { width: 12px; height: 12px; border-radius: 50%; background: var(--text); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); }
.pt-mark.mean { width: 2px; height: 20px; background: var(--accent); }
.pt-mark .lab { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 10.5px; white-space: nowrap; color: var(--muted); }
.pt-mark.cur .lab { color: var(--text); }
.pt-ends { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.pt-upside { font-family: var(--mono); font-size: 13px; margin-top: 10px; }

.rec-consensus { font-family: var(--serif); font-size: 26px; font-weight: 500; margin: 4px 0 2px; }
.rec-sub { font-size: 12px; color: var(--faint); margin-bottom: 14px; }
.rec-bar { display: flex; gap: 3px; height: 30px; margin-bottom: 10px; }
.rec-seg { border-radius: 4px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; color: var(--bg); min-width: 2px; }
.rec-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11.5px; color: var(--muted); }
.rec-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }

.est-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.est-table th, .est-table td { padding: 9px 10px; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line); white-space: nowrap; }
.est-table th:first-child, .est-table td:first-child { text-align: left; color: var(--muted); font-family: var(--sans); }
.est-table thead th { color: var(--faint); font-size: 10.5px; letter-spacing: .06em; font-weight: 400; }
.rev-up { color: var(--up); } .rev-down { color: var(--down); }

.ud-list { display: flex; flex-direction: column; }
.ud-row { display: grid; grid-template-columns: 84px 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ud-row:last-child { border-bottom: 0; }
.ud-row .date { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.ud-row .firm { color: var(--text); }
.ud-row .grade { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ud-row .grade .to { color: var(--text); }
.ud-badge { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.ud-badge.up { color: var(--up); border-color: rgba(92,192,143,.4); }
.ud-badge.down { color: var(--down); border-color: rgba(224,125,95,.4); }
.empty-note { color: var(--faint); font-size: 13px; padding: 8px 0; }

.sent-note { margin-top: 8px; font-size: 11px; color: var(--faint); line-height: 1.45; font-style: italic; }

/* ===== overview refinements: horizontal stats, collapsible AI, YoY rows ===== */
.stats-grid.stats-row { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }

/* collapsible AI cards */
.ai-collapse .prose.clampable { transition: none; }
.ai-collapse.collapse:not(.open) .prose.clampable { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ai-collapse.collapse:not(.open) .expand-extra { display: none; }
.ai-collapse .read-more { margin-top: 12px; background: none; border: 0; color: var(--accent); font-family: var(--mono); font-size: 12px; letter-spacing: .04em; cursor: pointer; padding: 0; }
.ai-collapse .read-more:hover { color: var(--accent-2); }
.angle-card.ai-collapse.collapse:not(.open) .prose.clampable { -webkit-line-clamp: 3; }

/* YoY sub-rows in statements */
.stmt-table tr.yoy td { padding-top: 0; padding-bottom: 9px; font-size: 11px; border-bottom: 1px solid var(--line); }
.stmt-table tr.yoy td:first-child { color: var(--faint); font-size: 10.5px; font-family: var(--mono); letter-spacing: .04em; }
.stmt-table tr.yoy td.na { color: var(--faint); }

/* ===== score: grade below ring (no overlap) + expandable breakdown ===== */
.score-ring .val .num { line-height: 1; }
.score-grade { text-align: center; font-family: var(--mono); font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin: 2px 0 4px; }
.score-grade span { color: var(--faint); }
.bd-toggle { display: block; width: 100%; margin-top: 16px; background: none; border: 1px solid var(--line);
  border-radius: 999px; color: var(--muted); font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em;
  padding: 8px 0; cursor: pointer; transition: color .15s, border-color .15s; }
.bd-toggle:hover { color: var(--text); border-color: var(--line-2); }
.bd-toggle .car { color: var(--accent); }
.bd-content { display: none; margin-top: 14px; }
.score-card.bd-open .bd-content { display: block; }
.bd-pillar { margin-bottom: 14px; }
.bd-h { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 6px;
  border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.bd-h span:first-child { font-size: 13px; color: var(--text); }
.bd-h em { font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; color: var(--faint); font-style: normal; text-transform: uppercase; }
.bd-h .bd-sub { font-family: var(--mono); font-size: 13px; color: var(--accent-2); }
.bd-row { display: grid; grid-template-columns: 1fr auto 64px; gap: 8px; align-items: center; padding: 4px 0; text-align: left; }
.bd-l { font-size: 12px; color: var(--muted); }
.bd-v { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text); }
.bd-rank { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.bd-bar { width: 34px; height: 4px; border-radius: 999px; background: rgba(236,233,223,.08); overflow: hidden; }
.bd-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bd-n { font-family: var(--mono); font-size: 11px; color: var(--faint); width: 18px; text-align: right; }

/* ===== analyst tab layout: 3 on top, 2 wide on bottom, equal heights ===== */
.an-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.an-est { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 18px; align-items: stretch; }
.an-top > .card, .an-est > .card { height: 100%; margin-top: 0; }
@media (max-width: 860px) { .an-top { grid-template-columns: 1fr; } .an-est { grid-template-columns: 1fr; } }
.est-scroll { overflow-x: auto; }

/* ratings donut */
.rec-donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.rec-donut { position: relative; width: 124px; height: 124px; flex: 0 0 auto; }
.rec-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.rec-c-l { font-family: var(--serif); font-size: 17px; font-weight: 500; line-height: 1.05; }
.rec-c-s { font-family: var(--mono); font-size: 10px; color: var(--faint); margin-top: 3px; }
.rec-legend { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--muted); }
.rec-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 7px; vertical-align: middle; }
.rec-legend b { color: var(--text); font-weight: 500; font-family: var(--mono); }

/* financials sub-tabs */
.fin-views { display: flex; flex-wrap: wrap; gap: 4px; }
.fin-views button { font-family: var(--sans); font-size: 13px; color: var(--muted); background: none;
  border: 1px solid transparent; border-radius: 999px; padding: 7px 14px; cursor: pointer; transition: all .15s; white-space: nowrap; }
.fin-views button:hover { color: var(--text); background: rgba(236,233,223,0.04); }
.fin-views button.active { color: var(--bg); background: var(--accent); }
.stmt-controls { align-items: center; }

/* TTM column highlight on annual statements */
.stmt-table th.ttm-col { color: var(--accent-2); }
.stmt-table td.ttm-col { background: rgba(91,185,139,0.06); color: var(--text); }
.stmt-table tr.yoy td.ttm-col, .stmt-table tr.derived td.ttm-col { background: rgba(91,185,139,0.06); }

/* values & sustainability subsection in the Mercatus Angle */
.values-sub { margin-top: 15px; padding: 12px 15px; border-radius: var(--r-sm);
  background: var(--accent-dim); border: 1px solid rgba(91,185,139,0.22); }
.values-sub .vs-label { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.values-sub p { margin: 0; font-family: var(--sans); font-size: 13px; line-height: 1.55; color: #d6dccf; }

/* ETF view */
.etf-hold { display: flex; flex-direction: column; }
.eh-row { display: grid; grid-template-columns: 64px 1fr 54px; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.eh-row:last-child { border-bottom: 0; }
.eh-tk { font-family: var(--mono); font-size: 12px; color: var(--brass); }
.eh-nm { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eh-w { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; color: var(--text); }
.etf-sectors { display: flex; flex-direction: column; gap: 8px; }
.es-row { display: grid; grid-template-columns: 1fr 1.4fr 40px; gap: 9px; align-items: center; font-size: 12.5px; }
.es-s { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-bar { height: 6px; border-radius: 999px; background: rgba(236,233,223,.08); overflow: hidden; }
.es-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.es-w { font-family: var(--mono); font-size: 12px; color: var(--text); text-align: right; }

/* Smart Money ------------------------------------------------------------- */
.sm-cluster { background: rgba(92,192,143,.12); border: 1px solid rgba(92,192,143,.4);
  color: var(--up); border-radius: var(--r-md); padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.sm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 640px) { .sm-stats { grid-template-columns: repeat(2, 1fr); } }
.sm-stat .k { font-size: 11px; color: var(--faint); font-family: var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.sm-stat .v { font-family: var(--mono); font-size: 18px; font-variant-numeric: tabular-nums; margin-top: 3px; }
.sm-tbl td, .sm-tbl th { white-space: nowrap; }
.sm-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.sm-role { color: var(--muted); font-size: 12px; }
.sm-holders { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.sm-holder { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 14px; text-decoration: none; color: inherit; transition: border-color .18s, background .18s; }
.sm-holder:hover { border-color: var(--line-2); background: var(--surface-2); }
.sm-h-name { font-size: 13.5px; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-h-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sm-h-val { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.sm-act { font-family: var(--mono); font-size: 10.5px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); }
.sm-act.new { color: var(--accent-2); } .sm-act.added { color: var(--up); } .sm-act.trimmed { color: var(--down); }

/* insider 10b5-1 labelling */
.sm-note { font-size: 12px; color: var(--faint); line-height: 1.5; margin: 0 0 12px; }
.sm-plan { font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-left: 5px; vertical-align: middle; }

/* chart header: intraday premium chip alongside the timeframe tabs */
.chart-h-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.chart-note { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); font-weight: 400; margin-left: 8px; }

/* Performance card (period returns + risk) */
.perf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.perf-cell { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 6px; text-align: center; }
.perf-cell .pk { font-family: var(--mono); font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.perf-cell .pv { font-size: 14px; font-variant-numeric: tabular-nums; margin-top: 3px; color: var(--text); }
.perf-cell .pv.pos { color: var(--up); }
.perf-cell .pv.neg { color: var(--down); }
.perf-foot { margin-top: 11px; font-size: 12px; color: var(--muted); }
.perf-foot b { color: var(--text); font-variant-numeric: tabular-nums; }
.perf-foot b.neg { color: var(--down); }

/* Compact revenue-mix: segment + geography side by side, denser bars */
.seg-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .seg-panels { grid-template-columns: 1fr; gap: 14px; } }
.seg-panel .seg-h { margin: 0 0 6px; }
.seg-panels .sb-legend { gap: 4px 12px; margin: 2px 0 8px; }
.seg-panels .sb-lg { font-size: 11px; }
.seg-panels .sb-chart { min-width: 0; }

/* Financials: click a row to chart it in the Charts studio */
.fa-plot { color: var(--text); display: inline-flex; align-items: center; gap: 5px; }
.fa-plot .fa-ic { opacity: 0; color: var(--accent-2); transition: opacity .12s; }
.fa-plot:hover { color: var(--accent-2); }
.fa-plot:hover .fa-ic { opacity: 1; }

/* Price chart axis tick labels (HTML overlay; crisp under the stretched SVG) */
.chart-wrap { padding-right: 50px; }                     /* gutter so price labels never sit on the line */
.px-yax, .px-xax { position: absolute; pointer-events: none; }
.px-yax { top: 0; right: 0; bottom: 0; width: 50px; }
.px-yax span { position: absolute; left: 5px; font-family: var(--mono); font-size: 9.5px; line-height: 1; color: var(--faint); white-space: nowrap; }
.px-xax { left: 0; right: 50px; bottom: 2px; height: 12px; }
.px-xax span { position: absolute; bottom: 0; font-family: var(--mono); font-size: 9.5px; line-height: 1; color: var(--faint); white-space: nowrap; }

/* ---- ownership & short interest ---- */
.own-bar { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: var(--surface-3); margin: 2px 0 12px; border: 1px solid var(--line); }
.own-seg { display: block; height: 100%; }
.own-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.own-legend .dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 6px; vertical-align: -1px; }
.own-legend b { color: var(--text); font-weight: 500; }
.own-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.own-tile { background: rgba(6,10,10,0.4); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px; }
.own-tile.grow { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.own-tile .k { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.own-tile b { font-family: var(--mono); font-size: 16px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.own-tile b.neg { color: var(--down); }
.tspark { width: 66px; height: 20px; vertical-align: middle; }
.own-tile.grow .tspark { width: 120px; height: 22px; }

/* ---- ratings trend ---- */
.rt-chart { display: flex; align-items: flex-end; gap: 14px; height: 130px; padding: 6px 4px 0; }
.rt-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.rt-bar { width: 100%; max-width: 46px; height: 100%; display: flex; flex-direction: column-reverse; border-radius: 3px 3px 0 0; overflow: hidden; background: rgba(6,10,10,0.4); }
.rt-bar span { display: block; width: 100%; }
.rt-lbl { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 7px; }
.rt-tot { font-family: var(--mono); font-size: 9px; color: var(--faint); }
.rt-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.rt-legend .dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 5px; vertical-align: -1px; }

/* ---- eps revisions (enhanced) ---- */
.rev-table .est-spark { padding: 2px 7px; }
.rev-table .rev-mom { font-size: 11px; white-space: nowrap; }
.rev-up { color: var(--up); } .rev-down { color: var(--down); }

/* ---- revenue-mix stacked-bar hover tooltip + segment highlight ---- */
.sb-wrap { position: relative; overflow: visible; }
.sb-seg { cursor: crosshair; transition: opacity .12s; }
.sb-chart:hover .sb-seg { opacity: .55; }
.sb-chart .sb-seg:hover { opacity: 1; }
.seg-tip { position: absolute; z-index: 8; pointer-events: none; opacity: 0;
  transform: translate(-50%, calc(-100% - 10px));
  background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 5px; padding: 6px 9px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5); white-space: nowrap; transition: opacity .1s; }
.seg-tip.on { opacity: 1; }
.seg-tip .st-nm { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text); margin-bottom: 2px; }
.seg-tip .st-sw { width: 9px; height: 9px; border-radius: 2px; flex: 0 0 auto; }
.seg-tip .st-v { font-family: var(--mono); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.seg-tip .st-v b { color: var(--text); }
