/* Bestaito theme. Hand-written, system fonts, token-based colours (dark mode-ready). */

/* ---------- Font: Inter variable, latin subset, self-hosted (SIL OFL, see assets/fonts/OFL.txt) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/inter-latin-var.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
	--c-brand: #853ae4;
	--c-brand-strong: #6b21c8;
	--c-brand-soft: #f3ebfd;
	--c-text: #111;
	--c-muted: #52525b;
	--c-bg: #fff;
	--c-surface: #f9f9f9;
	--c-page: #f7f7f8;
	--c-border: #e8e8eb;
	--c-free-bg: #a6f4c5;
	--c-free: #064e3b;
	--c-paid-bg: #fdf38a;
	--c-paid: #4a3a00;
	--c-ribbon: #ffd75d;
	--c-deal-bg: #dcfce7;
	--c-deal: #166534;
	--c-featured-bg: #fef3c7;
	--c-featured: #92400e;
	--c-nsfw-bg: #fee2e2;
	--c-nsfw: #991b1b;
	--c-star: #f59e0b;
	--c-focus: #2563eb;
	--font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--fs-sm: .875rem;
	--fs-md: 1rem;
	--fs-lg: 1.25rem;
	--fs-xl: 1.5625rem;
	--fs-2xl: 1.953rem;
	--fs-3xl: 2.441rem;
	--s1: 4px;
	--s2: 8px;
	--s3: 12px;
	--s4: 16px;
	--s5: 24px;
	--s6: 32px;
	--s7: 48px;
	--s8: 64px;
	--radius: 8px;
	--radius-lg: 16px;
	--shadow: 0 3px 9px rgb(0 0 0 / .05);
	--container: 1200px;
	--measure: 720px;
	--header-h: 64px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--s4)); }
/* Keep focused or anchored targets clear of a second sticky bar (WCAG 2.4.11): tool section nav ~50px, account nav ~58px incl. offset. */
html:has([data-section-nav]) { scroll-padding-top: calc(var(--header-h) + 64px); }
html:has(.account-nav) { scroll-padding-top: calc(var(--header-h) + 72px); }
body { margin: 0; font-family: var(--font); font-size: var(--fs-md); line-height: 1.6; color: var(--c-text); background: var(--c-bg); -webkit-font-smoothing: antialiased; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
svg { flex-shrink: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 var(--s3); line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
p, ul, ol, figure, blockquote, table, pre { margin: 0 0 var(--s4); }
a { color: var(--c-brand-strong); text-underline-offset: 2px; }
a:hover { color: var(--c-brand); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; border-radius: 2px; }
[role="list"] { list-style: none; padding: 0; margin: 0; }
hr { border: 0; border-top: 1px solid var(--c-border); margin: var(--s6) 0; }
.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 { position: absolute; left: var(--s2); top: -100px; z-index: 1000; padding: var(--s2) var(--s4); background: var(--c-text); color: #fff; border-radius: var(--radius); }
.skip-link:focus { top: var(--s2); color: #fff; }
.site-main:focus { outline: none; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s4); }
.container--narrow { max-width: calc(var(--measure) + 2 * var(--s4)); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ---------- Buttons, chips, badges ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px; padding: var(--s2) var(--s4); border: 1px solid transparent; border-radius: var(--radius); font-weight: 600; font-size: var(--fs-md); line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.btn--primary { background: var(--c-brand); color: #fff; }
.btn--primary:hover { background: var(--c-brand-strong); color: #fff; }
.btn--ghost { background: var(--c-bg); border-color: var(--c-border); color: var(--c-text); }
.btn--ghost:hover { border-color: var(--c-brand); color: var(--c-brand-strong); }
.btn--sm { min-height: 40px; padding: var(--s1) var(--s3); font-size: var(--fs-sm); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--radius); background: none; color: var(--c-text); cursor: pointer; }
.icon-btn:hover { background: var(--c-surface); color: var(--c-brand-strong); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-block: var(--s1); }
.chip { display: inline-flex; align-items: center; gap: var(--s1); min-height: 36px; padding: var(--s1) var(--s3); border: 1px solid var(--c-border); border-radius: 999px; background: var(--c-bg); color: var(--c-text); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; text-decoration: none; }
.chip:hover { border-color: var(--c-brand); color: var(--c-brand-strong); }
.chip[aria-current] { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.chip--sm { min-height: 28px; padding: 2px var(--s3); font-size: .8125rem; }
.chip--more { color: var(--c-brand-strong); }
.badge { display: inline-flex; align-items: center; gap: var(--s1); padding: 2px var(--s2); border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.5; text-decoration: none; white-space: nowrap; background: var(--c-surface); color: var(--c-muted); border: 1px solid var(--c-border); }
.badge--pricing { background: var(--c-brand-soft); color: var(--c-brand-strong); border-color: transparent; }
.badge--deal { background: var(--c-deal-bg); color: var(--c-deal); border-color: transparent; }
.badge--featured { background: var(--c-featured-bg); color: var(--c-featured); border-color: transparent; text-transform: uppercase; letter-spacing: .04em; }
.badge--nsfw { background: var(--c-nsfw-bg); color: var(--c-nsfw); border-color: transparent; }

/* ---------- Search form ---------- */
.search-form { position: relative; display: flex; width: 100%; max-width: 560px; }
.search-form__input { flex: 1; min-width: 0; min-height: 44px; padding: var(--s2) 48px var(--s2) var(--s4); border: 1px solid var(--c-border); border-radius: 999px; background: var(--c-bg); }
.search-form__input:focus-visible { outline-offset: 0; border-color: var(--c-focus); }
.search-form__btn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 999px; background: var(--c-brand); color: #fff; cursor: pointer; }
.search-form__btn:hover { background: var(--c-brand-strong); }
.search-form--lg .search-form__input { min-height: 52px; font-size: 1.0625rem; }
.search-form--lg .search-form__btn { width: 46px; height: 46px; }

/* ---------- Top bar & header ---------- */
.top-bar { background: var(--c-brand); color: #fff; font-size: var(--fs-sm); font-weight: 500; }
.top-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s2) var(--s4); padding-block: var(--s2); }
.top-bar a { color: #fff; }
.top-bar p { margin: 0; }
.top-bar__menu ul { display: flex; gap: var(--s4); list-style: none; margin: 0; padding: 0; }
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--c-border); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.site-header__inner { display: flex; align-items: center; gap: var(--s4); min-height: var(--header-h); }
.site-brand { flex-shrink: 0; }
.site-brand img { max-height: 40px; width: auto; }
.site-logo, .custom-logo-link { display: inline-flex; align-items: center; text-decoration: none; color: var(--c-text); }
.site-logo__text { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -.02em; }
.header-actions { display: flex; align-items: center; gap: var(--s1); margin-left: auto; }
.header-link { display: inline-flex; align-items: center; gap: var(--s1); min-height: 44px; padding-inline: var(--s2); color: var(--c-text); font-weight: 500; text-decoration: none; }
.header-link:hover { color: var(--c-brand-strong); }
.header-account { display: flex; align-items: center; }
.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown__panel { position: absolute; right: 0; top: calc(100% + var(--s2)); z-index: 60; min-width: 200px; max-height: 70vh; overflow: auto; padding: var(--s3); background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.dropdown__panel--wide { width: min(420px, calc(100vw - 2 * var(--s4))); }
.dropdown__panel .search-form { max-width: none; }
.lang-switcher .dropdown__panel a { display: block; padding: var(--s1) var(--s2); }
.main-nav .menu { display: flex; align-items: center; gap: var(--s1); list-style: none; margin: 0; padding: 0; }
.main-nav a { display: flex; align-items: center; min-height: 44px; padding-inline: var(--s3); color: var(--c-text); font-weight: 500; text-decoration: none; border-radius: var(--radius); }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a { color: var(--c-brand-strong); }
.main-nav .current-menu-item > a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.main-nav .sub-menu { list-style: none; margin: 0; padding: var(--s2); }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: inline-flex; }
.site-nav__extra { display: none; }

@media (min-width: 1024px) {
	.site-nav { display: flex; align-items: center; }
	.nav-toggle { display: none; }
	.main-nav .menu-item-has-children { position: relative; }
	.main-nav .sub-menu { position: absolute; left: 0; top: 100%; z-index: 60; min-width: 220px; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius-lg); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s; }
	.main-nav .menu-item-has-children:hover > .sub-menu, .main-nav .menu-item-has-children:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
	.main-nav .sub-menu .sub-menu { left: 100%; top: 0; }
}
@media (max-width: 1023.98px) {
	.site-nav { display: none; position: fixed; inset: var(--header-h) 0 0; z-index: 49; overflow-y: auto; padding: var(--s4); background: var(--c-bg); border-top: 1px solid var(--c-border); }
	.admin-bar .site-nav { top: calc(var(--header-h) + 46px); }
	.site-nav.is-open { display: block; }
	.nav-open { overflow: hidden; }
	.main-nav .menu { flex-direction: column; align-items: stretch; }
	.main-nav a { padding-inline: var(--s2); border-bottom: 1px solid var(--c-border); border-radius: 0; }
	.main-nav .sub-menu { padding: 0 0 0 var(--s4); }
	.site-nav__extra { display: grid; gap: var(--s4); margin-top: var(--s5); }
	.site-nav__links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
	.header-account, .header-submit, .header-search { display: none; }
}
@media (max-width: 380px) { .site-header__inner { gap: var(--s2); } }

/* ---------- Breadcrumb ---------- */
.breadcrumb { padding-block: var(--s4) 0; font-size: var(--fs-sm); color: var(--c-muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: var(--s1); list-style: none; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: var(--s1); color: var(--c-muted); }
.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-brand-strong); }
.breadcrumb p { margin: 0; }

/* ---------- Sections & grids ---------- */
.section { padding-block: var(--s6); }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s4); }
.section__title { font-size: var(--fs-xl); margin: 0; }
.section__more { display: inline-flex; align-items: center; gap: var(--s1); font-weight: 600; text-decoration: none; }
.grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
.grid > li { display: flex; min-width: 0; }
.grid > li > * { flex: 1; min-width: 0; }
@media (min-width: 640px) { .grid--tools, .grid--posts, .grid--cats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid--tools, .grid--posts { grid-template-columns: repeat(3, 1fr); } .grid--cats, .grid--tools.grid--4 { grid-template-columns: repeat(4, 1fr); } }
.layout-toc__main .grid--tools { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.empty-state { padding: var(--s7) var(--s4); text-align: center; border: 1px dashed var(--c-border); border-radius: var(--radius-lg); }
.empty-state .search-form { margin: var(--s4) auto 0; }
.ad-slot { margin-block: var(--s5); text-align: center; overflow: hidden; }
.is-nsfw-tool .ad-slot { display: none; }

/* ---------- Hero (home) ---------- */
.hero { padding-block: var(--s7) var(--s6); background: #fff; }
.hero__inner { display: grid; justify-items: start; gap: var(--s4); text-align: left; }
.hero__title { max-width: 22ch; margin: 0; font-size: clamp(2rem, 1.1rem + 3.6vw, 4rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.hero__lead { margin: 0; color: var(--c-muted); font-size: 1.0625rem; }
.hero .chips { max-width: 100%; }
@media (min-width: 1024px) { .hero .chips--scroll { flex-wrap: wrap; overflow: visible; } }
/* Home: hero, section heads and newsletter share one centred column inside the container. */
.home-main .hero__inner { justify-items: center; text-align: center; }
.home-main .hero__title { margin-inline: auto; }
.home-main .hero .search-form, .home-main .hero .finder { margin-inline: auto; }
.home-main .finder__hint { text-align: center; }
@media (min-width: 1024px) { .home-main .hero .chips { justify-content: center; } }
.home-main .section__head { flex-direction: column; align-items: center; text-align: center; gap: var(--s1); margin-bottom: var(--s5); }
.home-main .newsletter--inline { max-width: var(--measure); margin-inline: auto; justify-items: center; text-align: center; }
.home-main .newsletter--inline .bestaito-form { width: 100%; max-width: 480px; text-align: left; }

/* ---------- Tool card ---------- */
.tool-card { position: relative; display: flex; flex-direction: column; height: 100%; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius-lg); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.tool-card:hover { border-color: var(--c-brand); box-shadow: var(--shadow); }
.tool-card.is-featured { border-color: #f5d68a; }
.tool-card__media { position: relative; aspect-ratio: 16 / 9; background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.tool-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.tool-card__media--logo { display: flex; align-items: center; justify-content: center; }
.tool-card__media--logo img { width: 96px; height: 96px; object-fit: contain; border-radius: var(--radius); }
.tool-card__initial { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 2.5rem; font-weight: 800; color: var(--c-brand); }
.tool-card__media .badge--featured { position: absolute; top: var(--s2); left: var(--s2); }
.tool-card__body { display: flex; flex-direction: column; gap: var(--s2); flex: 1; padding: var(--s4); }
.tool-card__title { margin: 0; font-size: 1.125rem; }
.tool-card__title a { color: var(--c-text); text-decoration: none; }
.tool-card__title a:hover { color: var(--c-brand-strong); }
.stretched-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.tool-card__summary { margin: 0; color: var(--c-muted); font-size: var(--fs-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; overflow: hidden; }
.tool-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0; font-size: .8125rem; color: var(--c-muted); }
.tool-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: auto; padding-top: var(--s2); }
.tool-card__cat, .tool-card__actions, .tool-card__visit { position: relative; z-index: 2; }
.tool-card__cat { font-size: .8125rem; font-weight: 500; color: var(--c-muted); text-decoration: none; }
.tool-card__cat:hover { color: var(--c-brand-strong); }
.tool-card__actions { display: flex; align-items: center; gap: var(--s1); margin-left: auto; }
.tool-card__visit { display: inline-flex; align-items: center; gap: var(--s1); min-height: 44px; padding-inline: var(--s3); border: 1px solid var(--c-border); border-radius: 999px; color: var(--c-text); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.tool-card__visit:hover { border-color: var(--c-brand); color: var(--c-brand-strong); }

/* ---------- Rating ---------- */
.rating { display: inline-flex; align-items: center; gap: var(--s1); font-weight: 600; color: var(--c-text); }
.rating--compact .icon-star { color: var(--c-star); }
.rating__label { font-weight: 400; color: var(--c-muted); font-size: var(--fs-sm); }
.stars { --size: 18px; position: relative; display: inline-block; width: calc(var(--size) * 5); height: var(--size); background: linear-gradient(90deg, var(--c-star) var(--rating), var(--c-border) var(--rating)); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.4l-5.9 3.1 1.2-6.5-4.8-4.6 6.6-.9z'/%3E%3C/svg%3E") 0 0 / var(--size) var(--size) repeat-x; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.4l-5.9 3.1 1.2-6.5-4.8-4.6 6.6-.9z'/%3E%3C/svg%3E") 0 0 / var(--size) var(--size) repeat-x; }

/* ---------- Save / Upvote ---------- */
.tool-actions { display: flex; align-items: center; gap: var(--s2); }
.action-btn { display: inline-flex; align-items: center; gap: var(--s1); min-height: 44px; padding: var(--s1) var(--s3); border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-bg); color: var(--c-text); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; cursor: pointer; }
.action-btn:hover { border-color: var(--c-brand); color: var(--c-brand-strong); }
.action-btn[aria-pressed="true"] { background: var(--c-brand-soft); border-color: var(--c-brand); color: var(--c-brand-strong); }
.action-btn[aria-pressed="true"] svg { fill: currentColor; }
.action-btn[aria-pressed="true"] [data-label-off], .action-btn[aria-pressed="false"] [data-label-on] { display: none; }
.action-btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.action-btn--icon { width: 44px; min-height: 44px; padding: 0; justify-content: center; border-radius: 999px; }
.action-btn--icon .action-btn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Archive ---------- */
.archive-head { display: grid; gap: var(--s3); padding-block: var(--s5) var(--s4); }
.archive-head__title { margin: 0; font-size: clamp(1.625rem, 1.3rem + 1.5vw, var(--fs-3xl)); }
.archive-head__page { font-weight: 400; color: var(--c-muted); font-size: .6em; }
.archive-head__desc { max-width: var(--measure); color: var(--c-muted); }
.archive-head__desc > :last-child { margin-bottom: 0; }
.archive-results { padding-bottom: var(--s7); }
.archive-results__bar { display: grid; gap: var(--s3); margin-bottom: var(--s4); }
.archive-results__count { margin: 0; font-size: var(--fs-lg); }
.filters { display: grid; gap: var(--s2); min-width: 0; }
.filters__label { font-size: var(--fs-sm); font-weight: 600; color: var(--c-muted); padding-right: var(--s1); }

/* ---------- Pagination ---------- */
.pagination { margin-top: var(--s6); }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding-inline: var(--s3); border: 1px solid var(--c-border); border-radius: var(--radius); color: var(--c-text); text-decoration: none; font-weight: 600; }
.pagination a.page-numbers:hover { border-color: var(--c-brand); color: var(--c-brand-strong); }
.pagination .current { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.pagination .dots { border: 0; }
.page-links { display: flex; gap: var(--s2); margin-block: var(--s4); }

/* ---------- Tool page ---------- */
.tool-page { padding-bottom: var(--s6); }
.tool-header { display: grid; gap: var(--s4); padding-block: var(--s5); }
.tool-header__top { display: flex; gap: var(--s4); align-items: flex-start; }
.tool-header__logo img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-bg); }
.tool-header__cats { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s2); }
.tool-header__title { margin: 0; font-size: clamp(1.75rem, 1.3rem + 2vw, var(--fs-3xl)); }
.tool-header__summary { margin: var(--s2) 0 0; max-width: 64ch; color: var(--c-muted); font-size: 1.0625rem; }
.tool-header__facts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: 0; }
.tool-header__price { font-weight: 600; }
.tool-header__cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.btn--cta { min-height: 48px; padding-inline: var(--s5); font-size: 1.0625rem; }
.tool-header__updated { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); margin: 0; font-size: var(--fs-sm); color: var(--c-muted); }
.tool-shot { margin: 0 0 var(--s5); border: 1px solid var(--c-border); border-radius: var(--radius-lg); overflow: hidden; background: var(--c-surface); aspect-ratio: 16 / 9; max-width: 960px; }
.tool-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.quick-take { margin-bottom: var(--s5); padding: var(--s4); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); }
.quick-take__title { margin: 0 0 var(--s3); font-size: var(--fs-lg); font-weight: 700; }
.quick-take__best { margin: var(--s3) 0 0; }
.pros-cons { display: grid; gap: var(--s4); }
@media (min-width: 640px) { .pros-cons { grid-template-columns: 1fr 1fr; } }
.pros-cons__label { margin: 0 0 var(--s2); font-size: var(--fs-md); font-weight: 700; }
.pros-cons li { display: flex; gap: var(--s2); margin-bottom: var(--s2); }
.pros-cons li svg { margin-top: 4px; }
.pros-cons__col--pros svg { color: #15803d; }
.pros-cons__col--cons svg { color: #b91c1c; }
.mentioned, .child-articles, .post-tools { margin-block: var(--s6); }
.link-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); padding-block: var(--s2); border-bottom: 1px solid var(--c-border); }
.link-list time { color: var(--c-muted); font-size: var(--fs-sm); }
.child-articles__groups { display: grid; gap: var(--s4); }
@media (min-width: 640px) { .child-articles__groups { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }
.child-articles__group { padding: var(--s4); border: 1px solid var(--c-border); border-radius: var(--radius-lg); }
.child-articles__group h3 { font-size: var(--fs-md); }
.child-articles__group ul { display: grid; gap: var(--s2); }
.tag-list { display: flex; flex-wrap: wrap; gap: var(--s2); margin-block: var(--s5); }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: var(--s2) var(--s4) calc(var(--s2) + env(safe-area-inset-bottom)); background: var(--c-bg); border-top: 1px solid var(--c-border); box-shadow: 0 -4px 12px rgb(0 0 0 / .06); transition: transform .2s, visibility 0s; }
.sticky-cta.is-hidden { transform: translateY(110%); visibility: hidden; transition: transform .2s, visibility 0s .2s; }
/* Mobile: one full-width button, label and icon centered as a group. A long tool name
   ellipsizes; the action part ("-44% · Get code", "Visit") never shrinks. */
.sticky-cta__btn { display: flex; width: 100%; max-width: 560px; margin-inline: auto; padding-inline: var(--s4); text-align: center; }
.cta-label { display: flex; min-width: 0; white-space: nowrap; }
.cta-label__lead { flex: none; }
.cta-label__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sticky-cta__btn svg { flex: none; }
.btn--deal { background: var(--c-deal); color: #fff; }
.btn--deal:hover { background: #14532d; color: #fff; }
/* Desktop: a pill sized to its label, centered at the bottom. The full-width wrapper lets
   clicks through; only the button takes them. */
@media (min-width: 1024px) {
	.sticky-cta { display: flex; justify-content: center; bottom: var(--s4); padding: 0 var(--s4); background: none; border: 0; box-shadow: none; pointer-events: none; }
	.sticky-cta.is-hidden { transform: translateY(calc(100% + var(--s4))); }
	.sticky-cta__btn { width: auto; max-width: min(480px, 100%); margin-inline: 0; padding-inline: var(--s5); border-radius: 999px; box-shadow: 0 8px 24px rgb(0 0 0 / .18); pointer-events: auto; }
}

/* ---------- Tool mini box ---------- */
.tool-mini { display: grid; grid-template-columns: auto 1fr; gap: var(--s3) var(--s4); align-items: center; margin-block: var(--s4) var(--s5); padding: var(--s4); border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-surface); }
.tool-mini__media img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius); }
.tool-mini__name { margin: 0; font-size: var(--fs-lg); font-weight: 700; }
.tool-mini__name a { color: var(--c-text); text-decoration: none; }
.tool-mini__facts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: var(--s1) 0 0; font-size: var(--fs-sm); color: var(--c-muted); }
.tool-mini__cta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.tool-mini__review { font-weight: 600; font-size: var(--fs-sm); }
@media (min-width: 768px) { .tool-mini { grid-template-columns: auto 1fr auto; } .tool-mini__cta { grid-column: auto; } }

/* ---------- Deal box ---------- */
.deal-box { margin-block: var(--s5); padding: var(--s4); border: 2px dashed #86efac; border-radius: var(--radius-lg); background: #f0fdf4; }
.deal-box__head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.deal-box__percent { display: inline-flex; align-items: center; padding: var(--s1) var(--s3); border-radius: var(--radius); background: var(--c-deal); color: #fff; font-weight: 800; font-size: var(--fs-lg); }
.deal-box__title { margin: 0; font-size: var(--fs-lg); }
.deal-box__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
/* Deal call to action (box and card): half-masked code, reveal panel with the full code. */
.deal-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.deal-code { padding: var(--s2) var(--s3); border: 1px dashed var(--c-deal); border-radius: var(--radius); background: var(--c-bg); color: var(--c-deal); font-family: var(--mono); font-weight: 700; letter-spacing: .08em; }
.deal-code[hidden], .deal-reveal[hidden] { display: none; }
.deal-reveal-live { flex-basis: 100%; }
.deal-cta:not(.is-revealed) .deal-reveal-live { flex-basis: 0; }
.deal-reveal { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: 0; padding: var(--s3); border: 2px dashed var(--c-deal); border-radius: var(--radius); background: var(--c-bg); }
.deal-reveal__label { font-size: var(--fs-sm); font-weight: 600; color: var(--c-deal); }
.deal-reveal__code { padding: var(--s1) var(--s3); border-radius: var(--radius); background: var(--c-deal-bg); color: var(--c-deal); font-family: var(--mono); font-size: var(--fs-lg); font-weight: 800; letter-spacing: .08em; word-break: break-all; user-select: all; }
.deal-reveal__code:focus-visible, .deal-reveal__code:focus { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.deal-cta.is-revealed .deal-reveal { box-shadow: 0 0 0 4px var(--c-deal-bg); }
.deal-reveal [data-copy]:focus { outline: 3px solid var(--c-focus); outline-offset: 2px; }
/* Brief pulse on the Copy button after a jump from the header or a reveal tab (skipped by JS under reduced motion). */
@keyframes bestaito-deal-flash { 0% { box-shadow: 0 0 0 0 rgba(22, 101, 52, .55); background: var(--c-deal-bg); } 70% { box-shadow: 0 0 0 10px rgba(22, 101, 52, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 101, 52, 0); } }
.deal-reveal [data-copy].is-flash { animation: bestaito-deal-flash .8s ease-out 2; }
.deal-card .deal-cta { flex: 1 1 100%; }
.deal-box__meta { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s3) 0 0; font-size: var(--fs-sm); color: var(--c-deal); }
.deal-box__meta span { display: inline-flex; align-items: center; gap: var(--s1); }
.deal-box--header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); margin: 0; padding: var(--s3) var(--s4); }
.deal-box--header .deal-box__head { flex: 1 1 220px; margin: 0; }
.deal-box--header .deal-box__title { font-size: var(--fs-md); font-weight: 700; line-height: 1.35; color: var(--c-deal); }
.deal-box--header .deal-box__percent { font-size: var(--fs-md); }
.deal-box--header .deal-box__meta { flex-basis: 100%; margin: 0; }
.deal-box--header .deal-box__actions:has(.is-revealed), .deal-box--header .deal-cta.is-revealed { flex-basis: 100%; }

/* ---------- TOC layout ---------- */
.layout-toc { display: grid; gap: var(--s5); }
.layout-toc__main { min-width: 0; max-width: var(--measure); }
@media (min-width: 1024px) {
	.layout-toc { grid-template-columns: minmax(0, 1fr) 280px; gap: var(--s7); }
	.layout-toc__aside { grid-column: 2; grid-row: 1; }
	.layout-toc__aside .toc { position: sticky; top: calc(var(--header-h) + var(--s4)); max-height: calc(100vh - var(--header-h) - var(--s6)); overflow: auto; }
	.layout-toc__main { grid-column: 1; grid-row: 1; }
}
.layout-toc__aside:empty { display: none; }
.toc { padding: var(--s3) var(--s4); border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-surface); font-size: var(--fs-sm); }
.toc__title { display: flex; align-items: center; justify-content: space-between; min-height: 32px; font-weight: 700; cursor: pointer; list-style: none; }
.toc__title::-webkit-details-marker { display: none; }
.toc[open] .toc__title svg { transform: rotate(180deg); }
.toc__list { margin-top: var(--s2); display: grid; gap: var(--s1); }
.toc__item a { display: block; padding-block: 2px; color: var(--c-muted); text-decoration: none; }
.toc__item a:hover { color: var(--c-brand-strong); }
.toc__item--d1 { padding-left: var(--s3); }
.toc__item--d2 { padding-left: var(--s5); }

/* ---------- Articles & content ---------- */
.article { padding-bottom: var(--s6); }
.entry-header { padding-block: var(--s5) var(--s4); max-width: var(--measure); }
.entry-title { margin: 0 0 var(--s3); font-size: clamp(1.75rem, 1.3rem + 2vw, var(--fs-3xl)); }
.entry-cat { margin: 0 0 var(--s2); font-size: var(--fs-sm); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.entry-cat a { text-decoration: none; }
.entry-meta { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); margin: 0; font-size: var(--fs-sm); color: var(--c-muted); }
.entry-meta a { color: var(--c-text); }
.entry-thumb { margin: 0 0 var(--s5); max-width: 960px; border-radius: var(--radius-lg); overflow: hidden; }
.entry-thumb img { width: 100%; }
.entry-content { font-size: 1.0625rem; overflow-wrap: break-word; }
.entry-content > * { max-width: var(--measure); }
.entry-content h2 { margin-top: var(--s6); }
.entry-content h3 { margin-top: var(--s5); }
.entry-content ul, .entry-content ol { padding-left: 1.25em; }
.entry-content li { margin-bottom: var(--s1); }
.entry-content img { border-radius: var(--radius); }
.entry-content blockquote { margin-inline: 0; padding: var(--s2) var(--s4); border-left: 4px solid var(--c-brand); background: var(--c-surface); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); display: block; overflow-x: auto; }
.entry-content th, .entry-content td { padding: var(--s2) var(--s3); border: 1px solid var(--c-border); text-align: left; vertical-align: top; }
.entry-content th { background: var(--c-surface); }
.entry-content pre { overflow-x: auto; padding: var(--s4); background: var(--c-text); color: #f4f4f5; border-radius: var(--radius); font-size: var(--fs-sm); }
.entry-content code { font-family: var(--mono); font-size: .9em; }
.entry-content :not(pre) > code { padding: 1px 4px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 4px; }
.entry-content iframe { width: 100%; }
.alignleft { float: left; margin: 0 var(--s4) var(--s3) 0; }
.alignright { float: right; margin: 0 0 var(--s3) var(--s4); }
.aligncenter { margin-inline: auto; }
.wp-caption, figcaption, .wp-element-caption { font-size: var(--fs-sm); color: var(--c-muted); }
.wp-caption { max-width: 100%; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s2); }
.sticky, .bypostauthor { display: block; }

/* ---------- Share ---------- */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-block: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--c-border); }
.share__label { display: inline-flex; align-items: center; gap: var(--s1); font-weight: 600; color: var(--c-muted); }
.share__list { display: flex; gap: var(--s1); }
.share .icon-btn { border: 1px solid var(--c-border); }

/* ---------- Post card ---------- */
.post-card { position: relative; display: flex; flex-direction: column; height: 100%; border: 1px solid var(--c-border); border-radius: var(--radius-lg); overflow: hidden; background: var(--c-bg); transition: border-color .15s, box-shadow .15s; }
.post-card:hover { border-color: var(--c-brand); box-shadow: var(--shadow); }
.post-card__media { aspect-ratio: 16 / 9; background: var(--c-surface); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { display: flex; flex-direction: column; gap: var(--s2); flex: 1; padding: var(--s4); }
.post-card__cat { margin: 0; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--c-brand-strong); }
.post-card__title { margin: 0; font-size: 1.125rem; }
.post-card__title a { color: var(--c-text); text-decoration: none; }
.post-card__excerpt { margin: 0; color: var(--c-muted); font-size: var(--fs-sm); }
.post-card__date { margin: auto 0 0; font-size: .8125rem; color: var(--c-muted); }

/* ---------- Newsletter ---------- */
.newsletter { display: grid; gap: var(--s2); }
.newsletter--inline { margin-block: var(--s5); padding: var(--s5); border-radius: var(--radius-lg); background: var(--c-brand-soft); justify-items: start; }
.newsletter__title { display: flex; align-items: center; gap: var(--s2); margin: 0; font-size: var(--fs-lg); font-weight: 700; }
.newsletter__text { margin: 0; color: var(--c-muted); }
.newsletter input[type="email"], .newsletter input[type="text"] { width: 100%; min-height: 44px; padding: var(--s2) var(--s3); border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-bg); color: var(--c-text); }
.newsletter input[type="submit"], .newsletter button[type="submit"] { min-height: 44px; margin-top: var(--s2); padding: var(--s2) var(--s4); border: 0; border-radius: var(--radius); background: var(--c-brand); color: #fff; font-weight: 600; cursor: pointer; }
.newsletter .mc4wp-form-fields p { margin: 0 0 var(--s2); }

/* ---------- Footer ---------- */
.site-footer { margin-top: var(--s7); background: #111014; color: #d4d4d8; font-size: var(--fs-sm); }
.site-footer a { color: #e4e4e7; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: var(--s6); padding-block: var(--s7) var(--s6); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1.3fr; } }
.footer-brand { margin: 0 0 var(--s2); font-size: var(--fs-lg); font-weight: 800; color: #fff; }
.footer-title { margin: 0 0 var(--s3); font-size: var(--fs-md); font-weight: 700; line-height: 1.25; color: #fff; }
.footer-text { color: #a1a1aa; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.footer-menu a { text-decoration: none; }
.social { display: flex; flex-wrap: wrap; gap: var(--s1); }
.social .icon-btn { color: #e4e4e7; border: 1px solid #3f3f46; }
.social .icon-btn:hover { background: #27272a; color: #fff; }
.site-footer .newsletter__title { color: #fff; }
.site-footer .newsletter__text { color: #a1a1aa; }
.site-footer .newsletter input[type="email"], .site-footer .newsletter input[type="text"] { border-color: #3f3f46; }
.site-footer :focus-visible { outline-color: #93c5fd; }
.footer-bottom { border-top: 1px solid #27272a; }
.footer-bottom__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); padding-block: var(--s4); }
.copyright p { margin: 0; }
.legal-links { display: flex; gap: var(--s4); }

/* ---------- Collections ---------- */
.cat-card { position: relative; display: flex; flex-direction: column; gap: var(--s1); height: 100%; padding: var(--s4); border: 1px solid var(--c-border); border-radius: var(--radius-lg); color: var(--c-text); text-decoration: none; }
.cat-card:hover { border-color: var(--c-brand); color: var(--c-brand-strong); box-shadow: var(--shadow); }
.cat-card__name { font-weight: 700; font-size: 1.0625rem; }
.cat-card__count { color: var(--c-muted); font-size: var(--fs-sm); }
.cat-card .badge--nsfw { position: absolute; top: var(--s3); right: var(--s3); }
.cat-card--nsfw { background: #fffafa; }
/* /category/ page: categories grouped under display headings. */
.cat-group + .cat-group { margin-top: var(--s6); }
.cat-group__title { margin: 0 0 var(--s3); font-size: var(--fs-lg); }
.cat-group:not(.cat-group--flat) .grid--cats { grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
.cat-group:not(.cat-group--flat) .cat-card { padding: var(--s3) var(--s4); overflow-wrap: anywhere; }
@media (min-width: 1024px) { .cat-group:not(.cat-group--flat) .grid--cats { grid-template-columns: repeat(4, 1fr); gap: var(--s4); } }

/* ---------- Submit packages & FAQ ---------- */
.submit-page { padding-bottom: var(--s6); }
.packages-wrap { margin-block: var(--s5); }
.packages { display: grid; gap: var(--s4); margin-top: var(--s4); }
@media (min-width: 768px) { .packages { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
.package { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s5); border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-bg); }
.package:nth-child(2) { border-color: var(--c-brand); box-shadow: 0 0 0 1px var(--c-brand); }
.package__title { margin: 0; font-size: var(--fs-lg); }
.package__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2); margin: 0; color: var(--c-muted); }
.package__amount { font-size: var(--fs-2xl); font-weight: 800; color: var(--c-text); }
.package__list { display: grid; gap: var(--s2); }
.package__list li { display: flex; gap: var(--s2); }
.package__list svg { color: #15803d; margin-top: 3px; }
.package__list .is-bold { font-weight: 700; }
.package__btn { margin-top: auto; }
.package__btn:disabled { color: var(--c-muted); background: var(--c-surface); cursor: not-allowed; }
.packages__desc { margin-top: var(--s4); color: var(--c-muted); }
.faq { margin-block: var(--s6); max-width: var(--measure); }
.faq__desc { color: var(--c-muted); margin-bottom: var(--s3); }
.faq__item { border-bottom: 1px solid var(--c-border); }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 48px; padding-block: var(--s3); font-weight: 600; cursor: pointer; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item[open] summary svg { transform: rotate(180deg); }
.faq__answer { padding-bottom: var(--s3); font-size: var(--fs-md); }

/* ---------- 404 ---------- */
.not-found { display: grid; gap: var(--s6); align-items: center; padding-block: var(--s8); }
@media (min-width: 768px) { .not-found { grid-template-columns: 1fr 1fr; } }
.not-found__content { display: grid; gap: var(--s4); justify-items: start; }
.not-found__content h1, .not-found__content p { margin: 0; }
.not-found__image img { margin-inline: auto; }

/* ---------- Comments & forms ---------- */
.comments { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--c-border); }
.comment-list { list-style: none; padding: 0; margin: 0 0 var(--s5); }
.comment-list .children { list-style: none; padding-left: var(--s5); }
.comment-body { padding-block: var(--s4); border-bottom: 1px solid var(--c-border); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: var(--fs-sm); color: var(--c-muted); }
.comment-author { display: flex; align-items: center; gap: var(--s2); font-weight: 600; color: var(--c-text); }
.comment-author img { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata a { color: var(--c-muted); }
.reply a { font-size: var(--fs-sm); font-weight: 600; }
.comment-form { display: grid; gap: var(--s3); }
.comment-form label, .login-username label, .login-password label { display: block; font-weight: 600; font-size: var(--fs-sm); margin-bottom: var(--s1); }
.comment-form input:not([type="checkbox"]):not([type="submit"]), .comment-form textarea, .entry-content input[type="text"], .entry-content input[type="email"], .entry-content input[type="password"], .entry-content textarea { width: 100%; min-height: 44px; padding: var(--s2) var(--s3); border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-bg); }
.comment-form-cookies-consent { display: flex; gap: var(--s2); align-items: flex-start; font-size: var(--fs-sm); }
.entry-content input[type="submit"], .entry-content .button { min-height: 44px; padding: var(--s2) var(--s4); border: 0; border-radius: var(--radius); background: var(--c-brand); color: #fff; font-weight: 600; cursor: pointer; }

/* ---------- Embedded tool card ([tool_card] shortcode) ---------- */
.tool-card--embed { flex-direction: row; align-items: stretch; height: auto; margin-block: var(--s5); }
.tool-card--embed .tool-card__media { flex: 0 0 96px; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--c-border); }
.tool-card--embed .tool-card__media img { width: 64px; height: 64px; }
.tool-card--embed .tool-card__initial { font-size: 1.75rem; }
.tool-card--embed .tool-card__title { margin: 0; font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.entry-content .tool-card--embed a { text-decoration: none; }
@media (max-width: 479.98px) { .tool-card--embed .tool-card__media { flex-basis: 72px; } .tool-card--embed .tool-card__media img { width: 48px; height: 48px; } }

/* ---------- Comparison table ([tool_compare] shortcode) ---------- */
.compare { margin-block: var(--s5); }
.entry-content .compare__table, .compare__table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--fs-sm); }
.compare__table th, .compare__table td { padding: var(--s3); border: 1px solid var(--c-border); text-align: left; vertical-align: top; }
.compare__table thead th { background: var(--c-brand-soft); font-size: var(--fs-md); }
.compare__table thead a { color: var(--c-text); }
.compare__table tbody th { width: 9rem; background: var(--c-surface); font-weight: 600; color: var(--c-muted); }
.compare__corner { border: 0 !important; background: none; }
.compare__row--cta td { border-top-width: 2px; }
.compare__row--cta .btn { width: 100%; white-space: normal; }
@media (max-width: 639.98px) {
	.compare__table, .compare__table tbody, .compare__table tr, .compare__table th, .compare__table td { display: block; width: 100%; }
	.compare__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.compare__table tr { margin-bottom: var(--s3); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; }
	.compare__table th, .compare__table td { border: 0; }
	.compare__table tbody th { width: 100%; padding-block: var(--s2); }
	.compare__table td { display: flex; justify-content: space-between; gap: var(--s3); border-top: 1px solid var(--c-border); }
	.compare__table td::before { content: attr(data-label); font-weight: 600; color: var(--c-text); }
	.compare__row--cta th { display: none; }
	.compare__row--cta td { display: block; }
	.compare__row--cta td::before { display: none; }
}

/* ---------- Newsletter form from the plugin ([bestaito_newsletter]) ---------- */
.newsletter .bestaito-newsletter, .newsletter .bestaito-form { display: grid; gap: var(--s2); margin: 0; }
.newsletter .bestaito-form__field { display: grid; gap: var(--s1); margin: 0; }
.newsletter .bestaito-form__label { font-size: var(--fs-sm); font-weight: 600; }
.newsletter .bestaito-form__actions, .newsletter .bestaito-form p { margin: 0; }
.newsletter .bestaito-button { min-height: 44px; padding: var(--s2) var(--s4); border: 0; border-radius: var(--radius); background: var(--c-brand); color: #fff; font-weight: 600; cursor: pointer; }
.newsletter .bestaito-button:hover { background: var(--c-brand-strong); }
.newsletter .bestaito-form__note, .newsletter .bestaito-form__privacy { font-size: .8125rem; color: var(--c-muted); }
.newsletter .bestaito-form__status:not(:empty), .newsletter .bestaito-form__notice { font-size: var(--fs-sm); font-weight: 600; color: var(--c-deal); }
.newsletter .bestaito-form__status.is-error { color: #b91c1c; }
.newsletter .bestaito-form.is-sent .bestaito-form__field, .newsletter .bestaito-form.is-sent .bestaito-form__actions { display: none; }
.newsletter .bestaito-form__turnstile:empty { display: none; }
.site-footer .newsletter .bestaito-form__note, .site-footer .newsletter .bestaito-form__privacy { color: #a1a1aa; }
.site-footer .newsletter .bestaito-form__status:not(:empty), .site-footer .newsletter .bestaito-form__notice { color: #86efac; }
.site-footer .newsletter .bestaito-form__status.is-error { color: #fca5a5; }

/* ---------- Light look like the old site: page background, cards, badges, ribbon ---------- */
body { background: var(--c-page); }
.site-header { background: #fff; }
.card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.article { margin-block: var(--s4) var(--s6); padding: clamp(20px, 4vw, 40px); background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); }
.article .entry-header { padding-top: 0; }
.section__title { font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2.125rem); letter-spacing: -.02em; }
.chip { min-height: 40px; padding: var(--s2) var(--s4); border-color: #ddd; font-size: .9375rem; }
.chip--sm { min-height: 28px; padding: 2px var(--s3); font-size: .8125rem; }
.chip--soft { background: var(--c-brand-soft); border-color: transparent; color: var(--c-brand-strong); }
.chip__count { font-size: var(--fs-sm); font-weight: 400; color: var(--c-muted); }
/* Tag shown as text (noindexed tag, no link). */
.chip--static, .chip--static:hover { background: var(--c-surface); border-color: transparent; color: var(--c-muted); }
.tool-card { border-color: var(--c-border); box-shadow: var(--shadow); }
.tool-card__media { background: linear-gradient(180deg, #e9e9ee, #f6f6f8); }
.tool-card__title { font-weight: 600; }
.tool-card.is-featured { border-color: var(--c-border); }
.tool-card__media .badge--featured, .badge--ribbon { top: var(--s4); left: 0; padding: 3px 16px 3px 12px; border: 0; border-radius: 0; background: var(--c-ribbon); color: #111; font-size: .8125rem; font-weight: 500; letter-spacing: 0; text-transform: none; clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 50%, 100% 100%, 0 100%); }
.badge--free, .badge--paid { padding: 3px 12px; border: 0; font-size: .6875rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.badge--free { background: var(--c-free-bg); color: var(--c-free); }
.badge--paid { background: var(--c-paid-bg); color: var(--c-paid); }
a.badge--free:hover, a.badge--paid:hover { filter: brightness(.95); }

/* ---------- Tool page: card + sidebar, section nav, sections ---------- */
.tool-wrap { padding-bottom: var(--s4); }
.tool-layout { display: grid; gap: var(--s5); align-items: start; margin-top: var(--s4); }
@media (min-width: 1024px) { .tool-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s6); } }
.tool-page { min-width: 0; padding: 0 clamp(16px, 3vw, 32px) var(--s6); }
.tool-page .tool-header { padding-top: var(--s5); }
.tool-header__cats { gap: var(--s1) var(--s3); }
.tool-header__cat { color: var(--c-brand-strong); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--c-border); }
.tool-header__cat:hover { border-color: currentColor; }
.tool-page .tool-shot { margin-inline: calc(-1 * clamp(16px, 3vw, 32px)); max-width: none; border-radius: 0; border-inline: 0; }
.tool-section { scroll-margin-top: calc(var(--header-h) + 64px); }
.tool-section > h2 { margin-top: var(--s6); }
.tool-section .toc { margin-block: var(--s5) var(--s4); }
.entry-content [id], .tool-page [id] { scroll-margin-top: calc(var(--header-h) + 64px); }
.section-nav { position: sticky; top: var(--header-h); z-index: 20; margin: var(--s4) calc(-1 * clamp(16px, 3vw, 32px)) 0; padding-inline: clamp(16px, 3vw, 32px); background: #fff; border-block: 1px solid var(--c-border); }
.admin-bar .section-nav { top: calc(var(--header-h) + 32px); }
@media (max-width: 782px) { .admin-bar .section-nav { top: var(--header-h); } }
.section-nav__list { display: flex; gap: var(--s1); margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.section-nav__list::-webkit-scrollbar { display: none; }
.section-nav__link { display: inline-flex; align-items: center; min-height: 48px; padding-inline: var(--s3); border-bottom: 2px solid transparent; color: var(--c-muted); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; white-space: nowrap; }
.section-nav__link:hover { color: var(--c-text); }
.section-nav__link[aria-current] { border-color: var(--c-brand); color: var(--c-brand-strong); font-weight: 600; }
.tool-pricing__box, .signal-card { padding: var(--s4); border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-surface); }
.signal-card { margin-top: var(--s6); }
.signal-card > h2 { margin-top: 0; }
.tool-pricing__box { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); }
.tool-pricing__models { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; }
.tool-pricing__from { display: grid; margin: 0; font-size: var(--fs-sm); color: var(--c-muted); }
.tool-pricing__from strong { font-size: var(--fs-lg); color: var(--c-text); }
.tool-pricing__more { display: inline-flex; align-items: center; gap: var(--s1); margin-left: auto; font-weight: 600; }
/* Pricing plan cards. */
.plans { display: grid; gap: var(--s4); margin: var(--s4) 0 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .plans { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); } }
.plan { position: relative; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5) var(--s4) var(--s4); border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-bg); }
.plan--highlight { border: 2px solid var(--c-brand); box-shadow: 0 6px 20px rgb(133 58 228 / .12); }
.plan__badge { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); padding: 2px var(--s3); border-radius: 999px; background: var(--c-brand); color: #fff; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.plan__name { margin: 0; font-size: var(--fs-md); }
.plan__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1); margin: 0; }
.plan__price strong { font-size: var(--fs-xl); line-height: 1.2; }
.plan__price span { font-size: var(--fs-sm); color: var(--c-muted); }
.plan__note { margin: 0; font-size: var(--fs-sm); color: var(--c-muted); }
.plan__features { display: grid; gap: var(--s2); margin: var(--s2) 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); }
.plan__features li { display: flex; gap: var(--s2); align-items: flex-start; }
.plan__features .icon { flex: 0 0 auto; margin-top: 2px; color: var(--c-deal); }
.plan__cta { margin-top: auto; align-self: stretch; }
.plan__features + .plan__cta, .plan__note + .plan__cta { margin-top: var(--s3); }

/* Tool articles (#articles, "Guides"). */
.tool-articles__list { display: grid; margin: var(--s3) 0 0; padding: 0; list-style: none; border: 1px solid var(--c-border); border-radius: var(--radius-lg); }
.tool-articles__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s3); padding: var(--s3) var(--s4); }
.tool-articles__item + .tool-articles__item { border-top: 1px solid var(--c-border); }
.tool-articles__heading { margin: 0; font-size: var(--fs-md); line-height: inherit; }
.tool-articles__title { font-weight: 600; }
.tool-articles__meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: var(--fs-sm); color: var(--c-muted); }

/* "Research with AI". */
.ai-research { margin-block: var(--s6) var(--s4); padding: var(--s4) var(--s5); border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-surface); }
.ai-research__title { margin: 0; font-size: var(--fs-lg); }
.ai-research__text { margin: var(--s1) 0 var(--s3); font-size: var(--fs-sm); color: var(--c-muted); }
.ai-research__list { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.ai-research__btn { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: var(--s2) var(--s3); border: 1px solid var(--c-border); border-radius: 999px; background: var(--c-bg); color: var(--c-text); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.ai-research__btn:hover { border-color: var(--c-brand); color: var(--c-brand-strong); }
.ai-research__btn--chatgpt .icon { color: #10a37f; }
.ai-research__btn--claude .icon { color: #d97757; }
.ai-research__btn--gemini .icon { color: #4285f4; }
.ai-research__btn--perplexity .icon { color: #20808d; }
.ai-research__btn--grok .icon { color: #111; }
.ai-research__btn--google_ai .icon { color: #ea4335; }

/* Toast (main.js). */
.toast { position: fixed; left: 50%; bottom: calc(var(--s5) + env(safe-area-inset-bottom, 0px)); z-index: 1000; max-width: calc(100vw - 32px); padding: var(--s3) var(--s4); border-radius: var(--radius); background: #111; color: #fff; font-size: var(--fs-sm); font-weight: 600; box-shadow: 0 8px 24px rgb(0 0 0 / .2); opacity: 0; visibility: hidden; transform: translate(-50%, 8px); transition: opacity .2s, transform .2s, visibility .2s; }
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (max-width: 1023.98px) { .single-tool .toast { bottom: 88px; } }
.signal-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--s3); margin: 0; }
.signal-stats div { padding: var(--s3); background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); }
.signal-stats dt { font-size: .8125rem; color: var(--c-muted); }
.signal-stats dd { margin: 0; font-size: var(--fs-lg); font-weight: 700; }
.signal-trend.is-up { color: #15803d; }
.signal-trend.is-down { color: #b91c1c; }
.signal-sub { margin: var(--s4) 0 var(--s2); font-size: var(--fs-md); }
.signal-bars { display: grid; gap: var(--s2); margin: 0; }
.signal-bars li { display: grid; grid-template-columns: 2.5rem 1fr 3.5rem; align-items: center; gap: var(--s2); font-size: var(--fs-sm); }
.signal-code { font-family: var(--mono); font-weight: 700; }
.signal-bar { height: 8px; border-radius: 999px; background: var(--c-border); overflow: hidden; }
.signal-bar span { display: block; height: 100%; background: var(--c-brand); }
.signal-value { text-align: right; color: var(--c-muted); }
.signal-mentions { display: grid; gap: var(--s2); margin: 0; }
.signal-mentions li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); font-size: var(--fs-sm); }
.signal-mentions time { color: var(--c-muted); }
.signal-source { margin: var(--s3) 0 0; font-size: .8125rem; color: var(--c-muted); }
.tool-sidebar { min-width: 0; }
@media (min-width: 1024px) { .tool-sidebar__box { position: sticky; top: calc(var(--header-h) + var(--s4)); } }
.tool-sidebar__title { margin: 0; padding: var(--s5) var(--s5) var(--s4); font-size: var(--fs-lg); font-weight: 700; line-height: 1.25; border-bottom: 1px solid var(--c-border); }
.side-tools { margin: 0; }
.side-tool { display: flex; align-items: center; gap: var(--s4); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--c-border); }
.side-tool:last-child { border-bottom: 0; }
.side-tool__media { display: grid; place-items: center; flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--c-brand-soft); color: var(--c-brand-strong); font-weight: 800; }
.side-tool__media img { width: 100%; height: 100%; object-fit: cover; }
.side-tool__body { display: grid; justify-items: start; gap: var(--s1); min-width: 0; }
.side-tool__line { display: flex; align-items: center; gap: var(--s1); max-width: 100%; }
.side-tool__name { overflow: hidden; color: var(--c-text); font-weight: 500; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.side-tool__name:hover { color: var(--c-brand-strong); }
.side-tool__out { display: inline-grid; place-items: center; width: 32px; height: 32px; color: var(--c-text); }
.side-tool__out:hover { color: var(--c-brand-strong); }

/* ---------- View tabs (New | Top, leaderboard periods, account) ---------- */
.view-tabs ul { display: flex; gap: var(--s1); margin: 0 0 var(--s4); padding: 4px; list-style: none; overflow-x: auto; background: #fff; border: 1px solid var(--c-border); border-radius: 999px; width: max-content; max-width: 100%; }
.view-tabs__link { display: inline-flex; align-items: center; min-height: 40px; padding-inline: var(--s4); border-radius: 999px; color: var(--c-muted); font-weight: 500; text-decoration: none; white-space: nowrap; }
.view-tabs__link:hover { color: var(--c-text); }
.view-tabs__link[aria-current] { background: var(--c-brand); color: #fff; }
.tool-card__media { flex: none; overflow: hidden; }
.tool-card__media:not(.tool-card__media--logo) img { position: absolute; inset: 0; }
