/* ==========================================================================
   AnyCoin News - global styles
   1. Tokens  2. Base  3. Layout & 12-col grid  4. Utilities  5. Brand
   6. Utility bar  7. Header & nav  8. Search  9. Buttons & forms
   10. Archive basics  11. Footer  14. Ticker  15. Cards  16. Section heads
   17. Feed rows  18. Breadcrumbs  19. Chips  20. Rail boxes  21. Market modules
   12. Motion & print (kept last)
   Visual motif: graphite-navy bands, turquoise rules and the hexagon of the logo.
   ========================================================================== */

/* 1. Tokens ----------------------------------------------------------------- */
:root {
	/* Graphite navy + turquoise (from the logo), light reading surfaces. */
	--color-primary: #101C2E;
	--color-secondary: #0B7A73;   /* turquoise for text/links on light (5.3:1 on white) */
	--color-accent: #19B8AE;      /* turquoise on dark panels */
	--color-accent-soft: #E2F4F2;
	--color-breaking: #C2410C;
	--color-text: #0F1724;
	--color-body: #2B3442;
	--color-muted: #5A6577;
	--color-bg: #F3F5F8;
	--color-paper: #FFFFFF;
	--color-surface: #FFFFFF;
	--color-surface-alt: #E9EDF2;
	--color-border: #DCE2EA;
	--color-dark-panel: #101C2E;
	--color-dark-2: #18283F;
	--color-dark-line: rgb(255 255 255 / 0.1);
	--color-on-dark: #F2F6FA;
	--color-on-dark-muted: #A9B8CA;
	--color-focus: #0B7A73;
	--color-focus-dark: #5EE0D6;
	--color-up: #047857;
	--color-down: #B42318;

	--font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--font-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
	--font-head: var(--font-sans);

	/* Fluid type scale (320px → 1440px). */
	--fs-xs: 0.75rem;
	--fs-sm: 0.875rem;
	--fs-base: 1rem;
	--fs-md: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
	--fs-lg: clamp(1.2rem, 1.08rem + 0.55vw, 1.45rem);
	--fs-xl: clamp(1.45rem, 1.22rem + 0.95vw, 1.9rem);
	--fs-2xl: clamp(1.7rem, 1.32rem + 1.7vw, 2.6rem);
	--fs-3xl: clamp(1.95rem, 1.4rem + 2.5vw, 3.3rem);

	--container: 1280px;
	--gutter: clamp(16px, 3vw, 32px);
	--gap: clamp(16px, 2vw, 24px);
	--gap-lg: clamp(24px, 3.5vw, 44px);
	--radius: 10px;
	--radius-sm: 6px;
	--rule: 1px solid var(--color-border);
	--shadow-sm: 0 1px 2px rgb(16 28 46 / 0.06), 0 1px 1px rgb(16 28 46 / 0.04);
	--shadow-md: 0 8px 24px rgb(16 28 46 / 0.10);
	--header-h: 60px;
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--hex: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}

/* 2. Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-body);
	font-family: var(--font-sans);
	font-size: var(--fs-base);
	line-height: 1.6;
	overflow-x: clip; /* clip, not hidden - keeps position: sticky working */
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.5em;
	color: var(--color-text);
	font-family: var(--font-head);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

p { margin: 0 0 1em; }

/* Visual headings that are not document headings (widgets, sidebars, search, list items). */
.card__title, .rail__title, .side-box__title, .rank__title, .search-box__title {
	color: var(--color-text);
	font-family: var(--font-head);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.012em;
}
p, li { text-wrap: pretty; }

a { color: var(--color-secondary); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--color-primary); }

img, svg, video { display: block; max-width: 100%; height: auto; }
svg.icon { display: inline-block; flex-shrink: 0; vertical-align: middle; }

figure { margin: 0; }
ul, ol { padding-left: 1.25em; }
button, input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; border-top: var(--rule); margin: var(--gap-lg) 0; }

:focus-visible {
	outline: 2px solid var(--color-focus);
	outline-offset: 2px;
	border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: #BFEDE8; color: var(--color-text); }

time, .meta { font-variant-numeric: tabular-nums; }

/* 3. Layout & 12-column grid ------------------------------------------------- */
.container {
	width: 100%;
	max-width: calc(var(--container) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.page-pad { padding-block: var(--gap-lg); }

.grid-12 {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: var(--gap);
}
.grid-12 > * { grid-column: span var(--span, 12); min-width: 0; }
@media (min-width: 768px) { .grid-12 > * { grid-column: span var(--span-md, var(--span, 12)); } }
@media (min-width: 1024px) { .grid-12 > * { grid-column: span var(--span-lg, var(--span-md, var(--span, 12))); } }

.site-main { display: block; min-height: 50vh; }
.site-main:focus { outline: none; }

/* 4. Utilities --------------------------------------------------------------- */
.sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: 8px; left: 8px;
	z-index: 1000;
	padding: 10px 16px;
	background: var(--color-accent);
	color: var(--color-primary);
	font-weight: 700;
	text-decoration: none;
	border-radius: var(--radius-sm);
	transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--color-primary); }

.kicker {
	display: inline-block;
	font-family: var(--font-sans);
	font-size: var(--fs-xs);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cat, var(--color-secondary));
}

.meta {
	color: var(--color-muted);
	font-size: var(--fs-sm);
	margin: 0;
}

.mono { font-family: var(--font-mono); }

/* 5. Brand ------------------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; line-height: 0; }
.brand picture { display: block; }
.brand__img { width: auto; height: 32px; } /* logo ≈ 4.7:1 */
.brand--footer .brand__img { height: 40px; }
@media (min-width: 1024px) { .brand--header .brand__img { height: 40px; } }
@media (max-width: 359.98px) { .brand--header .brand__img { height: 27px; } }
.custom-logo { width: auto; max-height: 44px; }

/* 6. Utility bar ------------------------------------------------------------- */
.utility-bar {
	display: none;
	background: #0B1422;
	color: var(--color-on-dark-muted);
	font-size: var(--fs-xs);
}
.utility-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 32px;
}
.utility-bar__date { color: var(--color-on-dark); font-weight: 500; letter-spacing: 0.02em; }
.utility-bar__nav ul { display: flex; gap: 22px; margin: 0; padding: 0; list-style: none; }
.utility-bar a { color: var(--color-on-dark-muted); text-decoration: none; }
.utility-bar a:hover { color: #fff; text-decoration: underline; }
.utility-bar :focus-visible { outline-color: var(--color-focus-dark); }
@media (min-width: 1024px) { .utility-bar { display: block; } }

/* 7. Header & navigation ----------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--color-dark-panel);
	color: var(--color-on-dark);
	box-shadow: inset 0 -1px 0 var(--color-dark-line);
}
.admin-bar .site-header { top: 46px; }
@media (min-width: 783px) { .admin-bar .site-header { top: 32px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.site-header :focus-visible { outline-color: var(--color-focus-dark); }

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 20px;
	min-height: var(--header-h);
}
.site-header__brand { display: flex; flex-shrink: 0; }
.site-header__actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.icon-btn {
	display: inline-grid;
	place-items: center;
	width: 44px; height: 44px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: var(--radius-sm);
	color: inherit;
	cursor: pointer;
	transition: background-color 0.15s var(--ease);
}
.icon-btn:hover { background: rgb(255 255 255 / 0.08); }
.icon-btn[aria-expanded="true"] { background: rgb(255 255 255 / 0.12); color: var(--color-accent); }

.menu-toggle__close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: block; }

.nav-list { display: flex; margin: 0; padding: 0; list-style: none; }
.nav-list a {
	position: relative;
	display: block;
	color: var(--color-on-dark);
	font-size: var(--fs-sm);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

/* Mobile: full panel under the header. */
@media (max-width: 1023.98px) {
	.primary-nav {
		position: fixed;
		inset: var(--header-h) 0 0 0;
		z-index: 99;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 8px var(--gutter) 32px;
		background: var(--color-dark-panel);
		border-top: 1px solid var(--color-dark-line);
		visibility: hidden;
		opacity: 0;
		transform: translateY(-8px);
		transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s linear 0.2s;
	}
	.admin-bar .primary-nav { top: calc(var(--header-h) + 46px); }
	.menu-open .primary-nav {
		visibility: visible;
		opacity: 1;
		transform: none;
		transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
	}
	.menu-open { overflow: hidden; }
	.nav-list { flex-direction: column; }
	.nav-list a {
		display: flex;
		align-items: center;
		gap: 14px;
		padding: 14px 0;
		font-size: var(--fs-md);
		border-bottom: 1px solid var(--color-dark-line);
	}
	.nav-list a::before {
		content: "";
		flex: none;
		width: 10px; height: 11px;
		background: var(--color-accent);
		clip-path: var(--hex);
		opacity: 0.45;
	}
	.nav-list a[aria-current] { color: var(--color-accent); }
	.nav-list a[aria-current]::before { opacity: 1; }

	/* Without JS the panel is unreachable - show the list statically instead. */
	.no-js .primary-nav { position: static; visibility: visible; opacity: 1; transform: none; padding: 0; border: 0; }
	.no-js .menu-toggle { display: none; }
	.no-js .site-header__inner { flex-wrap: wrap; }
	.no-js .primary-nav { order: 3; width: 100%; }
}

/* Desktop: logo · sections · search in one row (ten sections → compact type, wraps never). */
@media (min-width: 1024px) {
	:root { --header-h: 72px; }
	.menu-toggle { display: none; }
	.site-header__inner { gap: clamp(16px, 2vw, 32px); }
	.primary-nav { flex: 1 1 auto; min-width: 0; }
	.nav-list { gap: 4px clamp(10px, 1.15vw, 20px); justify-content: center; flex-wrap: nowrap; }
	.nav-list a { padding: 26px 0; font-size: 13.5px; color: #DCE4EE; }
	.nav-list a::after {
		content: "";
		position: absolute;
		left: 0; right: 0; bottom: 14px;
		height: 2px;
		background: var(--color-accent);
		transform: scaleX(0);
		transform-origin: left;
		transition: transform 0.2s var(--ease);
	}
	.nav-list a:hover { color: #fff; }
	.nav-list a:hover::after,
	.nav-list a[aria-current]::after { transform: scaleX(1); }
	.nav-list a[aria-current] { color: #fff; }
	.site-header__actions { margin-left: 0; flex-shrink: 0; }
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
	.nav-list { gap: 4px 10px; }
	.nav-list a { font-size: 12.5px; letter-spacing: -0.01em; }
	.brand--header .brand__img { height: 32px; }
	.search-trigger { min-width: 0 !important; }
	.search-trigger__label, .search-trigger kbd { display: none !important; }
}

/* 8. Search: pill trigger + full-screen overlay -------------------------------- */
.search-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 40px;
	padding: 0 12px;
	background: rgb(255 255 255 / 0.06);
	border: 1px solid rgb(255 255 255 / 0.16);
	border-radius: 999px;
	color: var(--color-on-dark);
	font-size: var(--fs-sm);
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.search-trigger:hover { background: rgb(255 255 255 / 0.12); border-color: var(--color-accent); }
.search-trigger__label { display: none; }
.search-trigger kbd {
	display: none;
	padding: 1px 6px;
	background: rgb(255 255 255 / 0.08);
	border: 1px solid rgb(255 255 255 / 0.16);
	border-radius: 4px;
	color: var(--color-on-dark-muted);
	font-family: var(--font-mono);
	font-size: 11px;
}
@media (min-width: 1280px) {
	.search-trigger { padding: 0 10px 0 14px; min-width: 140px; }
	.search-trigger__label { display: inline; color: var(--color-on-dark-muted); font-weight: 500; margin-right: auto; }
	.search-trigger kbd { display: inline-block; }
}
@media (max-width: 1023.98px) {
	.search-trigger { width: 44px; height: 44px; padding: 0; justify-content: center; background: transparent; border-color: transparent; }
}

.search-panel { padding: 24px 0; background: var(--color-surface); color: var(--color-body); }
.js .search-panel {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 400;
	padding: clamp(24px, 10vh, 120px) 0 32px;
	background: rgb(11 20 34 / 0.78);
	overflow-y: auto;
}
.js .search-panel.is-open { display: block; animation: wpt-fade 0.18s var(--ease); }
@keyframes wpt-fade { from { opacity: 0; } }
.search-open { overflow: hidden; }
.search-panel :focus-visible { outline-color: var(--color-focus); }

.search-box {
	position: relative;
	max-width: 760px;
	margin-inline: auto;
	padding: clamp(20px, 4vw, 36px);
	background: var(--color-surface);
	border-top: 4px solid var(--color-accent);
	border-radius: var(--radius);
	box-shadow: 0 24px 64px rgb(4 10 20 / 0.4);
	color: var(--color-body);
}
.search-box .icon-btn { color: var(--color-text); }
.search-box .icon-btn:hover { background: var(--color-surface-alt); }
.search-box__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.search-box__title { margin: 0; font-size: var(--fs-lg); }
.search-box__close { flex-shrink: 0; }
.search-box__hint { margin: 18px 0 8px; color: var(--color-muted); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

.search-form { display: flex; gap: 8px; max-width: 760px; margin-inline: auto; }
.search-form__field { position: relative; flex: 1 1 auto; min-width: 0; }
.search-form__field .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--color-muted); pointer-events: none; }
.search-form__input {
	width: 100%;
	height: 54px;
	padding: 0 16px 0 48px;
	background: var(--color-bg);
	border: 2px solid var(--color-border);
	border-radius: var(--radius-sm);
	color: var(--color-text);
	font-size: var(--fs-md);
	transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.search-form__input::placeholder { color: #7A8597; }
.search-form__input:focus { outline: none; background: #fff; border-color: var(--color-secondary); }
@media (max-width: 479.98px) {
	.search-form { flex-direction: column; }
}

/* 9. Buttons & forms --------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: var(--fs-sm);
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-secondary); color: #fff; }
.btn--ghost { background: var(--color-surface); color: var(--color-primary); border-color: var(--color-border); }
.btn--ghost:hover { border-color: var(--color-secondary); color: var(--color-secondary); }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.6; cursor: progress; }
.search-form__submit { min-height: 54px; border-radius: var(--radius-sm); }
@media (max-width: 479.98px) { .search-form__submit { min-height: 48px; } }

.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.is-loading::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, var(--color-surface) 25%, #E7ECF2 50%, var(--color-surface) 75%) 0 0 / 200% 100%;
	border-radius: var(--radius-sm);
	animation: wpt-shimmer 1.2s linear infinite;
}
@keyframes wpt-shimmer { to { background-position: -200% 0; } }

.empty-state, .error-state {
	padding: 24px;
	background: var(--color-surface);
	border: 1px dashed #C5CEDA;
	border-radius: var(--radius);
	color: var(--color-muted);
	font-size: var(--fs-sm);
}
.error-state { border-style: solid; border-color: #FECACA; background: #FEF2F2; color: #991B1B; }

/* 10. Archive basics ----------------------------------------------------------- */
.archive-head { margin-bottom: var(--gap-lg); padding-bottom: 16px; border-bottom: 2px solid var(--color-text); }
.archive-head__title { font-size: var(--fs-2xl); margin: 0; }

.simple-list { display: grid; gap: 0; }
.simple-list__item { padding: 16px 0; border-bottom: var(--rule); }
.simple-list__title { font-size: var(--fs-lg); margin: 0 0 4px; }
.simple-list__title a { color: var(--color-text); text-decoration: none; }
.simple-list__title a:hover { color: var(--color-secondary); text-decoration: underline; }

.pagination { margin-top: var(--gap-lg); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 44px; height: 44px;
	padding: 0 14px;
	background: var(--color-surface);
	border: var(--rule);
	border-radius: 999px;
	color: var(--color-text);
	font-weight: 600;
	text-decoration: none;
}
.pagination .page-numbers:hover { border-color: var(--color-secondary); }
.pagination .page-numbers.current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.pagination .page-numbers.dots { border-color: transparent; background: none; }

/* 11. Footer ----------------------------------------------------------------- */
.site-footer {
	position: relative;
	margin-top: var(--gap-lg);
	padding-top: clamp(36px, 5vw, 56px);
	background:
		radial-gradient(600px 300px at 100% 0, rgb(25 184 174 / 0.10), transparent 70%),
		var(--color-dark-panel);
	color: var(--color-on-dark-muted);
	font-size: var(--fs-sm);
}
.site-footer::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--color-accent), transparent 60%);
}
.site-footer__grid {
	display: grid;
	gap: var(--gap-lg);
	grid-template-columns: 1fr;
	padding-bottom: var(--gap-lg);
}
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__about { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .site-footer__grid { grid-template-columns: 1.6fr 1.3fr 1fr; } .site-footer__about { grid-column: auto; } }
.site-footer__about p { max-width: 44ch; margin-top: 18px; color: var(--color-on-dark); }
.site-footer__about .site-footer__note { margin-top: 10px; color: var(--color-on-dark-muted); font-size: 13px; }
.site-footer__title {
	margin-bottom: 14px;
	color: var(--color-accent);
	font-family: var(--font-sans);
	font-size: var(--fs-xs);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer__sections ul { columns: 2; column-gap: 24px; }
.site-footer li { padding: 5px 0; break-inside: avoid; }
.site-footer a { color: var(--color-on-dark); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--color-accent); }
.site-footer :focus-visible { outline-color: var(--color-focus-dark); }
.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 24px;
	padding-block: 18px;
	border-top: 1px solid var(--color-dark-line);
	font-size: var(--fs-xs);
}
.site-footer__bottom p { margin: 0; }
.site-footer__bottom a { color: var(--color-on-dark); text-decoration: underline; }

/* 14. Breaking ticker (only when editors flag Breaking stories) ------------- */
.ticker { background: #fff; border-bottom: var(--rule); font-size: var(--fs-sm); }
.ticker__inner { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.ticker__label {
	flex-shrink: 0;
	padding: 3px 8px;
	background: var(--color-breaking);
	border-radius: 3px;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.ticker__list { display: flex; flex: 1 1 auto; gap: 32px; min-width: 0; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.ticker__item { display: flex; align-items: baseline; gap: 10px; min-width: 0; white-space: nowrap; }
.ticker__item a { overflow: hidden; color: var(--color-text); font-weight: 600; text-decoration: none; text-overflow: ellipsis; }
.ticker__item a:hover { text-decoration: underline; }
.ticker__item time { flex-shrink: 0; color: var(--color-muted); font-size: 12px; }
.ticker__viewport {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
	mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
.ticker.is-marquee .ticker__list { width: max-content; gap: 0; overflow: visible; animation: wpt-marquee var(--ticker-dur, 30s) linear infinite; }
.ticker.is-marquee .ticker__item { padding-right: 28px; }
.ticker.is-marquee .ticker__item::after { content: ""; align-self: center; width: 6px; height: 6px; margin-left: 18px; background: var(--color-breaking); border-radius: 50%; }
.ticker.is-marquee .ticker__item a { overflow: visible; }
.ticker.is-paused .ticker__list,
.ticker.is-marquee:hover .ticker__list,
.ticker.is-marquee:focus-within .ticker__list { animation-play-state: paused; }
@keyframes wpt-marquee { to { transform: translateX(-50%); } }
.ticker__pause {
	flex-shrink: 0;
	min-height: 32px;
	padding: 0 10px;
	background: none;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	color: var(--color-muted);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}
.ticker__pause:hover { color: var(--color-text); }
.no-js .ticker__pause { display: none; }
@media (max-width: 767.98px) {
	.ticker__item time { display: none; }
	.ticker__inner { gap: 8px; }
}

/* 15. Cards ------------------------------------------------------------------ */
.card { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card__media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--color-surface-alt);
	border-radius: var(--radius);
}
.ratio-4x3 { aspect-ratio: 4 / 3; }
.ratio-1x1 { aspect-ratio: 1 / 1; }
.ratio-4x5 { aspect-ratio: 4 / 5; }
.card__img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.card:hover .card__img { transform: scale(1.03); }
.card__ph {
	display: block;
	width: 100%;
	height: 100%;
	background:
		radial-gradient(circle at 80% 20%, rgb(25 184 174 / 0.35), transparent 45%),
		linear-gradient(135deg, var(--color-dark-2), var(--color-dark-panel));
}
.card__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card__badge { position: relative; z-index: 2; align-self: flex-start; text-decoration: none; }
.card__badge:hover { text-decoration: underline; }
.card__title { margin: 0; font-size: var(--fs-md); line-height: 1.28; }
.card__link { color: var(--color-text); text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card clickable */
.card:hover .card__link { color: var(--color-secondary); }
.card__link:focus-visible { outline: none; }
.card:has(.card__link:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 4px; border-radius: var(--radius-sm); }
.card__excerpt { margin: 0; color: var(--color-body); font-size: 15px; line-height: 1.55; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; }
.card__read::before { content: "\00B7"; margin-right: 12px; }
.card__num { font-family: var(--font-mono); font-size: 22px; font-weight: 700; line-height: 1; color: var(--color-secondary); }
.badge-demo {
	position: relative;
	z-index: 2;
	padding: 0 6px;
	background: #FFF7E6;
	border: 1px solid #D97706;
	border-radius: 3px;
	color: #8A3B06;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.6;
	text-transform: uppercase;
}

/* Overlay: headline over the image. */
.card--overlay { display: grid; overflow: hidden; isolation: isolate; background: var(--color-dark-panel); border-radius: var(--radius); }
.card--overlay > .card__media, .card--overlay > .card__body { grid-area: 1 / 1; }
.card--overlay .card__media { align-self: stretch; justify-self: stretch; border-radius: 0; }
.card--overlay .ratio-fill { position: absolute; inset: 0; aspect-ratio: auto; }
.card--overlay .card__body {
	position: relative;
	align-self: end;
	padding: 56px 20px 18px;
	background: linear-gradient(to top, rgb(11 20 34 / 0.95) 0%, rgb(11 20 34 / 0.6) 55%, transparent 100%);
}
.card--overlay .card__link, .card--overlay .card__excerpt { color: #fff; }
.card--overlay .card__meta { color: rgb(255 255 255 / 0.82); }
.card--overlay .card__title { font-size: var(--fs-lg); }
.card--overlay .kicker { color: var(--color-accent); }

/* Row: thumbnail left. */
.card--row { flex-direction: row; align-items: flex-start; gap: 14px; }
.card--row .card__media { flex: 0 0 112px; border-radius: var(--radius-sm); }
.card--row .card__title { font-size: var(--fs-base); }

/* Text-only and mini. */
.card--text .card__title { font-size: var(--fs-md); }
.card--mini { gap: 0; }
.card--mini .card__title { font-size: 15px; font-weight: 600; line-height: 1.35; }
.card--mini .card__meta { order: -1; font-size: 12px; font-family: var(--font-mono); }
.card--mini:has(.card__num) .card__body { display: grid; grid-template-columns: 34px 1fr; column-gap: 8px; row-gap: 2px; }
.card--mini:has(.card__num) .card__num { grid-row: 1 / span 3; }
.card--mini:has(.card__num) .card__body > :not(.card__num) { grid-column: 2; }

.mini-list, .headline-list, .rank__list, .rank-row, .timeline { margin: 0; padding: 0; list-style: none; }
.mini-list > li, .headline-list > li, .rank__list > li { padding: 12px 0; border-bottom: var(--rule); }
.mini-list > li:first-child, .rank__list > li:first-child { padding-top: 4px; }
.mini-list > li:last-child, .headline-list > li:last-child, .rank__list > li:last-child { border-bottom: 0; }

.rank { padding: 16px 18px; background: var(--color-surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.rank__title { margin: 0 0 2px; font-size: var(--fs-lg); }
.rank__note { margin: 0 0 12px; color: var(--color-muted); font-size: 12px; }
.tabs { display: flex; gap: 4px; margin: 8px 0 12px; border-bottom: var(--rule); }
.tabs__btn {
	padding: 8px 10px;
	margin-bottom: -1px;
	background: none;
	border: 0;
	border-bottom: 2px solid transparent;
	color: var(--color-muted);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.tabs__btn[aria-selected="true"] { color: var(--color-text); border-bottom-color: var(--color-secondary); }
.tabs__btn:hover { color: var(--color-text); }
.no-js .tabs { display: none; }
.no-js .tabs__panel + .tabs__panel { margin-top: 16px; }

/* 16. Section heading: hexagon bullet + title + "all" link -------------------- */
.sec-head {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 14px;
	margin-bottom: clamp(16px, 2vw, 24px);
	padding-left: 26px;
}
.sec-head::before {
	content: "";
	position: absolute;
	left: 0; top: 0.95em;
	width: 15px; height: 16px;
	margin-top: -8px;
	background: var(--color-accent);
	clip-path: var(--hex);
}
.sec-head__kicker { flex-basis: 100%; order: -1; }
.sec-head__title { margin: 0; font-size: var(--fs-xl); }
.sec-head__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	color: var(--color-text);
	font-size: var(--fs-sm);
	font-weight: 600;
	text-decoration: none;
}
.sec-head__more:hover { color: var(--color-secondary); text-decoration: underline; }
.sec-head:has(.sec-head__kicker)::before { top: calc(1.6em + 0.95em); }

/* 19. Chips -------------------------------------------------------------------- */
.chip {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	padding: 0 14px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 999px;
	color: var(--color-text);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}
.chip:hover { border-color: var(--color-secondary); color: var(--color-secondary); }
.chips { margin: 0; }
.home-sec .chips { margin: -8px 0 20px; }
.chips ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip[aria-current] { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* 17. Feed rows (Latest, list archives) ---------------------------------------- */
.feed { background: var(--color-surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.feed > .card { padding: 16px; border-bottom: var(--rule); }
.feed > .card:last-child { border-bottom: 0; }
.card--feed .card__media { flex-basis: 112px; }
.card--feed .card__excerpt { display: none; }
@container (min-width: 560px) {
	.feed > .card { padding: 20px 22px; }
	.card--feed { gap: var(--gap); }
	.card--feed .card__media { flex-basis: 200px; }
	.card--feed .card__title { font-size: var(--fs-lg); }
	.card--feed .card__excerpt { display: block; }
}
.card--feed:hover { background: #FAFCFD; }

/* 18. Breadcrumbs ---------------------------------------------------------------- */
.breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
	color: var(--color-muted);
	font-size: 13px;
}
.breadcrumbs li { min-width: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; opacity: 0.5; }
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--color-text); }
.breadcrumbs li:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 20. Rail boxes (article + category sidebars) ------------------------------------ */
.rail-box, .side-box {
	padding: 16px 18px 18px;
	background: var(--color-surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}
.rail__title, .side-box__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px;
	padding-bottom: 10px;
	border-bottom: var(--rule);
	font-size: var(--fs-md);
}
.rail__title::before, .side-box__title::before {
	content: "";
	flex: none;
	width: 11px; height: 12px;
	background: var(--color-accent);
	clip-path: var(--hex);
}
.rail-widgets .rail-box + .rail-box, .rail-box + .rail-box, .rail-box + .side-box, .side-box + .side-box, .side-box + .rail-widgets, .rail-box + .rail-widgets, .rail-widgets + .rail-box { margin-top: 20px; }
.rail-box--market { border-top: 3px solid var(--color-accent); }

/* 21. Market modules (homepage board, article/category rail, widget areas) -------- */
.mkt { font-size: 14px; }
.mkt-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mkt-table caption { padding: 0 0 6px; color: var(--color-muted); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; }
.mkt-table th, .mkt-table td { padding: 9px 0; border-bottom: var(--rule); text-align: left; vertical-align: middle; }
.mkt-table thead th { padding-top: 2px; color: var(--color-muted); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.mkt-table tbody tr:last-child th, .mkt-table tbody tr:last-child td { border-bottom: 0; }
.mkt-table tbody th { color: var(--color-text); font-weight: 600; }
.mkt-table .num { padding-left: 10px; text-align: right; white-space: nowrap; }
.mkt-asset { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.mkt-asset__sym { color: var(--color-muted); font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; text-decoration: none; }
.mkt-price { color: var(--color-text); font-family: var(--font-mono); font-size: 13.5px; }
.chg { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chg span[aria-hidden] { font-size: 9px; vertical-align: 1px; }
.chg--up { color: var(--color-up); }
.chg--down { color: var(--color-down); }
.chg--flat, .chg--na { color: var(--color-muted); }
.mkt-table--kv th { font-weight: 500; color: var(--color-body); }
.mkt-kv { color: var(--color-text); font-family: var(--font-mono); font-size: 15px; font-weight: 600; }
.mkt-na { color: var(--color-muted); font-family: var(--font-sans); font-size: 13px; font-weight: 500; }
.mkt-movers { display: grid; gap: 14px; }
.mkt-empty { color: var(--color-muted); font-size: 13px; }
.mkt-note { margin: 0 0 8px; color: var(--color-muted); font-size: 12.5px; line-height: 1.45; }
.mkt-source { margin: 10px 0 0; color: var(--color-muted); font-size: 11.5px; line-height: 1.55; }
.mkt-source a { color: inherit; text-decoration: underline; }
.mkt-badge { display: inline-block; padding: 0 6px; border-radius: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.mkt-badge--delayed { background: #FFF4D6; border: 1px solid #B45309; color: #7C2D12; }
.mkt-state {
	margin: 0;
	padding: 14px;
	background: var(--color-bg);
	border: 1px dashed #C5CEDA;
	border-radius: var(--radius-sm);
	color: var(--color-muted);
	font-size: 13.5px;
	font-weight: 600;
	text-align: center;
}

/* Converter. */
.cnv { margin: 0; }
.cnv__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; }
.cnv__field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cnv__label { color: var(--color-muted); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.cnv__input, .cnv__select {
	width: 100%;
	height: 44px;
	padding: 0 10px;
	background: var(--color-bg);
	border: 1px solid #C5CEDA;
	border-radius: var(--radius-sm);
	color: var(--color-text);
	font-size: 16px; /* no iOS zoom */
}
.cnv__input { font-family: var(--font-mono); }
.cnv__input:focus, .cnv__select:focus { outline: none; border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgb(11 122 115 / 0.18); }
.cnv__input[aria-invalid="true"] { border-color: var(--color-down); }
.cnv__err { margin: 8px 0 0; color: var(--color-down); font-size: 13px; font-weight: 600; }
.cnv__out { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 12px 0 0; padding: 10px 12px; background: var(--color-accent-soft); border-radius: var(--radius-sm); }
.cnv__result { color: var(--color-text); font-family: var(--font-mono); font-size: 18px; font-weight: 700; }

/* Watchlist. */
.watch__pick { margin: 0 0 10px; padding: 0; border: 0; min-width: 0; }
.watch__pick legend { padding: 0; }
.watch__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.watch__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 0 12px 0 10px;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	color: var(--color-text);
	font-family: var(--font-mono);
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
}
.watch__chip input { width: 16px; height: 16px; margin: 0; accent-color: var(--color-secondary); }
.watch__chip:has(input:checked) { background: var(--color-accent-soft); border-color: var(--color-secondary); }
.watch__chip:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.watch__empty { margin: 4px 0 0; }

/* 12. Motion & print --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

@media print {
	.utility-bar, .site-header__actions, .primary-nav, .search-panel, .site-footer__sections, .mkt-board, .rail-box--market { display: none !important; }
	.site-header { position: static; }
	a { color: inherit; }
}
