/*
 * Overall Signals widgets.
 * Every colour and font is a variable, so a theme can restyle without overriding rules.
 */
.ovs {
	--ovs-font: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--ovs-ink: currentColor;
	--ovs-muted: color-mix(in srgb, currentColor 60%, transparent);
	--ovs-rule: color-mix(in srgb, currentColor 14%, transparent);
	--ovs-track: color-mix(in srgb, currentColor 8%, transparent);
	--ovs-bar: #2340d8;
	--ovs-up: #1d7a50;
	--ovs-down: #b23a2b;
	--ovs-new: #2340d8;
	--ovs-urgent: #b23a2b;
	--ovs-live: #1d7a50;

	container-type: inline-size;
	font-family: var(--ovs-font);
	font-size: 1rem;
	line-height: 1.45;
	color: var(--ovs-ink);
	margin-block: 2rem;
}
@media (prefers-color-scheme: dark) {
	.ovs:not(.ovs-themed) { --ovs-bar: #93a6ff; --ovs-up: #5fd39a; --ovs-down: #ff8e7e; --ovs-new: #93a6ff; --ovs-urgent: #ff8e7e; --ovs-live: #5fd39a; }
}
.ovs *, .ovs *::before, .ovs *::after { box-sizing: border-box; }
.ovs[aria-busy="true"] { cursor: progress; }
.ovs p { margin: 0; }

/* Lead statement: the one loud element. */
.ovs-lead { display: grid; gap: 0.9rem; margin-bottom: 2.5rem; }
.ovs-lead-statement {
	font-size: clamp(2rem, 1.2rem + 4.2cqi, 4.75rem);
	line-height: 1.02;
	letter-spacing: -0.035em;
	font-weight: 650;
	max-width: 17ch;
	text-wrap: balance;
}
.ovs-lead-sub { color: var(--ovs-muted); font-size: 1.0625rem; }

.ovs-status { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--ovs-muted); }
.ovs-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ovs-muted); flex: none; }
.ovs-status.is-ok .ovs-dot { background: var(--ovs-live); box-shadow: 0 0 0 0 var(--ovs-live); animation: ovs-pulse 2.4s ease-out infinite; }
.ovs-status.is-late .ovs-dot { background: #c98a12; }
.ovs-status.is-stale .ovs-dot { background: var(--ovs-down); }
@keyframes ovs-pulse {
	0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ovs-live) 55%, transparent); }
	70%, 100% { box-shadow: 0 0 0 0.45rem transparent; }
}
/* Tabular figures only where numbers line up; elsewhere they space out punctuation. */
.ovs-table td, .ovs-countdown-n, .ovs-change, .ovs-share-num { font-variant-numeric: tabular-nums; }

/* Table */
.ovs-table-wrap { overflow-x: auto; border-radius: 2px; }
.ovs-table-wrap:focus-visible { outline: 2px solid var(--ovs-bar); outline-offset: 4px; }
.ovs-table { width: 100%; border-collapse: collapse; min-width: 30rem; }
.ovs-table caption { text-align: left; font-size: 1.25rem; font-weight: 650; letter-spacing: -0.01em; padding-bottom: 0.75rem; }
.ovs-table th, .ovs-table td { padding: 0.7rem 1rem 0.7rem 0; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--ovs-rule); }
.ovs-table thead th { font-size: 0.8125rem; font-weight: 500; color: var(--ovs-muted); padding-top: 0; }
.ovs-table tbody th { font-weight: 550; white-space: nowrap; }
.ovs-table .num { text-align: right; white-space: nowrap; }
.ovs-table tr > :last-child { padding-right: 0; }
.ovs-col-share { width: 38%; }
.ovs-share-wrap { display: flex; align-items: center; gap: 0.75rem; }
.ovs-bar { position: relative; flex: 1; height: 0.5rem; border-radius: 1px; background: var(--ovs-track); overflow: hidden; }
.ovs-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--ovs-v, 0) * 100%); background: var(--ovs-bar); }
.ovs-share-num { min-width: 3.5rem; text-align: right; }
.ovs-col-trend { width: 6.5rem; color: var(--ovs-muted); }
.ovs-spark { display: block; width: 6rem; height: 1.5rem; overflow: visible; }

.ovs-change { font-weight: 600; white-space: nowrap; }
.ovs-change.is-up { color: var(--ovs-up); }
.ovs-change.is-down { color: var(--ovs-down); }
.ovs-change.is-new { color: var(--ovs-new); }
.ovs-change.is-flat { color: var(--ovs-muted); }

/* Movers */
.ovs-movers { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.5rem 3rem; margin-top: 2.25rem; }
.ovs-mover-title { font-size: 1rem; font-weight: 650; margin: 0 0 0.5rem; }
.ovs-mover-list { list-style: none; margin: 0; padding: 0; }
.ovs-mover-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--ovs-rule); }
.ovs-mover-name { font-weight: 500; }

/* Open calls: a countdown */
.ovs-call-list { list-style: none; margin: 0; padding: 0; }
.ovs-call { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.25rem; padding: 1rem 0; border-bottom: 1px solid var(--ovs-rule); }
.ovs-call:first-child { padding-top: 0; }
.ovs-countdown { display: flex; flex-direction: column; line-height: 1; }
.ovs-countdown-n { font-size: 2.25rem; font-weight: 650; letter-spacing: -0.03em; }
.ovs-countdown-n.is-today { font-size: 1.25rem; padding-top: 0.35rem; }
.ovs-countdown-u { font-size: 0.8125rem; color: var(--ovs-muted); margin-top: 0.3rem; }
.ovs-call.is-urgent .ovs-countdown-n { color: var(--ovs-urgent); }
.ovs-call-body { min-width: 0; }
.ovs-call-title { color: inherit; font-weight: 550; font-size: 1.0625rem; line-height: 1.3; text-decoration: underline; text-decoration-color: var(--ovs-rule); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
.ovs-call-title:hover { text-decoration-color: currentColor; }
.ovs-call-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; margin-top: 0.35rem; font-size: 0.875rem; color: var(--ovs-muted); }
.ovs-subhead { font-size: 1rem; font-weight: 650; margin: 2rem 0 0.5rem; }
.ovs-undated { list-style: none; margin: 0; padding: 0; }
.ovs-undated li { padding: 0.5rem 0; border-bottom: 1px solid var(--ovs-rule); }
.ovs-undated a { color: inherit; font-weight: 500; }
.ovs-undated .ovs-source { display: block; font-size: 0.875rem; color: var(--ovs-muted); }

.ovs-note { font-size: 0.875rem; color: var(--ovs-muted); margin-top: 1.25rem !important; max-width: 60ch; }
.ovs-note a { color: inherit; }
.ovs-empty { color: var(--ovs-muted); }
.ovs a:focus-visible { outline: 2px solid var(--ovs-bar); outline-offset: 2px; border-radius: 1px; }

/* Narrow containers (sidebars, phones) */
@container (max-width: 34rem) {
	.ovs-table { min-width: 0; }
	.ovs-col-trend { display: none; }
	.ovs-col-share { width: auto; }
	.ovs-bar { display: none; }
	.ovs-call { grid-template-columns: 4rem 1fr; gap: 1rem; }
	.ovs-countdown-n { font-size: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
	.ovs-status.is-ok .ovs-dot { animation: none; }
}
