/* =========================================================
   polish.css: loaded LAST (priority 99). Shared tokens from style.css :root:
   --body-color / --body-size / --body-size-sm / --body-lh   one body-text voice
   --card-pad-sm 16 / --card-pad-md 20 / --card-pad 24       inner padding scale
   --stack-gap 20 / --stack-gap-lg 24                         gap between stacked cards
   ========================================================= */

/* ---------- 1. ONE body-text token on tool / extension / compare / category / blog / prompt pages ---------- */
/* paragraphs: hero answer, section prose, FAQ answers */
.pl-answer__text,
.tp-prose p, .tp-section p, .tp-faq__item p, .tp-note, .tp-embed__intro,
.cmp-sec p, .cmp-prose p, .cmp-answer .pl-answer__text,
.pl-faq__item p, .pl-sec p, .ats-cat__method, .ats-cat p,
.ats-ext__panel p, .ats-ext__faq p, .ats-ext__main p,
.pr-head__lede, .pr-why__purpose, .pr-block > p,
.ats-ed-article p, .ats-ed-article li, .ats-ed-article blockquote, .ats-ed-head .pl-answer__text {
	color: var(--body-color);
	font-size: var(--body-size);
	line-height: var(--body-lh);
	font-weight: 400;
}
/* lists inside content sections */
.tp-pc__col li, .tp-fit__col li, .tp-usecases li, .tp-steps li, .pl-changelog__list li, .tp-feature, .tp-alt,
.cmp-cols li, .cmp-sec li,
.ats-cat__criteria li, .ats-cat__toplist li, .ats-cat__free li,
.ats-ext__list li, .ats-ext__facts dd, .ats-ext__checks li,
.pr-block li {
	color: var(--body-color);
	font-size: var(--body-size-sm);
	line-height: 1.65;
}
.tp-steps li, .pl-changelog__list li, .ats-cat__criteria li, .ats-cat__toplist li, .ats-cat__free li, .ats-ext__list li, .ats-ext__facts dd { font-size: var(--body-size); line-height: var(--body-lh); }
/* card descriptions */
.tp-feat__desc, .tp-alt__why, .cmp-alt__desc, .cmp-sc__why, .ats-acard__bio, .ats-crow__desc, .pr-card__desc, .ats-tool-card__desc, .pr-hero__intro {
	color: var(--body-color);
	font-size: var(--body-size-sm);
	line-height: 1.6;
}
.pr-hero__intro, .pr-head__lede { font-size: var(--body-size); }
.cmp-note { color: var(--body-color); font-size: var(--body-size-sm); }
/* strong/links inside body text keep their own colour; bold reads as ink */
.pl-answer__text strong, .tp-prose strong, .cmp-sec strong, .pl-faq__item p strong { color: var(--color-text-primary); }
@media (max-width: 640px) { .pl-answer__text { font-size: var(--body-size); } }

/* ---------- 2. Compare hero: two cards, 56px gap, VS badge centred in the gap, aligned rows ---------- */
.cmp-vs { grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); grid-template-rows: auto auto auto auto auto; column-gap: 0; row-gap: 0; align-items: stretch; margin: 0 0 var(--stack-gap-lg); }
.cmp-vc {
	grid-row: 1 / span 5; display: grid; grid-template-rows: subgrid; row-gap: var(--card-pad-sm);
	padding: var(--card-pad); border-radius: var(--radius-lg); align-content: start;
}
.cmp-vc--a { grid-column: 1; }
.cmp-vc--b { grid-column: 3; }
.cmp-vs__badge { grid-column: 2; grid-row: 1 / span 5; align-self: center; justify-self: center; width: 48px; height: 48px; margin: 0; font-size: .95rem; box-shadow: 0 0 0 4px #fff; z-index: 1; }
.cmp-vc__media { aspect-ratio: 16 / 10; width: 100%; border-radius: var(--radius-md); }
.cmp-vc__media.is-logo { background: var(--color-thumb-bg, #f7f6f4); box-shadow: inset 0 0 0 1px var(--color-border); }
.cmp-vc__media.is-logo .ats-logo { --ats-logo-size: 88px !important; --ats-avatar-size: 88px !important; }
.cmp-vc__head { gap: 14px; align-items: center; flex-wrap: nowrap; }
.cmp-vc__facts { padding: var(--card-pad-sm) 0; gap: var(--card-pad-sm); }
.cmp-vc__facts dd { margin: 4px 0 0; line-height: 1.4; }
.cmp-vc__badges { min-height: 0; display: flex; align-items: center; }
.cmp-visit { margin-top: 0; align-self: end; }
@media (max-width: 720px) {
	.cmp-vs { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 0; }
	.cmp-vc { grid-row: auto; grid-column: 1; display: flex; flex-direction: column; gap: var(--card-pad-sm); padding: var(--card-pad-md); }
	.cmp-vs__badge { grid-column: 1; grid-row: auto; margin: 12px auto; }
	.cmp-visit { align-self: stretch; }
}

/* ---------- 3. "Our verdict" box: padding + tidy chip grid ---------- */
.pl-answer.cmp-answer { padding: 28px; margin: 0 0 var(--stack-gap-lg); }
.cmp-answer__label { margin: 0 0 12px; }
.cmp-answer .pl-answer__text { font-size: var(--body-size); line-height: var(--body-lh); font-weight: 500; margin: 0; }
.cmp-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; }
.cmp-pick-chip { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 10px 12px 10px 16px; border-radius: 14px; line-height: 1.35; }
.cmp-pick-chip__for { flex: 1 1 auto; min-width: 0; }
.cmp-pick-chip strong { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; white-space: nowrap; }
.cmp-answer .ats-cite { white-space: nowrap; margin-inline: 2px 0; }
.cmp-answer .ats-cite + .ats-cite { margin-inline-start: 4px; }
@media (max-width: 720px) {
	.pl-answer.cmp-answer { padding: var(--card-pad-md); }
	.cmp-picks { grid-template-columns: minmax(0, 1fr); }
	.cmp-pick-chip { flex-wrap: wrap; row-gap: 8px; }
}

/* ---------- 4. Padding audit: one scale (16 / 20 / 24), one stack gap ---------- */
/* big content cards: 24 */
.tp-pc__col, .tp-fit__col, .tp-card, .tp-rv, .tp-rform, .cmp-card, .cmp-fitcol, .cmp-sc-card, .ats-ext__card, .ats-tool-card--compact { padding: var(--card-pad); }
/* medium boxes (author, TOC, callouts, sidebar/rail, prompt blocks): 20 */
.ats-acard, .ats-rail__card, .pr-block, .pr-side-card, .atsc-callout, .tp-embed__row { padding: var(--card-pad-md); }
.atsc-cta { padding: var(--card-pad-md) var(--card-pad); }
/* small inner boxes (fact tiles, nested fit boxes, code, inputs rows): 16 */
.tp-fact, .cmp-fit, .eeat-try, .pr-code, .pr-example__text { padding: var(--card-pad-sm); }
.cmp-fit, .pr-code, .pr-example__text { padding-inline: var(--card-pad-md); }
.ats-acard__meta { padding-top: var(--card-pad-sm); margin-top: var(--card-pad-sm); }
.ats-toc--card summary { padding: var(--card-pad-md); }
.ats-toc--card .ats-toc__list { margin: 0; padding: 0 var(--card-pad-md) var(--card-pad-md); }
.ats-toc--card:not([open]) summary { padding-bottom: var(--card-pad-md); }
@media (max-width: 720px) {
	.tp-pc__col, .tp-fit__col, .tp-card, .tp-rv, .tp-rform, .cmp-card, .cmp-fitcol, .cmp-sc-card, .ats-ext__card, .ats-tool-card--compact { padding: var(--card-pad-md); }
	.ats-acard, .ats-rail__card, .pr-block, .pr-side-card, .atsc-callout, .tp-embed__row, .atsc-cta { padding: var(--card-pad-sm) var(--card-pad-md) var(--card-pad-md); }
}
.ats-rail__title { margin-bottom: 12px; }
.ats-rail__row:first-child { padding-top: 0; }
.ats-rail__row:last-child { padding-bottom: 0; }

/* gaps between stacked cards: 20 (24 between large blocks) */
.ats-acard { margin-bottom: var(--stack-gap); }
.cmp-article > .ats-toc--card { margin-bottom: var(--stack-gap-lg); }
.ats-rail, .pr-side, .cmp-side, .tp-side, .ats-ext__side { gap: var(--stack-gap); }
.pr-side-card { margin-bottom: var(--stack-gap); }
.pr-side-card:last-child { margin-bottom: 0; }

/* prompt card: the code preview clamps to 3 lines with real padding (clamp the code, not the padded box) */
.pr-card__prompt { padding: 12px 16px; display: block; overflow: visible; -webkit-line-clamp: unset; }
.pr-card__prompt code { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* citation pills stay glued to the word and punctuation (no orphan [2] or "." on its own line) */
body .ats-cite a.ats-cite__a { display: inline; }
.cmp-vc__facts { align-content: start; }
.cmp-side { align-content: start; }
/* "]" + "[" is a legal line-break pair; a word joiner keeps adjacent pills together */
.ats-cite + .ats-cite::before { content: "\2060"; }
/* card descriptions stay one step smaller than section prose (override the generic section-paragraph rule above) */
.cmp-sec .cmp-sc__why, .cmp-sec .cmp-alt__desc, .cmp-sec .cmp-card p, .cmp-sec .cmp-fit p,
.tp-section .tp-feat__desc, .tp-section .tp-alt__why, .tp-section .tp-feature p, .tp-section .tp-alt p, .tp-section .tp-fit__col p, .tp-section .tp-pc__col p, .tp-section .tp-card p {
	font-size: var(--body-size-sm); line-height: 1.6;
}

/* tool page: fact tiles top-aligned (labels share a baseline across a row), 16px gaps, tables breathe */
.tp-hero > .tp-keyfacts { gap: var(--card-pad-sm); }
.tp-hero .tp-keyfacts .tp-fact { align-items: start; align-content: start; padding: var(--card-pad-sm); }
.tp-hero .tp-keyfacts dt { align-self: start; }
.tp-hero .tp-keyfacts dd { margin-top: 2px; }
.tp-section .tp-pc__col h3, .tp-section .tp-fit__col h3 { margin: 0 0 12px; }
.tp-pc { gap: var(--card-pad-sm); }
.tp-fit { gap: var(--card-pad-sm); }
.tp-section .pl-table-wrap, .tp-section .tp-tablewrap { margin-block: var(--card-pad-sm) var(--card-pad-md); }
.tp-section .pl-table-wrap table { margin: 0; }
.tp-card > h2, .tp-card > h3, .tp-card .tp-card__title { margin: 0 0 12px; }
.ats-support { padding: var(--card-pad-md); }

/* prompt detail: breathing room under the title, compact tool card nested in the sidebar card */
.pr-single__thumb { margin-top: var(--card-pad-md); }
.pr-side-card .ats-tool-card--compact { padding: var(--card-pad-sm); }
.pr-side-card .ats-tool-card__desc { font-size: var(--body-size-sm); line-height: 1.55; }

/* category rows: description = card description size; price line keeps its muted caption style */
.ats-cat .ats-crow p, .ats-cat .ats-crow__desc { font-size: var(--body-size-sm); line-height: 1.6; color: var(--body-color); }
.ats-cat .ats-crow p.ats-crow__from, .ats-cat .ats-crow__from { font-size: var(--text-xs); line-height: 1.4; color: var(--color-text-muted); }

/* blog header stack: every card in the header column sits 20px from the next */
.ats-ed-head > .eeat-try { margin: var(--stack-gap) 0; }
.ats-ed-head .ats-acard, .ats-ed-head .ats-support, .ats-ed-article > .ats-support { margin-block: 0 var(--stack-gap); }
.gp-icon { background: var(--tile-bg, var(--color-accent-2)); color: #fff; border-color: transparent; box-shadow: none; }
.gp-icon svg { stroke: #fff; }

/* =========================================================
   FINAL layout pass (Dec 2026): one gutter between main column and sidebar, full-width components,
   readable measure only on paragraphs, CTA contrast, table alignment, prompt page, thumbnails.
   ========================================================= */
:root { --measure: 820px; --layout-gutter: 44px; --ats-purple: #7829b4; }

/* ---------- 1. Main column fills up to the sidebar (44px gutter) ---------- */
.tp-layout, .cmp-layout, .ats-ext__layout, .pr-single__layout, .md-layout { column-gap: var(--layout-gutter); }
.ats-ed .ats-ed-layout.has-rail { width: 100%; margin-inline: 0; grid-template-columns: minmax(0, 1fr) var(--ed-rail); column-gap: var(--layout-gutter); }
.ats-ed-layout.has-rail .ats-ed-col, .ats-ed-layout.has-rail .ats-ed-main, .ats-ed-layout.has-rail .ats-ed-head { max-width: none; width: 100%; }
/* paragraphs/lists keep the reading measure; everything else (tables, grids, cards, figures) runs the full column */
.ats-ed-content > p, .ats-ed-content > ul, .ats-ed-content > ol, .ats-ed-content > blockquote,
.tp-section > p, .tp-prose > p, .tp-prose > ul, .tp-prose > ol, .tp-section > .tp-note,
.cmp-sec > p, .cmp-prose > p, .ats-ext__panel > p, .ats-ext__dbody > p, .pr-head__lede { max-width: var(--measure); }
.ats-ext__dbody, .ats-ext__layout .ats-ext__panel { max-width: none; }
.ats-ed-content > h2, .ats-ed-content > h3, .ats-ed-content > figure, .ats-ed-content > .wp-block-table, .ats-ed-content > .ats-table-wrap { max-width: none; }
/* headings, dividers and text share the section's left edge; table cards no longer inset */
.tp-section > h2, .tp-section > .pl-table-wrap, .tp-section > p { margin-left: 0; }
.tp-section .pl-table-wrap, .tp-section .tp-tablewrap { padding-inline: 0; }

/* ---------- 2. CTA on dark / purple variants: white title, ~0.85 white body, AA on every variant ---------- */
.atsc-cta--compare .atsc-cta__title, .atsc-cta--category .atsc-cta__title,
.atsc-cta--compare p.atsc-cta__title, .atsc-cta--category p.atsc-cta__title { color: #fff; }
.atsc-cta--compare .atsc-cta__eyebrow, .atsc-cta--category .atsc-cta__eyebrow, .atsc-cta--compare .atsc-cta__vs { color: rgb(255 255 255 / 92%); }
.atsc-cta--compare .atsc-cta__text, .atsc-cta--category .atsc-cta__text,
.atsc-cta--compare p.atsc-cta__text, .atsc-cta--category p.atsc-cta__text { color: rgb(255 255 255 / 85%); }
.atsc-cta--compare .atsc-cta__meta, .atsc-cta--category .atsc-cta__meta { color: rgb(255 255 255 / 85%); }

/* ---------- 3. Pricing / plan tables ---------- */
.pl-table thead th, .tp-plantable thead th, .cmp-table thead th, .md-apitbl thead th, .md-bench thead th, .aud-table thead th { color: var(--ats-purple); }
.pl-table th, .pl-table td, .tp-plantable th, .tp-plantable td, .md-apitbl th, .md-apitbl td, .cmp-table th, .cmp-table td { padding: 15px 16px; text-align: left; font-variant-numeric: tabular-nums; }
.pl-table th + th, .pl-table td + td, .md-apitbl th + th, .md-apitbl td + td, .cmp-table--plans th + th, .cmp-table--plans td + td { border-left: 1px solid var(--color-border); }
.pl-price, .cmp-num, .md-apitbl td.is-num { color: var(--ats-purple); font-weight: 700; }
.pl-table .pl-price { font-variant-numeric: tabular-nums; }
.cmp-table .is-num, .md-apitbl .is-num, .md-apitbl th.is-num { text-align: left; white-space: nowrap; }
.cmp-table--plans .cmp-sub, .cmp-table--plans .cmp-na { font-weight: 400; }
/* free-tier and source columns centred */
.cmp-table .is-c, .cmp-table--quick td:not(:first-child), .cmp-table--quick th:not(:first-child) { text-align: center; }
.aud-table:has(caption) :is(th, td):nth-child(n+3), .aud-table:not(:has(caption)) :is(th, td):nth-child(3) { text-align: center; }
.aud-table :is(th, td) { text-align: left; }
.aud-table:has(caption) :is(th, td):nth-child(n+3), .aud-table:not(:has(caption)) :is(th, td):nth-child(3) { text-align: center; }
.cmp-grp th { text-align: left; }

/* ---------- 4. Prompt detail: header lives in the main column, sidebar has facts + actions ---------- */
.pr-single__layout { grid-template-columns: minmax(0, 1fr) 340px; margin-top: 1rem; }
.pr-single__main { gap: var(--stack-gap-lg); }
.pr-single .pr-head { max-width: none; margin-bottom: 0; }
.pr-single .pr-head__title { max-width: none; }
.pr-single .pr-single__thumb { max-width: none; width: 100%; margin: var(--card-pad-md) 0; }
.pr-single .eeat-try { margin: 0; }
.pr-single .pr-single__side { top: 8.5rem; }
.pr-side-card--actions { display: grid; gap: 12px; }
.pr-side-btn { width: 100%; justify-content: center; text-align: center; }
.pr-side-rel { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pr-side-rel li + li { border-top: 1px solid var(--color-border); }
.pr-side-rel a { display: block; padding: 10px 0; color: var(--color-accent-ink); font-weight: 600; font-size: var(--text-sm); line-height: 1.4; text-decoration: none; }
.pr-side-rel a:hover { text-decoration: underline; }
@media (max-width: 960px) { .pr-single__layout { grid-template-columns: minmax(0, 1fr); } .pr-single .pr-single__side { position: static; } }

/* ---------- 6. Prompt thumbnails: bigger tiles (card 96/48, detail 120/56) ---------- */
.pr-thumb { gap: 18px; }
.pr-thumb__mark { width: 96px; height: 96px; }
.pr-thumb__mark .ats-logo.ats-logo--tile { border-radius: 24px; }
.pr-thumb__mark .ats-logo__svg, .pr-thumb__mark svg { width: 58%; height: 58%; }
.pr-thumb__icons { gap: 12px; flex-wrap: wrap; justify-content: center; }
.pr-thumb__ico { width: 48px; height: 48px; border-radius: 14px; }
.pr-thumb__ico svg { width: 26px; height: 26px; }
.pr-thumb--hero { gap: 28px; min-height: 220px; padding: 32px; flex-wrap: wrap; }
.pr-thumb--hero .pr-thumb__mark { width: 120px; height: 120px; }
.pr-thumb--hero .pr-thumb__mark .ats-logo.ats-logo--tile { border-radius: 30px; }
.pr-thumb--hero .pr-thumb__icons { gap: 14px; }
.pr-thumb--hero .pr-thumb__ico { width: 56px; height: 56px; border-radius: 16px; }
.pr-thumb--hero .pr-thumb__ico svg { width: 30px; height: 30px; }
@media (max-width: 480px) { .pr-thumb--hero { gap: 18px; padding: 24px 16px; } }
/* wide content tables scroll inside their card instead of widening the page (390px) */
.ats-table-wrap, .md-scroll { overflow-x: auto; max-width: 100%; }
html, body { overflow-x: clip; }
.atsc-cta .atsc-cta__title, .atsc-cta p.atsc-cta__title { font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
.atsc-cta--tool .atsc-cta__title, .atsc-cta--tool p.atsc-cta__title { color: var(--color-text-primary); }
.atsc-cta--tool .atsc-cta__text, .atsc-cta--tool p.atsc-cta__text { color: var(--color-text-secondary); font-size: var(--text-sm); }
.cmp-table td strong.cmp-num, .cmp-table .cmp-num, td.is-num strong { color: var(--ats-purple); font-weight: 700; font-variant-numeric: tabular-nums; }
table.md-apitbl.md-bench thead th { color: var(--ats-purple); text-align: left; }
table.md-apitbl.md-bench th.is-num, table.md-apitbl.md-bench td.is-num { text-align: left; font-variant-numeric: tabular-nums; }
table.md-apitbl.md-bench td { padding: 15px 16px; }

/* Owner rule: in 2-column layouts the text fills its column, so the only gap before the sidebar is the 44px gutter.
   The 820px reading measure applies only to single-column pages. */
.tp-layout, .cmp-layout, .ats-ext__layout, .pr-single__layout, .md-layout, .ats-rail-layout, .ats-news__layout { --measure: none; }
.ats-rail-layout .alt .pl-sec > p, .ats-rail-layout .alt-reasons, .ats-rail-layout .alt-audience, .ats-rail-layout .alt-free, .ats-rail-layout .alt-item p { max-width: none; }

/* Owner rule: prices and token figures are bold purple everywhere (marked server-side by inc/money.php). */
.ats-money, strong.ats-money, .pl-price, .cmp-num { color: var(--ats-purple, #7829b4) !important; font-weight: 700 !important; font-variant-numeric: tabular-nums; }
.ats-btn .ats-money, .atsc-btn .ats-money, a.ats-btn-primary .ats-money { color: inherit !important; }

/* Owner rule: icons are white on solid brand tiles (chip icons in key facts, features, FAQ, CTA, empty states). */
.ats-chip-icon { background: var(--color-accent-2, #7829b4); color: #fff; }
.ats-chip-icon--ok { background: var(--color-success-ink, #1d6b3f); color: #fff; }
.ats-chip-icon--no { background: var(--color-danger, #b3261e); color: #fff; }
.ats-chip-icon--warm { background: var(--color-accent, #ff6036); color: #fff; }

/* Owner rule: cards are white with a shadow (the hero key-fact cards were flat, border only). */
.tp-fact { background: var(--color-surface, #fff); box-shadow: var(--shadow-card); }

/* Owner rule: exactly 44px between the main text and the rail on every rail layout (rail.css had 48/32). */
@media (min-width: 1100px) { .ats-rail-layout { column-gap: var(--layout-gutter); } }

/* Owner rule: tables and charts carry no shadow (a border separates them from the page). */
.tp-tablewrap, .tp-table-wrap, .pl-table-wrap, .cmp-tablewrap, .ats-subs__scroll, .md-tablewrap { box-shadow: none; border: 1px solid var(--color-border); }
@media (max-width: 600px) { .pl-table-wrap, .cmp-tablewrap, .ats-subs__scroll { border: 0; } }

/* Owner rule: in any two-column layout the text runs to the column edge (44px gutter to the sidebar); the 820px measure is for single-column pages only. */
.ats-ed-layout.has-rail, .ats-ed-layout.has-rail .ats-ed-content { --measure: none; --ed-measure: none; }
.ats-ed-layout.has-rail .ats-ed-content > p, .ats-ed-layout.has-rail .ats-ed-content > ul, .ats-ed-layout.has-rail .ats-ed-content > ol,
.ats-ed-layout.has-rail .ats-ed-content > blockquote, .ats-ed-layout.has-rail .ats-ed-content > .atsc { max-width: none; }
