/* "Jak taniej używać AI" — the AI price rubric (docs/ai-pricing-spec.md).
   Canon: design/DESIGN.md. Futura 400/500/700 only, one blue, yellow = "cheapest" marker only, flat fills,
   halos instead of borders, no uppercase / letter-spacing, no emoji, no gradients.
   Breakpoints: <=760 / 761-1025 / 1026-1440 / >1440. Every rule is scoped by body.cw-ai or .cw-ai-* . */

body.cw-ai {
  --ai-blue: #2457c6;
  --ai-blue-hover: #1c47a6;
  --ai-yellow: #ffc73b;
  --ai-green: #59b78b;
  --ai-red: #e4410d;
  --ai-tint: #eef2fc;
  --ai-line: #e9e9e9;
  --ai-card: #fafafa;
  --ai-mute: rgba(0, 0, 0, .6);
  --ai-halo: 0 0 18px rgba(0, 0, 0, .07);
  --ai-r: clamp(10px, 1.05vw, 16px);
  --ai-gap: clamp(14px, 1.4vw, 22px);
  --ai-bar: 60px;                 /* height of the sticky currency bar */
}

.cw-ai-main { padding-bottom: clamp(48px, 5vw, 88px); }
.cw-ai-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- language menu ---------------------------------------------------- */
.cw-ai-lang { position: relative; }
.cw-ai-lang summary {
  list-style: none; cursor: pointer; min-height: 40px; padding: 0 16px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; color: #000;
  box-shadow: inset 0 0 0 1px var(--ai-line); background: #fff; user-select: none;
}
.cw-ai-lang summary::-webkit-details-marker { display: none; }
.cw-ai-lang summary::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .15s;
}
.cw-ai-lang[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.cw-ai-lang summary:hover { box-shadow: inset 0 0 0 1px var(--ai-blue); color: var(--ai-blue); }
.cw-ai-lang ul {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; margin: 0; padding: 8px; list-style: none;
  min-width: 210px; background: #fff; border-radius: var(--ai-r); box-shadow: 0 0 26px rgba(0, 0, 0, .16);
}
.cw-ai-lang li a { display: block; padding: 10px 14px; border-radius: 6px; font-size: 16px; color: #000; text-decoration: none; }
.cw-ai-lang li a:hover { background: var(--ai-tint); color: var(--ai-blue); text-decoration: none; }
.cw-ai-lang li a[aria-current] { font-weight: 700; color: var(--ai-blue); }
.cw-ai-lang summary:focus-visible { outline: 2px solid var(--ai-blue); outline-offset: 3px; }

/* ---- hero: the answer (cheapest model per vendor) sits beside the headline ---------------- */
.cw-ai-hero { padding: clamp(26px, 3.2vw, 54px) 0 0; display: grid; gap: clamp(22px, 2.4vw, 36px) clamp(28px, 4vw, 72px); grid-template-columns: minmax(0, 1fr); grid-template-areas: 'copy' 'pick' 'facts'; align-items: start; }
.cw-ai-hero-copy { min-width: 0; grid-area: copy; }
.cw-ai-hero-pick { grid-area: pick; }
.cw-ai-hero .cw-ai-facts { grid-area: facts; margin-top: 0; }
.cw-ai-eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--ai-tint); color: var(--ai-blue);
  font-size: 15px; font-weight: 500; line-height: 1.3;
}
.cw-ai-hero h1 { margin: 18px 0 16px; font-size: clamp(32px, 3.5vw, 56px); font-weight: 700; line-height: 1.1; }
.cw-ai-accent { color: var(--ai-blue); }
.cw-ai-lead { margin: 0; max-width: 62ch; font-size: clamp(17px, 1.2vw, 21px); line-height: 1.5; }
.cw-ai-warn { margin: 18px 0 0; padding: 12px 16px 12px 40px; border-radius: var(--ai-r); background: #fff; box-shadow: var(--ai-halo); font-size: 16px; font-weight: 500; position: relative; }
.cw-ai-warn::before { content: ""; position: absolute; left: 18px; top: 1.15em; width: 10px; height: 10px; border-radius: 50%; background: var(--ai-red); }
.cw-ai-jump { margin-top: clamp(20px, 2vw, 30px); display: flex; flex-wrap: wrap; gap: 10px; }
.cw-ai-jump a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 999px; background: var(--ai-tint);
  color: var(--ai-blue); font-size: 16px; font-weight: 500; text-decoration: none;
}
.cw-ai-jump a:hover { background: var(--ai-blue); color: #fff; text-decoration: none; }
.cw-ai-facts { margin: clamp(22px, 2.4vw, 36px) 0 0; padding: 0; display: grid; gap: var(--ai-gap); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cw-ai-facts > div { background: #fff; border-radius: var(--ai-r); box-shadow: var(--ai-halo); padding: clamp(16px, 1.6vw, 24px); min-width: 0; display: flex; flex-direction: column; }
.cw-ai-facts dt { margin: 0; font-size: 15px; line-height: 1.3; color: var(--ai-mute); }
.cw-ai-facts dd { margin: 8px 0 0; font-size: clamp(30px, 2.8vw, 46px); font-weight: 700; line-height: 1.05; color: var(--ai-blue); font-variant-numeric: tabular-nums; margin-top: auto; padding-top: 8px; }

/* ---- shared pills / chips -------------------------------------------- */
.cw-ai-pill {
  font: inherit; font-size: 15px; font-weight: 500; line-height: 1; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px;
  background: #fff; color: #000; box-shadow: inset 0 0 0 1px var(--ai-line); cursor: pointer; white-space: nowrap;
}
.cw-ai-pill:hover { box-shadow: inset 0 0 0 1px var(--ai-blue); color: var(--ai-blue); }
.cw-ai-pill[aria-checked="true"], .cw-ai-pill[aria-selected="true"], .cw-ai-pill[aria-pressed="true"] { background: var(--ai-blue); color: #fff; box-shadow: none; }
.cw-ai-pill[aria-checked="true"]:hover, .cw-ai-pill[aria-selected="true"]:hover, .cw-ai-pill[aria-pressed="true"]:hover { background: var(--ai-blue-hover); color: #fff; }

/* colour code: green = a saving, blue ring = a time-limited or declared offer, blue tint = a mode or fact, yellow = the cheapest */
.cw-ai-chip {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; background: var(--ai-tint); color: var(--ai-blue);
  font-size: 13px; font-weight: 500; line-height: 1.25; white-space: nowrap;
}
.cw-ai-chip-blue { background: var(--ai-tint); color: var(--ai-blue); }
.cw-ai-chip-save { background: var(--ai-green); color: #000; font-weight: 700; min-width: 56px; justify-content: center; }
.cw-ai-chip-promo, .cw-ai-chip-date { background: #fff; color: var(--ai-blue); box-shadow: inset 0 0 0 1px var(--ai-blue); }
.cw-ai-chip-free { background: var(--ai-blue); color: #fff; }
.cw-ai-freecell { font-weight: 700; color: var(--ai-blue); }

.cw-ai-m { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cw-ai-na { opacity: .6; }
.cw-ai-note { margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: var(--ai-mute); max-width: 74ch; }
.cw-ai-note a, .cw-ai-src a, .cw-ai-deal-val a, .cw-ai-defs a { color: var(--ai-blue); }

/* ---- currency bar (stays on screen while the page scrolls) ------------------------- */
.cw-ai-currencybar {
  position: sticky; top: 0; z-index: 25; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: clamp(22px, 2.4vw, 36px) -6px 0; padding: 10px 6px; background: #fff; box-shadow: inset 0 -1px 0 var(--ai-line); min-height: var(--ai-bar);
}
.cw-ai-currencybar::-webkit-scrollbar { display: none; }
.cw-ai-currencybar .cw-ai-pill { flex: none; padding: 0 12px; }
@media (max-height: 500px) { body.cw-ai { --ai-bar: 0px; } .cw-ai-currencybar { position: static; } }
html:has(body.cw-ai) { scroll-padding-top: calc(var(--ai-bar) + 16px); scroll-padding-bottom: var(--ai-consent, 0px); }
/* Shift+Tab: an element already inside the viewport is not scrolled, so it needs its own margin to clear the sticky bar */
body.cw-ai :is(a[href], button, summary, input, select, [tabindex]) { scroll-margin-top: calc(var(--ai-bar) + 24px); scroll-margin-bottom: var(--ai-consent, 0px); }
body.cw-ai .cw-ai-footer { padding-bottom: calc(var(--ai-consent, 0px) + 24px); }
body.cw-ai .cw-promo-consent-actions button { min-height: 44px; }
.cw-ai-controls { padding-top: 12px; }
.cw-ai-ratebox { margin: 0; font-size: 17px; line-height: 1.4; max-width: 80ch; text-wrap: balance; }
.cw-ai-ratebox strong { color: var(--ai-blue); font-weight: 700; }
.cw-ai-scope { margin-top: 6px; }

/* ---- sections --------------------------------------------------------- */
.cw-ai-section { margin-top: clamp(44px, 5.4vw, 92px); scroll-margin-top: calc(var(--ai-bar) + 16px); }
.cw-ai-section h2 { margin: 0 0 12px; font-size: clamp(24px, 1.95vw, 36px); font-weight: 700; line-height: 1.15; }
.cw-ai-h3 { margin: 30px 0 8px; font-size: clamp(20px, 1.5vw, 24px); font-weight: 700; line-height: 1.2; }
.cw-ai-lead2 { margin: 0 0 20px; max-width: 66ch; font-size: clamp(16px, 1.1vw, 19px); line-height: 1.5; }
.cw-ai-checked { margin: -8px 0 18px; }

/* picks */
.cw-ai-picks-grid { display: grid; align-items: start; gap: var(--ai-gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); margin-top: 20px; }
.cw-ai-pick { background: #fff; border-radius: var(--ai-r); box-shadow: var(--ai-halo); padding: clamp(18px, 1.8vw, 28px); min-width: 0; }
.cw-ai-pick h2, .cw-ai-pick h3 { margin: 0 0 14px; font-size: clamp(18px, 1.3vw, 22px); font-weight: 700; line-height: 1.25; }
.cw-ai-pick ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.cw-ai-pick ol li { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 11px 0; box-shadow: inset 0 -1px 0 var(--ai-line); }
.cw-ai-pick ol li:last-child { box-shadow: none; }
.cw-ai-pick-name { font-size: 16px; font-weight: 500; line-height: 1.3; min-width: 0; }
.cw-ai-pick-name small, .cw-ai-bar-name small, .cw-ai-deal-name small { display: block; font-size: 13px; font-weight: 400; color: var(--ai-mute); }
.cw-ai-pick-val { font-size: 16px; font-weight: 700; text-align: right; flex: none; display: inline-flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.cw-ai-bullets { margin: 0; padding: 0 0 0 1.1em; display: grid; gap: 10px; font-size: 16px; line-height: 1.45; }
.cw-ai-bullets li::marker { color: var(--ai-blue); }

/* calculator */
.cw-ai-calc { background: var(--ai-card); border-radius: var(--ai-r); padding: clamp(18px, 2.4vw, 36px); }
.cw-ai-scenarios, .cw-ai-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.cw-ai-modes { margin-top: 18px; }
.cw-ai-sliders { margin-top: 22px; display: grid; gap: 18px clamp(18px, 2.4vw, 40px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.cw-ai-sliders label { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; font-size: 15px; min-width: 0; }
.cw-ai-sliders label span { grid-row: 1; grid-column: 1; font-weight: 500; line-height: 1.3; }
.cw-ai-sliders output { grid-row: 1; grid-column: 2; font-size: 18px; font-weight: 700; color: var(--ai-blue); font-variant-numeric: tabular-nums; }
.cw-ai-sliders input[type="range"] { grid-row: 2; grid-column: 1 / -1; width: 100%; height: 30px; margin: 0; accent-color: var(--ai-blue); cursor: pointer; }
.cw-ai-modenote { margin: 10px 0 0; }
.cw-ai-total { margin: 22px 0 6px; font-size: 16px; }
.cw-ai-total strong { font-variant-numeric: tabular-nums; }
.cw-ai-range { margin: 4px 0 6px; font-size: clamp(20px, 1.8vw, 28px); font-weight: 700; line-height: 1.2; }
.cw-ai-range .cw-ai-m { color: var(--ai-blue); }
.cw-ai-bars { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; }
.cw-ai-bar { display: grid; grid-template-columns: minmax(150px, 24%) minmax(0, 1fr) minmax(96px, auto); gap: 14px; align-items: center; }
.cw-ai-bar-name { font-size: 15px; font-weight: 500; line-height: 1.25; min-width: 0; }
.cw-ai-bar-track { height: 14px; border-radius: 999px; background: var(--ai-tint); overflow: hidden; }
.cw-ai-bar-track i { display: block; height: 100%; min-width: 12px; border-radius: 999px; background: var(--ai-blue); transition: width .25s; }
.cw-ai-bar.is-min .cw-ai-bar-track i { background: var(--ai-yellow); }
.cw-ai-bar-val { text-align: right; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cw-ai-bar-x { display: block; font-size: 13px; font-weight: 500; opacity: .6; }
.cw-ai-bar-gap { text-align: center; font-size: 14px; color: var(--ai-mute); padding: 2px 0; }
.cw-ai-assume { margin: 18px 0 0; font-size: 14px; line-height: 1.45; color: var(--ai-mute); max-width: 74ch; }

/* filters */
.cw-ai-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin: 18px 0 14px; }
.cw-ai-search, .cw-ai-select {
  font: inherit; font-size: 16px; min-height: 44px; border: 0; border-radius: 999px; background: #fff; color: #000;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .45); padding: 0 18px;      /* a field must show its edge: 3:1 against white */
}
.cw-ai-search { flex: 1 1 240px; max-width: 380px; }
.cw-ai-select { padding-right: 12px; max-width: 100%; }
body.cw-ai .cw-ai-search:focus-visible, body.cw-ai .cw-ai-select:focus-visible { outline: 2px solid var(--ai-blue); outline-offset: 2px; }
.cw-ai-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.cw-ai-sortselect { display: none; }
.cw-ai-count { margin: 0 0 12px; font-size: 14px; color: var(--ai-mute); min-height: 1.4em; }
.cw-ai-count.is-quiet { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.cw-ai-count:focus { outline: none; }
.cw-ai-more { margin: 18px 0 0; text-align: center; }
.cw-ai-empty { padding: 32px 20px; border-radius: var(--ai-r); background: var(--ai-card); text-align: center; display: grid; justify-items: center; gap: 14px; }
.cw-ai-empty p { margin: 0; font-size: 16px; }

/* table (desktop, 1026 and up) */
.cw-ai-tablewrap { background: #fff; border-radius: var(--ai-r); box-shadow: var(--ai-halo); overflow-x: auto; }
.cw-ai-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; line-height: 1.4; }
.cw-ai-table th, .cw-ai-table td { padding: 14px 10px; text-align: left; vertical-align: top; box-shadow: inset 0 -1px 0 var(--ai-line); }
.cw-ai-table th:first-child, .cw-ai-table td:first-child { padding-left: 16px; }
.cw-ai-table th:last-child, .cw-ai-table td:last-child { padding-right: 16px; }
.cw-ai-table thead th { background: var(--ai-card); font-weight: 700; vertical-align: bottom; }
.cw-ai-table thead th small { display: block; font-weight: 400; font-size: 12px; color: var(--ai-mute); }
.cw-ai-table tbody tr:last-child > * { box-shadow: none; }
.cw-ai-table tbody tr:hover > * { background: var(--ai-card); }
.cw-ai-table th[scope="row"] { font-weight: 400; min-width: 150px; }
.cw-ai-sortbtn { font: inherit; font-weight: 700; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: left; display: inline-flex; flex-direction: column; align-items: flex-start; }
.cw-ai-sortbtn:hover { color: var(--ai-blue); }
.cw-ai-sortlabel { display: inline-flex; align-items: center; gap: 7px; }
.cw-ai-sortlabel::after { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .25; }
th[aria-sort="ascending"] .cw-ai-sortlabel::after { border-top: 0; border-bottom: 5px solid currentColor; opacity: 1; color: var(--ai-blue); }
th[aria-sort="descending"] .cw-ai-sortlabel::after { opacity: 1; color: var(--ai-blue); }
a.cw-ai-name { color: var(--ai-blue); }
.cw-ai-name { display: block; font-size: 16px; font-weight: 500; line-height: 1.25; }
.cw-ai-lbl { display: none; }       /* the wide table has real column headers; the labels exist for the card layout */
.cw-ai-vendor { display: inline-block; margin-right: 6px; font-size: 13px; color: var(--ai-mute); }
.cw-ai-sub { display: block; font-size: 12px; font-weight: 400; color: var(--ai-mute); line-height: 1.3; margin-top: 2px; }
.cw-ai-quant { font-size: 13px; font-weight: 500; color: var(--ai-mute); white-space: nowrap; }
.cw-ai-unit { margin: -6px 0 10px; font-size: 14px; color: var(--ai-mute); }
.cw-ai-c-in, .cw-ai-c-out { font-weight: 700; }
.cw-ai-c-in, .cw-ai-c-out, .cw-ai-c-ctx, .cw-ai-c-speed { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cw-ai-c-in .cw-ai-sub, .cw-ai-c-out .cw-ai-sub, .cw-ai-c-ctx .cw-ai-sub, .cw-ai-c-speed .cw-ai-sub { white-space: normal; }
.cw-ai-c-in .cw-ai-chip, .cw-ai-c-out .cw-ai-chip { white-space: normal; max-width: 100%; border-radius: 14px; }   /* a long chip text (ru, uk, de) wraps inside its cell instead of widening the column */   /* the small line under a price may wrap: a long "via <host>" must not widen the whole column */
.cw-ai-c-host { min-width: 150px; }
.cw-ai-hostline { display: block; margin-bottom: 4px; font-size: 14px; line-height: 1.35; }
.cw-ai-same { font-size: 14px; opacity: .6; }
.cw-ai-c-modes .cw-ai-chip { margin: 0 4px 4px 0; }
.cw-ai-status { display: inline-flex; align-items: flex-start; gap: 7px; font-size: 13px; font-weight: 500; color: var(--ai-blue); }
.cw-ai-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; margin-top: .3em; }
.cw-ai-status-single { color: var(--ai-mute); }
.cw-ai-status-single::before { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }
.cw-ai-status-disputed { color: #000; }
.cw-ai-status-disputed::before { background: var(--ai-red); }

/* map */
.cw-ai-scatter { background: #fff; border-radius: var(--ai-r); box-shadow: var(--ai-halo); padding: clamp(10px, 1.4vw, 22px); }
.cw-ai-scatter svg { display: block; width: 100%; height: auto; }
.cw-ai-scatter-compact { display: none; }
.cw-ai-pt { cursor: pointer; outline: none; }
.cw-ai-pt:hover .dot, .cw-ai-pt:focus .dot, .cw-ai-pt.is-on .dot { stroke: #000; stroke-width: 2.5; }
.cw-ai-pt:focus-visible .hit { stroke: var(--ai-blue); stroke-width: 2; }
.cw-ai-readout { position: sticky; top: var(--ai-bar); z-index: 3; margin: 0 0 10px; padding: 8px 0; min-height: 2.6em; background: #fff; font-size: 16px; font-weight: 500; line-height: 1.4; box-shadow: inset 0 -1px 0 var(--ai-line); }
.cw-ai-readout strong { font-weight: 700; color: var(--ai-blue); }

/* plans */
.cw-ai-plans { display: grid; gap: var(--ai-gap); align-items: start; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.cw-ai-more-deals .cw-ai-plans { margin-top: var(--ai-gap); }
.cw-ai-plan { background: #fff; border-radius: var(--ai-r); box-shadow: var(--ai-halo); padding: clamp(18px, 1.8vw, 26px); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cw-ai-plan h3 { margin: 0; font-size: clamp(18px, 1.3vw, 22px); font-weight: 700; line-height: 1.25; }
.cw-ai-plan h3 small { display: block; font-size: 14px; font-weight: 400; color: var(--ai-mute); }
.cw-ai-tiers { list-style: none; margin: 0; padding: 0; }
.cw-ai-tiers li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; box-shadow: inset 0 -1px 0 var(--ai-line); }
.cw-ai-tiers li:last-child { box-shadow: none; }
.cw-ai-tiers a { color: #000; font-size: 16px; font-weight: 500; text-decoration: none; min-width: 0; }
.cw-ai-tiers a:hover { color: var(--ai-blue); text-decoration: underline; }
.cw-ai-tier-price { flex: none; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; display: inline-flex; gap: 6px; align-items: baseline; flex-wrap: wrap; justify-content: flex-end; }
.cw-ai-tier-price small { font-size: 12px; font-weight: 400; color: var(--ai-mute); }

/* deals */
.cw-ai-dealgroup { margin-top: 38px; }
.cw-ai-dealgroup h4 { margin: 0 0 4px; font-size: clamp(19px, 1.45vw, 23px); font-weight: 700; display: flex; align-items: baseline; gap: 10px; }
.cw-ai-dealgroup h4 small { font-size: 13px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--ai-tint); color: var(--ai-blue); }
.cw-ai-deals { list-style: none; margin: 0; padding: 0; max-width: 900px; }
.cw-ai-deals li { display: flex; justify-content: space-between; align-items: baseline; gap: 22px; padding: 13px 0; box-shadow: inset 0 -1px 0 var(--ai-line); }
.cw-ai-deal-name { font-size: 16px; line-height: 1.35; min-width: 0; max-width: 72ch; }
.cw-ai-deal-vendor { display: block; font-size: 13px; font-weight: 500; color: var(--ai-mute); }
.cw-ai-deal-title { font-weight: 500; }
.cw-ai-deal-detail { display: block; margin-top: 3px; font-size: 14px; line-height: 1.4; color: var(--ai-mute); }
.cw-ai-deal-val { flex: none; font-size: 15px; text-align: right; display: inline-flex; flex-wrap: wrap; gap: 4px 8px; justify-content: flex-end; align-items: center; }
.cw-ai-more-deals { margin-top: 2px; }
.cw-ai-more-deals summary { cursor: pointer; display: inline-flex; align-items: center; min-height: 40px; margin-top: 10px; padding: 0 16px; border-radius: 999px; font-size: 15px; font-weight: 500; color: #000; background: #fff; box-shadow: inset 0 0 0 1px var(--ai-line); list-style: none; }
.cw-ai-more-deals summary::-webkit-details-marker { display: none; }
.cw-ai-more-deals summary:hover { box-shadow: inset 0 0 0 1px var(--ai-blue); color: var(--ai-blue); }
.cw-ai-more-deals summary:focus-visible { outline: 2px solid var(--ai-blue); outline-offset: 3px; }
.cw-ai-more-deals[open] > summary { display: none; }

/* tips */
.cw-ai-tips { list-style: none; margin: 22px 0 0; padding: 0; counter-reset: tip; display: grid; gap: 30px clamp(28px, 4vw, 72px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.cw-ai-tips li { counter-increment: tip; position: relative; padding-left: 52px; min-width: 0; }
.cw-ai-tips li::before { content: counter(tip); position: absolute; left: 0; top: -2px; font-size: 34px; font-weight: 700; line-height: 1; color: var(--ai-blue); font-variant-numeric: tabular-nums; }
.cw-ai-tips h3 { margin: 0 0 6px; font-size: clamp(18px, 1.3vw, 22px); font-weight: 700; line-height: 1.25; }
.cw-ai-tips p { margin: 0; font-size: 16px; line-height: 1.5; max-width: 62ch; }

/* method */
.cw-ai-defs { margin: 18px 0 0; display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, calc(66ch + 56px)); gap: 0; }
.cw-ai-defs dt, .cw-ai-defs dd { margin: 0; padding: 16px 0; box-shadow: inset 0 -1px 0 var(--ai-line); }
.cw-ai-defs dt { font-size: 16px; font-weight: 700; line-height: 1.3; }
.cw-ai-defs dd { font-size: 16px; line-height: 1.55; padding-left: clamp(20px, 3vw, 56px); }
.cw-ai-defs dt:last-of-type, .cw-ai-defs dd:last-of-type { box-shadow: none; }

/* ---- 1026 and up: two-column hero, sticky table header ------------------------------------ */
@media (min-width: 1026px) {
  .cw-ai-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); grid-template-areas: 'copy pick' 'facts pick'; grid-template-rows: auto 1fr; }
  .cw-ai-hero-pick { margin-top: 34px; }
  .cw-ai-tablewrap { overflow: visible; }
  .cw-ai-table thead th { position: sticky; top: var(--ai-bar); z-index: 2; }
  .cw-ai-table thead th:first-child { border-top-left-radius: var(--ai-r); }
  .cw-ai-table thead th:last-child { border-top-right-radius: var(--ai-r); }
}

/* ---- 761-1025: cards instead of the wide table ------------------------ */
@media (max-width: 1025px) {
  .cw-ai-sortselect { display: block; }
  .cw-ai-tablewrap { background: transparent; box-shadow: none; overflow: visible; }
  .cw-ai-table, .cw-ai-table tbody, .cw-ai-table tr, .cw-ai-table th, .cw-ai-table td { display: block; }
  /* the header row stays in the accessibility tree (real column names), it is only not drawn */
  .cw-ai-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .cw-ai-table thead tr, .cw-ai-table thead th { display: block; }
  .cw-ai-table tbody { display: grid; align-items: start; gap: var(--ai-gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
  .cw-ai-table tr.cw-ai-row { background: #fff; border-radius: var(--ai-r); box-shadow: var(--ai-halo); padding: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; align-content: start; }
  .cw-ai-table tbody tr:hover > * { background: transparent; }
  .cw-ai-table th[scope="row"], .cw-ai-table td { padding: 0; box-shadow: none; min-width: 0; }
  .cw-ai-lbl { display: block; font-size: 12px; line-height: 1.3; color: var(--ai-mute); margin-bottom: 2px; font-weight: 400; }
  .cw-ai-lbl small { font-size: 12px; }
  .cw-ai-table th[scope="row"] { grid-column: 1 / -1; min-width: 0; }
  .cw-ai-name { font-weight: 700; }
  .cw-ai-table .cw-ai-c-host, .cw-ai-table .cw-ai-c-modes, .cw-ai-table .cw-ai-c-status { grid-column: 1 / -1; min-width: 0; }
  .cw-ai-table td.is-empty, .cw-ai-table td.is-card-empty { display: none; }
  .cw-ai-table .cw-ai-c-status { display: flex; align-items: center; gap: 10px; }
  .cw-ai-table .cw-ai-c-status .cw-ai-lbl { display: inline; margin: 0; }
  .cw-ai-sub { display: block; margin: 2px 0 0; overflow-wrap: anywhere; }
  /* touch sizes: 44px targets on tablets as well as phones */
  .cw-ai-pill, .cw-ai-jump a, .cw-ai-lang summary, .cw-ai-more-deals summary { min-height: 44px; }
  .cw-ai-sliders input[type="range"] { height: 44px; }
  .cw-ai-tiers a, .cw-ai-deal-val a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; margin-left: -6px; }
  .cw-ai-tiers a { flex: 1 1 auto; }
  .cw-ai-lang li a { min-height: 44px; display: flex; align-items: center; }
  .cw-ai-tiers li { padding: 0; }
  .cw-ai-toggles { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 6px; margin: -6px; max-width: calc(100% + 12px); }
  .cw-ai-toggles .cw-ai-pill { flex: none; }
}

/* ---- phone ------------------------------------------------------------ */
@media (max-width: 760px) {
  .cw-ai-facts { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cw-ai-facts > div { flex-direction: row; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 16px; }
  .cw-ai-facts dd { margin: 0; padding: 0; font-size: 28px; }
  .cw-ai-scenarios { flex-wrap: wrap; }
  .cw-ai-jump a { padding: 0 14px; }
  .cw-ai-tiers li { flex-wrap: wrap; }
  .cw-ai-deals li { flex-direction: column; align-items: flex-start; gap: 0; padding: 10px 0; }
  .cw-ai-deal-val { justify-content: flex-start; text-align: left; }
  .cw-ai-search { max-width: none; flex-basis: 100%; }
  .cw-ai-filters > .cw-ai-select, .cw-ai-sortselect { flex: 1 1 calc(50% - 7px); min-width: 0; }
  .cw-ai-sortselect .cw-ai-select { width: 100%; }
  .cw-ai-bar { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .cw-ai-bar-track { grid-column: 1 / -1; grid-row: 2; }
  .cw-ai-bar-x { display: inline; margin-left: 6px; }
  .cw-ai-scatter-wide { display: none; }
  .cw-ai-scatter-compact { display: block; }
  .cw-ai-table tbody { grid-template-columns: minmax(0, 1fr); }
  .cw-ai-defs { grid-template-columns: minmax(0, 1fr); }
  .cw-ai-defs dt { padding: 16px 0 2px; box-shadow: none; }
  .cw-ai-defs dd { padding: 0 0 16px; }
  .cw-ai-tips li { padding-left: 42px; }
  .cw-ai-tips li::before { font-size: 28px; }
  .cw-ai-pick ol li { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .cw-ai-bar-track i, .cw-ai-lang summary::after { transition: none; }
}

@media (forced-colors: active) {
  .cw-ai-pill, .cw-ai-search, .cw-ai-select, .cw-ai-more-deals summary, .cw-ai-lang summary { border: 1px solid ButtonText; }
  .cw-ai-pill[aria-checked="true"], .cw-ai-pill[aria-pressed="true"] { background: Highlight; color: HighlightText; forced-color-adjust: none; }
  .cw-ai-bar-track i { background: Highlight; forced-color-adjust: none; }
  .cw-ai-chip { border: 1px solid CanvasText; }
  .cw-ai-scatter text { fill: CanvasText; forced-color-adjust: none; }   /* the chart is drawn on Canvas: black text on a black Canvas is invisible */
  .cw-ai-sortlabel::after { forced-color-adjust: none; color: CanvasText; }   /* the arrows are border triangles; forced border colours would make them identical boxes */
  th[aria-sort="ascending"] .cw-ai-sortlabel::after, th[aria-sort="descending"] .cw-ai-sortlabel::after { color: Highlight; }
}
