/*
Theme Name: Custom-TopDebrid
Theme URI: https://topdebrid.com
Author: TopDebrid
Description: Custom theme for TopDebrid. Calm editorial layout in the TopDebrid palette (Scarlet Rush, Turf Green, Willow Green, Lemon Chiffon, Dark Coffee), per-category colors, AdSense-ready ad slots, affiliate components as shortcodes, table of contents and full dark mode.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: custom-topdebrid
*/

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
	--bg: #FFFFFF;
	--bg2: #F8F6EE;
	--card: #FFFFFF;
	--ink: #43291F;
	--ink2: #5B443A;
	--muted: #7A6A61;
	--line: rgba(67, 41, 31, 0.11);
	--glass: rgba(255, 255, 255, 0.78);
	--on-ink: #F4F0BB;
	--accent: #DA2C38;
	--accent-ink: #B3202B;
	--pos: #226F54;
	--neg: #C4232F;
	--lemon: #F4F0BB;
	--ad: #F8F6EE;
	--ad-line: rgba(67, 41, 31, 0.16);
	--shadow: 0 1px 2px rgba(67, 41, 31, 0.05), 0 8px 24px rgba(67, 41, 31, 0.07);
	--shadow-lg: 0 2px 6px rgba(67, 41, 31, 0.06), 0 28px 56px rgba(67, 41, 31, 0.14);
	--font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
	--ease: cubic-bezier(0.2, 0.8, 0.2, 1);
	color-scheme: light;
}

html.dark {
	--bg: #120B08;
	--bg2: #1B120E;
	--card: #231812;
	--ink: #F4F0BB;
	--ink2: #E4DEC0;
	--muted: #B3A795;
	--line: rgba(244, 240, 187, 0.12);
	--glass: rgba(18, 11, 8, 0.78);
	--on-ink: #120B08;
	--accent: #E8414C;
	--accent-ink: #FF8A92;
	--pos: #7FD3B1;
	--neg: #FF8A92;
	--ad: #1B120E;
	--ad-line: rgba(244, 240, 187, 0.16);
	--shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.45);
	--shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.5), 0 28px 56px rgba(0, 0, 0, 0.6);
	color-scheme: dark;
}

/* Tones: each category gets one. --c mark, --c-soft surface, --c-ink text, --c-btn/--c-btn-fg buttons. */
:root,
.tone-scarlet { --c: #DA2C38; --c-soft: #FCE9EA; --c-ink: #B3202B; --c-btn: #DA2C38; --c-btn-fg: #FFFFFF; }
.tone-turf    { --c: #226F54; --c-soft: #E4F0EB; --c-ink: #1B5A44; --c-btn: #226F54; --c-btn-fg: #FFFFFF; }
.tone-willow  { --c: #87C38F; --c-soft: #EAF5EC; --c-ink: #2E6A38; --c-btn: #87C38F; --c-btn-fg: #43291F; }
.tone-lemon   { --c: #CDBF4E; --c-soft: #F4F0BB; --c-ink: #5E5414; --c-btn: #43291F; --c-btn-fg: #F4F0BB; }
.tone-coffee  { --c: #43291F; --c-soft: #F1EAE6; --c-ink: #43291F; --c-btn: #43291F; --c-btn-fg: #FFFFFF; }

html.dark,
html.dark .tone-scarlet { --c: #E8414C; --c-soft: rgba(218, 44, 56, 0.18); --c-ink: #FF8A92; --c-btn: #DA2C38; --c-btn-fg: #FFFFFF; }
html.dark .tone-turf    { --c: #3DA27D; --c-soft: rgba(61, 162, 125, 0.18); --c-ink: #7FD3B1; --c-btn: #2A8564; --c-btn-fg: #FFFFFF; }
html.dark .tone-willow  { --c: #87C38F; --c-soft: rgba(135, 195, 143, 0.16); --c-ink: #A9DDB0; --c-btn: #87C38F; --c-btn-fg: #2A1A13; }
html.dark .tone-lemon   { --c: #F4F0BB; --c-soft: rgba(244, 240, 187, 0.12); --c-ink: #F4F0BB; --c-btn: #F4F0BB; --c-btn-fg: #2A1A13; }
html.dark .tone-coffee  { --c: #B08A74; --c-soft: rgba(176, 138, 116, 0.18); --c-ink: #D9BFAE; --c-btn: #8A5A45; --c-btn-fg: #FFFFFF; }

/* ==========================================================================
   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.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	transition: background-color 0.4s ease, color 0.4s ease;
}

img, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--lemon); color: #43291F; }

.screen-reader-text {
	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:focus {
	position: fixed !important; top: 12px; left: 12px; z-index: 100;
	width: auto; height: auto; clip: auto; margin: 0;
	padding: 12px 18px; border-radius: 12px;
	background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 600;
}

.wrap { width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 32px; padding-right: 32px; }
/* Wide (full screen) layout, the default. Reading columns stay narrow inside it. */
.layout-wide { --gutter: clamp(16px, 4vw, 72px); }
.layout-wide .wrap { max-width: 1680px; padding-left: var(--gutter); padding-right: var(--gutter); }
.layout-wide .wrap.art-head, .layout-wide .wrap.art-hero { max-width: calc(1292px + 2 * var(--gutter)); }
.layout-wide .wrap.comments-wrap { max-width: calc(784px + 2 * var(--gutter)); }
.mono { font-family: var(--mono); }
.icon { flex: none; }

.eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.h-display { margin: 0; font-size: clamp(38px, 4.6vw, 62px); line-height: 1.04; letter-spacing: -0.042em; font-weight: 700; text-wrap: balance; }
.h-display a { text-decoration: none; }
.h-sec { margin: 0; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 700; text-wrap: balance; }
.h-sec--sm { font-size: clamp(26px, 2.6vw, 34px); }

.section { margin-top: 112px; }
.section--tight { margin-top: 48px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.section-sub { margin: 12px 0 0; max-width: 620px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.center-row { display: flex; justify-content: center; margin-top: 40px; }

/* Motion */
.lift { transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
@keyframes tdb-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.reveal { animation: tdb-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 30%; }
	}
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

.blob { position: absolute; border-radius: 50%; pointer-events: none; }

/* ==========================================================================
   Buttons, links, chips, pills
   ========================================================================== */

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 22px;
	border: 0; border-radius: 999px;
	font-family: var(--font); font-size: 15px; font-weight: 600; line-height: 1.2;
	text-decoration: none; white-space: nowrap; cursor: pointer;
	transition: transform 0.25s var(--ease), filter 0.2s ease, background-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn:active { transform: scale(0.98); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-soft { background: var(--bg2); color: var(--ink); }
.btn-tone { background: var(--c-btn); color: var(--c-btn-fg); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }

.iconbtn {
	width: 44px; height: 44px; border: 0; border-radius: 999px;
	background: transparent; color: var(--ink);
	display: inline-flex; align-items: center; justify-content: center;
	cursor: pointer; transition: background-color 0.2s ease;
}
.iconbtn:hover { background: var(--bg2); }
.when-dark { display: none; }
html.dark .when-light { display: none; }
html.dark .when-dark { display: inline-flex; }
.when-light { display: inline-flex; }

.ulink { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; text-decoration: none; transition: color 0.2s ease; }
.ulink:hover { color: var(--accent-ink); }
.flink { color: var(--muted); font-size: 14px; text-decoration: none; transition: color 0.2s ease; }
.flink:hover { color: var(--ink); }
.aff-note { font-size: 12px; color: var(--muted); }

.pill {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 7px 14px; border-radius: 999px;
	background: var(--c-soft); color: var(--c-ink);
	font-size: 13px; font-weight: 600; text-decoration: none;
	transition: filter 0.2s ease;
}
.pill:hover { filter: saturate(1.3); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.soft-pill { display: inline-flex; padding: 9px 14px; border-radius: 999px; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; box-shadow: var(--shadow); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
	min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px;
	background: var(--bg2); color: var(--ink2);
	font-size: 14px; font-weight: 500; cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease;
}
.chip:hover { color: var(--ink); }
.chip.on { background: var(--ink); color: var(--bg); }

.mono-tile {
	flex: none; width: 52px; height: 52px; border-radius: 16px;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--c-btn); color: var(--c-btn-fg);
	font-size: 17px; font-weight: 700; letter-spacing: -0.02em;
}
.mono-tile--lg { width: 56px; height: 56px; border-radius: 18px; font-size: 18px; }
.mono-tile--xl { width: 64px; height: 64px; border-radius: 20px; font-size: 21px; }

.rating { display: inline-flex; align-items: center; gap: 5px; font-size: 15px; color: var(--ink); }
.rating .icon-star { color: var(--accent); }
.rating b { font-weight: 700; }
.rating-of { font-size: 13px; color: var(--muted); }

.field {
	width: 100%; min-height: 52px; padding: 0 22px;
	border: 1px solid var(--line); border-radius: 999px;
	background: var(--bg); color: var(--ink); font-size: 16px; outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--c-soft); }

.search-form { display: flex; gap: 10px; flex-wrap: wrap; }
.search-form .field { flex: 1 1 240px; width: auto; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--glass);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	backdrop-filter: saturate(180%) blur(20px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
.header-bar { height: 64px; display: flex; align-items: center; gap: 20px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--ink); color: var(--bg); display: inline-flex; align-items: center; justify-content: center; }
.brand-img { width: auto; height: 32px; border-radius: 8px; }
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: -0.025em; }

.primary-nav { margin-left: 12px; min-width: 0; }
.primary-nav .menu, .menu-panel .menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.primary-nav .menu a {
	display: inline-flex; padding: 10px 12px; border-radius: 999px;
	color: var(--ink2); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.primary-nav .menu a:hover { background: var(--bg2); color: var(--ink); }
.primary-nav .current-menu-item > a,
.primary-nav .current-category-ancestor > a,
.primary-nav .current-post-ancestor > a { background: var(--c-soft); color: var(--c-ink); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.header-actions .btn { margin-left: 8px; }
.menu-btn { display: none; }

.header-panel { border-top: 1px solid var(--line); padding: 16px 0 20px; }
.header-panel[hidden] { display: none; }
.menu-panel .menu { flex-direction: column; align-items: stretch; gap: 2px; }
.menu-panel .menu a { display: flex; min-height: 48px; align-items: center; padding: 0 14px; border-radius: 14px; color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 600; }
.menu-panel .menu a:hover { background: var(--bg2); }

/* ==========================================================================
   Ads (reserved space so nothing shifts when ads load)
   ========================================================================== */

.ad { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 40px auto; max-width: 100%; }
.ad-label { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ad-box { width: 100%; max-width: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 12px; background: var(--ad); }
.ad-unit { width: 100%; display: flex; justify-content: center; }
.ad--home-billboard .ad-box { max-width: 970px; min-height: 250px; }
.ad--article-leaderboard { margin: 28px auto 8px; }
.ad--article-leaderboard .ad-box { max-width: 728px; min-height: 90px; }
.ad--article-incontent { margin: 48px auto; }
.ad--article-incontent .ad-box { max-width: 336px; min-height: 280px; }
.ad--sidebar { margin: 0; }
.ad--sidebar .ad-box { width: 300px; min-height: 600px; }
.ad--infeed { margin: 0; height: 100%; }
.ad--infeed .ad-box { flex: 1; min-height: 360px; border-radius: 24px; }
.infeed { display: flex; }
.infeed > .ad { width: 100%; }
.infeed--row { padding: 24px 0; border-top: 1px solid var(--line); }
.infeed--row .ad--infeed .ad-box { min-height: 160px; border-radius: 20px; }
.ad--mobile-anchor { margin: 0; gap: 4px; }
.ad--mobile-anchor .ad-label { font-size: 10px; }
.ad--mobile-anchor .ad-box { max-width: 320px; min-height: 100px; }
.anchor-ad {
	display: none; position: sticky; bottom: 0; z-index: 40;
	padding: 8px 16px calc(10px + env(safe-area-inset-bottom));
	background: var(--glass);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	backdrop-filter: saturate(180%) blur(20px);
	border-top: 1px solid var(--line);
}

/* ==========================================================================
   Homepage
   ========================================================================== */

.hero { padding-top: 72px; padding-bottom: 24px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.hero-copy .h-display { max-width: 640px; }
.hero-copy .h-display a:hover { color: var(--c-ink); }
.hero-dek { margin: 0; max-width: 540px; font-size: 20px; line-height: 1.55; color: var(--ink2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); }

.hero-media { position: relative; }
.hero-frame {
	position: relative; display: block; overflow: hidden;
	display: flex; align-items: center; justify-content: center;
	min-height: 360px; padding: 40px; border-radius: 36px;
	background: var(--c-soft);
}
.hero-frame .blob-a { width: 420px; height: 420px; right: -150px; top: -170px; background: var(--c); opacity: 0.14; }
.hero-frame .blob-b { width: 280px; height: 280px; left: -90px; bottom: -120px; background: var(--lemon); opacity: 0.7; }
html.dark .hero-frame .blob-b { opacity: 0.12; }
.hero-img {
	position: relative; width: 100%; height: auto;
	border-radius: 22px; box-shadow: var(--shadow-lg);
	transition: transform 0.8s var(--ease);
}
.hero-frame .ph { position: relative; aspect-ratio: 16 / 10; height: auto; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-frame:hover .hero-img { transform: scale(1.015); }

.float-card {
	position: absolute; left: -20px; bottom: 28px;
	display: flex; align-items: center; gap: 12px;
	padding: 12px 18px 12px 12px; border-radius: 20px;
	background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
	color: var(--ink); text-decoration: none;
	transition: transform 0.4s var(--ease);
}
.float-card:hover { transform: translateY(-3px); }
.float-card .mono-tile { width: 46px; height: 46px; border-radius: 14px; font-size: 15px; }
.float-id { display: flex; flex-direction: column; gap: 2px; }
.float-sub { font-size: 12px; color: var(--muted); }
.float-name { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.float-card .rating { margin-left: 6px; }

.trend-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.trend {
	display: flex; flex-direction: column; gap: 14px; min-height: 184px;
	padding: 22px; border-radius: 24px; background: var(--bg2);
	color: var(--ink); text-decoration: none;
}
.trend-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trend-n { font-size: 13px; color: var(--muted); }
.trend-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--c-ink); }
.trend-title { font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
.trend-meta { margin-top: auto; font-size: 12px; color: var(--muted); }

/* Category bento */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 270px; gap: 20px; }
.tile {
	position: relative; overflow: hidden;
	display: flex; flex-direction: column; gap: 8px;
	padding: 28px; border-radius: 32px;
	background: var(--c-soft); color: var(--ink); text-decoration: none;
}
.tile-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tile-icon { width: 48px; height: 48px; border-radius: 15px; background: var(--c-btn); color: var(--c-btn-fg); display: inline-flex; align-items: center; justify-content: center; }
.tile-explore { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--c-ink); transition: gap 0.3s var(--ease); }
.tile:hover .tile-explore { gap: 10px; }
.tile-title { font-size: 26px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; }
.tile-text { font-size: 15px; line-height: 1.5; color: var(--ink2); max-width: 420px; }
.tile-list { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.tile-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.tile-row-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--c-btn); color: var(--c-btn-fg); display: inline-flex; align-items: center; justify-content: center; }
.tile-row-text { font-size: 14px; font-weight: 500; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.tile-count { margin-top: auto; font-size: 12px; color: var(--c-ink); }
.tile-list + .tile-count { margin-top: 4px; }

.bento > .tile:first-child { grid-column: span 2; grid-row: span 2; padding: 36px; }
.bento > .tile:first-child .tile-title { font-size: 38px; }
.bento--1 > .tile:first-child { grid-column: span 4; grid-row: span 1; }
.bento--2 > .tile { grid-column: span 2; grid-row: span 2; }
.bento--3 > .tile:not(:first-child) { grid-column: span 2; }
.bento--4 > .tile:nth-child(2) { grid-column: span 2; }
.bento--5 > .tile:nth-child(2) { grid-column: span 2; }
.bento--5 > .tile:nth-child(5) { grid-column: span 4; }

/* Tools */
.tools-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.tools-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tools-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tools-grid--1 { grid-template-columns: minmax(0, 420px); }

.tool { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 28px; color: var(--ink); }
.tool--grid { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.tool-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.tool-badge { padding: 3px 9px; border-radius: 999px; background: var(--c-soft); color: var(--c-ink); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
.tool-head { display: flex; align-items: center; gap: 14px; }
.tool-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tool-name { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.tool-label { font-size: 13px; font-weight: 500; color: var(--c-ink); }
.tool-stats { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tool-price { font-size: 14px; color: var(--ink2); }
.tool-price b { color: var(--ink); }
.tool-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--ink2); }
.tool-feats li { display: flex; gap: 10px; }
.tool-feats .icon { color: var(--c-ink); margin-top: 1px; }
.tool-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.tool-sub { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }

.tool--wide { display: flex; flex-direction: column; gap: 20px; padding: 28px; box-shadow: var(--shadow); margin: 0 0 24px; }
.tool--wide .tool-name { font-size: 24px; }
.tool--wide .tool-head .rating { margin-left: auto; font-size: 20px; }
.tool-blurb { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink2); }
.tool-blurb p { margin: 0 0 8px; font-size: inherit; }
.tool-feats--2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; font-size: 15px; }
.tool-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--line); }
.tool-foot .tool-price { font-size: 16px; }
.tool-cta { margin-left: auto; }
.tool--wide .aff-note { margin-top: -8px; }

.tool--mini { display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 0; background: var(--c-soft); border-radius: 24px; }
.tool-eyebrow { margin: 0; color: var(--c-ink); font-size: 12px; }
.tool--mini .mono-tile { width: 44px; height: 44px; border-radius: 14px; font-size: 15px; }
.tool--mini .tool-name { font-size: 17px; }
.tool--mini .rating { font-size: 13px; }
.tool--mini .aff-note { text-align: center; }

/* Article cards */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card[hidden], .infeed[hidden] { display: none; }
.card { min-width: 0; }
.card-link { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 24px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.card-link:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--c-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.card-link:hover .card-media img { transform: scale(1.04); }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 24px; }
.card-cat { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-ink); }
.card-title { margin: 0; font-size: 20px; line-height: 1.28; letter-spacing: -0.02em; font-weight: 600; text-wrap: pretty; }
.card-excerpt { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.card-meta { margin-top: auto; padding-top: 8px; font-size: 12px; color: var(--muted); }

.post-list { display: flex; flex-direction: column; }
.card--row .card-link { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: center; height: auto; padding: 24px 16px; margin: 0 -16px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.card--row .card-link:hover { transform: none; box-shadow: none; background: var(--bg2); border-radius: 24px; }
.card--row .card-media { border-radius: 20px; aspect-ratio: 16 / 9; }
.card--row .card-body { padding: 0; }
.card--row .card-title { font-size: 22px; }
.card--row .card-meta { margin-top: 2px; padding-top: 0; }

/* Placeholder illustration (posts without a featured image) */
.ph { width: 100%; height: 100%; display: flex; align-items: flex-end; padding: 26px 28px 0; background: var(--c-soft); }
.ph-win { width: 100%; height: 76%; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px 16px 0 0; background: var(--card); box-shadow: var(--shadow); }
.ph-row { display: flex; align-items: center; gap: 10px; }
.ph-dot { width: 28px; height: 28px; border-radius: 9px; background: var(--c); }
.ph-line { display: block; height: 8px; border-radius: 99px; background: var(--line); }
.ph-w42 { width: 42%; } .ph-w86 { width: 86%; } .ph-w62 { width: 62%; }
.ph-bar { margin-top: auto; height: 6px; border-radius: 99px; background: var(--bg2); overflow: hidden; }
.ph-bar span { display: block; width: 72%; height: 100%; border-radius: 99px; background: var(--c); }

/* Deal */
.td-deal { margin: 32px 0; }
.deal-row { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 28px 32px; border-radius: 28px; background: var(--lemon); color: #43291F; }
html.dark .deal-row { background: rgba(244, 240, 187, 0.1); color: var(--ink); }
.deal-icon { flex: none; width: 56px; height: 56px; border-radius: 18px; background: #DA2C38; color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; }
.deal-copy { flex: 1 1 320px; min-width: 0; }
.deal-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #B3202B; }
html.dark .deal-label { color: var(--accent-ink); }
.deal-title { margin: 4px 0 0; font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -0.025em; }
.deal-note { margin: 4px 0 0; font-size: 14px; opacity: 0.8; }
.deal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.deal-code { min-height: 48px; padding: 0 16px; display: inline-flex; align-items: center; gap: 12px; border: 1.5px dashed currentColor; border-radius: 14px; background: transparent; color: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.deal-copy-label { font-family: var(--font); font-size: 14px; font-weight: 600; color: #B3202B; }
html.dark .deal-copy-label { color: var(--accent-ink); }
.deal-row .btn-ink { background: #43291F; color: #F4F0BB; min-height: 48px; }
html.dark .deal-row .btn-ink { background: var(--ink); color: var(--bg); }
.deal-aff { margin: 10px 6px 0; }

/* Newsletter */
.newsletter {
	position: relative; overflow: hidden;
	display: flex; flex-direction: column; align-items: center; gap: 16px;
	padding: 72px 32px; border-radius: 36px; text-align: center;
	background: var(--ink); color: var(--on-ink);
}
.newsletter > * { position: relative; }
.newsletter .blob { position: absolute; }
.newsletter .blob-a { width: 360px; height: 360px; left: -120px; top: -170px; background: #DA2C38; opacity: 0.35; }
.newsletter .blob-b { width: 300px; height: 300px; right: -110px; bottom: -160px; background: #87C38F; opacity: 0.28; }
.newsletter .h-sec { color: var(--on-ink); }
.nl-icon { width: 56px; height: 56px; border-radius: 18px; background: #DA2C38; color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; }
.nl-text { margin: 0; max-width: 520px; font-size: 18px; line-height: 1.55; opacity: 0.8; }
.nl-form { width: 100%; max-width: 520px; margin-top: 8px; }
.nl-form form, .nl-form .wp-block-jetpack-subscriptions__form { display: flex !important; flex-wrap: wrap; gap: 10px; justify-content: center; }
.nl-form p { margin: 0; }
.nl-form input[type="email"] {
	flex: 1 1 260px; width: 100% !important; min-height: 52px !important; margin: 0 !important; padding: 0 22px !important;
	border: 0 !important; border-radius: 999px !important; background: var(--bg) !important; color: var(--ink) !important; font-size: 16px !important;
}
.nl-form button, .nl-form input[type="submit"] {
	min-height: 52px !important; margin: 0 !important; padding: 0 28px !important;
	border: 0 !important; border-radius: 999px !important;
	background: #DA2C38 !important; color: #FFFFFF !important; font-family: var(--font) !important; font-size: 16px !important; font-weight: 600 !important; cursor: pointer;
}
.nl-form .jetpack-subscribe-count, .nl-form #subscribe-text { display: none; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { margin-top: 112px; padding: 64px 0 40px; background: var(--bg2); border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.foot-brand { display: flex; flex-direction: column; gap: 14px; }
.foot-brand p { margin: 0; max-width: 300px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.foot-col { display: flex; flex-direction: column; gap: 12px; }
.foot-title { margin: 0 0 4px; font-size: 13px; font-weight: 600; }
.foot-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.foot-menu a { color: var(--muted); font-size: 14px; text-decoration: none; }
.foot-menu a:hover { color: var(--ink); }
.foot-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.foot-bottom p { margin: 0; max-width: 760px; }

/* ==========================================================================
   Article
   ========================================================================== */

.art-head { max-width: 1016px; padding-top: 40px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.art-head .pill { margin-top: 28px; }
.art-h1 { margin: 20px 0 0; font-size: clamp(34px, 4.4vw, 58px); line-height: 1.05; letter-spacing: -0.042em; font-weight: 700; text-wrap: balance; }
.art-dek { margin: 22px 0 0; max-width: 760px; font-size: 22px; line-height: 1.5; color: var(--muted); }
.art-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; }
.byline { display: flex; align-items: center; gap: 12px; }
.byline-avatar { width: 40px; height: 40px; border-radius: 50%; }
.byline-id { display: flex; flex-direction: column; }
.byline-name { font-size: 15px; font-weight: 600; }
.byline-name a { text-decoration: none; }
.byline-sub { font-size: 13px; color: var(--muted); }
.meta-item { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.disclosure { display: flex; gap: 10px; align-items: flex-start; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.55; color: var(--muted); }
.disclosure .icon { margin-top: 2px; }

.art-hero { margin-top: 36px; margin-bottom: 0; }
.art-hero img { width: 100%; height: auto; border-radius: 32px; background: var(--c-soft); }
.art-body { margin-top: 64px; }

.art-grid { display: grid; gap: 56px; justify-content: center; align-items: start; grid-template-columns: minmax(0, 720px); }
.art-grid.has-toc.has-side { grid-template-columns: 200px minmax(0, 680px) 300px; }
.art-grid.has-toc.no-side { grid-template-columns: 200px minmax(0, 720px); }
.art-grid.no-toc.has-side { grid-template-columns: minmax(0, 720px) 300px; }
.art-grid > .toc-col, .art-grid > .side-col { align-self: stretch; }
.art-main { min-width: 0; }

.toc-sticky, .side-sticky { position: sticky; top: 96px; }
.admin-bar .toc-sticky, .admin-bar .side-sticky { top: 128px; }
.side-sticky { display: flex; flex-direction: column; gap: 40px; }
.toc-eyebrow { margin: 0 0 12px 12px; font-size: 12px; }
.toc { display: flex; flex-direction: column; gap: 2px; }
.tocl { display: block; padding: 8px 12px; border-radius: 10px; font-size: 14px; line-height: 1.4; color: var(--muted); text-decoration: none; transition: background-color 0.2s ease, color 0.2s ease; }
.tocl:hover { color: var(--ink); background: var(--bg2); }
.tocl.on { color: var(--c-ink); background: var(--c-soft); font-weight: 600; }

.toc-inline { display: none; margin: 0 0 32px; padding: 4px 18px; border-radius: 20px; background: var(--bg2); }
.toc-inline summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; font-size: 16px; font-weight: 600; list-style: none; cursor: pointer; }
.toc-inline summary::-webkit-details-marker { display: none; }
.toc-inline .plus { display: inline-flex; transition: transform 0.3s var(--ease); }
.toc-inline[open] .plus { transform: rotate(45deg); }
.toc-inline .toc { padding-bottom: 12px; }

/* Reading typography */
.prose { font-size: 19px; line-height: 1.72; color: var(--ink2); overflow-wrap: break-word; }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 24px; }
.prose h2 { margin: 72px 0 20px; font-size: 34px; line-height: 1.12; letter-spacing: -0.03em; font-weight: 700; color: var(--ink); scroll-margin-top: 96px; text-wrap: balance; }
.prose h3 { margin: 44px 0 12px; font-size: 23px; line-height: 1.3; letter-spacing: -0.02em; font-weight: 600; color: var(--ink); scroll-margin-top: 96px; }
.prose h4 { margin: 32px 0 10px; font-size: 19px; font-weight: 600; color: var(--ink); }
.prose strong, .prose b { color: var(--ink); font-weight: 600; }
.prose a { color: var(--c-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-thickness 0.2s ease; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose a.btn, .prose .tool a, .prose .td-toppick a, .prose .td-deal a { text-decoration: none; }
.prose ul, .prose ol { margin: 0 0 24px; padding-left: 1.3em; }
.prose li { margin: 0 0 10px; padding-left: 4px; }
.prose li::marker { color: var(--c); }
.prose ol li::marker { font-weight: 600; }
.prose blockquote { margin: 32px 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--c); font-size: 21px; line-height: 1.6; color: var(--ink); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { margin: 56px 0; border: 0; border-top: 1px solid var(--line); }
.prose img { height: auto; border-radius: 20px; }
.prose figure { margin: 32px 0; }
.prose figcaption, .prose .wp-caption-text { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--muted); text-align: center; }
.prose code { padding: 2px 6px; border-radius: 6px; background: var(--bg2); font-family: var(--mono); font-size: 0.85em; color: var(--ink); }
.prose pre { margin: 0 0 24px; padding: 20px; overflow-x: auto; border-radius: 16px; background: var(--bg2); font-size: 15px; line-height: 1.6; }
.prose pre code { padding: 0; background: none; }
.prose iframe { width: 100%; border: 0; border-radius: 16px; }
.prose table { width: 100%; min-width: 520px; border-collapse: separate; border-spacing: 0; font-size: 15px; line-height: 1.5; }
.prose th, .prose td { padding: 14px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.prose thead th { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--bg2); }
.prose tbody tr:last-child > * { border-bottom: 0; }
.prose .wp-block-table, .prose .td-compare { margin: 0 0 28px; overflow-x: auto; border: 1px solid var(--line); border-radius: 24px; background: var(--card); }
.prose .wp-block-table table, .prose .td-compare table { margin: 0; }
.prose > table { display: block; overflow-x: auto; border: 1px solid var(--line); border-radius: 24px; }
.td-compare.hl-1 tr > *:nth-child(1), .td-compare.hl-2 tr > *:nth-child(2), .td-compare.hl-3 tr > *:nth-child(3),
.td-compare.hl-4 tr > *:nth-child(4), .td-compare.hl-5 tr > *:nth-child(5), .td-compare.hl-6 tr > *:nth-child(6) { background: var(--c-soft); }
.td-compare.hl-1 thead tr > *:nth-child(1), .td-compare.hl-2 thead tr > *:nth-child(2), .td-compare.hl-3 thead tr > *:nth-child(3),
.td-compare.hl-4 thead tr > *:nth-child(4), .td-compare.hl-5 thead tr > *:nth-child(5), .td-compare.hl-6 thead tr > *:nth-child(6) { color: var(--c-ink); }

.alignleft { float: left; margin: 6px 24px 16px 0; }
.alignright { float: right; margin: 6px 0 16px 24px; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.sticky, .bypostauthor, .gallery-caption { }

.page-links { display: flex; gap: 8px; margin: 32px 0; font-size: 15px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.tag-list a { padding: 6px 12px; border-radius: 999px; background: var(--bg2); color: var(--muted); font-size: 13px; text-decoration: none; }
.tag-list a:hover { color: var(--ink); }

.author-box { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; margin-top: 56px; padding: 28px; border-radius: 24px; background: var(--bg2); }
.author-avatar { width: 64px; height: 64px; border-radius: 50%; }
.author-id { flex: 1 1 300px; min-width: 0; }
.author-kicker { margin: 0; font-size: 13px; color: var(--muted); }
.author-name { margin: 2px 0 0; font-size: 20px; font-weight: 700; }
.author-name a { text-decoration: none; }
.author-bio { margin: 8px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink2); }

.page-col { max-width: 720px; margin: 0 auto; }

/* ==========================================================================
   Article components (shortcodes)
   ========================================================================== */

.td-toppick { display: flex; flex-direction: column; gap: 20px; margin: 0 0 40px; padding: 28px; border-radius: 28px; background: var(--c-soft); color: var(--ink); }
.tp-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--c-btn); color: var(--c-btn-fg); font-size: 13px; font-weight: 600; }
.tp-main { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.tp-id { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.tp-name { font-size: 28px; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.tp-blurb { font-size: 16px; line-height: 1.5; color: var(--ink2); }
.tp-main .rating { font-size: 22px; }
.tp-feats { list-style: none !important; margin: 0 !important; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 8px; }
.tp-feats li { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 8px 12px; border-radius: 999px; background: var(--card); font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.tp-feats .icon { color: var(--c-ink); }
.tp-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.tp-cta .aff-note { margin-left: auto; }

.td-callout { display: flex; gap: 16px; margin: 0 0 28px; padding: 20px 22px; border-radius: 20px; background: var(--bg2); }
.co-icon { flex: none; width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
.co-body { min-width: 0; }
.co-title { margin: 0 !important; font-size: 15px; line-height: 1.4; font-weight: 700; color: var(--ink); }
.co-text { margin-top: 4px; font-size: 17px; line-height: 1.6; color: var(--ink2); }
.co-text p { margin: 0 0 10px !important; }
.co-text p:last-child { margin-bottom: 0 !important; }
.td-callout--tip { background: var(--lemon); }
.td-callout--tip .co-icon { background: #43291F; color: #F4F0BB; }
.td-callout--tip .co-title, .td-callout--tip .co-text { color: #43291F; }
html.dark .td-callout--tip { background: rgba(244, 240, 187, 0.1); }
html.dark .td-callout--tip .co-icon { background: #F4F0BB; color: #43291F; }
html.dark .td-callout--tip .co-title, html.dark .td-callout--tip .co-text { color: var(--ink); }
.td-callout--warning .co-icon { background: #DA2C38; color: #FFFFFF; }
.td-callout--note .co-icon { background: #226F54; color: #FFFFFF; }
.td-callout--verdict { flex-direction: column; gap: 12px; padding: 32px; border-radius: 28px; background: var(--ink); }
.td-callout--verdict .co-icon { width: auto; height: auto; justify-content: flex-start; color: var(--on-ink); }
.td-callout--verdict .co-body { display: flex; flex-direction: column; gap: 6px; }
.td-callout--verdict .co-title { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-ink); }
.td-callout--verdict .co-text { font-size: 22px; line-height: 1.45; font-weight: 600; letter-spacing: -0.015em; color: var(--on-ink); }
.td-callout--verdict .co-text a { color: var(--on-ink); }

.td-proscons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 32px; }
.pc-col { padding: 22px; border-radius: 20px; background: var(--bg2); }
.pc-title { margin: 0 0 14px !important; font-size: 15px; line-height: 1.4; font-weight: 700; }
.pc-pros .pc-title, .pc-pros .icon { color: var(--pos); }
.pc-cons .pc-title, .pc-cons .icon { color: var(--neg); }
.pc-col ul { list-style: none !important; margin: 0 !important; padding: 0 !important; display: flex; flex-direction: column; gap: 12px; }
.pc-col li { display: flex; gap: 10px; margin: 0; padding: 0; font-size: 16px; line-height: 1.5; color: var(--ink2); }
.pc-col .icon { margin-top: 2px; }

.td-bestfor { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 28px; }
.td-best { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 20px; background: var(--bg2); }
.bf-label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-ink); }
.bf-name { font-size: 20px; line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.bf-name a { color: inherit !important; text-decoration: none !important; }
.bf-text { font-size: 15px; line-height: 1.5; color: var(--muted); }

.td-steps { list-style: none !important; margin: 0 0 28px !important; padding: 0 !important; display: flex; flex-direction: column; gap: 12px; counter-reset: tdstep; }
.td-step { display: flex; gap: 16px; align-items: flex-start; margin: 0; padding: 18px; border-radius: 18px; background: var(--bg2); counter-increment: tdstep; }
.td-step::before { content: counter(tdstep); flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--c-btn); color: var(--c-btn-fg); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.step-body { display: flex; flex-direction: column; gap: 4px; }
.step-title { font-size: 17px; line-height: 1.4; font-weight: 600; color: var(--ink); }
.step-text { font-size: 16px; line-height: 1.6; color: var(--ink2); }

/* ==========================================================================
   Archive
   ========================================================================== */

.cat-panel { position: relative; overflow: hidden; margin-top: 32px; padding: 56px; border-radius: 40px; background: var(--c-soft); }
.cat-panel .blob-a { width: 520px; height: 520px; right: -180px; top: -260px; background: var(--c); opacity: 0.14; }
.cat-panel-inner { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; max-width: 760px; }
.cat-icon { width: 60px; height: 60px; border-radius: 18px; background: var(--c-btn); color: var(--c-btn-fg); display: inline-flex; align-items: center; justify-content: center; }
.cat-title { color: var(--ink); }
.cat-desc { margin: 0; max-width: 560px; font-size: 20px; line-height: 1.55; color: var(--ink2); }
.cat-children { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-search { width: 100%; max-width: 560px; }
.nf-code { margin: 0; font-size: 14px; color: var(--c-ink); }

.cat-layout { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.cat-main { flex: 999 1 560px; min-width: 0; }
.cat-side { flex: 1 1 300px; max-width: 320px; align-self: stretch; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.list-count { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.seg-group { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--bg2); }
.seg { min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease; }
.seg:hover { color: var(--ink); }
.seg.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.empty { padding: 40px 0; border-top: 1px solid var(--line); }
.empty p { margin: 0 0 16px; color: var(--muted); }

.side-block .eyebrow { font-size: 12px; margin-bottom: 14px; }
.pop-list { list-style: none; margin: 0; padding: 0; }
.pop-list li { border-top: 1px solid var(--line); }
.pop-list a { display: flex; gap: 14px; padding: 14px 8px; border-radius: 14px; color: var(--ink); font-size: 15px; line-height: 1.4; font-weight: 500; text-decoration: none; transition: background-color 0.2s ease; }
.pop-list a:hover { background: var(--bg2); }
.pop-n { padding-top: 2px; font-size: 13px; color: var(--c-ink); }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.pagination { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.pagination .nav-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.page-numbers { min-width: 44px; height: 44px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: var(--muted); font-size: 15px; font-weight: 500; text-decoration: none; transition: background-color 0.2s ease, color 0.2s ease; }
a.page-numbers:hover { background: var(--bg2); color: var(--ink); }
.page-numbers.current { background: var(--ink); color: var(--bg); font-weight: 600; }
.page-numbers.prev, .page-numbers.next { background: var(--bg2); color: var(--ink); font-weight: 600; }

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-wrap { max-width: 784px; margin-top: 80px; }
.comments-title { margin: 0 0 24px; font-size: 28px; letter-spacing: -0.03em; }
.comment-list { list-style: none; margin: 0 0 40px; padding: 0; }
.comment-list .children { list-style: none; margin: 0; padding-left: 24px; }
.comment-body { padding: 20px 0; border-top: 1px solid var(--line); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--muted); }
.comment-meta a { color: inherit; text-decoration: none; }
.comment-author { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.comment-author .avatar { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-content { font-size: 16px; line-height: 1.65; color: var(--ink2); }
.reply a { font-size: 14px; font-weight: 600; color: var(--c-ink); text-decoration: none; }
.comment-respond { padding: 28px; border-radius: 24px; background: var(--bg2); }
.comment-reply-title { margin: 0 0 12px; font-size: 22px; letter-spacing: -0.02em; }
.comment-form label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font-size: 16px;
}
.comment-form textarea { min-height: 140px; resize: vertical; }
.comment-form p { margin: 0 0 16px; }
.comment-notes, .logged-in-as { font-size: 14px; color: var(--muted); }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1240px) {
	.art-grid.has-toc.has-side { grid-template-columns: minmax(0, 680px) 300px; gap: 48px; }
	.art-grid.has-toc.no-side { grid-template-columns: minmax(0, 720px); }
	.toc-col { display: none; }
	.toc-inline { display: block; }
}

@media (max-width: 1040px) {
	.primary-nav { display: none; }
	.menu-btn { display: inline-flex; }
	.hero-grid { grid-template-columns: 1fr; gap: 48px; }
	.float-card { left: 16px; }
	.trend-grid, .tools-grid, .tools-grid--3, .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.foot-grid { grid-template-columns: 1fr 1fr; }
	.cat-side { max-width: none; }
}

@media (max-width: 980px) {
	.art-grid.has-side, .art-grid.no-toc.has-side, .art-grid.has-toc.has-side { grid-template-columns: minmax(0, 1fr); }
	.side-col { display: none; }
	.anchor-ad { display: block; }
	.ad--article-leaderboard .ad-box { max-width: 320px; min-height: 100px; }
}

@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}

@media (max-width: 640px) {
	.wrap { padding-left: 16px; padding-right: 16px; }
	.hide-sm { display: none; }
	.section { margin-top: 80px; }
	.hero { padding-top: 32px; }
	.hero-dek { font-size: 18px; }
	.hero-frame { padding: 18px; border-radius: 28px; }
	.trend-grid, .tools-grid, .tools-grid--2, .tools-grid--3, .post-grid { grid-template-columns: 1fr; }
	.bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
	.bento > .tile, .bento > .tile:first-child { grid-column: auto !important; grid-row: auto !important; min-height: 220px; padding: 24px; }
	.bento > .tile:first-child .tile-title { font-size: 30px; }
	.ad--home-billboard .ad-box { max-width: 336px; min-height: 280px; }
	.deal-row { padding: 24px; }
	.newsletter { padding: 56px 20px; border-radius: 28px; }
	.foot-grid { grid-template-columns: 1fr; }
	.art-dek { font-size: 19px; }
	.art-hero img { border-radius: 24px; }
	.art-body { margin-top: 40px; }
	.prose { font-size: 18px; line-height: 1.7; }
	.prose h2 { margin-top: 56px; font-size: 28px; }
	.prose h3 { font-size: 21px; }
	.td-proscons, .td-bestfor, .tool-feats--2 { grid-template-columns: 1fr; }
	.tool-cta { margin-left: 0; width: 100%; }
	.tp-cta .btn { width: 100%; }
	.tp-cta .aff-note { margin-left: 0; }
	.cat-panel { padding: 32px 20px; border-radius: 28px; }
	.cat-desc { font-size: 18px; }
	.card--row .card-link { grid-template-columns: 1fr; gap: 16px; }
	.alignleft, .alignright { float: none; margin: 24px 0; }
}

/* ==========================================================================
   Wide screens and phones (v1.1)
   ========================================================================== */

@media (min-width: 1500px) {
	.layout-wide #tdb-latest { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.layout-wide .hero-grid { gap: 96px; }
}

@media (max-width: 600px) {
	.admin-bar .site-header { top: 0; }
}

@media (max-width: 640px) {
	.h-display { font-size: clamp(32px, 9vw, 40px); }
	.art-h1 { font-size: clamp(30px, 8.4vw, 38px); }
	.hero-copy { gap: 18px; }
	.hero-actions { width: 100%; }
	.hero-actions .btn { flex: 1 1 auto; }
	.hero-frame { min-height: 0; }
	.float-card { left: 12px; bottom: 12px; padding: 8px 12px 8px 8px; border-radius: 16px; }
	.float-card .mono-tile { width: 38px; height: 38px; border-radius: 12px; font-size: 13px; }
	.float-name { font-size: 14px; }
	.section-head { margin-bottom: 20px; }

	/* Swipeable rows instead of long stacks */
	.trend-grid, .tools-grid {
		display: flex; gap: 12px; overflow-x: auto;
		margin-left: -16px; margin-right: -16px; padding: 4px 16px 14px;
		scroll-snap-type: x mandatory; scroll-padding-left: 16px;
		scrollbar-width: none; -webkit-overflow-scrolling: touch;
	}
	.trend-grid::-webkit-scrollbar, .tools-grid::-webkit-scrollbar { display: none; }
	.trend-grid > *, .tools-grid > * { flex: 0 0 84%; scroll-snap-align: start; }
	.trend { min-height: 160px; }
	.lift:hover, .card-link:hover { transform: none; }

	/* Compact article cards */
	.post-grid { gap: 12px; }
	.post-grid .card-link, .card--row .card-link {
		display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start;
		padding: 12px; margin: 0; border-radius: 20px;
	}
	.card--row .card-link { padding: 14px 0; border-radius: 0; }
	.card--row .card-link:hover { background: transparent; }
	.post-grid .card-media, .card--row .card-media { aspect-ratio: 1 / 1; border-radius: 14px; }
	.post-grid .card-body, .card--row .card-body { padding: 0; gap: 6px; }
	.post-grid .card-excerpt, .card--row .card-excerpt { display: none; }
	.post-grid .card-title, .card--row .card-title { font-size: 16px; line-height: 1.3; }
	.card-cat { font-size: 11px; }
	.card-meta { padding-top: 2px; font-size: 11px; }
	.post-grid .ph { padding: 10px 10px 0; }
	.post-grid .ph-win { padding: 8px; gap: 6px; }
	.post-grid .ph-dot { width: 16px; height: 16px; border-radius: 5px; }
	.ad--infeed .ad-box { min-height: 280px; }

	.tile-list { display: none; }
	.deal-actions { width: 100%; }
	.deal-actions > * { flex: 1 1 auto; justify-content: center; }
	.deal-title { font-size: 20px; }
	.newsletter .h-sec { font-size: 30px; }
	.tool--wide { padding: 20px; }
	.tool--wide .tool-name { font-size: 20px; }
	.art-meta { gap: 10px 16px; }
	.td-toppick { padding: 20px; }
	.tp-name { font-size: 24px; }
	.td-callout--verdict { padding: 24px; }
	.td-callout--verdict .co-text { font-size: 19px; }
	.list-head .seg-group { width: 100%; }
	.list-head .seg { flex: 1; justify-content: center; }
}
