/*
Theme Name: AzPicks
Description: Playful, Nintendo-inspired, fully responsive theme for Amazon affiliate roundup / buying-guide sites. Pairs with the Roundups AutoKey plugin (affiliate buttons, comparison tables, product boxes, table of contents, auto disclosure).
Version: 2.0.0
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: azpicks
*/

:root {
	--accent: #e60012;          /* Nintendo-style red (Customizer) */
	--accent-dark: #b8000e;
	--nav: #2d2d2d;             /* footer colour (Customizer) */
	--blue: #00a6e0;
	--yellow: #ffd400;
	--green: #2ec27e;
	--ink: #1d1d1f;
	--muted: #666a70;
	--line: #e8e8ec;
	--bg: #ffffff;
	--soft: #f5f6f8;
	--link: #0a6fb8;
	--radius: 20px;
	--radius-sm: 12px;
	--wrap: 1200px;
	--read: 760px;
	--gutter: clamp(16px, 4vw, 28px);
	--font: ui-rounded, "Nunito", "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Thai", "Sarabun", Helvetica, Arial, sans-serif;
	--shadow: 0 6px 0 rgba(0,0,0,.07), 0 12px 28px rgba(0,0,0,.08);
	--bounce: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0; font: 400 clamp(16px, 1.1vw + 11px, 18px)/1.7 var(--font); color: var(--ink); background: var(--bg);
	-webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-wrap: break-word;
}
img, video { max-width: 100%; height: auto; }
iframe, embed, object, svg { max-width: 100%; }
iframe { border: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; background: #fff; padding: 10px 16px; clip: auto; width: auto; height: auto; border-radius: 999px; }

/* ================= Top bar & header ================= */
.topbar { background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; text-align: center; padding: 6px var(--gutter); letter-spacing: .02em; }
.site-header { background: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 4px solid var(--accent); box-shadow: 0 4px 18px rgba(0,0,0,.06); }
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); font-weight: 900; font-size: clamp(20px, 3vw, 26px); letter-spacing: -.5px; line-height: 1; flex: 0 0 auto; }
.brand::before { content: ""; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff6b78 0 18%, var(--accent) 19% 100%); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); transition: transform .4s var(--bounce); }
.brand:hover { color: var(--accent-dark); text-decoration: none; }
.brand:hover::before { transform: rotate(180deg) scale(1.15); }
.custom-logo-link { display: inline-flex; }
.custom-logo { max-height: 44px; width: auto; }

.nav-panel { display: flex; align-items: center; gap: 18px; flex: 1 1 auto; min-width: 0; }
.main-nav { flex: 1 1 auto; min-width: 0; }
.main-nav ul { list-style: none; margin: 0; padding: 4px 2px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.main-nav ul::-webkit-scrollbar { display: none; }
.main-nav li { flex: 0 0 auto; }
.main-nav a { color: var(--ink); font-weight: 800; font-size: 15px; padding: 9px 16px; border-radius: 999px; display: block; white-space: nowrap; transition: background .15s, transform .25s var(--bounce), color .15s; }
.main-nav a:hover { background: var(--accent); color: #fff; transform: translateY(-2px); text-decoration: none; }
.main-nav .current-menu-item > a, .main-nav .current-cat > a { background: var(--accent); color: #fff; }


.nav-toggle { display: none; margin-left: auto; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; padding: 0; align-items: center; justify-content: center; box-shadow: 0 4px 0 var(--accent-dark); transition: transform .15s; -webkit-tap-highlight-color: transparent; }
.nav-toggle svg { width: 24px; height: 24px; display: block; stroke: #fff; }
.nav-toggle:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-dark); }
.nav-toggle .ic-close { display: none; }
.site-header.open .nav-toggle .ic-open { display: none; }
.site-header.open .nav-toggle .ic-close { display: block; }

/* Category button + mega menu (handles 24+ categories) */
.cat-toggle { font: inherit; font-weight: 800; font-size: 15px; color: var(--ink); background: var(--soft); border: 0; padding: 9px 16px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s, transform .25s var(--bounce); }
.cat-toggle svg { width: 16px; height: 16px; transition: transform .2s; stroke: currentColor; }
.cat-toggle:hover, .cat-toggle[aria-expanded="true"] { background: var(--accent); color: #fff; }
.cat-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.main-nav { display: flex; align-items: center; gap: 12px; }
.main-nav .nav-links { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0; overflow: visible; }
.nav-cats { margin-left: auto; flex: 0 0 auto; }
.main-nav .current-menu-item > a, .main-nav .current_page_item > a { background: var(--accent); color: #fff; }
.main-nav .extra-menu { padding: 4px 2px; }
.mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 4px solid var(--accent); box-shadow: 0 18px 30px rgba(0,0,0,.14); padding: 20px 0 24px; max-height: calc(100vh - 150px); overflow-y: auto; overscroll-behavior: contain; }
.mega[hidden] { display: none; }
.site-header .mega .wrap { display: block; min-height: 0; gap: 0; }
.mega ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px 12px; }
.mega a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--soft); color: var(--ink); font-weight: 800; font-size: 15px; line-height: 1.3; transition: transform .25s var(--bounce), background .15s; }
.mega a:hover { background: #fff; box-shadow: 0 0 0 2px var(--c, var(--accent)) inset; transform: translateY(-2px); text-decoration: none; color: var(--ink); }
.mega .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--accent)); flex: 0 0 auto; }
.mega li:nth-child(4n+2) { --c: var(--blue); }
.mega li:nth-child(4n+3) { --c: #e0a800; }
.mega li:nth-child(4n) { --c: var(--green); }
.mega .nm { flex: 1; min-width: 0; }
.mega .ct { font-size: 12px; background: #fff; border-radius: 999px; padding: 1px 9px; color: var(--muted); }

/* Hero search */
.hero-search { display: flex; max-width: 560px; margin-top: 24px; background: #fff; border-radius: 999px; padding: 6px; box-shadow: 0 6px 0 rgba(0,0,0,.16); }
.hero-search input[type=search] { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; padding: 10px 18px; color: var(--ink); -webkit-appearance: none; appearance: none; }
.hero-search input[type=search]:focus { outline: 0; }
.hero-search button { flex: 0 0 auto; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--yellow); color: #1d1d1f; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 3px 0 #c9a400; transition: transform .2s var(--bounce); }
.hero-search button svg { stroke: #1d1d1f; width: 22px; height: 22px; }
.hero-search button:hover { transform: scale(1.1) rotate(-8deg); }

.progress { position: fixed; top: 0; left: 0; height: 4px; width: 0; background: linear-gradient(90deg, var(--yellow), var(--blue)); z-index: 100; border-radius: 0 4px 4px 0; }

/* ================= Hero ================= */
.hero { position: relative; background: var(--accent); color: #fff; padding: clamp(40px, 8vw, 84px) 0 clamp(70px, 10vw, 120px); overflow: hidden; isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; z-index: -1; }
.hero::before { width: clamp(180px, 30vw, 380px); aspect-ratio: 1; right: -6%; top: -20%; background: rgba(255,255,255,.12); }
.hero::after { width: clamp(90px, 16vw, 200px); aspect-ratio: 1; right: 18%; bottom: 14%; background: var(--yellow); opacity: .9; animation: float 5s ease-in-out infinite; }
.hero .wrap > * { position: relative; }
.hero h1 { margin: 0 0 12px; font-size: clamp(28px, 6vw, 56px); line-height: 1.1; letter-spacing: -1px; font-weight: 900; max-width: 18ch; text-shadow: 0 3px 0 rgba(0,0,0,.14); }
.hero p { margin: 0; max-width: 56ch; font-size: clamp(16px, 2.2vw, 20px); color: #fff; opacity: .95; }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: clamp(34px, 6vw, 70px); z-index: -1; }
.hero-wave svg { display: block; width: 100%; height: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chips a { background: #fff; color: var(--ink); padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 800; box-shadow: 0 4px 0 rgba(0,0,0,.18); transition: transform .25s var(--bounce), box-shadow .15s; }
.chips a:nth-child(4n+2) { background: var(--yellow); }
.chips a:nth-child(4n+3) { background: #c9f0ff; }
.chips a:nth-child(4n) { background: #cff5e2; }
.chips a:hover { transform: translateY(-4px) rotate(-2deg); color: var(--ink); text-decoration: none; box-shadow: 0 8px 0 rgba(0,0,0,.18); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.section-title { font-size: clamp(22px, 3vw, 30px); font-weight: 900; margin: clamp(30px, 5vw, 56px) 0 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.section-title::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); margin-right: 10px; flex: 0 0 auto; box-shadow: 18px 0 0 var(--yellow), 36px 0 0 var(--blue); margin-right: 52px; }
.section-title small { font-size: 15px; font-weight: 800; margin-left: auto; }
.section-title small a { background: var(--soft); padding: 6px 14px; border-radius: 999px; }
.section-title small a:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* ================= Cards ================= */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.grid > * { min-width: 0; }
.card { --c: var(--accent); background: #fff; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); border: 2px solid var(--line); transition: transform .35s var(--bounce), box-shadow .25s, border-color .2s; }
.grid > .card:nth-child(4n+2) { --c: var(--blue); }
.grid > .card:nth-child(4n+3) { --c: #e0a800; }
.grid > .card:nth-child(4n) { --c: var(--green); }
.card:hover { transform: translateY(-8px) rotate(-.6deg); border-color: var(--c); box-shadow: 0 10px 0 color-mix(in srgb, var(--c) 35%, transparent), 0 18px 32px rgba(0,0,0,.12); }
.card .thumb { aspect-ratio: 16/9; background: var(--soft); display: block; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--bounce); }
.card:hover .thumb img { transform: scale(1.07); }
.card .body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .cat { align-self: flex-start; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 900; color: #fff; background: var(--c); padding: 3px 12px; border-radius: 999px; }
.card h2, .card h3 { margin: 0; font-size: clamp(17px, 2vw, 20px); line-height: 1.3; font-weight: 900; }
.card h2 a, .card h3 a { color: var(--ink); }
.card h2 a:hover, .card h3 a:hover { color: var(--c); text-decoration: none; }
.card .excerpt { color: var(--muted); font-size: 15px; line-height: 1.55; }
.card .meta { margin-top: auto; font-size: 13px; color: var(--muted); font-weight: 700; }
.card.featured { grid-column: 1 / -1; flex-direction: row; }
.card.featured .thumb { flex: 1.25; aspect-ratio: auto; min-height: 300px; }
.card.featured .body { flex: 1; justify-content: center; padding: clamp(20px, 3vw, 36px); gap: 12px; }
.card.featured h2 { font-size: clamp(22px, 3.2vw, 32px); }

/* ================= Layout ================= */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: clamp(24px, 4vw, 48px); padding: clamp(24px, 4vw, 44px) 0 clamp(40px, 6vw, 70px); align-items: start; }
.layout.no-sidebar { grid-template-columns: minmax(0, var(--read)); justify-content: center; }
.layout > * { min-width: 0; }
.sidebar { position: sticky; top: 96px; }
.sidebar .widget { background: var(--soft); border-radius: var(--radius); padding: 20px; margin-bottom: 22px; border: 2px solid var(--line); }
.sidebar .widget-title { margin: 0 0 12px; font-size: 18px; font-weight: 900; }
.sidebar ul { margin: 0; padding-left: 0; list-style: none; }
.sidebar li { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.sidebar li:last-child { border: 0; }
.page-head { padding: clamp(24px, 4vw, 40px) 0 0; }
.page-head h1 { margin: 0; font-size: clamp(26px, 4.5vw, 40px); font-weight: 900; }
.pagination, .navigation.pagination .nav-links { display: flex; gap: 8px; justify-content: center; margin: 40px 0 0; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--soft); color: var(--ink); font-weight: 800; padding: 0 14px; transition: transform .2s var(--bounce); }
.pagination .current, .pagination a.page-numbers:hover { background: var(--accent); color: #fff; text-decoration: none; transform: translateY(-3px); }

/* ================= Single article ================= */
.entry-head .cat a { display: inline-block; font-size: 13px; text-transform: uppercase; font-weight: 900; letter-spacing: .06em; color: #fff; background: var(--accent); padding: 4px 14px; border-radius: 999px; }
.entry-head .cat a:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }
.entry-head h1 { font-size: clamp(26px, 5vw, 44px); line-height: 1.15; margin: 14px 0 12px; letter-spacing: -.5px; font-weight: 900; }
.entry-meta { color: var(--muted); font-size: 14px; font-weight: 700; display: flex; gap: 8px 16px; flex-wrap: wrap; }
.disclosure { background: #fff7cc; border: 2px dashed #e0a800; color: #594200; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; line-height: 1.5; margin: 18px 0; }
.entry-thumb { margin: 18px 0 8px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.entry-thumb img { display: block; width: 100%; }
.toc { background: #fff; border: 3px solid var(--blue); border-radius: var(--radius); padding: 16px 20px; margin: 26px 0; box-shadow: 0 6px 0 rgba(0,166,224,.2); }
.toc strong { display: block; margin-bottom: 8px; font-size: 18px; font-weight: 900; color: var(--blue); }
.toc ol { margin: 0; padding-left: 22px; columns: 2 240px; column-gap: 28px; font-size: 15px; }
.toc li { break-inside: avoid; margin: 4px 0; font-weight: 700; }

.entry-content { font-size: 1em; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: clamp(23px, 3.6vw, 31px); line-height: 1.25; margin: 2em 0 .6em; padding-left: 16px; border-left: 8px solid var(--accent); font-weight: 900; scroll-margin-top: 90px; }
.entry-content h3 { font-size: clamp(19px, 2.6vw, 23px); margin: 1.6em 0 .5em; font-weight: 900; scroll-margin-top: 90px; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.2em; }
.entry-content li { margin-bottom: .35em; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content figure { margin: 1.4em 0; }
.entry-content blockquote { margin: 1.5em 0; padding: 6px 20px; border-left: 6px solid var(--yellow); background: var(--soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.entry-content pre, .entry-content code { overflow-x: auto; max-width: 100%; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5em 0; border: 2px solid var(--line); border-radius: var(--radius-sm); max-width: 100%; }
.entry-content table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 0; }
.entry-content th { background: var(--accent); color: #fff; text-align: left; font-weight: 900; white-space: nowrap; }
.entry-content th, .entry-content td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.entry-content tr:nth-child(even) td { background: var(--soft); }
.entry-content table img { max-width: 90px; }

/* Affiliate links & buttons */
.entry-content a.rau-aff { font-weight: 800; }
.entry-content a.rau-aff:not(:has(img))::after { content: " \2197"; font-size: .8em; opacity: .7; }
.entry-content a.rau-aff:has(img)::after { content: none; }
a.rau-btn, .entry-content a.button, .entry-content a.btn, .entry-content a[class*="cta"], .entry-content a[class*="button"] {
	display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 48px;
	background: var(--yellow); color: #1d1d1f !important; border: 0; border-radius: 999px; padding: 11px 26px;
	font-weight: 900; font-size: 16px; line-height: 1.25; text-decoration: none !important;
	box-shadow: 0 5px 0 #c9a400, 0 10px 18px rgba(0,0,0,.12); transition: transform .2s var(--bounce), box-shadow .15s; max-width: 100%;
}
a.rau-btn:hover, .entry-content a.button:hover, .entry-content a.btn:hover, .entry-content a[class*="cta"]:hover, .entry-content a[class*="button"]:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 8px 0 #c9a400, 0 14px 22px rgba(0,0,0,.14); }
a.rau-btn:active, .entry-content a[class*="button"]:active, .entry-content a[class*="cta"]:active { transform: translateY(4px); box-shadow: 0 1px 0 #c9a400; }
a.rau-btn::after, .entry-content a[class*="button"]::after, .entry-content a[class*="cta"]::after { content: none !important; }

.tags a { display: inline-block; background: var(--soft); border-radius: 999px; padding: 4px 14px; font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 6px 8px 0; }
.tags a:hover { background: var(--accent); color: #fff; text-decoration: none; }
.related { margin-top: 48px; }

/* ================= Footer ================= */
.site-footer { background: var(--nav); color: #c9ccd1; padding: clamp(30px, 5vw, 50px) 0 26px; font-size: 14px; position: relative; border-top: 6px solid var(--accent); }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--yellow); }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 28px; margin-bottom: 26px; }
.site-footer .widget-title { color: #fff; font-size: 17px; font-weight: 900; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.footer-disclosure { border-top: 2px dashed rgba(255,255,255,.18); padding-top: 18px; font-size: 13px; line-height: 1.6; }

/* ================= Comments / forms ================= */
.comments-area { margin-top: 48px; }
.comment-list { list-style: none; padding: 0; }
.comment-body { border-bottom: 1px dashed var(--line); padding: 14px 0; }
.comment-respond input[type=text], .comment-respond input[type=email], .comment-respond input[type=url], .comment-respond textarea { width: 100%; padding: 11px 14px; border: 2px solid var(--line); border-radius: var(--radius-sm); font: inherit; }
.comment-respond .submit, .search-form button { background: var(--accent); color: #fff; border: 0; padding: 12px 26px; border-radius: 999px; font-weight: 900; cursor: pointer; box-shadow: 0 4px 0 var(--accent-dark); }
.search-box { display: flex; gap: 8px; max-width: 460px; }
.search-box input { flex: 1; min-width: 0; padding: 11px 16px; border: 2px solid var(--line); border-radius: 999px; font: inherit; }
.search-box button { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 0 22px; font-weight: 900; cursor: pointer; box-shadow: 0 4px 0 var(--accent-dark); }
.not-found { padding: clamp(50px, 10vw, 100px) var(--gutter); text-align: center; }
.not-found h1 { font-size: clamp(64px, 18vw, 140px); margin: 0; line-height: 1; color: var(--accent); font-weight: 900; text-shadow: 0 6px 0 rgba(0,0,0,.1); }
.not-found .search-box { margin: 20px auto 0; }

/* ================= Responsive ================= */
@media (max-width: 960px) {
	.layout { grid-template-columns: minmax(0, 1fr); }
	.sidebar { position: static; }
	.card.featured { flex-direction: column; }
	.card.featured .thumb { min-height: 0; aspect-ratio: 16/9; flex: none; }
}

@media (max-width: 860px) {
	.site-header .wrap { flex-wrap: wrap; min-height: 62px; padding-top: 8px; padding-bottom: 8px; gap: 8px; }
	.nav-toggle { display: inline-flex; }
	.nav-panel { display: none; flex-direction: column; align-items: stretch; width: 100%; flex: 1 1 100%; gap: 14px; padding: 8px 0 16px; }
	.site-header.open { max-height: 100vh; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
	.site-header.open .nav-panel { display: flex; }
	.main-nav { flex-direction: column; align-items: stretch; gap: 8px; }
	.main-nav .nav-links { flex-direction: column; align-items: stretch; gap: 8px; flex-wrap: nowrap; }
	.nav-cats { margin-left: 0; }
	.main-nav ul { flex-direction: column; overflow: visible; gap: 8px; }
	.main-nav a, .cat-toggle { background: var(--soft); font-size: 17px; padding: 14px 18px; border-radius: 16px; white-space: normal; width: 100%; justify-content: space-between; }
	.main-nav a:hover { transform: none; }
	.mega { position: static; box-shadow: none; border-bottom: 0; padding: 0 0 14px; max-height: 55vh; }
	.mega .wrap { padding: 0 var(--gutter); }
	.mega ul { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 8px; }
	.mega a { padding: 10px 12px; font-size: 14px; }
	.site-header:not(.open) .mega { display: none; }
	.hero-search { margin-top: 18px; }
	.hero::after { right: 6%; bottom: 20%; opacity: .55; }
	.hero h1 { max-width: none; }
	.sticky-offset { top: 0; }
}

@media (max-width: 600px) {
	.topbar { font-size: 12px; }
	.grid { grid-template-columns: minmax(0, 1fr); }
	.chips { flex-wrap: nowrap; overflow-x: auto; margin-right: calc(var(--gutter) * -1); padding: 4px var(--gutter) 10px 0; scrollbar-width: none; }
	.chips::-webkit-scrollbar { display: none; }
	.chips a { flex: 0 0 auto; }
	.section-title::before { display: none; }
	.card:hover { transform: none; }
	.entry-content h2 { padding-left: 12px; border-left-width: 6px; }
	.entry-content a[class*="button"], .entry-content a[class*="cta"], a.rau-btn { display: flex; width: 100%; }
	.toc ol { columns: 1; }
	.entry-meta { gap: 4px 12px; }
	.related { margin-top: 32px; }
}

@media (hover: none) {
	.card:hover, .chips a:hover, .main-nav a:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print { .site-header, .sidebar, .site-footer, .progress, .topbar, .hero { display: none; } }

/* ================= Imported article hardening (Roundups.ai / Classic editor HTML) ================= */
.entry-content { max-width: 100%; }
.entry-content * { box-sizing: border-box; }
.entry-content :where(div, section, article, aside, header, footer, figure, p, ul, ol, dl, form, blockquote, pre, iframe, video, canvas, center) { max-width: 100% !important; }
.entry-content img { max-width: 100% !important; height: auto !important; }
.entry-content svg { max-width: 100%; flex-shrink: 0; }
.entry-content :where(div, section, article, aside, figure, ul, ol)[style*="width"]:not(.buy-box-roundups) { width: auto !important; }
/* A fixed min-width must never exceed the screen, but keep it big enough so flex-wrap still wraps. */
.entry-content [style*="min-width"]:not(table):not(col):not(td):not(th) { min-width: min(280px, 100%) !important; }
.entry-content [style*="white-space"] { white-space: normal !important; }
.entry-content [style*="grid-template-columns"] { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)) !important; }
.entry-content [style*="float"] { float: none !important; }
.entry-content [style*="position: fixed"], .entry-content [style*="position:fixed"] { position: static !important; }
.entry-content iframe { width: 100%; }
.entry-content pre { white-space: pre-wrap; }
.entry-content p:empty { display: none; }
.entry-content .alignleft, .entry-content .alignright { float: none; margin: 1em auto; display: block; }
.entry-content .wp-caption { max-width: 100% !important; width: auto !important; }

/* Tables: keep columns readable and scroll sideways instead of squashing */
.entry-content .tableWrapper { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5em 0; }
.entry-content .tableWrapper > .table-scroll { margin: 0; }
.table-scroll {
	background:
		linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left center / 36px 100% no-repeat local,
		linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right center / 36px 100% no-repeat local,
		radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.22), rgba(0,0,0,0)) left center / 12px 100% no-repeat scroll,
		radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.22), rgba(0,0,0,0)) right center / 12px 100% no-repeat scroll;
}
.entry-content table { width: 100% !important; min-width: 0 !important; table-layout: auto !important; }
.entry-content table td, .entry-content table th { min-width: 130px; overflow-wrap: normal; word-break: normal; hyphens: none; }
.entry-content table td:last-child, .entry-content table th:last-child { min-width: 120px; }
.entry-content table col { min-width: 0 !important; }
.entry-content table td.col-wide, .entry-content table th.col-wide { min-width: 230px; }
.entry-content table td img { width: 100%; max-width: 110px !important; }

/* Roundups.ai product box ("buy-box-roundups") */
.entry-content .buy-box-roundups { border: 2px solid var(--line) !important; border-radius: var(--radius) !important; box-shadow: var(--shadow); background: #fff; margin: 28px 0 !important; max-width: 100% !important; }
.entry-content .buy-box-roundups figure { margin: 0; }
.entry-content .buy-box-roundups img { border-radius: 0; }
.entry-content .buy-box-roundups h3 { margin: 0 0 .4em; }
.entry-content a.buy-now-link {
	background: var(--yellow) !important; color: #1d1d1f !important; font-weight: 900 !important; font-size: 16px !important; line-height: 1.2 !important;
	width: auto !important; min-width: 12rem; max-width: 100%; height: auto !important; min-height: 48px; padding: 10px 28px; text-align: center; text-decoration: none !important;
	box-shadow: 0 5px 0 #c9a400, 0 10px 18px rgba(0,0,0,.12); transition: transform .2s var(--bounce), box-shadow .15s; white-space: nowrap !important;
}
.entry-content a.buy-now-link:hover { transform: translateY(-3px) scale(1.03); }
.entry-content a.buy-now-link::after { content: none !important; }
@media (max-width: 600px) {
	.entry-content a.buy-now-link { display: flex !important; width: 100% !important; }
	.entry-content .buy-box-roundups p:has(> a.buy-now-link) { flex: 1 1 100%; }
	.entry-content .buy-box-roundups > div:first-child { flex: 1 1 100% !important; }
	.entry-content table td, .entry-content table th { min-width: 120px; }
}
/* ================= Footer menu, static pages, forms ================= */
.footer-nav { margin-bottom: 18px; }
.footer-menu { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-menu li { margin: 0; }
.footer-menu a { font-weight: 700; }
.cat-card { text-decoration: none; color: inherit; }
.cat-card:hover { text-decoration: none; }
.cat-card h2 { color: var(--ink); }
.azp-form { display: grid; gap: 14px; max-width: 560px; margin-top: 18px; }
.azp-form p { margin: 0; }
.azp-form label { display: block; font-weight: 800; margin-bottom: 6px; }
.azp-form input[type=text], .azp-form input[type=email], .azp-form textarea { width: 100%; padding: 12px 16px; border: 2px solid var(--line); border-radius: var(--radius-sm); font: inherit; font-size: 16px; background: #fff; }
.azp-form input:focus, .azp-form textarea:focus { outline: 0; border-color: var(--accent); }
.azp-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.azp-notice { padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 700; margin: 12px 0; }
.azp-notice.ok { background: #d9f6e8; color: #0a5a37; }
.azp-notice.err { background: #ffe0e3; color: #8a0010; }