/* StockVane Quotes - quote table + single-stock page
 * Quote-page type scale (2026, consumer-finance calibrated):
 *   price 2.4rem | H1 1.85rem | card h2 1.2rem | section label 13 |
 *   body/description 15-15.5 | data value 14.5-15 | secondary 13 | caption 12 (floor).
 * Single-stock page styling takes cues from a modern research terminal:
 * card-based layout, green-up / red-down (US convention), rating pills,
 * percentile bars, a hero price block and a sticky ticker bar.
 */

:root {
	--sv-up: #00a63e;
	--sv-down: #e02424;
	--sv-flat: #374151;
	--sv-accent: #0f5af0;
	--sv-ai: #7c5cff;
}

/* =========================================================================
 *  Shared quote table (shortcode + /quote/ list page)
 * ====================================================================== */
.sv-quotes-wrap {
	margin: 1em 0;
	font-variant-numeric: tabular-nums;
}
.sv-quotes-title { margin: 0 0 .5em; font-size: 1.1em; }
/* Classic CSS-only "scroll shadow": a shadow layer fixed to the viewport
   (background-attachment: scroll) is covered by a same-color gradient that
   scrolls WITH the content (background-attachment: local), so each edge
   shadow only shows once the corresponding side actually has more to
   scroll to — no JS overflow-detection needed, and it disappears on its
   own once a table fits without scrolling. */
.sv-quotes-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	background-color: var(--sv-card);
	background-image:
		linear-gradient(to right, var(--sv-card) 50%, transparent),
		linear-gradient(to left, var(--sv-card) 50%, transparent),
		linear-gradient(to right, rgba(16, 24, 40, .12), transparent),
		linear-gradient(to left, rgba(16, 24, 40, .12), transparent);
	background-repeat: no-repeat;
	background-size: 20px 100%, 20px 100%, 10px 100%, 10px 100%;
	background-position: left, right, left, right;
	background-attachment: local, local, scroll, scroll;
}
.sv-quotes-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.sv-quotes-table th,
.sv-quotes-table td {
	padding: 9px 12px;
	text-align: right;
	white-space: nowrap;
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.sv-quotes-table th {
	font-weight: 600;
	color: #374151;
	background: rgba(0, 0, 0, .02);
	position: sticky;
	top: 0;
}
.sv-quotes-table tbody tr:hover { background: rgba(37, 99, 235, .04); }
.sv-quotes-table td:first-child,
.sv-quotes-table th:first-child {
	text-align: left;
	position: sticky;
	left: 0;
	background: #fff;
}
.sv-table-left th, .sv-table-left td { text-align: left; }
.sv-name { display: block; font-weight: 600; }
.sv-code { display: block; font-size: 12px; color: #5c6675; }
.sv-table-rating {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--sv-chip);
	font-size: 12px;
	font-weight: 700;
}
.sv-table-rating b { font-weight: 800; }
.sv-table-empty { color: var(--sv-faint); }

.sv-dir-up .sv-last, .sv-dir-up .sv-chg, .sv-dir-up .sv-chg-rate { color: var(--sv-up); }
.sv-dir-down .sv-last, .sv-dir-down .sv-chg, .sv-dir-down .sv-chg-rate { color: var(--sv-down); }
.sv-dir-flat .sv-last, .sv-dir-flat .sv-chg, .sv-dir-flat .sv-chg-rate { color: var(--sv-flat); }

.sv-chg-inline { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.sv-chg-inline.sv-dir-up { color: var(--sv-up); }
.sv-chg-inline.sv-dir-down { color: var(--sv-down); }

.sv-quotes-status { margin-top: .5em; font-size: 12px; color: #5c6675; }
.sv-quotes-stale { opacity: .5; transition: opacity .2s; }
.sv-quotes-empty { color: #5c6675; padding: 1em 0; }
.sv-name-link { text-decoration: none; color: inherit; }
.sv-name-link:hover .sv-name { text-decoration: underline; }

/* =========================================================================
 *  Single-stock page
 * ====================================================================== */
.sv-quote-page {
	--sv-page-bg: #f5f6f8;
	--sv-card: #ffffff;
	--sv-border: #e5e7eb;
	--sv-border-strong: #d1d5db;
	--sv-text: #111827;
	--sv-muted: #374151;
	--sv-faint: #5c6675;
	--sv-track: #eef0f3;
	--sv-chip: #f3f4f6;
	background: var(--sv-page-bg);
	color: var(--sv-text);
	font-variant-numeric: tabular-nums;
	-webkit-font-smoothing: antialiased;
}
.sv-quote-inner {
	max-width: 940px;
	margin: 0 auto;
	padding: 20px 16px 64px;
	line-height: 1.55;
}
/* Pages with a right rail (sidebar present) get a wider frame so the main
   column doesn't get squeezed down to make room for it. */
.sv-quote-inner.sv-has-sidebar { max-width: 1240px; }
.sv-quote-inner * { box-sizing: border-box; }
/* Neutralise theme chrome on our own elements */
.sv-quote-inner h1,
.sv-quote-inner h2,
.sv-quote-inner h3 { border: 0; padding: 0; color: inherit; font-family: inherit; }
.sv-quote-inner a { box-shadow: none; }
.sv-quote-inner dl,
.sv-quote-inner dd,
.sv-quote-inner dt,
.sv-quote-inner ul { margin: 0; padding: 0; }
.sv-quote-inner table { margin: 0; border: 0; background: none; }
.sv-quote-inner summary { list-style: none; }

.sv-quote-crumbs { font-size: 13px; color: var(--sv-faint); margin-bottom: 14px; }
.sv-quote-crumbs a { color: var(--sv-muted); text-decoration: none; }
.sv-quote-crumbs a:hover { color: var(--sv-accent); }
.sv-quote-crumbs span { margin: 0 6px; }

/* ---------- sticky ticker bar (revealed on scroll) ---------- */
.sv-stickybar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 900;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 16px;
	background: rgba(255, 255, 255, .92);
	backdrop-filter: saturate(180%) blur(8px);
	-webkit-backdrop-filter: saturate(180%) blur(8px);
	border-bottom: 1px solid #e5e7eb;
	color: #111827;
	transform: translateY(-100%);
	transition: transform .18s ease;
	font-size: 14.5px;
}
.sv-stickybar.is-shown { transform: translateY(0); }
.sv-stickybar-inner { max-width: 940px; margin: 0 auto; width: 100%; display: flex; align-items: center; gap: 12px; }
.sv-stickybar-name { font-weight: 700; }
.sv-stickybar-sym { color: var(--sv-faint); font-size: 12.5px; }
.sv-stickybar-price { margin-left: auto; font-weight: 700; }
.sv-stickybar-move { font-weight: 600; font-size: 13.5px; }
.sv-dir-up .sv-stickybar-price, .sv-dir-up .sv-stickybar-move { color: var(--sv-up); }
.sv-dir-down .sv-stickybar-price, .sv-dir-down .sv-stickybar-move { color: var(--sv-down); }

/* ---------- sub-page tab nav (a modern research terminal style) ---------- */
.sv-tabs {
	/* sticky is opt-in: some themes (Neve) run their own fixed header that
	   would overlap it. Add .sv-tabs--sticky on the <nav> to enable. */
	margin: 14px 0 18px;
	background: var(--sv-page-bg, #f5f6f8);
	border-bottom: 1px solid var(--sv-border);
}
.sv-tabs--sticky {
	position: sticky;
	top: 0;
	z-index: 30;
}
.admin-bar .sv-tabs--sticky { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .sv-tabs--sticky { top: 46px; } }

/* ---------- trailing returns ---------- */
.sv-returns { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 1px; background: var(--sv-border); border: 1px solid var(--sv-border); border-radius: 10px; overflow: hidden; }
.sv-return { background: var(--sv-card); padding: 10px 8px; text-align: center; }
.sv-return-k { display: block; font-size: 12px; color: var(--sv-faint); text-transform: uppercase; letter-spacing: .03em; }
.sv-return-v { display: block; font-size: 15px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.sv-return.sv-dir-up .sv-return-v { color: var(--sv-up); }
.sv-return.sv-dir-down .sv-return-v { color: var(--sv-down); }
.sv-tabs-scroll {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.sv-tabs-scroll::-webkit-scrollbar { display: none; }
.sv-tab {
	flex: 0 0 auto;
	padding: 12px 15px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	color: var(--sv-muted);
	text-decoration: none;
	white-space: nowrap;
	border-bottom: 2px solid transparent;
	transition: color .15s ease, border-color .15s ease;
}
.sv-tab:hover { color: var(--sv-text); }
.sv-tab.is-active {
	color: var(--sv-accent);
	border-bottom-color: var(--sv-accent);
}
.sv-tab-content > .sv-card:first-child,
.sv-tab-content > section:first-child { margin-top: 0; }
.sv-tab-content { transition: opacity .12s ease; }
.sv-tab-content.is-loading { opacity: .5; pointer-events: none; }

/* ---------- hero ---------- */
.sv-hero {
	background: var(--sv-card);
	border: 1px solid var(--sv-border);
	border-radius: 14px;
	padding: 22px 24px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.sv-hero-top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px 28px;
}
.sv-hero-id h1 {
	margin: 0 0 6px;
	font-size: 1.85rem;
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -.01em;
}
.sv-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sv-pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--sv-chip);
	color: var(--sv-muted);
	font-size: 12.5px;
	font-weight: 600;
	white-space: nowrap;
}
.sv-pill-exch { background: rgba(37, 99, 235, .1); color: var(--sv-accent); }
.sv-dir-up .sv-pill-move { background: rgba(0, 166, 62, .12); color: var(--sv-up); }
.sv-dir-down .sv-pill-move { background: rgba(224, 36, 36, .1); color: var(--sv-down); }

.sv-hero-price { text-align: right; line-height: 1.1; }
.sv-hero-last {
	font-size: 2.4rem;
	font-weight: 700;
	letter-spacing: -.02em;
	display: block;
}
.sv-hero-move {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	margin-top: 6px;
	padding: 3px 10px;
	border-radius: 8px;
	font-size: 1.05rem;
	font-weight: 700;
}
.sv-dir-up .sv-hero-last { color: var(--sv-up); }
.sv-dir-down .sv-hero-last { color: var(--sv-down); }
.sv-dir-flat .sv-hero-last { color: var(--sv-text); }
.sv-dir-up .sv-hero-move { background: rgba(0, 166, 62, .12); color: var(--sv-up); }
.sv-dir-down .sv-hero-move { background: rgba(224, 36, 36, .1); color: var(--sv-down); }
.sv-dir-flat .sv-hero-move { background: var(--sv-chip); color: var(--sv-muted); }

.sv-hero-asof { margin-top: 12px; font-size: 12px; color: var(--sv-faint); }
.sv-live-dot {
	display: inline-block;
	width: 7px; height: 7px;
	border-radius: 50%;
	background: var(--sv-up);
	margin-right: 5px;
	vertical-align: middle;
	box-shadow: 0 0 0 0 rgba(0, 166, 62, .5);
	animation: sv-pulse 2s infinite;
}
.sv-live-dot.is-off { background: var(--sv-faint); animation: none; box-shadow: none; }
@keyframes sv-pulse {
	0% { box-shadow: 0 0 0 0 rgba(0, 166, 62, .5); }
	70% { box-shadow: 0 0 0 6px rgba(0, 166, 62, 0); }
	100% { box-shadow: 0 0 0 0 rgba(0, 166, 62, 0); }
}

/* ---------- session strip (pre / after / overnight) ---------- */
.sv-sessions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sv-session {
	display: flex;
	align-items: baseline;
	gap: 7px;
	font-size: 13px;
	padding: 6px 11px;
	border: 1px solid var(--sv-border);
	border-radius: 9px;
	background: var(--sv-page-bg);
}
.sv-session-label { color: var(--sv-faint); font-weight: 600; }
.sv-session.sv-dir-up span:not(.sv-session-label) { color: var(--sv-up); }
.sv-session.sv-dir-down span:not(.sv-session-label) { color: var(--sv-down); }

/* ---------- quick stats strip ---------- */
.sv-quickstats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 1px;
	margin-top: 18px;
	background: var(--sv-border);
	border: 1px solid var(--sv-border);
	border-radius: 10px;
	overflow: hidden;
}
.sv-quickstats > div { background: var(--sv-card); padding: 10px 14px; }
.sv-quickstats dt { font-size: 12.5px; color: var(--sv-faint); margin: 0 0 3px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.sv-quickstats dd { margin: 0; font-size: 16px; font-weight: 700; }

/* ---------- cards ---------- */
.sv-card {
	background: var(--sv-card);
	border: 1px solid var(--sv-border);
	border-radius: 14px;
	padding: 20px 24px;
	margin-top: 16px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.sv-card > h2 {
	font-size: 1.2rem;
	font-weight: 700;
	margin: 0 0 16px;
	display: flex;
	align-items: baseline;
	gap: 8px;
}
.sv-card > h2 small { color: var(--sv-faint); font-weight: 500; font-size: 13px; }

/* ---------- key statistics ---------- */
.sv-stat-group + .sv-stat-group { margin-top: 18px; }
.sv-stat-group h3 {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--sv-faint);
	font-weight: 700;
	margin: 0 0 8px;
}
.sv-stat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 28px; }
.sv-stat-list > div {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 9px 0;
	border-bottom: 1px solid var(--sv-border);
	font-size: 14.5px;
}
.sv-stat-list dt { color: var(--sv-muted); }
.sv-term { position: relative; color: inherit; text-decoration: none; cursor: help; border-bottom: 1px dashed rgba(120,130,145,.55); }
.sv-term:hover { color: var(--sv-accent); border-bottom-color: var(--sv-accent); }
.sv-term-i { display:inline-grid; place-items:center; width:13px; height:13px; margin-left:3px; border-radius:50%;
  font-size:9px; font-weight:700; font-style:normal; line-height:1; vertical-align:top; margin-top:1px;
  background:rgba(120,130,145,.18); color:#6b7684; }
.sv-term:hover .sv-term-i { background:var(--sv-accent); color:#fff; }
.sv-term[data-tip]::after {
  content: attr(data-tip); position:absolute; left:0; top:calc(100% + 8px); z-index:60;
  width:max-content; max-width:280px; padding:9px 12px; border-radius:10px;
  background:#0b1220; color:#fff; font-size:12.5px; font-weight:400; line-height:1.5; text-align:left;
  text-decoration:none; letter-spacing:0; text-transform:none; white-space:normal;
  box-shadow:0 12px 34px -10px rgba(0,0,0,.4); opacity:0; visibility:hidden; transform:translateY(-3px);
  transition:opacity .12s ease, transform .12s ease, visibility .12s;
}
.sv-term[data-tip]::before {
  content:""; position:absolute; left:14px; top:calc(100% + 3px); z-index:61;
  border:5px solid transparent; border-bottom-color:#0b1220; opacity:0; visibility:hidden; transition:opacity .12s;
}
.sv-term[data-tip]:hover::after,.sv-term[data-tip]:focus::after { opacity:1; visibility:visible; transform:translateY(0); }
.sv-term[data-tip]:hover::before,.sv-term[data-tip]:focus::before { opacity:1; visibility:visible; }
@media (prefers-color-scheme:dark){ .sv-term[data-tip]::after{ background:#e5e7eb; color:#0b1220; } .sv-term[data-tip]::before{ border-bottom-color:#e5e7eb; } }
@media (max-width:640px){ .sv-term[data-tip]::after{ max-width:220px; left:auto; right:0; } .sv-term[data-tip]::before{ left:auto; right:14px; } }
.sv-glossary-list { margin-top: 24px; }
.sv-glossary-item { padding: 16px 0; border-bottom: 1px solid var(--sv-border); scroll-margin-top: 80px; }
.sv-glossary-item dt { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.sv-glossary-item dd { margin: 0; color: var(--sv-muted); font-size: 15px; line-height: 1.6; }
.sv-peer-self td { font-weight: 700; background: var(--sv-chip); }
.sv-stat-list dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------- range bar ---------- */
.sv-range { margin-top: 18px; }
.sv-range-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 13px;
	color: var(--sv-muted);
	margin-bottom: 8px;
}
.sv-range-head strong { color: var(--sv-text); font-size: 13.5px; }
.sv-range-track {
	position: relative;
	height: 6px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--sv-down) 0%, #f0b429 50%, var(--sv-up) 100%);
}
.sv-range-track.is-plain { background: var(--sv-track); }
.sv-range-track > span {
	position: absolute;
	top: 50%;
	width: 13px; height: 13px;
	margin-left: -6.5px;
	border-radius: 50%;
	background: var(--sv-card);
	border: 3px solid var(--sv-text);
	transform: translateY(-50%);
}
.sv-range-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--sv-faint); margin-top: 5px; }
.sv-range-note { font-size: 12.5px; color: var(--sv-muted); margin-top: 6px; }

/* ---------- valuation cards ---------- */
.sv-val-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.sv-val-card {
	border: 1px solid var(--sv-border);
	border-radius: 12px;
	padding: 14px 16px;
	background: var(--sv-page-bg);
}
.sv-val-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.sv-val-type { font-weight: 700; font-size: 13.5px; color: var(--sv-muted); }
.sv-val-now { font-size: 1.35rem; font-weight: 700; }
.sv-val-tag { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.sv-val-tag.cheap { background: rgba(0, 166, 62, .14); color: var(--sv-up); }
.sv-val-tag.fair { background: var(--sv-chip); color: var(--sv-muted); }
.sv-val-tag.rich { background: rgba(224, 36, 36, .1); color: var(--sv-down); }
.sv-val-bar { position: relative; height: 5px; border-radius: 999px; background: var(--sv-track); margin: 12px 0 6px; }
.sv-val-bar > span { position: absolute; top: -3px; width: 3px; height: 11px; border-radius: 2px; background: var(--sv-text); transform: translateX(-1.5px); }
.sv-val-meta { font-size: 12px; color: var(--sv-faint); }

.sv-valblock { padding: 14px 0; border-top: 1px solid var(--sv-border); }
.sv-valblock:first-of-type { border-top: 0; padding-top: 4px; }
.sv-valblock-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.sv-valblock-head .sv-val-now { font-size: 1.2rem; }
.sv-val-pct { font-size: 12px; color: var(--sv-faint); margin-left: auto; }

/* ---------- chart ---------- */
.sv-chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sv-seg { display: inline-flex; background: var(--sv-chip); border-radius: 9px; padding: 3px; gap: 2px; }
.sv-seg button {
	border: 0;
	background: transparent;
	color: var(--sv-muted);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 7px;
	cursor: pointer;
	line-height: 1.4;
}
.sv-seg button.is-active { background: var(--sv-card); color: var(--sv-text); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.sv-chart-readout {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	font-size: 12.5px;
	color: var(--sv-muted);
	margin-bottom: 8px;
	min-height: 16px;
}
.sv-chart-readout b { color: var(--sv-text); font-weight: 700; margin-left: 3px; }
.sv-chart-readout .up { color: var(--sv-up); }
.sv-chart-readout .down { color: var(--sv-down); }
.sv-chart-body { position: relative; width: 100%; overflow: hidden; }
.sv-kline-svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.sv-kline-grid { stroke: var(--sv-border); stroke-width: 1; }
.sv-kline-tick { font-size: 10px; fill: var(--sv-faint); font-family: inherit; }
.sv-kline-tick-last { font-weight: 700; }
.sv-kline-cross { stroke: var(--sv-faint); stroke-width: 1; stroke-dasharray: 3 3; }
.sv-kline-dot { fill: var(--sv-card); stroke-width: 2; }
.sv-kline-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11.5px; margin-top: 8px; color: var(--sv-faint); }
.sv-kline-legend b { font-weight: 700; }
.sv-quote-chart .sv-chart-body { min-height: 260px; }

/* ---------- tab-fragment mini charts ---------- */
.sv-mini-chart { width: 100%; margin: 6px 0 2px; overflow: hidden; }
.sv-mini-svg { width: 100%; height: auto; display: block; }
.sv-mini-chart .sv-quotes-empty { margin: 12px 0; }
.sv-chart-caption { font-size: 12px; color: var(--sv-faint); margin: 2px 0 0; }

/* ---------- financials tables ---------- */
.sv-fin-toggle { margin: 4px 0 12px; }
.sv-fin-pane + .sv-fin-toggle { margin-top: 16px; }
.sv-card h3 { font-size: 13.5px; font-weight: 700; color: var(--sv-muted); margin: 4px 0 8px; }
.sv-card h3 small { font-weight: 500; color: var(--sv-faint); }

/* ---------- segment / holder-type bars ---------- */
.sv-segbars { display: flex; flex-direction: column; gap: 9px; margin: 6px 0 4px; }
.sv-segbar-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 3px; }
.sv-segbar-label span:last-child { color: var(--sv-muted); font-variant-numeric: tabular-nums; }
.sv-segbar-track { height: 7px; border-radius: 999px; background: var(--sv-track); overflow: hidden; }
.sv-segbar-track > span { display: block; height: 100%; border-radius: 999px; background: var(--sv-accent); }

/* ---------- news list ---------- */
.sv-newslist { list-style: none; margin: 0; padding: 0; }
.sv-newslist li { padding: 11px 0; border-bottom: 1px solid var(--sv-border); }
.sv-newslist li:last-child { border-bottom: 0; }
.sv-news-title { color: var(--sv-text); font-weight: 600; font-size: 15px; line-height: 1.45; }
.sv-news-meta { display: block; font-size: 12.5px; color: var(--sv-faint); margin-top: 3px; }
.sv-news-tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; color: var(--sv-accent); background: rgba(0, 0, 0, .04); border-radius: 4px; padding: 2px 7px; margin-bottom: 5px; }

/* ---------- narrative + FAQ ---------- */
.sv-story {
	font-size: 15.5px;
	line-height: 1.7;
	color: var(--sv-text);
	background: var(--sv-card);
	border: 1px solid var(--sv-border);
	border-radius: 12px;
	padding: 14px 18px;
	margin: 0 0 14px;
}
.sv-faq details {
	border-bottom: 1px solid var(--sv-border);
	padding: 10px 0;
}
.sv-faq details:last-child { border-bottom: 0; }
.sv-faq summary {
	cursor: pointer;
	font-weight: 600;
	font-size: 15px;
	list-style: none;
}
.sv-faq summary::-webkit-details-marker { display: none; }
.sv-faq summary::before { content: '＋'; color: var(--sv-faint); margin-right: 8px; }
.sv-faq details[open] summary::before { content: '－'; }
.sv-faq p { margin: 8px 0 2px 22px; font-size: 15px; line-height: 1.65; color: var(--sv-muted); }

/* ---------- analyst consensus ---------- */
.sv-consensus { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.sv-rating-badge {
	font-weight: 800;
	font-size: 1.2rem;
	letter-spacing: .02em;
	padding: 8px 18px;
	border-radius: 10px;
	background: var(--sv-chip);
	color: var(--sv-muted);
	text-transform: capitalize;
}
.sv-rating-badge.buy, .sv-rating-badge.strong_buy, .sv-rating-badge.outperform { background: rgba(0, 166, 62, .14); color: var(--sv-up); }
.sv-rating-badge.sell, .sv-rating-badge.strong_sell, .sv-rating-badge.underperform { background: rgba(224, 36, 36, .1); color: var(--sv-down); }
.sv-consensus-sub { font-size: 13px; color: var(--sv-faint); }
.sv-consensus-sub strong { color: var(--sv-text); font-size: 1.05rem; display: block; }

.sv-target { margin-top: 18px; }
.sv-target-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--sv-muted); margin-bottom: 8px; }
.sv-target-track { position: relative; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--sv-border-strong), var(--sv-accent)); }
.sv-target-track .sv-target-cur {
	position: absolute; top: -5px; width: 2px; height: 16px; background: var(--sv-text);
}
.sv-target-track .sv-target-cur::after {
	content: attr(data-label);
	position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
	font-size: 10px; font-weight: 700; white-space: nowrap; color: var(--sv-text);
}
.sv-target-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--sv-faint); margin-top: 6px; }
.sv-target-ends b { display: block; color: var(--sv-text); font-size: 13.5px; }
.sv-target-ends > div:nth-child(2) { text-align: center; }
.sv-target-ends > div:nth-child(3) { text-align: right; }

.sv-bhs { display: flex; overflow: hidden; border-radius: 8px; margin-top: 16px; font-size: 12px; font-weight: 700; color: #fff; height: 24px; }
.sv-bhs span { display: flex; align-items: center; justify-content: center; white-space: nowrap; min-width: 0; }
.sv-bhs-buy { background: var(--sv-up); }
.sv-bhs-hold { background: #9ca3af; }
.sv-bhs-sell { background: var(--sv-down); }

/* ---------- morningstar ---------- */
.sv-ms-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.sv-ms-stars { color: #f0b429; font-size: 1.15rem; letter-spacing: 2px; }
.sv-ms-metric {
	display: inline-flex; flex-direction: column; gap: 1px;
	padding: 6px 12px; border-radius: 9px; background: var(--sv-page-bg); border: 1px solid var(--sv-border);
	font-size: 12.5px; color: var(--sv-muted);
}
.sv-ms-metric b { font-size: 14px; color: var(--sv-text); font-weight: 700; }

/* ---------- collapsible detail blocks ---------- */
.sv-details { margin-top: 10px; border-top: 1px solid var(--sv-border); padding-top: 10px; }
.sv-details summary {
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: var(--sv-text);
	list-style: none;
	display: flex;
	align-items: center;
	gap: 6px;
}
.sv-details summary::-webkit-details-marker { display: none; }
.sv-details summary::before { content: "\25B8"; color: var(--sv-faint); transition: transform .15s; }
.sv-details[open] summary::before { transform: rotate(90deg); }
.sv-details p { font-size: 15px; line-height: 1.7; color: var(--sv-muted); margin: 10px 0 4px; }

/* ---------- dividends / splits / sectors ---------- */
.sv-inline-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sv-inline-list li { border: 1px solid var(--sv-border); border-radius: 9px; padding: 6px 12px; font-size: 13.5px; background: var(--sv-page-bg); }
.sv-inline-list span { color: var(--sv-faint); margin-left: 6px; font-size: 12px; }

.sv-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.sv-chip { background: var(--sv-chip); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; color: var(--sv-muted); font-weight: 500; }

.sv-quote-meta { font-size: 12px; color: var(--sv-faint); margin-top: 18px; text-align: center; }
.sv-quote-meta-sep { margin: 0 6px; }
.sv-quote-disclaimer { font-size: 12px; color: var(--sv-faint); margin-top: 6px; text-align: center; }
.sv-quote-list { list-style: none; padding: 0; }
.sv-quote-list a { text-decoration: none; }
.sv-quote-list span { color: var(--sv-faint); font-size: 12px; margin-left: 6px; }

/* ---------- centered "not found" / search-result state ---------- */
.sv-quote-notfound { max-width: 640px; margin: 24px auto 40px; text-align: center; }
.sv-quote-notfound h1 { margin: 0 0 10px; }
.sv-quote-notfound .sv-quotes-empty { padding: 0 0 4px; }
.sv-quote-notfound code { background: var(--sv-chip); padding: 1px 6px; border-radius: 4px; }
.sv-quote-list--center {
	display: flex; flex-wrap: wrap; gap: 8px 10px;
	justify-content: center; margin: 14px 0 0;
}
.sv-quote-list--center li { display: inline-flex; }
.sv-quote-list--center a {
	display: inline-flex; align-items: baseline; gap: 6px;
	padding: 7px 13px; border: 1px solid var(--sv-border, #e5e7eb);
	border-radius: 999px; background: #fff; font-size: 14px; color: #111827;
}
.sv-quote-list--center span { margin-left: 0; }
.sv-btn {
	display: inline-block; margin-top: 14px; padding: 10px 20px;
	background: #0f5af0; color: #fff; border-radius: 10px;
	text-decoration: none; font-weight: 600; font-size: 14px;
}

/* ---------- two-column layout: main content + right rail ---------- */
.sv-quote-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 20px;
	align-items: start;
}
.sv-quote-main { min-width: 0; }
.sv-quote-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 76px; }
.sv-tabs--sticky ~ .sv-quote-layout .sv-quote-sidebar { top: 60px; }
.sv-side-card { padding: 16px 18px; margin-top: 0; }
.sv-side-card > h2 { font-size: 15px; margin-bottom: 10px; }
.sv-side-card > h2 small { font-weight: 500; color: var(--sv-faint); font-size: 12px; }
.sv-side-list { list-style: none; margin: 0; padding: 0; }
.sv-side-list li { border-bottom: 1px solid var(--sv-border); }
.sv-side-list li:last-child { border-bottom: 0; }
.sv-side-list a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 9px 0;
	text-decoration: none;
	color: inherit;
}
.sv-side-list a:hover .sv-side-name { text-decoration: underline; }
.sv-side-name { display: flex; flex-direction: column; font-size: 13.5px; font-weight: 600; }
.sv-side-name b { font-weight: 500; font-size: 12px; color: var(--sv-faint); }
.sv-side-price { text-align: right; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.sv-side-price em { display: block; font-style: normal; font-size: 12px; font-weight: 600; }
.sv-dir-up .sv-side-price, .sv-dir-up .sv-side-price em { color: var(--sv-up); }
.sv-dir-down .sv-side-price, .sv-dir-down .sv-side-price em { color: var(--sv-down); }
.sv-side-reads { list-style: none; margin: 0; padding: 0; }
.sv-side-reads li { padding: 9px 0; border-bottom: 1px solid var(--sv-border); }
.sv-side-reads li:last-child { border-bottom: 0; }
.sv-side-reads a { font-size: 13.5px; font-weight: 600; text-decoration: none; color: inherit; line-height: 1.45; }
.sv-side-reads a:hover { text-decoration: underline; }
.sv-side-tag {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--sv-accent);
	margin-bottom: 3px;
}

/* [sv_quotes_active layout="list"]: reuses .sv-card/.sv-side-list,
   which normally get their --sv-* tokens from the .sv-quote-page wrapper
   on the single-stock template. This shortcode runs anywhere (front page,
   theme sidebar widgets) with no such wrapper, so it carries its own copy
   of just the tokens those classes need. */
.sv-active-widget {
	--sv-card: #ffffff;
	--sv-border: #e5e7eb;
	--sv-faint: #5c6675;
	--sv-text: #111827;
	--sv-muted: #374151;
}

/* =========================================================================
 *  [sv_market_overview]: homepage "quant score" scoreboard - a scrolling
 *  ticker of individual stock scores, a tracked-universe Quant Score gauge
 *  with its factor breakdown, and a most-watched grid. Daily snapshot (not
 *  live-ticking); designed to be self-contained and screenshot-worthy.
 *  Same --sv-* token trick as .sv-active-widget above, since this runs
 *  outside .sv-quote-page.
 * ====================================================================== */
.sv-scoreboard {
	--sv-card: #ffffff;
	--sv-border: #e5e7eb;
	--sv-faint: #5c6675;
	--sv-text: #111827;
	--sv-muted: #374151;
	--sv-page-bg: #f5f6f8;
	margin: 1.5em 0;
}
.sv-score-good { color: var(--sv-up); }
.sv-score-mid { color: #b45309; }
.sv-score-bad { color: var(--sv-down); }

.sv-ticker {
	background: var(--sv-page-bg);
	border: 1px solid var(--sv-border);
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 14px;
}
/* Seamless auto-scroll: .sv-ticker-track holds two identical
   .sv-ticker-set copies back to back and slides the whole thing left by
   exactly one copy's width (-50% of the track, since both copies are the
   same width) on an infinite loop - the instant it resets, the pixels on
   screen are identical to the frame before, so the loop point is
   invisible. width: max-content keeps the track sized to its real content
   instead of being clamped to the visible .sv-ticker box. */
.sv-ticker-track {
	display: flex;
	width: max-content;
	animation: sv-ticker-scroll 34s linear infinite;
	will-change: transform;
}
.sv-ticker:hover .sv-ticker-track,
.sv-ticker:focus-within .sv-ticker-track {
	animation-play-state: paused;
}
@keyframes sv-ticker-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
.sv-ticker-set {
	display: flex;
	align-items: center;
	gap: 22px;
	padding: 12px 18px;
	flex: none;
}
.sv-ticker-item {
	display: flex;
	align-items: baseline;
	gap: 7px;
	white-space: nowrap;
	text-decoration: none;
	flex: none;
}
.sv-ticker-index b { color: var(--sv-muted); }
.sv-ticker-item b { color: var(--sv-text); font-weight: 700; font-size: 13.5px; }
.sv-ticker-item span { font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; gap: 2px; }
.sv-ticker-pct.sv-dir-up { color: var(--sv-up); }
.sv-ticker-pct.sv-dir-down { color: var(--sv-down); }
.sv-ticker-arrow { font-style: normal; font-size: 9px; }
.sv-ticker-arrow.sv-dir-up { color: var(--sv-up); }
.sv-ticker-arrow.sv-dir-down { color: var(--sv-down); }
.sv-ticker-meta { color: var(--sv-faint); font-size: 12px; padding-left: 4px; border-left: 1px solid var(--sv-border); }
.sv-ticker-meta b { color: var(--sv-muted); font-weight: 700; }

.sv-scoreboard-grid {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.35fr) minmax(260px, 1.35fr);
	gap: 16px;
	align-items: stretch;
}
.sv-scoreboard .sv-card {
	background: var(--sv-card);
	border: 1px solid var(--sv-border);
	border-radius: 14px;
	padding: 20px 22px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.sv-scoreboard .sv-card h2 {
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 700;
	color: var(--sv-faint);
	text-transform: uppercase;
	letter-spacing: .04em;
}

.sv-score-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.sv-gauge { position: relative; width: 168px; height: 168px; margin: 4px auto 6px; }
.sv-gauge svg { width: 100%; height: 100%; }
.sv-gauge-track, .sv-gauge-fill {
	fill: none;
	stroke-width: 10;
	stroke-linecap: round;
}
.sv-gauge-track { stroke: var(--sv-border); }
.sv-gauge-fill { transition: stroke-dasharray .3s ease; }
.sv-gauge-fill.sv-score-good { stroke: var(--sv-up); }
.sv-gauge-fill.sv-score-mid { stroke: #d97706; }
.sv-gauge-fill.sv-score-bad { stroke: var(--sv-down); }
.sv-gauge-mid {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
}
.sv-gauge-value { font-size: 2.4rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.sv-gauge-label { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--sv-muted); }
.sv-score-spy { margin: 4px 0 0; font-size: 13px; color: var(--sv-muted); }
.sv-score-spy span { font-weight: 700; margin-left: 4px; }
.sv-score-spy.sv-dir-up span { color: var(--sv-up); }
.sv-score-spy.sv-dir-down span { color: var(--sv-down); }
.sv-score-asof { margin: 10px 0 0; font-size: 12px; color: var(--sv-faint); }

.sv-factor-list { display: flex; flex-direction: column; gap: 14px; }
.sv-factor-row { display: grid; grid-template-columns: 108px 1fr 30px; align-items: center; gap: 10px; }
.sv-factor-name { font-size: 13.5px; font-weight: 600; color: var(--sv-text); }
.sv-factor-bar { position: relative; height: 8px; border-radius: 999px; background: var(--sv-page-bg); overflow: hidden; }
.sv-factor-bar-fill { position: absolute; inset: 0; border-radius: 999px; }
.sv-factor-bar-fill.sv-score-good { background: var(--sv-up); }
.sv-factor-bar-fill.sv-score-mid { background: #d97706; }
.sv-factor-bar-fill.sv-score-bad { background: var(--sv-down); }
.sv-factor-score { font-size: 13.5px; font-weight: 700; color: var(--sv-text); text-align: right; font-variant-numeric: tabular-nums; }
.sv-factor-note { margin: 16px 0 0; font-size: 12px; line-height: 1.6; color: var(--sv-faint); }

.sv-watchlist-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sv-watchlist-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 5px;
	min-width: 0;
	padding: 9px 9px;
	border: 1px solid var(--sv-border);
	border-radius: 10px;
	text-decoration: none;
	overflow: hidden;
}
.sv-watchlist-code { font-size: 12px; font-weight: 700; color: var(--sv-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-watchlist-score { font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; flex: none; }
.sv-watchlist-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sv-watchlist-more { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--sv-accent); text-decoration: none; }
.sv-watchlist-more:hover { text-decoration: underline; }

.sv-scoreboard-foot {
	margin: 12px 2px 0;
	font-size: 11.5px;
	line-height: 1.6;
	color: var(--sv-faint);
	text-align: center;
}
.sv-scoreboard-foot strong { color: var(--sv-muted); }

@media (max-width: 900px) {
	.sv-scoreboard-grid { grid-template-columns: 1fr 1fr; }
	.sv-score-card { grid-column: 1 / -1; flex-direction: row; justify-content: space-around; text-align: left; }
	.sv-score-card h2 { width: 100%; }
}
@media (max-width: 560px) {
	.sv-scoreboard-grid { grid-template-columns: 1fr; }
	.sv-score-card { flex-direction: column; text-align: center; }
	.sv-watchlist-grid { grid-template-columns: repeat(2, 1fr); }
	.sv-ticker-set { gap: 16px; padding: 10px 14px; }
	.sv-gauge { width: 140px; height: 140px; }
	.sv-gauge-value { font-size: 2rem; }
}

/* ---------- AI features ---------- */
.sv-ai-card { border-color: rgba(124, 92, 255, .35); background: linear-gradient(180deg, rgba(124, 92, 255, .05), var(--sv-card) 70px); }
.sv-ai-spark { color: var(--sv-ai); }
.sv-ai-card > h2 small a { color: var(--sv-ai); text-decoration: none; font-weight: 600; }
.sv-ai-card > h2 small a:hover { text-decoration: underline; }
.sv-ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.sv-ai-block { border: 1px solid var(--sv-border); border-radius: 12px; padding: 14px 16px; background: var(--sv-page-bg); }
.sv-ai-block-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sv-ai-label { font-size: 12.5px; font-weight: 700; color: var(--sv-muted); text-transform: uppercase; letter-spacing: .02em; }
.sv-ai-grade { font-weight: 800; font-size: 1.2rem; margin-left: auto; }
.sv-ai-grade-a, .sv-ai-grade-b { color: var(--sv-up); }
.sv-ai-grade-c { color: var(--sv-muted); }
.sv-ai-grade-d, .sv-ai-grade-f { color: var(--sv-down); }
.sv-ai-score { font-size: 12.5px; color: var(--sv-faint); }
.sv-ai-tag { margin-left: auto; font-weight: 700; font-size: 13.5px; padding: 2px 10px; border-radius: 999px; background: var(--sv-chip); }
.sv-ai-tag.sv-dir-up { background: rgba(0, 166, 62, .14); color: var(--sv-up); }
.sv-ai-tag.sv-dir-down { background: rgba(224, 36, 36, .1); color: var(--sv-down); }
.sv-ai-tag.sv-dir-flat { color: var(--sv-muted); }
.sv-ai-gauge { position: relative; height: 6px; border-radius: 999px; margin: 4px 0 12px; background: linear-gradient(90deg, var(--sv-down), var(--sv-track) 50%, var(--sv-up)); }
.sv-ai-gauge > span { position: absolute; top: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--sv-card); border: 3px solid var(--sv-text); transform: translateY(-50%); }
.sv-ai-reasons { list-style: none; margin: 0; padding: 0; font-size: 13.5px; line-height: 1.6; color: var(--sv-muted); }
.sv-ai-reasons li { padding: 3px 0 3px 14px; position: relative; }
.sv-ai-reasons li::before { content: '·'; position: absolute; left: 2px; color: var(--sv-ai); font-weight: 800; }
.sv-ai-disclaimer { font-size: 12px; color: var(--sv-faint); margin: 14px 0 0; }

/* Single-metric mini cards on non-Overview tabs (Valuation/Analysts/
   Ownership/Financials): same visuals, minus the outer grid/box since
   there's only one block, and the h2 already carries the metric name. */
.sv-ai-mini .sv-ai-block { border: 0; padding: 0; background: transparent; }
.sv-ai-mini .sv-ai-grade, .sv-ai-mini .sv-ai-tag { margin-left: 0; }
.sv-ai-mini .sv-ai-score { margin-left: 6px; }

/* AI Analyst Revision Trend: stacked upgrade/downgrade count bar. */
.sv-ai-bar { display: flex; height: 22px; border-radius: 7px; overflow: hidden; margin: 2px 0 6px; background: var(--sv-track); }
.sv-ai-bar span { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; min-width: 0; }
.sv-ai-bar-up { background: var(--sv-up); }
.sv-ai-bar-down { background: var(--sv-down); }
.sv-ai-bar-legend { display: flex; gap: 14px; font-size: 12px; color: var(--sv-muted); margin-bottom: 10px; }
.sv-ai-bar-legend b { font-style: normal; margin-right: 4px; }
.sv-ai-bar-legend b.sv-dir-up { color: var(--sv-up); }
.sv-ai-bar-legend b.sv-dir-down { color: var(--sv-down); }

/* AI Fair Value: implied price-range bar (avg-P/E band x EPS), current
   price marked against it - same idea as the analyst target-price bar,
   styled in the AI accent to read as a distinct module. */
.sv-ai-range { margin: 2px 0 6px; }
.sv-ai-range-track { position: relative; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--sv-up), var(--sv-track) 50%, var(--sv-down)); margin-top: 14px; }
.sv-ai-range-mid { position: absolute; top: -4px; width: 2px; height: 14px; background: var(--sv-faint); }
.sv-ai-range-cur { position: absolute; top: -6px; width: 3px; height: 18px; border-radius: 2px; background: var(--sv-ai); }
.sv-ai-range-cur::after {
	content: attr(data-label);
	position: absolute; top: -17px; left: 50%; transform: translateX(-50%);
	font-size: 10.5px; font-weight: 700; white-space: nowrap; color: var(--sv-ai);
}
.sv-ai-range-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--sv-faint); margin-top: 6px; }
.sv-ai-range-ends > div:nth-child(2), .sv-ai-range-ends span:nth-child(2) { text-align: center; }

/* Tablet (e.g. iPad portrait, ~768-1024px): the grids already reflow via
   auto-fit/minmax, but padding/type scale were untouched above 560px, so
   this width sat squarely between "full desktop" and "mobile" with neither
   treatment. Trim spacing without going all the way to the phone layout. */
@media (max-width: 1024px) {
	.sv-quote-inner { padding: 24px 20px 48px; }
	.sv-hero { padding: 22px 20px; }
	.sv-card { padding: 20px; }
	.sv-hero-last { font-size: 2.4rem; }

	/* Right rail stacks below the main content instead of squeezing it. */
	.sv-quote-layout { grid-template-columns: 1fr; }
	.sv-quote-sidebar { position: static; }
	.sv-ai-grid { grid-template-columns: 1fr; }

	/* Tables were flat 14px/9-12px padding at every width. On a tablet the
	   text is still comfortably legible a notch smaller, and the tighter
	   padding lets a couple more columns (e.g. financials' year columns)
	   sit on screen before the horizontal scroll shadow kicks in. */
	.sv-quotes-table { font-size: 14.5px; }
	.sv-quotes-table th,
	.sv-quotes-table td { padding: 8px 10px; }
}

@media (max-width: 560px) {
	.sv-quote-inner { padding: 16px 12px 48px; }
	.sv-hero { padding: 18px 16px; }
	.sv-card { padding: 16px; border-radius: 12px; }
	.sv-hero-top { flex-direction: column; }
	.sv-hero-price { text-align: left; }
	.sv-hero-last { font-size: 2.1rem; }
	.sv-stat-list { grid-template-columns: 1fr; }

	/* Chart control rows (style / period / range / indicator) were full
	   desktop size, so 4 wrapped rows ate most of the first screen before
	   the chart itself appeared. Shrink the buttons so more fit per row. */
	.sv-chart-head { gap: 6px 8px; }
	.sv-seg { padding: 2px; gap: 1px; }
	.sv-seg button { padding: 4px 8px; font-size: 12.5px; }

	/* Phone width: drop one more notch from the tablet size above and trim
	   padding further so 3-4 columns are visible without scrolling on a
	   ~375px screen, while staying above the ~12px floor that starts
	   hurting legibility for tabular numerals. The sticky first column
	   also gets a touch narrower so it doesn't eat too much of the
	   viewport before the scrollable columns even start. */
	.sv-quotes-table { font-size: 13.5px; }
	.sv-quotes-table th,
	.sv-quotes-table td { padding: 7px 8px; }
	.sv-quotes-table td:first-child,
	.sv-quotes-table th:first-child { max-width: 108px; }
	.sv-code { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.sv-ticker-track { animation: none; }
}

/* =========================================================================
 *  Dark mode
 * ====================================================================== */
@media (prefers-color-scheme: dark) {
	.sv-quotes-table th { background: rgba(255, 255, 255, .04); color: #9ca3af; }
	.sv-quotes-table td:first-child,
	.sv-quotes-table th:first-child { background: #14161a; }
	.sv-quotes-table th,
	.sv-quotes-table td { border-bottom-color: rgba(255, 255, 255, .09); }
	.sv-code { color: #6b7280; }

	.sv-active-widget,
	.sv-scoreboard {
		--sv-card: #16181d;
		--sv-border: #262a31;
		--sv-faint: #6b7280;
		--sv-text: #e5e7eb;
		--sv-muted: #9ca3af;
		--sv-page-bg: #1c1f25;
	}
	.sv-gauge-fill.sv-score-mid, .sv-factor-bar-fill.sv-score-mid { background: #f0a93d; stroke: #f0a93d; }
	.sv-score-mid { color: #f0a93d; }

	.sv-quote-page {
		--sv-page-bg: #0e1013;
		--sv-card: #16181d;
		--sv-border: #262a31;
		--sv-border-strong: #363b44;
		--sv-text: #e5e7eb;
		--sv-muted: #9ca3af;
		--sv-faint: #6b7280;
		--sv-track: #262a31;
		--sv-chip: #22252b;
		--sv-ai: #a389ff;
	}
	.sv-hero, .sv-card { box-shadow: none; }
	.sv-stickybar { background: rgba(22, 24, 29, .92); border-bottom-color: #262a31; color: #e5e7eb; }
	.sv-stickybar-sym { color: #6b7280; }
	.sv-kline-dot { fill: #16181d; }
	.sv-ai-card { background: linear-gradient(180deg, rgba(124, 92, 255, .1), var(--sv-card) 70px); }
}

/* =========================================================================
 *  Reader sentiment vote  (bullish / bearish, under the hero price).
 *  Horizontal band: [ title ][ meter fills the slack ][ vote buttons ],
 *  disclaimer on its own line. The meter is always present (grey when there
 *  are no votes) so the card never has an empty right half on wide screens.
 * ====================================================================== */
.sv-sentiment {
	background: var(--sv-card);
	border: 1px solid var(--sv-border);
	border-radius: 14px;
	padding: 14px 20px 12px;
	margin: 14px 0 4px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px 26px;
}
.sv-sent-head { flex: 0 0 auto; display: flex; flex-direction: column; gap: 1px; }
.sv-sent-title { font-size: 15px; font-weight: 700; color: var(--sv-text); letter-spacing: -.01em; }
.sv-sent-sub { font-size: 12px; color: var(--sv-faint); }

.sv-sent-body { flex: 1 1 300px; min-width: 190px; }
.sv-sent-bar {
	display: flex; height: 12px; border-radius: 999px; overflow: hidden;
	background: var(--sv-track); box-shadow: inset 0 1px 2px rgba(16, 24, 40, .09);
}
.sv-sent-bar-bull, .sv-sent-bar-bear { width: 0; transition: width .5s cubic-bezier(.4, 0, .2, 1); }
.sv-sent-bar-bull { background: linear-gradient(90deg, #0a9f48, #00c257); }
.sv-sent-bar-bear { background: linear-gradient(90deg, #f1584f, #e02424); }
.sv-sent-bar[data-state="live"] .sv-sent-bar-bear,
.sv-sent-bar[data-state="faint"] .sv-sent-bar-bear { margin-left: 2px; }
.sv-sent-bar[data-state="faint"] .sv-sent-bar-bull,
.sv-sent-bar[data-state="faint"] .sv-sent-bar-bear { opacity: .4; }

.sv-sent-legend {
	display: flex; justify-content: space-between; align-items: baseline; gap: 6px 16px;
	margin-top: 8px; font-size: 12.5px; color: var(--sv-muted);
	font-variant-numeric: tabular-nums; flex-wrap: wrap;
}
.sv-sent-legend .sv-sent-pct-bull b { color: var(--sv-up); font-weight: 800; font-size: 14.5px; }
.sv-sent-legend .sv-sent-pct-bear b { color: var(--sv-down); font-weight: 800; font-size: 14.5px; }
.sv-sent-count { color: var(--sv-faint); font-size: 12px; }
.sv-sent-q { font-weight: 800; }
.sv-sent-q-bullish { color: var(--sv-up); }
.sv-sent-q-bearish { color: var(--sv-down); }
.sv-sent-q-neutral { color: var(--sv-muted); }

.sv-sent-actions { flex: 0 0 auto; display: flex; gap: 10px; }
.sv-sent-foot { flex: 1 0 100%; font-size: 11.5px; color: var(--sv-faint); margin: 6px 0 0; }
.sv-sent-foot.is-warn { color: var(--sv-down); font-weight: 600; }

.sv-sent-btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 9px 18px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 700;
	cursor: pointer; border: 1.5px solid; background: var(--sv-card); color: var(--sv-muted);
	transition: background .15s ease, color .15s ease, border-color .15s ease, transform .08s ease, box-shadow .15s ease;
	white-space: nowrap;
}
.sv-sent-btn svg { flex: none; width: 19px; height: 19px; }
.sv-sent-btn:active { transform: scale(.96); }
.sv-sent-bull { color: var(--sv-up); border-color: rgba(0, 166, 62, .45); }
.sv-sent-bull:hover { background: rgba(0, 166, 62, .08); }
.sv-sent-bull.is-voted { background: var(--sv-up); color: #fff; border-color: var(--sv-up); box-shadow: 0 3px 10px rgba(0, 166, 62, .32); }
.sv-sent-bear { color: var(--sv-down); border-color: rgba(224, 36, 36, .45); }
.sv-sent-bear:hover { background: rgba(224, 36, 36, .08); }
.sv-sent-bear.is-voted { background: var(--sv-down); color: #fff; border-color: var(--sv-down); box-shadow: 0 3px 10px rgba(224, 36, 36, .32); }

.sv-sent-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.sv-sentiment.is-loading .sv-sent-bar { position: relative; }
.sv-sentiment.is-loading .sv-sent-bar::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(90deg, var(--sv-track) 0%, var(--sv-chip) 50%, var(--sv-track) 100%);
	background-size: 200% 100%; animation: sv-sent-shim 1.2s linear infinite;
}
.sv-sentiment.is-loading .sv-sent-legend { visibility: hidden; }
.sv-sentiment.is-loading .sv-sent-btn { opacity: .5; pointer-events: none; }
@keyframes sv-sent-shim { to { background-position: -200% 0; } }

@media (max-width: 680px) {
	.sv-sentiment { gap: 8px 16px; }
	.sv-sent-body { flex-basis: 100%; order: 3; }
	.sv-sent-actions { order: 2; width: 100%; }
	.sv-sent-btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	.sv-sent-bar-bull, .sv-sent-bar-bear { transition: none; }
	.sv-sentiment.is-loading .sv-sent-bar::after { animation: none; }
}
@media (prefers-color-scheme: dark) {
	.sv-sent-bull:hover { background: rgba(0, 166, 62, .16); }
	.sv-sent-bear:hover { background: rgba(224, 36, 36, .16); }
}

/* sidebar "Explore" contextual links */
.sv-side-explore-list{list-style:none;margin:0;padding:0}
.sv-side-explore-list li{border-bottom:1px solid var(--sv-border,#e7ebf0)}
.sv-side-explore-list li:last-child{border-bottom:0}
.sv-side-explore-list a{display:flex;justify-content:space-between;gap:10px;padding:10px 2px;font-size:13.5px;font-weight:600;color:var(--sv-ink,#0b1220);text-decoration:none}
.sv-side-explore-list a:hover{color:var(--sv-accent)}
.sv-side-explore-list a span{color:var(--sv-accent)}
