/*
Theme Name: THSH Tech v3
Theme URI: https://thehomesmarthome.com
Author: The Home Smart Home
Author URI: https://thehomesmarthome.com
Description: Editorial redesign of THSH Tech. The site's own purple-to-blue house logo and palette, IBM Plex Serif headlines, mono metadata, hairline rules, everyday Home Assistant states as the motif. Light and dark mode.
Version: 3.1.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: thsh-tech
*/

/* =========================================================
   1. Tokens (derived from the v2 palette + the logo's purple-to-blue)
   ========================================================= */
:root {
	--font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-serif: var(--font-sans);
	--font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

	--fs-xs: .8125rem;
	--fs-sm: .9rem;
	--fs-read: 1.0625rem;
	--fs-h1: clamp(2.05rem, 1.35rem + 3.3vw, 3.5rem);
	--fs-title: clamp(1.85rem, 1.35rem + 2.2vw, 2.75rem);
	--fs-section: clamp(1.45rem, 1.25rem + .9vw, 1.95rem);

	--gutter: 18px;
	--max: 1180px;
	--read: 700px;
	--header-h: 60px;
	--r: 4px;

	--brand-1: #6d4ed6;
	--brand-2: #3b82f6;
	--bg: #ffffff;
	--surface: #ffffff;
	--surface-2: #f6f8fb;
	--border: #e2e8f0;
	--border-strong: #cbd5e1;
	--text: #0f172a;
	--text-2: #334155;
	--text-3: #64748b;
	--rule: var(--border);
	--link: #2563eb;
	--accent: #1d4ed8;
	--signal: #f59e0b;
	--btn-bg: #2563eb;
	--btn-bg-hover: #1d4ed8;
	--btn-text: #ffffff;
	--focus: #2563eb;
	--header-bg: rgb(255 255 255 / .92);
	--code-bg: #0f172a;
	--code-text: #e2e8f0;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--brand-1: #9b84f0; --brand-2: #60a5fa;
		--bg: #0a0f1e; --surface: #111827; --surface-2: #131c2e; --border: #1f2a3d; --border-strong: #334155;
		--text: #f1f5f9; --text-2: #cbd5e1; --text-3: #94a3b8; --rule: var(--border);
		--link: #60a5fa; --accent: #93c5fd; --signal: #f59e0b;
		--btn-bg: #2563eb; --btn-bg-hover: #3b82f6; --btn-text: #ffffff;
		--focus: #60a5fa; --header-bg: rgb(10 15 30 / .9);
		--code-bg: #060a15; --code-text: #e2e8f0;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--brand-1: #9b84f0; --brand-2: #60a5fa;
	--bg: #0a0f1e; --surface: #111827; --surface-2: #131c2e; --border: #1f2a3d; --border-strong: #334155;
	--text: #f1f5f9; --text-2: #cbd5e1; --text-3: #94a3b8; --rule: var(--border);
	--link: #60a5fa; --accent: #93c5fd; --signal: #f59e0b;
	--btn-bg: #2563eb; --btn-bg-hover: #3b82f6; --btn-text: #ffffff;
	--focus: #60a5fa; --header-bg: rgb(10 15 30 / .9);
	--code-bg: #060a15; --code-text: #e2e8f0;
	color-scheme: dark;
}

/* =========================================================
   2. Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
/* overflow-x: clip lives on <html>, NOT <body>: clipping body stops Chrome's native lazy loading (images never load). */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); overflow-x: clip; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
	margin: 0; background: var(--bg); color: var(--text);
	font-family: var(--font-sans); font-size: 1rem; line-height: 1.6;
	-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
html.no-scroll, html.no-scroll body { overflow: hidden; }
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
svg.icon { flex: none; display: inline-block; vertical-align: middle; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
h1, h2, h3, h4 { color: var(--text); text-wrap: balance; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: rgb(109 78 214 / .22); }
.mono { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0; }
.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px rgb(245 158 11 / .18); }
.dot--off { background: var(--border-strong); box-shadow: 0 0 0 3px rgb(148 163 184 / .16); }
.screen-reader-text, .wt-cli-sr-only {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--btn-bg); color: var(--btn-text); font-weight: 600; }
.skip-link:focus { top: 12px; color: var(--btn-text); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(var(--read) + 2 * var(--gutter)); }
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; --header-h: 66px; } }

/* =========================================================
   3. Buttons + search
   ========================================================= */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
	border: 1px solid transparent; border-radius: var(--r); font-size: .9375rem; font-weight: 600; line-height: 1.2; text-align: center;
	transition: background-color .15s, border-color .15s, color .15s;
}
.btn--primary, .btn--accent, .btn--success { background: var(--btn-bg); color: var(--btn-text); }
.btn--primary:hover, .btn--accent:hover, .btn--success:hover { background: var(--btn-bg-hover); color: var(--btn-text); }
.btn--ghost, .btn--secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover, .btn--secondary:hover { border-color: var(--text); color: var(--text); }
.btn--large { min-height: 50px; padding: 0 22px; font-size: 1rem; }
.btn--small { min-height: 40px; padding: 0 12px; font-size: .875rem; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r); background: transparent; color: var(--text-2); }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }

.search-form { position: relative; display: flex; align-items: center; gap: 6px; width: 100%; padding: 3px 3px 3px 38px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); }
.search-form:focus-within { border-color: var(--link); }
.search-form__icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search-field { flex: 1; min-width: 0; height: 42px; padding: 0 4px; border: 0; background: transparent; color: var(--text); font-size: 1rem; outline: none; -webkit-appearance: none; appearance: none; }
.search-field::placeholder { color: var(--text-3); opacity: 1; }
.search-field::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-submit { flex: none; height: 40px; padding: 0 14px; border: 0; border-radius: 3px; background: var(--btn-bg); color: var(--btn-text); font-size: .875rem; font-weight: 600; }
.search-submit:hover { background: var(--btn-bg-hover); }

.kicker { display: inline-block; color: var(--text-3); }
a.kicker:hover { color: var(--accent); }

/* =========================================================
   4. Logo, header, drawer
   ========================================================= */
.logo { display: inline-flex; align-items: center; gap: 10px; line-height: 1; }
.logo__mark { flex: none; }
.logo__text { display: flex; flex-direction: column; gap: 3px; }
.logo__top {
	font-size: 1.0625rem; font-weight: 800; letter-spacing: .015em; white-space: nowrap;
	background: linear-gradient(90deg, var(--brand-1), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo__bottom { font-size: .6875rem; font-weight: 600; letter-spacing: .14em; color: var(--text-2); white-space: nowrap; }
.logo__slash { color: var(--brand-1); letter-spacing: 0; margin-right: 1px; }
.site-footer .logo__top { background: linear-gradient(90deg, #a996f5, #7db4fb); -webkit-background-clip: text; background-clip: text; }
.site-footer .logo__bottom { color: #cbd5e1; }
.site-footer .logo__slash { color: #a996f5; }

.site-header { position: sticky; top: 0; z-index: 60; background: var(--header-bg); border-bottom: 1px solid var(--border); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.header-bar { display: flex; align-items: center; gap: 8px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; min-height: 44px; margin-right: auto; color: var(--text); }
.header-tools { display: flex; align-items: center; gap: 0; margin-right: -8px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: inline-block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: inline-block; }
	:root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
.nav-desktop { display: none; }
@media (min-width: 1024px) {
	.menu-toggle { display: none; }
	.brand { margin-right: 28px; }
	.nav-desktop { display: block; margin-right: auto; }
	.nav-list { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
	.nav-list a { position: relative; display: inline-flex; align-items: center; height: var(--header-h); padding: 0 10px; color: var(--text-2); font-size: .9375rem; }
	.nav-list a:hover { color: var(--text); }
	.nav-list .current-menu-item > a, .nav-list .current-menu-ancestor > a { color: var(--text); }
	.nav-list .current-menu-item > a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--brand-1), var(--brand-2)); }
}
.search-panel { border-top: 1px solid var(--border); background: var(--bg); padding: 12px 0 14px; }
.search-panel .search-form { max-width: 640px; }
.read-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; display: none; }
.has-progress .read-progress { display: block; }
.read-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-1), var(--brand-2)); transform: scaleX(0); transform-origin: 0 50%; }

.drawer { position: fixed; inset: 0; z-index: 120; }
.drawer[hidden] { display: none; }
.drawer__backdrop { position: absolute; inset: 0; background: rgb(8 12 20 / .45); opacity: 0; transition: opacity .2s; }
.drawer__panel {
	position: absolute; top: 0; right: 0; bottom: 0; width: min(88vw, 380px); overflow-y: auto; overscroll-behavior: contain;
	padding: 6px var(--gutter) 32px; background: var(--bg); border-left: 1px solid var(--border);
	transform: translateX(100%); transition: transform .22s cubic-bezier(.2, .7, .2, 1);
}
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; height: 58px; margin-bottom: 10px; }
.brand--small { margin: 0; }
.drawer__search { margin-bottom: 8px; }
.drawer__list, .drawer__quick { margin: 0; padding: 0; list-style: none; }
.drawer__list a { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--border); color: var(--text); font-family: var(--font-serif); font-size: 1.25rem; font-weight: 500; }
.drawer__label { margin: 26px 0 4px; color: var(--text-3); }
.drawer__quick a { display: flex; align-items: center; min-height: 44px; color: var(--text-2); font-size: .9375rem; }

/* =========================================================
   5. Homepage
   ========================================================= */
.hero { display: grid; gap: 32px; padding-block: 40px 36px; }
.hero__title { font-family: var(--font-serif); font-size: var(--fs-h1); font-weight: 600; line-height: 1.07; letter-spacing: -.022em; max-width: 14ch; }
.hero__lead { margin-top: 18px; max-width: 46ch; color: var(--text-2); font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); line-height: 1.55; }
@media (min-width: 1024px) {
	.hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 72px; align-items: end; padding-block: 76px 56px; }
}
/* The motif: everyday entity rows, like a Home Assistant card. Each one links to its guide. */
.states { border-top: 2px solid var(--rule); }
.states__head { padding: 10px 0; color: var(--text-3); border-bottom: 1px solid var(--border); }
.states__list { margin: 0; padding: 0; list-style: none; }
.states__row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 50px; border-bottom: 1px solid var(--border); }
.states__name { flex: 1; color: var(--text); font-size: 1rem; }
.states__name::after { content: ""; position: absolute; inset: 0; }
.states__row:hover .states__name { color: var(--accent); }
.states__state { color: var(--text-2); font-size: 13px; }
.states__foot { padding-top: 10px; color: var(--text-3); font-size: 12px; }

.topics { display: flex; align-items: center; gap: 14px; overflow-x: auto; scrollbar-width: none; border-block: 1px solid var(--border); }
.topics::-webkit-scrollbar { display: none; }
.topics__label { flex: none; color: var(--text-3); }
.topics ul { display: flex; margin: 0; padding: 0; list-style: none; }
.topics li { flex: none; }
.topics li + li::before { content: "/"; color: var(--border-strong); margin: 0 2px; }
.topics a { display: inline-flex; align-items: center; min-height: 46px; padding: 0 6px; color: var(--text-2); font-size: .9375rem; white-space: nowrap; }
.topics a:hover { color: var(--accent); }
@media (min-width: 1024px) { .topics { max-width: calc(var(--max) - 2 * var(--gutter)); padding-inline: 0; } }

.section { padding-block: 48px 8px; }
@media (min-width: 1024px) { .section { padding-block: 64px 8px; } }
.section__head { margin-bottom: 18px; }
.section__head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section__title { font-family: var(--font-serif); font-size: var(--fs-section); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
.section__sub { margin-top: 6px; max-width: 58ch; color: var(--text-3); font-size: .9375rem; }
.section__more { flex: none; display: inline-flex; align-items: center; min-height: 44px; color: var(--text-2); white-space: nowrap; }
.section__more:hover { color: var(--accent); }

.start-list { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--rule); }
@media (min-width: 900px) { .start-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; } }
.start-item { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--border); }
.start-item__num { color: var(--accent); font-weight: 500; }
.start-item__title { font-family: var(--font-serif); font-size: 1.125rem; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.start-item__title a { color: var(--text); }
.start-item__title a::after { content: ""; position: absolute; inset: 0; }
.start-item:hover .start-item__title a { color: var(--accent); }
.start-item__blurb { margin-top: 3px; color: var(--text-3); font-size: .9375rem; line-height: 1.5; }
.start-item__time { color: var(--text-3); white-space: nowrap; }
@media (max-width: 480px) { .start-item__time { display: none; } .start-item { grid-template-columns: 30px minmax(0, 1fr); } }
.home-about { padding-bottom: 16px; }

/* =========================================================
   6. Entry rows, cards, covers
   ========================================================= */
.post-list { border-top: 2px solid var(--rule); }
.entry-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.entry-row__meta { display: flex; flex-wrap: wrap; gap: 0 12px; color: var(--text-3); }
.entry-row__main { min-width: 0; }
.entry-row__title { font-family: var(--font-serif); font-size: 1.1875rem; font-weight: 600; line-height: 1.3; letter-spacing: -.012em; }
.entry-row__title a { color: var(--text); }
.entry-row__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.entry-row:hover .entry-row__title a { color: var(--accent); }
.entry-row__excerpt { margin-top: 6px; color: var(--text-3); font-size: .9375rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entry-row__time { display: inline-block; margin-top: 8px; color: var(--text-3); }
.entry-row__thumb { display: block; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: #fff; }
.entry-row__thumb .cover { aspect-ratio: 1; }
.entry-row--thumb { grid-template-columns: minmax(0, 1fr) 84px; }
.entry-row--thumb .entry-row__meta, .entry-row--thumb .entry-row__main { grid-column: 1; }
.entry-row--thumb .entry-row__thumb { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
.meta__score { color: var(--accent); }
@media (min-width: 768px) {
	.entry-row { grid-template-columns: 150px minmax(0, 1fr); padding: 22px 0; }
	.entry-row__meta { flex-direction: column; padding-top: 4px; }
	.entry-row--thumb { grid-template-columns: 150px minmax(0, 1fr) 112px; }
	.entry-row--thumb .entry-row__main { grid-column: 2; }
	.entry-row--thumb .entry-row__thumb { grid-column: 3; grid-row: 1; }
	.entry-row__title { font-size: 1.3125rem; }
}

.h-scroll {
	display: grid; grid-auto-flow: column; grid-auto-columns: 70%; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory; scrollbar-width: thin; margin-inline: calc(-1 * var(--gutter)); padding: 18px var(--gutter) 14px; scroll-padding-inline: var(--gutter);
	border-top: 2px solid var(--rule);
}
@media (min-width: 640px) { .h-scroll { grid-auto-columns: 40%; } }
@media (min-width: 1024px) { .h-scroll { grid-auto-columns: calc((100% - 3 * 20px) / 4); gap: 20px; margin-inline: 0; padding-inline: 0; } }
.card { position: relative; scroll-snap-align: start; }
.card__media { display: block; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: #fff; }
.card .cover { aspect-ratio: 4 / 3; }
.card__body { padding-top: 10px; }
.card .meta { color: var(--text-3); }
.card__title { margin-top: 2px; font-family: var(--font-serif); font-size: 1.03rem; font-weight: 600; line-height: 1.3; }
.card__title a { color: var(--text); }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card:hover .card__title a { color: var(--accent); }

.cover { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.cover--photo img { width: 100%; height: 100%; object-fit: cover; }
.cover--product { background: #fff; }
.cover--product img { object-fit: contain; padding: 10px; }
.cover--gen { display: flex; flex-direction: column; justify-content: space-between; padding: 12px 14px; background: linear-gradient(135deg, #5b45c4, #2f6fe0); color: #fff; }
.cover__cat { font-family: var(--font-mono); font-size: 11.5px; color: rgb(255 255 255 / .78); }
.cover__title { font-family: var(--font-serif); font-size: 1rem; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* =========================================================
   7. Listing pages + sidebars
   ========================================================= */
.page-head { padding-block: 24px 20px; }
.page-head__row { margin-top: 10px; }
.page-head__title { font-family: var(--font-serif); font-size: var(--fs-title); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.page-head__desc { margin-top: 8px; max-width: 62ch; color: var(--text-2); }
.page-head__count { margin-top: 10px; color: var(--text-3); }
.page-head__search { margin-top: 18px; max-width: 640px; }
.list-layout { display: grid; gap: 48px; padding-block: 8px 56px; }
@media (min-width: 1024px) { .list-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; } }
.pagination { margin-top: 28px; }
.pagination.is-enhanced { display: none; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r); color: var(--text-2); font-family: var(--font-mono); font-size: 13px; }
.page-numbers.current { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }
.load-more { margin-top: 24px; }
.no-results { padding: 20px 0; border-top: 2px solid var(--rule); }
.no-results h2 { font-family: var(--font-serif); font-size: 1.375rem; margin-bottom: 6px; }
.no-results p { color: var(--text-2); margin-bottom: 10px; }

.list-aside, .article-aside { display: grid; gap: 28px; align-content: start; width: 100%; max-width: 336px; margin-inline: auto; }
@media (min-width: 1024px) { .list-aside, .article-aside { max-width: none; margin: 0; } }
.side-card { border-top: 2px solid var(--rule); padding-top: 10px; }
.side-card__title { margin-bottom: 4px; color: var(--text-3); }
.side-list { margin: 0; padding: 0 0 0 1.4em; color: var(--text-3); font-family: var(--font-mono); font-size: 12px; }
.side-list li { padding: 1px 0; }
.side-list a { display: inline-block; padding: 6px 0; color: var(--text); font-family: var(--font-sans); font-size: .9375rem; line-height: 1.4; }
.side-list a:hover { color: var(--accent); }

/* =========================================================
   8. Ads: consistent, reserved space, a tiny neutral label on AdSense only
   ========================================================= */
.ad-unit { position: relative; display: block; width: 100%; margin: 36px auto; text-align: center; }
.ad-label { display: block; margin-bottom: 6px; color: var(--text-3); font-family: var(--font-mono); font-size: 10.5px; }
.ad-unit--display { min-height: 270px; }
.ad-unit--in-article { min-height: 180px; }
.ad-unit ins.adsbygoogle { margin-inline: auto; }
.ad-unit:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
/* Auto ads sometimes drop a full-width unit inside product or form boxes, which breaks them.
   Keep those boxes clean (better: add them as excluded areas in AdSense > Auto ads). */
.thsh-wl .google-auto-placed, .thsh-buybox .google-auto-placed, .faq .google-auto-placed, .toc .google-auto-placed, .author-box .google-auto-placed { display: none !important; }
.ad-unit--ali { max-width: 300px; }
.ad-unit--ali img, .ad-unit--ali-side img { width: 100%; height: auto; border-radius: var(--r); }
.thsh-ali-incontent { margin: 0; }
.ad-unit--ali-side { margin: 0 auto; max-width: 300px; }
.ad-unit--ali-side .ali-desktop { display: none; }
@media (min-width: 1024px) {
	.list-aside .ad-unit, .article-aside .ad-unit { margin: 0; }
	.ad-unit--ali-side { max-width: none; }
	.ad-unit--ali-side .ali-desktop { display: block; }
	.ad-unit--ali-side .ali-mobile { display: none; }
}
@media (min-width: 1024px) and (min-height: 760px) { .ad-unit--sticky { position: sticky; top: calc(var(--header-h) + 20px); } }
.site-content .thsh-wlb { margin-inline: auto; }
.entry-content .thsh-wlb b, .entry-content .thsh-wlb strong { color: inherit; }

/* =========================================================
   9. Article
   ========================================================= */
.article-layout { display: grid; gap: 48px; padding-block: 18px 24px; }
.article, .article-main { min-width: 0; width: 100%; max-width: var(--read); }
.article-main > .article { max-width: none; }
.article-layout--full .article-main { margin-inline: auto; }
@media (min-width: 1024px) {
	.article-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 72px; padding-top: 28px; }
	.article-layout--full { grid-template-columns: minmax(0, 1fr); }
}
.breadcrumbs { overflow: hidden; margin-bottom: 18px; color: var(--text-3); font-family: var(--font-mono); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.breadcrumbs a { display: inline-block; padding: 8px 0; color: var(--text-3); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumb-sep { margin: 0 6px; color: var(--border-strong); }
.article__header { margin-bottom: 4px; }
.article__title { margin-top: 6px; font-family: var(--font-serif); font-size: var(--fs-title); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; }
.byline { display: flex; flex-wrap: wrap; gap: 2px 0; margin-top: 18px; padding-block: 12px; border-block: 1px solid var(--border); color: var(--text-3); }
.byline > span + span::before { content: "·"; margin: 0 8px; color: var(--border-strong); }
.byline a { color: var(--text); }
.byline a:hover { color: var(--accent); }
.article__hero { margin: 22px 0 4px; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.article__hero--product .cover { aspect-ratio: auto; }
.article__hero--product .cover img { max-height: min(360px, 60vw); margin-inline: auto; width: auto; }

.toc--inline { margin: 20px 0 4px; border-bottom: 1px solid var(--border); }
.toc--inline summary { display: flex; align-items: center; gap: 8px; min-height: 48px; cursor: pointer; list-style: none; color: var(--text-2); }
.toc--inline summary::-webkit-details-marker { display: none; }
.toc--inline summary::after { content: "+"; margin-left: auto; color: var(--accent); font-size: 16px; }
.toc--inline[open] summary::after { content: "\2212"; }
.toc__list { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc__list li { counter-increment: toc; display: flex; gap: 10px; }
.toc__list li::before { content: counter(toc, decimal-leading-zero); flex: none; padding-top: 8px; color: var(--text-3); font-family: var(--font-mono); font-size: 11.5px; }
.toc__list a { display: block; padding: 6px 0; color: var(--text-2); font-size: .9375rem; line-height: 1.4; }
.toc__list a:hover { color: var(--accent); }
.toc--inline .toc__list { padding-bottom: 12px; }
.toc--side { display: none; }
@media (min-width: 1024px) {
	.toc--side { display: block; position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; border-top: 2px solid var(--rule); padding-top: 10px; }
	.toc__title { margin-bottom: 4px; color: var(--text-3); }
	.toc--side .toc__list a { font-size: .875rem; color: var(--text-3); }
	.toc--side .toc__list a.is-active { color: var(--text); font-weight: 600; }
	.toc--side .toc__list li:has(a.is-active)::before { color: var(--accent); }
}

/* Reading typography */
.entry-content { margin-top: 26px; font-size: var(--fs-read); line-height: 1.72; color: var(--text); overflow-wrap: break-word; }
@media (min-width: 768px) { .entry-content { font-size: 1.125rem; } }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { margin-top: 2.2em; margin-bottom: -.25em; font-family: var(--font-serif); font-size: clamp(1.45rem, 1.25rem + .9vw, 1.875rem); font-weight: 600; line-height: 1.22; letter-spacing: -.018em; }
.entry-content h3 { margin-top: 1.8em; margin-bottom: -.35em; font-size: clamp(1.1rem, 1.05rem + .3vw, 1.25rem); font-weight: 700; line-height: 1.35; letter-spacing: -.005em; }
.entry-content h4 { margin-top: 1.5em; font-size: 1.05rem; font-weight: 700; }
.entry-content a:not(.btn):not(.thsh-bb-btn):not(.sd-button) { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); }
.entry-content a:not(.btn):not(.thsh-bb-btn):not(.sd-button):hover { color: var(--accent); text-decoration-color: currentColor; }
.entry-content strong, .entry-content b { font-weight: 650; color: var(--text); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { padding-left: .25em; }
.entry-content li + li { margin-top: .45em; }
.entry-content li::marker { color: var(--text-3); }
.entry-content ol > li::marker { color: var(--accent); font-family: var(--font-mono); font-size: .85em; }
.entry-content li > ul, .entry-content li > ol { margin-top: .45em; }
.entry-content img { border-radius: var(--r); height: auto; }
.entry-content figure { margin-block: 1.6em; }
.entry-content figcaption, .entry-content .wp-caption-text { margin-top: 8px; color: var(--text-3); font-family: var(--font-mono); font-size: 12px; }
.entry-content .wp-caption { max-width: 100%; }
.entry-content .aligncenter { margin-inline: auto; }
.entry-content .alignleft, .entry-content .alignright { margin-block: 1em; }
@media (min-width: 640px) {
	.entry-content .alignleft { float: left; max-width: 50%; margin: .3em 1.4em 1em 0; }
	.entry-content .alignright { float: right; max-width: 50%; margin: .3em 0 1em 1.4em; }
}
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content hr { margin-block: 2.4em; border: 0; border-top: 1px solid var(--border); }
.entry-content iframe, .entry-content video, .entry-content embed { max-width: 100%; border: 0; border-radius: var(--r); }
.entry-content .wp-block-embed__wrapper iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.entry-content blockquote { padding-left: 1.1em; border-left: 2px solid var(--brand-1); color: var(--text-2); font-family: var(--font-serif); font-style: italic; font-size: 1.06em; }
.entry-content blockquote p + p { margin-top: .7em; }
.entry-content :not(pre) > code, .entry-content kbd { padding: .1em .35em; border: 1px solid var(--border); border-radius: 3px; background: var(--surface-2); font-family: var(--font-mono); font-size: .84em; color: var(--text); word-break: break-word; }

/* Code */
.code-block { position: relative; margin-block: 1.5em; }
.entry-content pre { margin: 0; padding: 40px 18px 18px; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r); background: var(--code-bg); color: var(--code-text); font-family: var(--font-mono); font-size: .84rem; line-height: 1.7; tab-size: 2; white-space: pre; }
.entry-content > pre { margin-block: 1.5em; padding-top: 18px; }
.entry-content pre code { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; white-space: inherit; }
@media (max-width: 639px) { .code-block, .entry-content > pre { margin-inline: calc(-1 * var(--gutter)); } .code-block pre { border-radius: 0; } }
.code-copy { position: absolute; top: 6px; right: 8px; min-height: 30px; padding: 0 10px; border: 1px solid rgb(255 255 255 / .16); border-radius: 3px; background: transparent; color: #b8c3d6; font-family: var(--font-mono); font-size: 12px; }
.code-copy::before { content: ""; position: absolute; inset: -7px; }
.code-copy:hover { color: #fff; border-color: rgb(255 255 255 / .35); }
.code-copy.is-done { color: var(--signal); border-color: rgb(245 158 11 / .5); }

/* Tables */
.table-scroll { margin-block: 1.5em; overflow-x: auto; -webkit-overflow-scrolling: touch; border-top: 2px solid var(--rule); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; }
.table-scroll table { margin: 0; }
.entry-content th, .entry-content td { padding: 10px 12px 10px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.entry-content th { color: var(--text-3); font-family: var(--font-mono); font-size: 12px; font-weight: 500; white-space: nowrap; }
.entry-content .wp-block-table { margin-block: 1.5em; overflow-x: auto; }
.entry-content .wp-block-table .table-scroll { margin: 0; }

/* TL;DR + callouts: a label and a rule, nothing more */
.entry-content .aio-tldr { padding: 12px 0 14px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--border); color: var(--text-2); font-size: .97em; line-height: 1.65; }
.entry-content .aio-tldr > strong:first-child { display: block; margin-bottom: 4px; color: var(--accent); font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.entry-content .callout { padding-left: 16px; border-left: 2px solid var(--border-strong); color: var(--text-2); }
.entry-content .callout > strong:first-child { color: var(--text); }
.entry-content .callout--warn { border-left-color: var(--signal); }

/* FAQ accordion (JS builds it from H2 + H3/P; the H3s stay H3s) */
.entry-content .faq { margin-top: 1.1em; border-top: 1px solid var(--rule); }
.faq__item { border-bottom: 1px solid var(--border); }
.entry-content .faq__h { margin: 0; font-size: 1rem; }
.faq__q { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 56px; padding: 14px 0; border: 0; background: transparent; color: var(--text); font-size: 1.03rem; font-weight: 650; line-height: 1.4; text-align: left; }
.faq__q:hover { color: var(--accent); }
.faq__q::after { content: "+"; flex: none; color: var(--accent); font-family: var(--font-mono); font-size: 18px; font-weight: 400; }
.faq__q[aria-expanded="true"]::after { content: "\2212"; }
.faq__a { padding: 0 0 16px; color: var(--text-2); }
.faq__a > * + * { margin-top: .8em; }
.entry-content details { border-bottom: 1px solid var(--border); }
.entry-content details > summary { position: relative; min-height: 52px; padding: 14px 32px 14px 0; cursor: pointer; list-style: none; font-weight: 650; }
.entry-content details > summary::-webkit-details-marker { display: none; }
.entry-content details > summary::after { content: "+"; position: absolute; right: 0; top: 12px; color: var(--accent); font-family: var(--font-mono); font-size: 18px; }
.entry-content details[open] > summary::after { content: "\2212"; }
.entry-content details > :not(summary) { padding-bottom: 14px; color: var(--text-2); }

/* Jetpack sharing: quiet text links */
.entry-content .sharedaddy { margin-top: 2.4em; }
body.thsh-v3 .sharedaddy .sd-title { margin: 0 0 6px; font-family: var(--font-mono) !important; font-size: 12px !important; font-weight: 400 !important; color: var(--text-3); }
body.thsh-v3 .sharedaddy .sd-title::before { display: none !important; }
body.thsh-v3 .sd-content ul { display: flex !important; flex-wrap: wrap; gap: 6px; margin: 0 !important; padding: 0 !important; list-style: none !important; }
body.thsh-v3 .sd-content ul li { margin: 0 !important; padding: 0 !important; }
body.thsh-v3 .sd-content ul li::marker { content: none; }
body.thsh-v3 .sd-content ul li a.sd-button {
	display: inline-flex !important; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px !important; border-radius: var(--r) !important;
	border: 1px solid var(--border) !important; background: transparent !important; color: var(--text-2) !important; box-shadow: none !important;
	font-size: 13px !important; font-weight: 500 !important; text-decoration: none !important;
}
body.thsh-v3 .sd-content ul li a.sd-button:hover { border-color: var(--text) !important; color: var(--text) !important; }
#jp-relatedposts { display: none !important; }

/* Article footer */
.article__footer { margin-top: 36px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; }
.tag { display: inline-flex; align-items: center; min-height: 36px; color: var(--text-3); font-family: var(--font-mono); font-size: 12.5px; }
.tag::before { content: "#"; color: var(--accent); margin-right: 1px; }
.tag:hover { color: var(--text); }
.author-box { margin-top: 36px; padding-top: 12px; border-top: 2px solid var(--rule); }
.author-box__label { color: var(--text-3); }
.author-box__name { margin-top: 8px; font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; }
.author-box__text { margin-top: 6px; max-width: 60ch; color: var(--text-2); font-size: .9875rem; line-height: 1.6; }
.author-box__link { display: inline-flex; align-items: center; min-height: 40px; margin-top: 4px; color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--brand-1); font-size: .9375rem; }
.home-about .author-box { margin-top: 8px; max-width: var(--read); }
.related { padding-bottom: 8px; }
.comments-wrap { padding-block: 16px 48px; }

/* =========================================================
   10. Buy box (mu-plugin markup, theme styling only)
   ========================================================= */
body.thsh-v3 .thsh-buybox { margin: 2em 0; padding: 0; border: 1px solid var(--border); border-top: 2px solid var(--rule); border-radius: 0 0 var(--r) var(--r); background: var(--surface); box-shadow: none; font-size: 1rem; line-height: 1.5; }
body.thsh-v3 .thsh-buybox__title { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-2); font-family: var(--font-mono); font-size: 12.5px; font-weight: 400; letter-spacing: 0; }
body.thsh-v3 .thsh-buybox__title::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px rgb(245 158 11 / .18); }
body.thsh-v3 .thsh-buybox__list { display: block; padding: 0 16px; }
body.thsh-v3 .thsh-buybox__item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; margin: 0; border-top: 1px solid var(--border); }
body.thsh-v3 .thsh-buybox__item:first-child { border-top: 0; }
body.thsh-v3 .thsh-buybox__item img { border-radius: 3px; border: 1px solid var(--border); background: #fff; }
body.thsh-v3 .thsh-buybox__name { color: var(--text); font-weight: 650; font-size: 1rem; line-height: 1.35; }
body.thsh-v3 .thsh-buybox__why { margin-top: 2px; color: var(--text-3); font-size: .9rem; line-height: 1.5; }
body.thsh-v3 .entry-content a.thsh-bb-btn, body.thsh-v3 a.thsh-bb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--r); background: var(--btn-bg); color: var(--btn-text); font-size: .875rem; font-weight: 600; text-decoration: none; white-space: nowrap; transform: none; filter: none; }
body.thsh-v3 .entry-content a.thsh-bb-btn::after { content: "\2197"; font-weight: 400; }
body.thsh-v3 .entry-content a.thsh-bb-btn:hover { background: var(--btn-bg-hover); color: var(--btn-text); transform: none; }
body.thsh-v3 .entry-content a.thsh-bb-btn--alt { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
@media (max-width: 600px) {
	body.thsh-v3 .thsh-buybox__item { flex-direction: column; align-items: stretch; gap: 10px; }
	body.thsh-v3 .entry-content a.thsh-bb-btn { width: 100%; }
}

/* Waitlist box (mu-plugin markup) */
body.thsh-v3 .thsh-wl { margin: 2em 0; padding: 14px 0 16px; border: 0; border-top: 2px solid var(--rule); border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; box-shadow: none; }
body.thsh-v3 .thsh-wl-eyebrow { color: var(--accent); font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
body.thsh-v3 .thsh-wl .thsh-wl-title { font-family: var(--font-serif); font-size: 1.3em; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
body.thsh-v3 .thsh-wl-body { color: var(--text-2); }
body.thsh-v3 .thsh-wl-form input[type=email] { min-height: 46px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); color: var(--text); }
body.thsh-v3 .thsh-wl-form button { min-height: 46px; border-radius: var(--r); background: var(--btn-bg); color: var(--btn-text); }
body.thsh-v3 .thsh-wl-fine { color: var(--text-3); opacity: 1; font-family: var(--font-mono); font-size: 11.5px; }

/* =========================================================
   11. Reviews + comparisons
   ========================================================= */
.review-rating-box { display: flex; align-items: center; gap: 12px; margin: 18px 0 0; padding: 10px 0; border-bottom: 1px solid var(--border); }
.review-rating-box > div { display: flex; align-items: center; gap: 10px; }
.rating-stars { display: inline-flex; gap: 1px; line-height: 1; }
.rating-stars .star { color: var(--border-strong); font-size: 1.1rem; }
.rating-stars .star--filled { color: var(--signal); }
.rating-stars--small .star { font-size: .9rem; }
.rating-number { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.review-pros-cons { display: grid; gap: 24px; margin: 32px 0; }
@media (min-width: 640px) { .review-pros-cons { grid-template-columns: 1fr 1fr; } }
.pros, .cons { padding-top: 10px; border-top: 2px solid #15803d; }
.cons { border-top-color: #b91c1c; }
.pros h3, .cons h3 { margin: 0 0 6px; font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; color: var(--text-3); }
.pros ul, .cons ul { margin: 0; padding: 0; list-style: none; }
.pros li, .cons li { position: relative; padding: 6px 0 6px 22px; border-bottom: 1px solid var(--border); color: var(--text-2); font-size: .9375rem; line-height: 1.5; }
.pros li::before, .cons li::before { position: absolute; left: 0; top: 6px; font-family: var(--font-mono); }
.pros li::before { content: "+"; color: #15803d; }
.cons li::before { content: "\2212"; color: #b91c1c; }
[data-theme="dark"] .pros li::before { color: #4ade80; }
[data-theme="dark"] .cons li::before { color: #f87171; }
.review-verdict { margin: 32px 0; padding-top: 12px; border-top: 2px solid var(--rule); }
.review-verdict h3 { margin: 0 0 6px; font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; }
.review-verdict p { color: var(--text-2); }
.aliexpress-cta { display: grid; gap: 10px; margin: 24px 0; padding: 14px 16px; border: 1px solid var(--border); border-top: 2px solid var(--rule); border-radius: 0 0 var(--r) var(--r); background: var(--surface); }
.aliexpress-cta__label { color: var(--accent); font-family: var(--font-mono); font-size: 12px; }
.aliexpress-cta__body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.aliexpress-cta__name { font-family: var(--font-serif); font-size: 1.125rem; font-weight: 600; color: var(--text); }
.aliexpress-cta__price { color: var(--text-2); font-family: var(--font-mono); font-size: 13px; }
.aliexpress-cta .btn { width: 100%; }
@media (min-width: 640px) {
	.aliexpress-cta { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
	.aliexpress-cta__label { grid-column: 1 / -1; margin-bottom: -4px; }
	.aliexpress-cta .btn { width: auto; }
}
.aliexpress-recap { margin: 20px 0 0; color: var(--text-2); font-size: var(--fs-read); line-height: 1.7; }
.aliexpress-section-title { margin: 2em 0 .8em; font-family: var(--font-serif); font-size: clamp(1.45rem, 1.25rem + .9vw, 1.875rem); font-weight: 600; letter-spacing: -.018em; }
.comparison-products { display: grid; gap: 28px 20px; margin: 0 0 24px; }
@media (min-width: 640px) { .comparison-products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.comparison-products > .comparison-product { display: flex; flex-direction: column; gap: 6px; }
.comparison-product__image { aspect-ratio: 4 / 3; display: grid; place-items: center; margin: 0 0 6px; border: 1px solid var(--border); border-radius: var(--r); background: #fff; overflow: hidden; }
.comparison-product__image img { max-height: 100%; width: auto; object-fit: contain; padding: 8px; }
.comparison-product__title { font-family: var(--font-serif); font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.comparison-product__title a { color: var(--text); }
.comparison-product__rating { display: flex; align-items: center; gap: 8px; }
.comparison-product__price, .review-price { font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.comparison-product__verdict { color: var(--text-3); font-size: .9375rem; line-height: 1.5; flex: 1; }
.comparison-product__cta { margin-top: 4px; }
.comparison-product__cta .btn { width: 100%; }
.comparison-table-wrapper, .comparison-table { margin: 20px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border-top: 2px solid var(--rule); }
.comparison-table-wrapper .comparison-table { margin: 0; border: 0; }
.comparison-grid { display: grid; min-width: max-content; font-size: var(--fs-sm); }
.comparison-cell { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--border); background: var(--bg); color: var(--text-2); }
.comparison-label { position: sticky; left: 0; z-index: 1; color: var(--text-3); font-family: var(--font-mono); font-size: 12px; }
.comparison-cell.comparison-product img { width: 72px; height: 72px; object-fit: contain; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 3px; background: #fff; }
.comparison-cell.comparison-product h3 { font-family: var(--font-serif); font-size: var(--fs-sm); font-weight: 600; line-height: 1.35; }
.comparison-cell.comparison-product h3 a { color: var(--text); }
.no-data { color: var(--text-3); }
.thsh-rating-inline { display: inline-flex; align-items: center; gap: 6px; }

/* =========================================================
   12. 404, comments
   ========================================================= */
.error-404 { padding-block: 48px 64px; }
.error-404__code { display: flex; align-items: center; gap: 10px; color: var(--text-3); }
.error-404__title { margin-top: 14px; font-family: var(--font-serif); font-size: var(--fs-title); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.error-404__text { margin: 12px 0 22px; max-width: 52ch; color: var(--text-2); }
.error-404__list { margin: 28px 0 0; padding: 0; list-style: none; border-top: 2px solid var(--rule); }
.error-404__list li { border-bottom: 1px solid var(--border); }
.error-404__list a { display: flex; align-items: center; min-height: 52px; padding: 10px 0; color: var(--text); font-family: var(--font-serif); font-size: 1.0625rem; font-weight: 600; }
.error-404__list a:hover { color: var(--accent); }

.comments-area, #comments, #respond { margin-top: 24px; }
.comments-title, .comment-reply-title { font-family: var(--font-serif); font-size: 1.375rem; font-weight: 600; margin-bottom: 12px; }
.comment-list { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--rule); }
.comment-list li { padding: 14px 0; border-bottom: 1px solid var(--border); }
#respond label { display: block; margin-bottom: 4px; color: var(--text-3); font-family: var(--font-mono); font-size: 12px; }
#respond input[type=text], #respond input[type=email], #respond input[type=url], #respond textarea { width: 100%; padding: 12px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); color: var(--text); }
#respond p { margin-bottom: 12px; }
#respond input[type=submit] { min-height: 44px; padding: 0 18px; border: 0; border-radius: var(--r); background: var(--btn-bg); color: var(--btn-text); font-weight: 600; }
.comment-subscription-form { margin-top: 8px; color: var(--text-3); font-size: var(--fs-sm); }
.page-links { margin-top: 24px; font-weight: 600; }

/* =========================================================
   13. Footer
   ========================================================= */
.site-footer { margin-top: 48px; padding: 44px 0 28px; background: #0a0f1e; color: #cbd5e1; }
[data-theme="dark"] .site-footer { border-top: 1px solid var(--border); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-footer { border-top: 1px solid var(--border); } }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
.footer-about { grid-column: 1 / -1; }
.footer-about p { margin-top: 14px; max-width: 44ch; color: #a3b0c2; font-size: .9375rem; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } .footer-about { grid-column: auto; } }
.footer-title { margin-bottom: 6px; color: #8291a8; }
.footer-col ul, .footer-menu, .footer-menu-fallback { margin: 0; padding: 0; list-style: none; }
.footer-col a { display: inline-flex; align-items: center; min-height: 40px; color: #dbe2ec; font-size: .9375rem; }
.footer-col a:hover { color: #a996f5; }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / .1); color: #8291a8; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.6; }
.site-footer :focus-visible { outline-color: #a996f5; }

/* =========================================================
   14. Cookie Law Info: compact (one short line + two buttons). Consent unchanged.
   ========================================================= */
#cookie-law-info-bar {
	position: fixed !important; top: auto !important; bottom: 8px !important; left: 8px !important; right: 8px !important;
	width: auto !important; max-width: 560px; margin: 0 !important; padding: 8px 10px !important; z-index: 9990 !important;
	border: 1px solid var(--border-strong) !important; border-radius: 6px !important; background: var(--surface) !important; color: var(--text-2) !important;
	box-shadow: 0 10px 30px -12px rgb(0 0 0 / .35) !important; font-family: var(--font-sans) !important; font-size: 13px !important; line-height: 1.3 !important; text-align: left !important;
}
#cookie-law-info-bar > span { display: block; }
#cookie-law-info-bar .cli-bar-container { display: flex !important; flex-direction: column; align-items: stretch; gap: 6px; width: 100%; }
/* The plugin's long paragraph is replaced visually by one short line; the full details stay one tap away in Cookie Settings. */
#cookie-law-info-bar .cli-bar-message { width: auto !important; margin: 0 !important; font-size: 0 !important; line-height: 0 !important; }
#cookie-law-info-bar .cli-bar-message::before { content: "We use cookies for ads and anonymous stats."; display: block; font-size: 13px; line-height: 1.3; color: var(--text-2); }
#cookie-law-info-bar .cli-bar-btn_container { display: flex !important; gap: 8px; margin: 0 !important; }
#cookie-law-info-bar .cli-plugin-button {
	flex: 1; display: inline-flex !important; align-items: center; justify-content: center; min-height: 40px; margin: 0 !important; padding: 0 12px !important;
	border-radius: var(--r) !important; font-size: 13.5px !important; font-weight: 600 !important; line-height: 1.2 !important; text-decoration: none !important; cursor: pointer;
}
#cookie-law-info-bar .cli_settings_button { background: transparent !important; color: var(--text) !important; border: 1px solid var(--border-strong) !important; }
#cookie-law-info-bar .wt-cli-accept-all-btn, #cookie-law-info-bar .cli_action_button { background: var(--btn-bg) !important; color: var(--btn-text) !important; border: 1px solid var(--btn-bg) !important; }
@media (min-width: 640px) {
	#cookie-law-info-bar { left: 16px !important; right: auto !important; bottom: 16px !important; width: min(560px, calc(100vw - 32px)) !important; padding: 10px 12px !important; }
	#cookie-law-info-bar .cli-bar-container { flex-direction: row; align-items: center; gap: 14px; }
	#cookie-law-info-bar .cli-bar-message { flex: 1; }
	#cookie-law-info-bar .cli-plugin-button { flex: none; }
}
#cookie-law-info-again { left: 12px !important; right: auto !important; bottom: 12px !important; padding: 6px 10px !important; border-radius: var(--r) !important; background: var(--surface) !important; color: var(--text-3) !important; border: 1px solid var(--border) !important; box-shadow: none !important; font-family: var(--font-mono) !important; font-size: 11.5px !important; }
.cli-modal .cli-modal-content { border-radius: 6px; background: var(--surface); color: var(--text); }
.cli-modal .cli-tab-header, .cli-modal .cli-privacy-overview h4 { color: var(--text); }
.cli-modal .cli-privacy-content-text, .cli-modal .cli-tab-content, .cli-modal .wt-cli-cookie-description { color: var(--text-2); }
.cli-modal .cli-tab-section { background: var(--surface-2); border-radius: 4px; }
.cli-modal .cli-modal-close svg { fill: var(--text-2); }

/* =========================================================
   15. Motion + print
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
	.site-header, .site-footer, .article-aside, .ad-unit, .related, .toc, .code-copy, #cookie-law-info-bar, #cookie-law-info-again, .sharedaddy { display: none !important; }
	body { background: #fff; color: #000; }
}

/* Byline on phones: one fact per line, no orphan separators */
@media (max-width: 479px) {
	.byline { flex-direction: column; gap: 2px; }
	.byline > span + span::before { content: none; }
}

/* =========================================================
   16. v3b: image-rich cards, the site's own logo, old-site feel
   ========================================================= */
:root { --radius-card: 14px; --shadow-card: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.03); --shadow-hover: 0 10px 30px -10px rgba(15,23,42,.22); }
[data-theme="dark"] { --shadow-card: 0 1px 3px rgba(0,0,0,.4); --shadow-hover: 0 10px 30px -10px rgba(0,0,0,.7); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shadow-card: 0 1px 3px rgba(0,0,0,.4); --shadow-hover: 0 10px 30px -10px rgba(0,0,0,.7); } }

/* Headings: bold sans like the live site */
.hero__title, .home-intro__title, .section__title, .article__title, .page-head__title, .error-404__title,
.entry-content h2, .aliexpress-section-title, .card__title, .author-box__name, .review-verdict h3, .comparison-product__title,
.aliexpress-cta__name, .drawer__list a, .no-results h2, .comments-title, .comment-reply-title { font-weight: 750; letter-spacing: -.02em; }
.entry-content h2 { letter-spacing: -.015em; }

/* Logo: the live theme's own image logo (Customizer), dark variant swap */
.site-branding { display: flex; align-items: center; }
.site-branding .custom-logo, .site-branding .custom-logo-dark { height: 48px; width: auto; display: block; }
.custom-logo-dark-link { display: none; }
[data-theme="dark"] .custom-logo-dark-link { display: block; }
[data-theme="dark"] .has-dark-logo .custom-logo-link:not(.custom-logo-dark-link) { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .custom-logo-dark-link { display: block; }
	:root:not([data-theme="light"]) .has-dark-logo .custom-logo-link:not(.custom-logo-dark-link) { display: none; }
}
.site-title { font-weight: 800; color: var(--text); }
.site-footer .custom-logo-link:not(.custom-logo-dark-link) { display: none; }
.site-footer .custom-logo-dark-link { display: block; }

/* Homepage intro (small, the images carry the page) */
.home-intro { padding-block: 22px 4px; }
.home-intro__title { font-size: clamp(1.45rem, 1.15rem + 1.4vw, 2.1rem); line-height: 1.15; }
.home-intro__lead { margin-top: 4px; color: var(--text-3); font-size: 1rem; }

/* Cards: existing featured image, 16:9, object-fit cover */
.card { position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card__media { display: block; border: 0; border-radius: 0; background: var(--surface-2); }
.card .cover, .card--lead .cover { aspect-ratio: 16 / 9; }
.cover--photo img { width: 100%; height: 100%; object-fit: cover; }
.card .cover--product { background: #fff; }
.card .cover--product img { object-fit: contain; padding: 10px; }
.card__body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 12px 14px 14px; }
.card__kicker { color: var(--link); font-size: 12.5px; font-weight: 700; }
.card__title { margin: 0; font-size: 1.03rem; line-height: 1.32; }
.card__title a { color: var(--text); }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card:hover .card__title a { color: var(--link); }
.card__excerpt { color: var(--text-3); font-size: .9375rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { display: flex; gap: 10px; margin-top: auto; padding-top: 6px; color: var(--text-3); font-size: 12.5px; }
.card__score { color: #d97706; font-weight: 700; }

/* Hero: one big image card + two beside it */
.hero-grid { display: grid; gap: 14px; padding-block: 14px 8px; }
.card--lead .card__body { padding: 16px 18px 18px; }
.card--lead .card__title { font-size: clamp(1.3rem, 1.05rem + 1.2vw, 1.9rem); line-height: 1.2; }
.card--lead .card__excerpt { -webkit-line-clamp: 3; font-size: 1rem; }
.hero-side { display: grid; gap: 14px; }
.card--side { flex-direction: row; }
.card--side .card__media { flex: none; width: 42%; }
.card--side .cover { height: 100%; min-height: 96px; }
.card--side .card__body { padding: 10px 12px; }
.card--side .card__title { font-size: .98rem; }
@media (min-width: 900px) {
	.hero-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; padding-top: 20px; }
	.hero-side { grid-template-rows: 1fr 1fr; gap: 20px; }
	.card--side { flex-direction: column; }
	.card--side .card__media { width: 100%; }
	.card--side .cover { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
}

/* Card rows: swipe on phones, grid on desktop */
.card-row { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 14px; scroll-padding-inline: var(--gutter); }
.card-row::-webkit-scrollbar { display: none; }
.card-row > .card { scroll-snap-align: start; }
@media (min-width: 640px) { .card-row { grid-auto-columns: 44%; } }
@media (min-width: 1024px) {
	.card-row { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; margin-inline: 0; padding: 4px 0 0; gap: 20px; }
	.card-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.card-row--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.card-row--4 > .card:nth-child(n+5) { display: none; }
}
.card-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1200px) { .card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.section--tint { background: var(--surface-2); padding-block: 40px 28px; margin-top: 40px; border-block: 1px solid var(--border); }
.section { padding-block: 36px 4px; }
.section__head { margin-bottom: 14px; }
.section__more { color: var(--link); font-family: var(--font-sans); font-size: .9375rem; font-weight: 600; }
.topics { margin-top: 12px; border-block: 0; }
.topics ul { gap: 6px; }
.topics li + li::before { content: none; }
.topics a { min-height: 40px; margin: 4px 0; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-2); font-weight: 600; font-size: .875rem; }
.topics a:hover { border-color: var(--link); color: var(--link); }

/* Posts: featured image on top, softer rules */
.article__hero { margin: 20px 0 6px; border-radius: var(--radius-card); border: 1px solid var(--border); }
.article__hero .cover { aspect-ratio: 16 / 9; }
.article__hero--product .cover { aspect-ratio: auto; }
.kicker { color: var(--link); font-size: 13px; font-weight: 700; }
.author-box { padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface-2); }
.side-card, .toc--side, .review-verdict { border-top-width: 1px; border-top-color: var(--border); }
body.thsh-v3 .thsh-buybox { border-top: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card); }
body.thsh-v3 .thsh-buybox__title { font-family: var(--font-sans); font-size: .9375rem; font-weight: 700; color: var(--text); }
body.thsh-v3 .entry-content a.thsh-bb-btn, body.thsh-v3 a.thsh-bb-btn { border-radius: 10px; }
body.thsh-v3 .thsh-wl { padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface-2); }
.aliexpress-cta { border-top-width: 1px; border-radius: var(--radius-card); }
.btn, .search-form, .search-submit, .page-numbers { border-radius: 10px; }
.entry-content pre { border-radius: 12px; }
.card__media .cover--gen { background: linear-gradient(135deg, #6d4ed6, #3b82f6); }
