/*
Theme Name: Helium News
Description: A fast, professional tech-news theme with a headline ticker, hero grid, trending list, dark mode, newsletter box and full Customizer controls. No page builder or external fonts required.
Author: Helium News
Version: 1.5.1
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: helium-news
Tags: news, blog, two-columns, right-sidebar, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, accessibility-ready
*/

/* =========================================================
   1. Tokens
   ========================================================= */
:root {
	--accent: #0a6cff;
	--accent-ink: #fff;
	--accent-link: var(--accent);
	--accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);

	--bg: #f4f6fa;
	--surface: #ffffff;
	--surface-2: #eef1f6;
	--ink: #0b1220;
	--ink-2: #364055;
	--muted: #667186;
	--line: #e2e7ef;
	--header-bg: rgba(255, 255, 255, .86);
	--ticker-bg: #0b1220;
	--ticker-ink: #e8edf7;

	--radius: 14px;
	--radius-sm: 8px;
	--shadow: 0 1px 2px rgba(11, 18, 32, .05), 0 10px 30px rgba(11, 18, 32, .06);
	--maxw: 1240px;
	--gutter: clamp(16px, 3vw, 28px);

	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
	--accent-link: color-mix(in srgb, var(--accent) 62%, #fff);
	--bg: #090d15;
	--surface: #111826;
	--surface-2: #172033;
	--ink: #eef2fa;
	--ink-2: #c3ccdd;
	--muted: #8d99b0;
	--line: #202b40;
	--header-bg: rgba(9, 13, 21, .84);
	--ticker-bg: #05080e;
	--shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
	color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-link); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.2; letter-spacing: -.02em; font-weight: 750; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }

button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap;
}
.skip-link:focus {
	position: fixed !important; z-index: 1000; top: 8px; left: 8px; width: auto; height: auto; margin: 0;
	clip: auto; clip-path: none; background: var(--accent); color: var(--accent-ink);
	padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600;
}

.icon { flex: none; vertical-align: middle; }
.muted { color: var(--muted); }

.button, .comment-form .submit, button.button {
	display: inline-flex; align-items: center; gap: .5em; justify-content: center;
	background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px;
	padding: .75em 1.4em; font-weight: 650; transition: filter .15s, transform .15s;
}
.button:hover, .comment-form .submit:hover { filter: brightness(1.1); color: var(--accent-ink); }
.button:active { transform: translateY(1px); }

/* =========================================================
   3. Top bar
   ========================================================= */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 36px; }
.topbar-left { display: flex; gap: 14px; align-items: center; min-width: 0; }
.topbar-date { font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.topbar-tagline { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-tagline::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--line); margin-right: 14px; vertical-align: middle; }

.social { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.social a { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.social a:hover { background: var(--accent-soft); color: var(--accent-link); }

/* =========================================================
   4. Header & navigation
   ========================================================= */
/* The header sits above all page content (but below the cookie notice, reading bar and pop-ups at 200+).
   The frosted-glass effect lives on a pseudo-element: putting backdrop-filter on the header itself
   turns it into the containing block for position:fixed children and traps the mobile menu inside it. */
.site-header {
	position: sticky; top: 0; z-index: 190;
	border-bottom: 1px solid var(--line);
	transition: box-shadow .2s;
}
.site-header::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background: var(--header-bg);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	backdrop-filter: saturate(180%) blur(14px);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header.is-stuck { box-shadow: 0 6px 24px rgba(11, 18, 32, .08); }

.header-inner { display: flex; align-items: center; gap: 28px; min-height: 66px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.03em; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
	display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
	background: var(--accent); color: var(--accent-ink);
}
.custom-logo { max-height: 42px; width: auto; }
.custom-logo-link { display: inline-flex; align-items: center; }

.primary-nav { flex: 1; min-width: 0; }
.primary-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex-wrap: wrap; }
.primary-nav .menu > li { position: relative; }
.primary-nav .menu a { display: block; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.primary-nav .menu a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current-menu-ancestor > a,
.primary-nav .current-cat > a { color: var(--accent-link); background: var(--accent-soft); }

.primary-nav .sub-menu {
	list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0; min-width: 220px;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .15s, transform .15s, visibility .15s; z-index: 20;
}
/* Invisible bridge so the dropdown doesn't close while the pointer crosses the small gap */
.primary-nav .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }

/* Dropdown caret on items that have a sub-menu */
.primary-nav .menu-item-has-children > a::after {
	content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: translateY(-3px) rotate(45deg); opacity: .65;
}
.primary-nav .sub-menu a { white-space: nowrap; }
.primary-nav .sub-menu .menu-item-has-children > a::after { transform: translateY(-1px) rotate(-45deg); float: right; margin-top: 8px; }

/* Social icons in the menu banner */
.header-social, .nav-social { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.header-social { margin-right: 6px; padding-right: 10px; border-right: 1px solid var(--line); }
.header-social a, .nav-social a {
	display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--ink-2);
}
.header-social a:hover, .nav-social a:hover { background: var(--accent-soft); color: var(--accent-link); }
.nav-social { display: none; }
/* Wide screens: icons live in the banner. Narrower: they stay in the top bar. */
@media (max-width: 1199px) { .header-social { display: none; } }
@media (min-width: 1200px) { .topbar-social { display: none; } }

.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
	display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
	background: transparent; border: 1px solid transparent; color: var(--ink-2);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.menu-toggle { display: none; }
.when-dark, .when-open { display: none; }
[data-theme="dark"] .when-dark { display: inline-flex; }
[data-theme="dark"] .when-light { display: none; }

.search-panel { border-top: 1px solid var(--line); background: var(--surface); padding: 16px 0; }
.search-panel[hidden] { display: none; }

.search-form {
	display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line);
	border-radius: 999px; padding: 6px 6px 6px 16px; color: var(--muted); max-width: 640px;
}
.search-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-field { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; padding: 8px 0; color: var(--ink); }
.search-submit { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; padding: 9px 20px; font-weight: 650; }

/* =========================================================
   5. Ticker
   ========================================================= */
.ticker { background: var(--ticker-bg); color: var(--ticker-ink); font-size: 14px; }
.ticker-inner { display: flex; align-items: center; gap: 16px; min-height: 42px; }
.ticker-label {
	display: inline-flex; align-items: center; gap: 6px; flex: none; text-transform: uppercase;
	letter-spacing: .08em; font-weight: 800; font-size: 12px; background: var(--accent); color: var(--accent-ink);
	padding: 5px 10px; border-radius: 6px;
}
.ticker-viewport { overflow: hidden; flex: 1; min-width: 0;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
	mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
.ticker-track { display: flex; width: max-content; animation: ticker 60s linear infinite; }
.ticker-viewport:hover .ticker-track,
.ticker-viewport:focus-within .ticker-track { animation-play-state: paused; }
.ticker-set { display: flex; flex: none; }
.ticker-set a { white-space: nowrap; padding: 0 28px 0 0; margin-right: 28px; position: relative; opacity: .92; }
.ticker-set a::after { content: ""; position: absolute; right: 0; top: 50%; width: 5px; height: 5px; margin-top: -2px; background: var(--accent); border-radius: 50%; }
.ticker-set a:hover { color: #fff; opacity: 1; text-decoration: underline; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* =========================================================
   6. Layout
   ========================================================= */
.site-main { min-height: 60vh; padding-bottom: 56px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; padding-top: 36px; align-items: start; }
.sidebar { position: sticky; top: 90px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.sidebar .widget { min-width: 0; overflow-wrap: anywhere; }
.admin-bar .sidebar { top: 122px; }
.page-wrap { max-width: 820px; padding-top: 40px; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.section-title { font-size: 22px; letter-spacing: -.03em; position: relative; }
.section-title::after { content: ""; display: block; width: 36px; height: 4px; background: var(--accent); border-radius: 2px; position: absolute; left: 0; bottom: -14px; }
.section-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 650; color: var(--accent-link); }
.section-link:hover { gap: 8px; }
.cat-section { margin-top: 52px; }

/* =========================================================
   7. Hero grid
   ========================================================= */
.hero { padding-top: 28px; }
.hero-grid {
	display: grid; gap: 14px;
	grid-template-columns: 2fr 1fr 1fr;
	grid-template-rows: repeat(2, minmax(210px, 1fr));
}
.hero-card { position: relative; overflow: hidden; border-radius: var(--radius); background: #0b1220; color: #fff; isolation: isolate; min-height: 210px; }
.hero-lead { grid-row: span 2; min-height: 440px; }
.hero-media, .hero-media img, .hero-media .ph { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media img { object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.hero-card:hover .hero-media img { transform: scale(1.04); }
.hero-card::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(5, 8, 14, 0) 25%, rgba(5, 8, 14, .88) 100%); }
.hero-body { position: absolute; z-index: 2; inset: auto 0 0 0; padding: 18px; display: grid; gap: 8px; }
.hero-lead .hero-body { padding: 28px; gap: 12px; }
.hero-title { font-size: 17px; line-height: 1.25; text-wrap: balance; }
.hero-lead .hero-title { font-size: clamp(24px, 3.2vw, 38px); letter-spacing: -.035em; }
.hero-title a::before { content: ""; position: absolute; inset: 0; z-index: 3; }
.hero-title a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.hero-excerpt { color: rgba(255, 255, 255, .82); margin: 0; max-width: 60ch; font-size: 16px; }
.hero-card .badge { position: relative; z-index: 4; }
.hero-card .meta { color: rgba(255, 255, 255, .75); }

/* =========================================================
   8. Badges, meta, cards
   ========================================================= */
.badge {
	display: inline-block; width: fit-content; text-transform: uppercase; letter-spacing: .07em;
	font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 6px;
	background: var(--accent-soft); color: var(--accent-link);
}
a.badge:hover { background: var(--accent); color: var(--accent-ink); }
.hero-card .badge { background: var(--accent); color: var(--accent-ink); }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.meta > * + *::before { content: "·"; margin-right: 12px; opacity: .6; }
.meta-comments { display: inline-flex; align-items: center; gap: 4px; }
.meta-author { font-weight: 650; color: var(--ink-2); }
.hero-card .meta-author { color: #fff; }

.ph {
	display: grid; place-items: center; width: 100%; height: 100%;
	background:
		radial-gradient(circle at 20% 15%, rgba(255, 255, 255, .22), transparent 45%),
		linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 35%, #0b1220));
	color: rgba(255, 255, 255, .85); font-weight: 800; font-size: clamp(36px, 8vw, 72px);
}

.card-grid { display: grid; gap: 22px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 16px 16px 18px; display: grid; gap: 10px; align-content: start; flex: 1; }
.card-title { font-size: 17px; line-height: 1.3; text-wrap: balance; }
.card-title a:hover { color: var(--accent-link); }
.card-excerpt { margin: 0; color: var(--ink-2); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.row-list { display: grid; }
.row-card { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.row-card:first-child { padding-top: 0; }
.row-media { display: block; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--surface-2); align-self: start; }
.row-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.row-card:hover .row-media img { transform: scale(1.05); }
.row-body { display: grid; gap: 10px; align-content: start; }
.row-title { font-size: 22px; line-height: 1.25; letter-spacing: -.025em; text-wrap: balance; }
.row-title a:hover { color: var(--accent-link); }
.row-excerpt { margin: 0; color: var(--ink-2); }

/* =========================================================
   9. Sidebar & widgets
   ========================================================= */
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.widget-title { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.widget-title span { display: inline-flex; align-items: center; gap: 8px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.widget li:last-child { border-bottom: 0; }
.widget a:hover { color: var(--accent-link); }
.widget select, .widget input[type="text"], .widget input[type="email"] { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }

.trending { list-style: none; counter-reset: t; margin: 0; padding: 0; display: grid; gap: 16px; }
.trending-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 0 !important; border: 0 !important; }
.trending-rank { font-size: 28px; font-weight: 800; line-height: 1; letter-spacing: -.04em; color: var(--accent-link); opacity: .9; font-variant-numeric: tabular-nums; }
.trending-body { display: grid; gap: 4px; }
.trending-title { font-weight: 700; line-height: 1.3; font-size: 15px; }

.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tagcloud a { padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px !important; color: var(--ink-2); }
.tagcloud a:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-link); }

.newsletter {
	border-radius: var(--radius); padding: 24px; color: #fff; position: relative; overflow: hidden;
	background:
		radial-gradient(circle at 100% 0, rgba(255, 255, 255, .22), transparent 50%),
		linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 38%, #070b14));
}
.newsletter-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .18); margin-bottom: 14px; }
.newsletter-title { font-size: 21px; margin-bottom: 6px; }
.newsletter-text { color: rgba(255, 255, 255, .86); font-size: 14.5px; margin-bottom: 16px; }
.newsletter-form { display: grid; gap: 10px; }
.newsletter-form input[type="email"] { width: 100%; padding: 12px 14px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .96); color: #0b1220; }
.newsletter-form button { padding: 12px 14px; border-radius: 10px; border: 0; background: #0b1220; color: #fff; font-weight: 700; }
.newsletter-form button:hover { background: #000; }
.newsletter-embed input[type="email"], .newsletter-embed input[type="text"] { width: 100%; padding: 12px 14px; border-radius: 10px; border: 0; margin-bottom: 10px; color: #0b1220; }
.newsletter-embed input[type="submit"], .newsletter-embed button { width: 100%; padding: 12px; border-radius: 10px; border: 0; background: #0b1220; color: #fff; font-weight: 700; cursor: pointer; }
.newsletter-hint { margin: 0; font-size: 13px; background: rgba(0, 0, 0, .25); padding: 10px 12px; border-radius: 8px; }
.newsletter-hint a { text-decoration: underline; }

/* =========================================================
   10. Archive & search headers
   ========================================================= */
.archive-header { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 2px solid var(--ink); display: grid; gap: 10px; }
.archive-kicker { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 800; color: var(--accent-link); }
.archive-title { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.04em; }
.archive-description { color: var(--ink-2); max-width: 62ch; margin: 0; }
.archive-header .search-form { margin-top: 8px; }

.no-results { text-align: center; padding: 56px 20px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); display: grid; gap: 14px; justify-items: center; }
.no-results .search-form { width: 100%; }

.pagination { margin-top: 32px; }
.pagination ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers {
	display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px;
	border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 650;
}
.pagination a.page-numbers:hover { border-color: var(--accent); color: var(--accent-link); }
.pagination .current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pagination .dots { border: 0; background: transparent; }

/* =========================================================
   11. Single article
   ========================================================= */
.article { min-width: 0; }
.article-page { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 44px); }
.article-header { display: grid; gap: 16px; margin-bottom: 26px; }
.article-title { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.1; letter-spacing: -.04em; text-wrap: balance; }
.article-deck { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--ink-2); margin: 0; max-width: 60ch; }
.breadcrumbs { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumbs a:hover { color: var(--accent-link); }
.breadcrumbs .sep { opacity: .5; }

.byline { display: flex; align-items: center; gap: 12px; padding-top: 6px; }
.byline-avatar img { border-radius: 50%; width: 44px; height: 44px; }
.byline-text { display: grid; gap: 1px; font-size: 14px; }
.byline-name { font-weight: 700; }
.byline-name a:hover { color: var(--accent-link); }
.byline-meta { color: var(--muted); font-size: 13px; }
.byline-meta .dot { margin: 0 4px; }

.article-figure { margin: 0 0 32px; }
.article-figure img { width: 100%; border-radius: var(--radius); }
.article-figure figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; }

.entry-content { font-size: 18.5px; line-height: 1.78; color: var(--ink-2); max-width: 720px; overflow-wrap: break-word; }
.article-page .entry-content { max-width: none; }
.entry-content > * { margin-block: 0 1.35em; }
.entry-content h2 { font-size: 30px; margin-top: 1.9em; color: var(--ink); }
.entry-content h3 { font-size: 24px; margin-top: 1.7em; color: var(--ink); }
.entry-content h4 { font-size: 19px; margin-top: 1.5em; color: var(--ink); }
.entry-content a { color: var(--accent-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.entry-content a:hover { text-decoration-thickness: 2px; }
.entry-content strong { color: var(--ink); }
.entry-content img { border-radius: 10px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: .45em; }
.entry-content > p:first-of-type::first-letter { font-size: 1em; }

.entry-content blockquote {
	margin-inline: 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--accent);
	font-size: 1.15em; color: var(--ink); font-weight: 500;
}
.entry-content blockquote cite { display: block; margin-top: .6em; font-size: 14px; color: var(--muted); font-style: normal; }
.entry-content pre {
	background: #0b1220; color: #e8edf7; padding: 18px 20px; border-radius: 12px; overflow-x: auto;
	font-family: var(--font-mono); font-size: 14.5px; line-height: 1.6;
}
.entry-content code { font-family: var(--font-mono); font-size: .88em; background: var(--surface-2); padding: .15em .4em; border-radius: 5px; }
.entry-content pre code { background: none; padding: 0; font-size: inherit; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 16px; }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content th { background: var(--surface-2); color: var(--ink); }
.entry-content hr { border: 0; height: 1px; background: var(--line); margin-block: 2.2em; }
.entry-content .wp-caption, .entry-content figure { max-width: 100%; }
.entry-content figcaption, .wp-caption-text { font-size: 13px; color: var(--muted); margin-top: 8px; }
.entry-content .alignleft { float: left; margin: .3em 1.5em 1em 0; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.5em; }
.entry-content .aligncenter { margin-inline: auto; display: block; }
.entry-content .alignwide { width: min(1000px, 100vw - 32px); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content .wp-block-embed iframe, .entry-content iframe { width: 100%; border: 0; border-radius: 10px; }
.entry-content .wp-block-button__link { border-radius: 999px; background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.entry-content .wp-block-pullquote { border-block: 3px solid var(--accent); padding-block: 1.4em; text-align: center; }
.entry-content .has-drop-cap:not(:focus)::first-letter { color: var(--accent-link); }

.page-links { display: flex; gap: 8px; align-items: center; font-size: 15px; }

.article-footer { display: grid; gap: 18px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); max-width: 720px; }
.article-page .article-footer { max-width: none; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag-list-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 4px; }
.tag-list a { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.tag-list a:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-link); }

.share { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.share-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.share ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.share a, .share-copy {
	display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
	border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 650; color: var(--ink-2);
}
.share a:hover, .share-copy:hover { border-color: var(--accent); color: var(--accent-link); }

.author-box { display: flex; gap: 18px; align-items: flex-start; margin-top: 32px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-width: 720px; }
.author-box img { border-radius: 50%; flex: none; }
.author-box-kicker { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.author-box-name { font-size: 19px; margin: 2px 0 6px; }
.author-box p { margin: 0; color: var(--ink-2); font-size: 15px; }

.post-navigation { margin-top: 32px; max-width: 720px; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.post-navigation a { display: grid; gap: 4px; height: 100%; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.post-navigation a:hover { border-color: var(--accent); }
.post-navigation .nav-next { text-align: right; grid-column: 2; }
.nav-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-link); }
.nav-title { font-weight: 700; line-height: 1.3; }

.read-progress { position: fixed; z-index: 200; top: 0; left: 0; right: 0; height: 3px; pointer-events: none; }
.admin-bar .read-progress { top: 32px; }
@media (max-width: 782px) { .admin-bar .read-progress { top: 46px; } }
.read-progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }

/* =========================================================
   12. Comments
   ========================================================= */
.comments { margin-top: 44px; max-width: 720px; }
.comments-title, .comment-reply-title { font-size: 24px; margin-bottom: 20px; }
.comment-list { list-style: none; margin: 0 0 32px; padding: 0; }
.comment-list .children { list-style: none; padding-left: clamp(16px, 4vw, 40px); border-left: 2px solid var(--line); margin-left: 8px; }
.comment { margin-top: 18px; }
.comment-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.comment-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.comment-meta img { border-radius: 50%; }
.comment-meta-text { display: grid; line-height: 1.3; }
.comment-date { font-size: 12.5px; color: var(--muted); }
.comment-content { font-size: 16px; color: var(--ink-2); }
.comment-content p:last-child { margin: 0; }
.comment-actions { display: flex; gap: 14px; margin-top: 10px; font-size: 13px; font-weight: 650; }
.comment-actions a { color: var(--accent-link); }
.comment-awaiting { font-size: 13px; color: var(--muted); font-style: italic; }
.bypostauthor > .comment-body { border-color: var(--accent); }

.comment-form { display: grid; gap: 14px; }
.comment-form p { margin: 0; }
.comment-form label { display: block; font-weight: 650; font-size: 14px; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.comment-form-cookies-consent label { margin: 0; font-weight: 400; }

/* =========================================================
   13. 404
   ========================================================= */
.error-404 { text-align: center; display: grid; gap: 18px; justify-items: center; padding-block: 72px; }
.error-404 .search-form { width: 100%; }
.error-code { font-size: clamp(80px, 18vw, 160px); font-weight: 900; letter-spacing: -.06em; line-height: 1; color: var(--accent-link); }

/* =========================================================
   14. Footer
   ========================================================= */
.site-footer { background: #070b14; color: #b7c1d6; margin-top: 24px; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; padding-block: 56px 40px; }
.footer-about .brand { color: #fff; margin-bottom: 14px; }
.footer-about p { max-width: 38ch; }
.footer-widget-title { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: #fff; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer .widget { background: transparent; border: 0; padding: 0; }
.site-footer .social a { color: #b7c1d6; border: 1px solid #1d283c; }
.site-footer .social a:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
/* Footer social icons: a row of round buttons (beats the footer's generic stacked-list rule above) */
.site-footer .social.footer-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.site-footer .footer-social a { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 12px; transition: background .15s, border-color .15s, color .15s; }
.footer-bottom { border-top: 1px solid #141c2c; font-size: 14px; }
.footer-bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 20px; }
.footer-bottom p { margin: 0; }
.footer-menu { display: flex !important; gap: 20px !important; flex-wrap: wrap; }

.to-top {
	position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 46px; height: 46px; display: grid; place-items: center;
	border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow);
}
.to-top[hidden] { display: none; }
.to-top:hover { filter: brightness(1.12); }

/* =========================================================
   15. Responsive
   ========================================================= */
@media (max-width: 1100px) {
	.layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
	.card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
	.layout { grid-template-columns: minmax(0, 1fr); }
	.sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
	.sidebar > .widget-tags { grid-column: 1 / -1; }

	.menu-toggle { display: inline-grid; }
	.primary-nav {
		position: fixed; inset: 66px 0 0 0; z-index: 99; background: var(--surface); padding: 16px var(--gutter) 40px;
		/* Fade and drop in. (Parking the closed menu off to the right made phones treat the page as wider
		   than the screen, so it could be dragged sideways.) */
		overflow-y: auto; opacity: 0; transform: translateY(-10px); visibility: hidden;
		transition: opacity .2s, transform .2s, visibility .2s;
	}
	.admin-bar .primary-nav { top: 112px; }
	.nav-open .primary-nav { opacity: 1; transform: none; visibility: visible; }
	.nav-open { overflow: hidden; }
	.nav-open .when-closed { display: none; }
	.nav-open .when-open { display: inline-flex; }
	.primary-nav .menu { flex-direction: column; gap: 0; }
	.primary-nav .menu a { padding: 14px 4px; font-size: 18px; border-bottom: 1px solid var(--line); border-radius: 0; }
	.primary-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 16px; background: transparent; }
	.primary-nav .sub-menu a { font-size: 16px; white-space: normal; }
	.primary-nav .menu-item-has-children > a::after { display: none; }
	.nav-social { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
	.nav-social a { width: 40px; height: 40px; border: 1px solid var(--line); }

	.hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
	.hero-lead { grid-column: 1 / -1; grid-row: auto; min-height: 380px; }
	.hero-card { min-height: 220px; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-about { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
	.topbar-tagline, .topbar-social { display: none; }
	.header-inner { gap: 12px; min-height: 60px; }
	.primary-nav { inset: 60px 0 0 0; }
	.brand { font-size: 20px; }

	.hero-grid { grid-template-columns: 1fr; }
	.hero-lead { min-height: 340px; }
	.hero-lead .hero-body { padding: 20px; }
	.hero-excerpt { display: none; }

	.row-card { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; padding: 16px 0; }
	.row-title { font-size: 17px; }
	.row-excerpt { display: none; }
	.row-media { aspect-ratio: 1; }
	.row-media .ph { font-size: 36px; }

	.card-grid, .card-grid-3 { grid-template-columns: minmax(0, 1fr); }
	.sidebar { grid-template-columns: minmax(0, 1fr); }
	.entry-content { font-size: 17.5px; }
	.entry-content h2 { font-size: 25px; }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.post-navigation .nav-next { grid-column: auto; text-align: left; }
	.author-box { flex-direction: column; }
	.footer-grid { grid-template-columns: 1fr; gap: 32px; }
	.ticker-label span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.ticker-viewport { overflow-x: auto; }
	.ticker-track { animation: none; }
	.ticker-set[aria-hidden="true"] { display: none; }
}

@media print {
	.topbar, .site-header, .ticker, .sidebar, .site-footer, .share, .comments, .post-navigation, .to-top, .read-progress, .related { display: none !important; }
	body { background: #fff; color: #000; }
	.entry-content { font-size: 12pt; color: #000; }
	.entry-content a::after { content: " (" attr(href) ")"; font-size: .85em; }
}

/* =========================================================
   Cookie notice & subscribe pop-up
   ========================================================= */

/* ---------- Cookie notice ---------- */
.cookie-banner {
	position: fixed; z-index: 200; left: 20px; bottom: 20px; width: min(440px, calc(100vw - 40px));
	opacity: 0; transform: translateY(18px); transition: opacity .25s ease, transform .25s ease;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner.is-visible { opacity: 1; transform: none; }

.cookie-card {
	background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 18px;
	padding: 20px; box-shadow: 0 2px 4px rgba(11, 18, 32, .06), 0 24px 60px rgba(11, 18, 32, .22);
}
.cookie-view[hidden] { display: none; }
.cookie-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cookie-icon {
	display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px;
	background: var(--accent-soft); color: var(--accent-link);
}
.cookie-title { margin: 0; font-size: 17px; font-weight: 750; letter-spacing: -.01em; line-height: 1.25; }
.cookie-text { margin: 0 0 16px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.cookie-text a { color: var(--accent-link); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.cookie-actions { display: flex; gap: 10px; }
.cookie-btn {
	flex: 1; min-height: 44px; padding: 10px 14px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 700;
	cursor: pointer; border: 1.5px solid var(--accent); transition: filter .15s, background .15s, transform .05s;
}
.cookie-btn:active { transform: translateY(1px); }
.cookie-btn-solid { background: var(--accent); color: var(--accent-ink); }
.cookie-btn-solid:hover { filter: brightness(1.1); }
.cookie-btn-outline { background: transparent; color: var(--accent-link); }
.cookie-btn-outline:hover { background: var(--accent-soft); }
.cookie-link {
	display: block; width: 100%; margin-top: 12px; padding: 6px; background: none; border: 0; cursor: pointer;
	font: inherit; font-size: 13px; font-weight: 650; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px;
}
.cookie-link:hover { color: var(--accent-link); }

.cookie-options { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.cookie-option {
	position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px;
	background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
}
div.cookie-option { cursor: default; }
.cookie-option-text { display: grid; gap: 2px; min-width: 0; }
.cookie-option-text strong { font-size: 14px; }
.cookie-option-text span { font-size: 12.5px; line-height: 1.45; color: var(--muted); }

.switch-input { position: absolute; right: 14px; top: 50%; width: 42px; height: 24px; margin: -12px 0 0; opacity: 0; cursor: pointer; }
.switch { position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 22%, transparent); transition: background .2s; }
.switch::after {
	content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s;
}
.switch-input:checked + .switch { background: var(--accent); }
.switch-input:checked + .switch::after, .switch.is-locked::after { transform: translateX(18px); }
.switch-input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch.is-locked { background: var(--accent); opacity: .5; }

.cookie-reopen {
	padding: 0; background: none; border: 0; cursor: pointer; font: inherit; color: inherit; opacity: .8;
	text-decoration: underline; text-underline-offset: 3px;
}
.cookie-reopen:hover { opacity: 1; }

/* ---------- Subscribe pop-up ---------- */
html.has-modal { overflow: hidden; }

.sub-dialog {
	width: min(820px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0;
	border: 0; background: transparent; color: var(--ink); overflow: visible;
}
.sub-dialog::backdrop { background: rgba(7, 11, 20, .62); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.sub-dialog[open] { animation: sub-in .32s cubic-bezier(.2, .8, .2, 1); }
.sub-dialog[open]::backdrop { animation: sub-fade .3s ease; }
@keyframes sub-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes sub-fade { from { opacity: 0; } to { opacity: 1; } }

.sub-card {
	position: relative; display: grid; grid-template-columns: 5fr 7fr; max-height: calc(100dvh - 32px); overflow: auto;
	background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
}
.sub-close {
	position: absolute; z-index: 2; top: 14px; right: 14px; display: grid; place-items: center; width: 36px; height: 36px;
	border-radius: 50%; border: 0; cursor: pointer; background: var(--surface-2); color: var(--ink-2);
}
.sub-close:hover { background: var(--line); color: var(--ink); }

.sub-side {
	display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 32px 28px; color: var(--accent-ink);
	background:
		radial-gradient(120% 80% at 0% 0%, rgba(255, 255, 255, .22), transparent 55%),
		linear-gradient(155deg, var(--accent), color-mix(in srgb, var(--accent) 52%, #000));
}
.sub-badge { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.sub-badge .brand-mark { background: rgba(255, 255, 255, .2); color: inherit; }
.sub-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.sub-points li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; font-weight: 600; line-height: 1.4; }
.sub-tick { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .22); }

.sub-main { display: grid; align-content: center; gap: 12px; padding: 40px 36px 28px; }
.sub-icon {
	display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
	background: var(--accent-soft); color: var(--accent-link);
}
.sub-title { margin: 6px 0 0; font-size: clamp(24px, 3.4vw, 30px); line-height: 1.15; letter-spacing: -.025em; font-weight: 800; }
.sub-text { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }

.sub-formwrap { margin-top: 8px; }
.sub-form {
	display: flex; gap: 8px; padding: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
}
.sub-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sub-form input[type="email"] {
	flex: 1; min-width: 0; padding: 10px 16px; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px;
}
.sub-form button {
	flex: none; padding: 12px 22px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-size: 15px; font-weight: 750;
	background: var(--accent); color: var(--accent-ink); transition: filter .15s;
}
.sub-form button:hover { filter: brightness(1.1); }
.sub-embed input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]) {
	width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink); font: inherit;
}
.sub-embed input[type="submit"], .sub-embed button[type="submit"] {
	margin-top: 8px; padding: 12px 22px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 750;
	background: var(--accent); color: var(--accent-ink);
}

.sub-skip {
	justify-self: start; padding: 6px 2px; background: none; border: 0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600;
	color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
}
.sub-skip:hover { color: var(--ink); }
.sub-note { margin: 0; font-size: 12.5px; color: var(--muted); }

.sub-done { display: none; justify-items: start; gap: 8px; padding: 8px 0; }
.sub-done strong { font-size: 22px; letter-spacing: -.02em; }
.sub-done > span:not(.sub-done-icon) { color: var(--ink-2); }
.sub-done-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #16a34a; color: #fff; }
.sub-dialog.is-done .sub-done { display: grid; }
.sub-dialog.is-done .sub-icon,
.sub-dialog.is-done .sub-title,
.sub-dialog.is-done .sub-text,
.sub-dialog.is-done .sub-formwrap,
.sub-dialog.is-done .sub-note,
.sub-dialog.is-done .sub-main > .sub-skip { display: none; }

/* ---------- Pop-ups on small screens ---------- */
@media (max-width: 720px) {
	.sub-card { grid-template-columns: 1fr; }
	.sub-side { display: none; }
	.sub-main { padding: 30px 22px 22px; }
	.sub-form { flex-direction: column; border-radius: 18px; padding: 8px; }
	.sub-form input[type="email"] { padding: 12px 14px; }
	.sub-form button { width: 100%; padding: 14px; }
}
@media (max-width: 560px) {
	.cookie-banner { left: 12px; right: 12px; bottom: 12px; width: auto; }
	.cookie-card { padding: 18px; border-radius: 16px; }
	.cookie-actions { flex-direction: column; }
	.sub-dialog { align-self: end; margin-bottom: 12px; }
}

@media print {
	.cookie-banner, .sub-dialog { display: none !important; }
}

/* =========================================================
   Mobile & tablet polish (1.4.0)
   ========================================================= */

/* Nothing can push the page wider than the screen */
h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
pre { max-width: 100%; overflow-x: auto; }

/* Hero cards grow with their text instead of clipping it (badge, long headlines) */
.hero-card { display: flex; flex-direction: column; justify-content: flex-end; }
.hero-body { position: relative; inset: auto; }
/* Tablet: the big lead story keeps its height. (A later ".hero-card" rule used to shrink it to 220px.) */
@media (max-width: 960px) { .hero-grid .hero-lead { min-height: 380px; } }
@media (max-width: 680px) { .hero-grid .hero-lead { min-height: 340px; } }

/* Top bar: the icon row never wraps onto a second line */
.topbar-left { flex: 1 1 auto; }
.topbar-social { flex: none; flex-wrap: nowrap; }

/* Header: comfortable touch targets, and the logo gives way before the buttons do */
.branding { min-width: 0; }
.brand { max-width: 100%; min-width: 0; }
.brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 960px), (pointer: coarse) {
	.icon-btn { width: 44px; height: 44px; }
}
@media (max-width: 380px) {
	.header-inner { gap: 6px; }
	.header-actions { gap: 0; }
	.brand { font-size: 18px; gap: 8px; }
	.brand-mark { width: 30px; height: 30px; }
}

/* Footer social icons: two even rows on a phone, never one lonely icon on the second row */
@media (max-width: 480px) {
	.site-footer .social.footer-social { max-width: 188px; }
}

/* Articles on small screens */
.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-block: 0 1.35em; }
.table-scroll > table { margin: 0; min-width: 100%; }
.table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content video, .entry-content embed, .entry-content object { max-width: 100%; }
.share a, .share-copy { min-height: 40px; }
@media (max-width: 680px) {
	.pagination .page-numbers { min-width: 44px; height: 44px; }
}
@media (max-width: 560px) {
	.entry-content .alignleft, .entry-content .alignright { float: none; display: block; margin: 0 auto 1.2em; max-width: 100%; }
	.byline { align-items: flex-start; }
	.comment-body { padding: 14px; }
}

/* Pop-up email field: 16px stops iPhones zooming the page when it is tapped */
.sub-form input[type="email"] { font-size: 16px; }

/* Images and figures inside articles use the full text column (browsers add a 40px margin to <figure>) */
.entry-content figure { margin-inline: 0; }

/* Cards without a featured image: keep the placeholder letter clear of the headline */
.hero-card .ph { place-items: start center; padding-top: 12%; }

/* Very small phones (320px): let the logo shrink a little so the whole name still shows */
@media (max-width: 340px) {
	.brand { font-size: 16px; gap: 6px; }
	.brand-mark { width: 28px; height: 28px; }
}
