/*
 * WH Ticker front-end styles.
 *
 * No font-family is set anywhere: everything inherits the site's font.
 * Flat design: thin borders, no shadows. Colours adapt to light or dark sites
 * because text and surfaces are derived from the inherited text colour.
 *
 * Override any token on .whtk-card or .whtk-archive from your theme, e.g.
 *   .whtk-card, .whtk-archive { --whtk-accent: #00b67a; }
 */

.whtk-card,
.whtk-archive {
	--whtk-accent: #1f2937;
	--whtk-bull: #4c9a2a;
	--whtk-neutral: #e0a030;
	--whtk-bear: #d9534f;
	--whtk-bull-ink: #2f7d32;
	--whtk-neutral-ink: #9a6200;
	--whtk-bear-ink: #b3322a;
	--whtk-line: rgba(128, 128, 128, 0.32);
	--whtk-line-soft: rgba(128, 128, 128, 0.2);
	--whtk-fill: rgba(128, 128, 128, 0.1);

	box-sizing: border-box;
	font-size: 0.875em;
	line-height: 1.5;
}

.whtk-card *,
.whtk-archive * {
	box-sizing: border-box;
}

/* ---------- Shared pieces ---------- */

.whtk-eyebrow {
	font-size: 0.78em;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.7;
}

.whtk-note {
	font-size: 0.85em;
	opacity: 0.65;
}

.whtk-badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 4px;
	background: #ff4931;
	color: #fff!important;
	font-size: 0.86em;
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1.4;
	text-transform: uppercase;
	text-decoration: none;
}

a.whtk-badge:hover,
a.whtk-badge:focus {
	color: #fff;
	opacity: 0.85;
}

.whtk-tag {
	display: inline-block;
	padding: 3px 8px;
	border: 1px solid var(--whtk-line);
	border-radius: 4px;
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-align: center;
	text-transform: uppercase;
	opacity: 0.85;
}

.whtk-tag--analysis {
	border-color: transparent;
	background: var(--whtk-fill);
}

.whtk-pill {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.3;
	text-transform: uppercase;
	white-space: nowrap;
}

.whtk-pill--bull {
	background: rgba(76, 154, 42, 0.18);
	color: var(--whtk-bull-ink);
	color: color-mix(in srgb, var(--whtk-bull-ink) 55%, currentColor);
}

.whtk-pill--neutral {
	background: rgba(224, 160, 48, 0.2);
	color: var(--whtk-neutral-ink);
	color: color-mix(in srgb, var(--whtk-neutral-ink) 55%, currentColor);
}

.whtk-pill--bear {
	background: rgba(217, 83, 79, 0.18);
	color: var(--whtk-bear-ink);
	color: color-mix(in srgb, var(--whtk-bear-ink) 55%, currentColor);
}

.whtk-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: inherit;
	font-size: 0.78em;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
}

.whtk-link:hover,
.whtk-link:focus {
	color: inherit;
	opacity: 0.7;
}

.whtk-link svg {
	width: 12px;
	height: 12px;
	fill: currentColor;
}

/* ---------- Post card ---------- */

.whtk-card {
	margin: 0 0 1.5em;
	padding: 16px;
	border: 1px solid var(--whtk-line);
	border-radius: 12px;
}

.whtk-card__top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.whtk-card__id {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.whtk-card__name {
	font-weight: 600;
}

.whtk-card__price {
	margin-top: 14px;
}

.whtk-card__value {
	font-size: 2.15em;
	font-weight: 600;
	line-height: 1.1;
}

.whtk-card__stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 10px;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--whtk-line-soft);
}

.whtk-card__stat-value {
	margin-top: 2px;
	font-size: 1.15em;
	font-weight: 600;
}

.whtk-card__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--whtk-line-soft);
}

/* ---------- Archive: hero ---------- */

.whtk-hero {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.whtk-hero__main {
	flex: 1 1 320px;
	max-width: 560px;
}

.whtk-hero__logo img {
	display: block;
	width: auto;
	max-width: 160px;
	max-height: 48px;
	margin-bottom: 12px;
}

.whtk-hero__ident {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.whtk-hero__name {
	margin: 8px 0 6px;
	font-size: 1.6em;
	font-weight: 600;
	line-height: 1.25;
}

.whtk-hero__summary {
	margin: 0 0 10px;
	opacity: 0.8;
}

.whtk-hero__summary p {
	margin: 0 0 0.6em;
}

.whtk-hero__price {
	text-align: right;
}

.whtk-hero__value {
	font-size: 2.3em;
	font-weight: 600;
	line-height: 1.1;
}

/* ---------- Archive: blocks ---------- */

.whtk-block {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--whtk-line-soft);
}

/* Sentiment meters */

.whtk-meters {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px 24px;
}

.whtk-meter__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px 12px;
}

.whtk-meter__figure {
	font-size: 0.95em;
	font-weight: 600;
}

.whtk-meter__figure--bull {
	color: var(--whtk-bull-ink);
	color: color-mix(in srgb, var(--whtk-bull-ink) 55%, currentColor);
}

.whtk-meter__figure--neutral {
	color: var(--whtk-neutral-ink);
	color: color-mix(in srgb, var(--whtk-neutral-ink) 55%, currentColor);
}

.whtk-meter__figure--bear {
	color: var(--whtk-bear-ink);
	color: color-mix(in srgb, var(--whtk-bear-ink) 55%, currentColor);
}

.whtk-meter__bar {
	display: flex;
	gap: 2px;
	height: 10px;
	margin: 8px 0 6px;
	overflow: hidden;
	border-radius: 5px;
}

.whtk-meter__seg {
	display: block;
	height: 100%;
}

.whtk-meter__seg--bull { background: var(--whtk-bull); }
.whtk-meter__seg--neutral { background: var(--whtk-neutral); }
.whtk-meter__seg--bear { background: var(--whtk-bear); }

.whtk-meter__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	font-size: 0.85em;
	opacity: 0.75;
}

/* Key figures */

.whtk-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 10px;
	margin-top: 10px;
}

.whtk-stats__item {
	padding: 12px;
	border-radius: 8px;
	background: var(--whtk-fill);
}

.whtk-stats__value {
	margin-top: 2px;
	font-size: 1em;
	font-weight: 600;
	line-height: 1.25;
}

/* Sparkline */

.whtk-spark__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px 16px;
}

.whtk-spark__legend {
	display: flex;
	gap: 14px;
	font-size: 0.85em;
	opacity: 0.8;
}

.whtk-spark__key {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 5px;
	border-radius: 50%;
}

.whtk-spark__key--bull { background: var(--whtk-bull); }
.whtk-spark__key--neutral { background: var(--whtk-neutral); }
.whtk-spark__key--bear { background: var(--whtk-bear); }

.whtk-spark__svg {
	display: block;
	width: 100%;
	height: auto;
	margin-top: 8px;
}

.whtk-spark__line {
	fill: none;
	stroke: currentColor;
	stroke-opacity: 0.35;
	stroke-width: 1.5;
	stroke-linejoin: round;
}

.whtk-spark__dot--bull { fill: var(--whtk-bull); }
.whtk-spark__dot--neutral { fill: var(--whtk-neutral); }
.whtk-spark__dot--bear { fill: var(--whtk-bear); }
.whtk-spark__dot--none { fill: currentColor; fill-opacity: 0.4; }

/* Filters */

.whtk-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 10px 0;
}

.whtk-filter {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid var(--whtk-line);
	border-radius: 999px;
	color: inherit;
	font-size: 0.78em;
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1.3;
	text-decoration: none;
	text-transform: uppercase;
}

.whtk-filter:hover,
.whtk-filter:focus,
.whtk-filter--active {
	border-color: var(--whtk-accent);
	background: var(--whtk-accent);
	color: #fff;
}

/* Article list */

.whtk-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.whtk-list__item {
	display: grid;
	grid-template-columns: 76px 84px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 11px 0;
	border-top: 1px solid var(--whtk-line-soft);
}

.whtk-list__date {
	font-size: 0.85em;
	opacity: 0.65;
}

.whtk-list__title {
	color: inherit;
	font-weight: 600;
	text-decoration: none;
}

.whtk-list__title:hover,
.whtk-list__title:focus {
	color: inherit;
	text-decoration: underline;
}

.whtk-list__meta {
	display: none;
}

.whtk-archive .navigation.pagination {
	margin-top: 16px;
}

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
	/* Left-aligned throughout. */
	.whtk-hero__price {
		text-align: left;
	}

	.whtk-card__stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.whtk-list__item {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 8px 12px;
	}

	.whtk-list__date,
	.whtk-list__item > .whtk-tag {
		display: none;
	}

	.whtk-list__meta {
		display: block;
	}
}
