/* LLM model catalog: list with filters, comparison table, model page, task hubs (docs/llm-catalog-spec.md).
   Canon: design/DESIGN.md. Futura 400/500/700 only, one blue, flat fills, halos instead of borders, no uppercase / letter-spacing,
   no emoji, no gradients. Yellow is used for ONE thing here: the "Free" plaque and the dot of the "Free only" pill.
   Breakpoints: <=760 / 761-1025 / 1026-1440 / >1440. Every rule is scoped by body.cw-llm or .cw-llm-* ; tokens (--ai-*) come from ai-pricing.css. */

body.cw-llm { --ai-bar: 0px; }
/* The rubric draws its currency bar 6px wider than the column on each side (its pills sit at the column edge, its rule does not): here the bar is exactly the
   column, the rule is a border (not a shifted shadow), and the focus ring is drawn inside the pill, where the scroller cannot clip it. */
body.cw-llm .cw-ai-currencybar { position: static; margin: 18px 0 0; padding: 10px 0; box-shadow: none; border-bottom: 1px solid var(--ai-line); }
body.cw-llm .cw-ai-currencybar .cw-ai-pill:focus-visible { outline: 2px solid var(--ai-blue); outline-offset: -2px; }
body.cw-llm .cw-ai-currencybar .cw-ai-pill[aria-checked="true"]:focus-visible { outline-color: #fff; outline-offset: -4px; }
/* --cw-llm-tray (the fixed tray's height + 16px, 0 when it is empty) is measured by the script on <html>, next to --ai-consent, so the root's
   scroll padding can read it too: whatever the keyboard focuses, and the end of the page, clear both the tray and the cookie banner */
html:has(body.cw-llm) { --cw-llm-tray: 0px; scroll-padding-top: 16px; scroll-padding-bottom: calc(var(--ai-consent, 0px) + var(--cw-llm-tray, 0px) + var(--cw-llm-bar, 0px)); }
body.cw-llm :is(a[href], button, summary, input, select, [tabindex]) { scroll-margin-bottom: calc(var(--ai-consent, 0px) + var(--cw-llm-tray, 0px) + var(--cw-llm-bar, 0px)); }
/* Without script nothing measures a tray, and the sticky "Compare selected" bar (61px on a desktop, up to 137px on a phone) floats over the bottom of the screen: the
   focus is scrolled clear of it. The padding and the margin above add up, so 80px each clear the tallest bar seen (every language, 360 to 1280px). */
html:not(.cw-js):has(.cw-llm-nojs-bar) { --cw-llm-bar: 80px; }
body.cw-llm .cw-ai-main { padding-bottom: calc(clamp(48px, 5vw, 88px) + var(--cw-llm-tray, 0px)); }
body.cw-llm .cw-ai-footer { padding-bottom: calc(var(--ai-consent, 0px) + var(--cw-llm-tray, 0px) + 24px); }
body.cw-llm a.cw-ai-pill { display: inline-flex; align-items: center; text-decoration: none; }
body.cw-llm a.cw-ai-pill:hover { text-decoration: none; }

/* progressive enhancement: controls that need JavaScript exist only when the page has it; the no-JS bar only without it */
html:not(.cw-js) .cw-llm-needs-js, html:not(.cw-js) .cw-ai-currencybar { display: none !important; }
html.cw-js .cw-llm-nojs, html.cw-js .cw-llm-nojs-bar, html.cw-js .cw-llm-flt-apply { display: none !important; }
html.cw-js .cw-llm-flt-apply.is-partial { display: inline-flex !important; }

/* ---- hero ------------------------------------------------------------------------------------------ */
.cw-llm-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'copy' 'facts'; }
.cw-llm-hero .cw-ai-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
.cw-llm-hero .cw-llm-factbox { grid-area: facts; min-width: 0; }   /* the catalog's two figures and their note: one box in the grid area (a note is not a child of the dl) */
.cw-llm-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; }
.cw-llm-links a { color: var(--ai-blue); font-weight: 500; }
.cw-llm-crumbs { font-size: 14px; color: var(--ai-mute); margin: 0 0 6px; }
.cw-llm-crumbs a { color: var(--ai-blue); }
.cw-llm-fact-small { font-size: clamp(18px, 1.5vw, 24px) !important; line-height: 1.2 !important; }
.cw-llm-facts a { color: inherit; text-decoration: none; }
@media (hover: hover) { .cw-llm-facts a:hover { text-decoration: underline; } }
.cw-llm-nodata { margin-top: 24px; }
@media (min-width: 1026px) {
  .cw-llm-hero { grid-template-columns: minmax(0, 1fr) minmax(280px, 34%); grid-template-areas: 'copy facts'; align-items: start; }   /* the figures sit level with the headline, not at the foot of a tall copy column */
}

/* ---- the Free plaque: the only yellow ------------------------------------------------------------------ */
span.cw-llm-free {
  display: inline-block; padding: 4px 10px; border-radius: 6px; background: var(--ai-yellow); color: #000;
  font-size: 15px; font-weight: 700; line-height: 1.25; white-space: nowrap;
}
.cw-llm-free-lg { font-size: 18px; padding: 5px 12px; }
.cw-llm-pill-free::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--ai-yellow); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); vertical-align: 1px; }
.cw-llm-pill-free[aria-pressed="true"]::before { box-shadow: none; }
.cw-llm-caveat { margin: 10px 0 0; padding: 12px 16px; border-radius: var(--ai-r); background: var(--ai-card); font-size: 15px; line-height: 1.45; max-width: 74ch; }

/* ---- task row ------------------------------------------------------------------------------------------- */
.cw-llm-tasks { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.cw-llm-tasks .cw-ai-pill small { font-size: 12px; font-weight: 500; opacity: .75; margin-left: 4px; }
.cw-llm-tasks .cw-ai-pill[aria-pressed="true"] small { opacity: 1; }

/* ---- layout: filter sidebar + list ------------------------------------------------------------------------ */
.cw-llm-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.cw-llm-flt-toggle { list-style: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--ai-line); font-size: 15px; font-weight: 500; user-select: none; }
.cw-llm-flt-toggle::-webkit-details-marker { display: none; }
.cw-llm-flt-box[open] > .cw-llm-flt-toggle { box-shadow: inset 0 0 0 1px var(--ai-blue); color: var(--ai-blue); }
.cw-llm-flt-box > .cw-llm-flt-group, .cw-llm-flt-box > .cw-llm-opt-solo, .cw-llm-flt-actions { margin-top: 18px; }
.cw-llm-flt-box > .cw-llm-flt-cur { margin-top: 12px; }
.cw-llm-flt-group { border: 0; padding: 0; margin: 0 0 0; min-width: 0; }
.cw-llm-flt-group legend, .cw-llm-flt-legend { padding: 0; margin: 0 0 6px; font-size: 15px; font-weight: 700; }
/* the currency group of the panel: pills that wrap inside the column (the page's own bar is a scrolling strip); no rule under it */
body.cw-llm .cw-llm-flt .cw-ai-currencybar { margin: 0; padding: 0; border: 0; background: transparent; min-height: 0; overflow: visible; flex-wrap: wrap; gap: 6px; }
body.cw-llm .cw-llm-flt .cw-ai-currencybar .cw-ai-pill { padding: 0 12px; }
.cw-llm-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; line-height: 1.3; cursor: pointer; }
.cw-llm-opt input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--ai-blue); }
.cw-llm-opt span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cw-llm-opt small { flex: none; font-size: 13px; color: var(--ai-mute); font-variant-numeric: tabular-nums; }
.cw-llm-opt.is-zero > span, .cw-llm-opt.is-zero > small { opacity: .5; }
.cw-llm-hint { margin: 2px 0 8px; font-size: 13px; line-height: 1.4; color: var(--ai-mute); }
.cw-llm-more summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-size: 15px; font-weight: 500; color: var(--ai-blue); }
.cw-llm-flt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cw-llm-reset { color: var(--ai-blue); font-size: 15px; font-weight: 500; }
@media (min-width: 1026px) {
  .cw-llm-layout { grid-template-columns: 264px minmax(0, 1fr); gap: clamp(24px, 2.4vw, 40px); }
  /* the panel is taller than the screen: its scrollbar is a thin one that stays on screen (an overlay bar would hide itself, and with it the
     fact that Context, Features and Added are further down). A styled ::-webkit-scrollbar is what keeps it on screen in Chrome and Safari (the standard
     scrollbar-width would switch that off again, so it is for the engines that do not know the pseudo-element). */
  .cw-llm-flt { position: sticky; top: 16px; max-height: calc(100vh - 32px - var(--cw-llm-tray, 0px)); overflow: auto; padding: 4px 8px 4px 2px; margin: -4px -8px -4px -2px; }
  .cw-llm-flt::-webkit-scrollbar { width: 8px; }
  .cw-llm-flt::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .3); border-radius: 4px; }
  .cw-llm-flt::-webkit-scrollbar-track { background: transparent; }
  @supports not selector(::-webkit-scrollbar) { .cw-llm-flt { scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, .35) transparent; } }
  .cw-llm-flt-toggle { display: none; }
  .cw-llm-flt-box > .cw-llm-flt-cur { margin-top: 0; }
  .cw-llm-opt { min-height: 34px; }
  body.cw-llm .cw-llm-flt .cw-ai-currencybar .cw-ai-pill { min-height: 34px; padding: 0 11px; font-size: 14px; }
}
@media (min-width: 1441px) { .cw-llm-layout { grid-template-columns: 280px minmax(0, 1fr); } }

/* ---- toolbar, captions ------------------------------------------------------------------------------------ */
.cw-llm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.cw-llm-toolbar .cw-ai-search { flex: 1 1 240px; min-width: 0; }
.cw-llm-sort { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
/* the count and "How to read this list" share a line; opened, the explanation takes the full width under the count */
.cw-llm-countrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 18px; margin: 12px 0 0; }
.cw-llm-count { margin: 0; font-weight: 500; }
.cw-llm-read { margin: 6px 0 14px; max-width: 74ch; }
.cw-llm-countrow .cw-llm-read { margin: 0; }
.cw-llm-countrow .cw-llm-read[open] { flex: 1 1 100%; max-width: none; margin-bottom: 8px; }   /* the count line goes above it, not beside it: the 74ch limit belongs to the text, not to the box */
.cw-llm-read summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; font-size: 15px; font-weight: 500; color: var(--ai-blue); }
.cw-llm-read p { margin: 6px 0; font-size: 15px; line-height: 1.45; max-width: 74ch; }
@media (min-width: 761px) { .cw-llm-phone-only { display: none; } }   /* what the phone's first screen moved here is still in the hero, in full, on a wide one */
@media (min-width: 1026px) { .cw-llm-narrow-only { display: none; } }   /* the note under the hero's two figures: a tablet draws no figures either, so its note is here */

/* ---- the list: one halo container on desktop, cards below --------------------------------------------------- */
.cw-llm-list { list-style: none; margin: 14px 0 0; padding: 0; background: #fff; border-radius: var(--ai-r); box-shadow: var(--ai-halo); }
.cw-llm-item {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 190px); gap: 10px clamp(14px, 2vw, 28px);
  padding: 16px clamp(14px, 1.6vw, 22px); background: #fff;
}
@media (hover: hover) { .cw-llm-item:hover { background: var(--ai-card); } }
.cw-llm-item[hidden] { display: none; }
/* a selected row stays white (its chips keep their tint, so they do not melt into the row) and wears a 2px ring of the one blue */
.cw-llm-item.is-selected { background: #fff; box-shadow: inset 0 0 0 2px var(--ai-blue); }
/* Desktop: one halo container. Its corners are cut by the container, not drawn by the first and last row (the instant filter hides rows, and
   :first-child / :last-child still point at the hidden ones); the hairline is the top border of every visible row that has a visible row before it. */
@media (min-width: 1026px) {
  .cw-llm-list { overflow: hidden; overflow: clip; }
  .cw-llm-item:where(:not([hidden])) ~ .cw-llm-item:where(:not([hidden])) { border-top: 1px solid var(--ai-line); }
}
.cw-llm-id { min-width: 0; }
.cw-llm-name { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.cw-llm-name a { color: #000; text-decoration: none; }
.cw-llm-name a::after { content: ""; position: absolute; inset: 0; }
@media (hover: hover) { .cw-llm-name a:hover { color: var(--ai-blue); text-decoration: none; } }
.cw-llm-name a:focus-visible { outline: 2px solid var(--ai-blue); outline-offset: 2px; }
.cw-llm-meta, .cw-llm-specs { margin: 3px 0 0; font-size: 13px; line-height: 1.4; color: var(--ai-mute); overflow-wrap: anywhere; }
.cw-llm-chips { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 1; }
/* a chip inherits white-space: nowrap from the rubric: a long text (the value claim of a hub, in any of ten languages) wraps inside its row instead of running off the screen */
.cw-llm-chips .cw-ai-chip, .cw-llm-chip { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
/* The text and its band are one flow, not two flex items: as items they shrank to a letter each ("Obere/s/Zehnt/el") instead of wrapping at the space.
   A pill of two or three lines would be an oval. The twin chip keeps its 44px pill on phones. */
.cw-llm-chips .cw-ai-chip:not(.cw-llm-chip-twin) { display: block; border-radius: 14px; }
/* the band is one piece ("Top 10 %" never breaks inside) and stands apart from the task name by a gap, not by a character in the markup */
.cw-llm-chips .cw-ai-chip:not(.cw-llm-chip-twin) b { margin-left: 6px; white-space: nowrap; }
.cw-llm-chip { text-decoration: none; }
.cw-llm-chip b { font-weight: 700; }
body.cw-llm .cw-ai-chip b { font-weight: 700; margin-left: 6px; }
@media (hover: hover) { a.cw-llm-chip:hover { background: var(--ai-blue); color: #fff; text-decoration: none; } }
.cw-llm-chip-twin { box-shadow: inset 0 0 0 1px var(--ai-blue); background: #fff; }
/* The strip is as wide as the card and sits above the card's stretched link (z-index 1, so that its own links can be pressed): what is not a link in it lets the
   press through to the card's link, so no part of a card is dead. A chip with a tooltip keeps it where there is a pointer to hover. (Under 1026px the task chips are
   inert as well, see the touch rules below: the press goes to the card.) */
.cw-llm-chips { pointer-events: none; }
.cw-llm-chips a { pointer-events: auto; }
@media (hover: hover) { .cw-llm-chips [title] { pointer-events: auto; } }
.cw-llm-chip-end { white-space: normal; }
.cw-llm-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ai-red); margin-right: 6px; vertical-align: 1px; }
/* "no cheaper model" and the saving chips: the rubric fills them solid green, which on a hub is the loudest thing in every row, louder than the price.
   Here they are the soft chip of the other facts with a green dot: the same signal, a quieter voice. They wrap like any chip. */
body.cw-llm .cw-ai-chip-save { background: var(--ai-tint); color: var(--ai-blue); font-weight: 500; min-width: 0; white-space: normal; border-radius: 14px; text-align: left; }
body.cw-llm .cw-ai-chip-save::before { content: ""; display: inline-block; flex: none; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--ai-green); vertical-align: 1px; }
.cw-llm-cost { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; min-width: 0; }
.cw-llm-price { font-size: 18px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cw-llm-sub { display: block; font-size: 12px; line-height: 1.35; color: var(--ai-mute); overflow-wrap: anywhere; }
.cw-llm-warn { color: #000; font-weight: 500; }
.cw-llm-step { color: #000; }
.cw-llm-pick { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; margin-top: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.cw-llm-pick input { width: 20px; height: 20px; margin: 0; accent-color: var(--ai-blue); }
/* a full tray refuses another tick: the box AND its words go dim (script sets .is-full on the label of every unticked row) */
.cw-llm-pick.is-full { opacity: .5; }
.cw-llm-pick input[aria-disabled="true"] { cursor: not-allowed; }
.cw-llm-pick.is-full, .cw-llm-pick.is-full span { cursor: not-allowed; }
.cw-llm-why { margin: 6px 0 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.cw-llm-why b { font-weight: 700; }
.cw-llm-hubrow .cw-llm-chips { margin-top: 6px; }
.cw-llm-group { margin-top: clamp(24px, 2.6vw, 40px); }
.cw-llm-group h2 { margin: 0; font-size: clamp(22px, 1.95vw, 30px); font-weight: 700; }
.cw-llm-group h2 small { font-size: 15px; font-weight: 500; color: var(--ai-mute); margin-left: 6px; }
.cw-llm-order { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 8px; font-size: 15px; font-weight: 500; }
.cw-llm-freestrip { margin: 18px 0 0; padding: 14px 18px; border-radius: var(--ai-r); background: var(--ai-card); }
.cw-llm-freestrip p { margin: 6px 0; font-size: 15px; line-height: 1.5; }
.cw-llm-assume { max-width: 90ch; }

/* ---- pager ----------------------------------------------------------------------------------------------- */
.cw-llm-pager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 22px 0 0; }
.cw-llm-pager a, .cw-llm-pager span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--ai-line); font-size: 15px; font-weight: 500; color: #000; text-decoration: none; background: #fff; }
@media (hover: hover) { .cw-llm-pager a:hover { box-shadow: inset 0 0 0 1px var(--ai-blue); color: var(--ai-blue); } }
.cw-llm-pager span[aria-current] { background: var(--ai-blue); color: #fff; box-shadow: none; }
.cw-llm-pager i { font-style: normal; color: var(--ai-mute); }

/* ---- no-JS compare bar and the tray ------------------------------------------------------------------------ */
/* z-index 2: the chips and the pick labels of the rows above it sit at 1, and a button that a chip paints over is a button nobody can press */
.cw-llm-nojs-bar { position: sticky; bottom: 0; z-index: 2; margin-top: 18px; padding: 10px 0; background: #fff; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cw-llm-nojs-bar .cw-ai-note { margin: 0; }
.cw-llm-submit { background: var(--ai-blue); color: #fff; box-shadow: none; font-weight: 700; }
@media (hover: hover) { .cw-llm-submit:hover { background: var(--ai-blue-hover); color: #fff; } }
.cw-llm-tray {
  position: fixed; left: 50%; bottom: calc(var(--ai-consent, 0px) + 8px); transform: translateX(-50%); z-index: 30;
  width: min(92vw, 1325px); box-sizing: border-box; padding: 10px 16px; background: #fff; border-radius: var(--ai-r); box-shadow: 0 0 26px rgba(0, 0, 0, .16);
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
}
.cw-llm-tray[hidden] { display: none; }
.cw-llm-tray-title { font-size: 15px; font-weight: 700; }
.cw-llm-tray-count { font-size: 15px; font-weight: 500; }
.cw-llm-tray-need, .cw-llm-tray-full { font-size: 14px; color: var(--ai-mute); }
.cw-llm-tray-full { font-weight: 700; color: #000; }
/* list and Clear travel together: beside the other parts of the one row here, the opened drawer on a phone */
.cw-llm-tray-panel { display: contents; }
.cw-llm-tray-list { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 200px; min-width: 0; list-style: none; margin: 0; padding: 0; }
.cw-llm-tray-item { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 4px 0 14px; border-radius: 999px; background: var(--ai-tint); color: var(--ai-blue); font-size: 14px; font-weight: 500; max-width: 100%; }
.cw-llm-tray-item span { overflow-wrap: anywhere; }
.cw-llm-tray button { font: inherit; cursor: pointer; }
.cw-llm-tray-x { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--ai-blue); font-size: 24px; line-height: 1; }
@media (hover: hover) { .cw-llm-tray-x:hover { background: var(--ai-blue); color: #fff; } }
.cw-llm-tray-clear { min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--ai-line); font-size: 15px; font-weight: 500; }
.cw-llm-tray-go { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: 999px; background: var(--ai-blue); color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; }
@media (hover: hover) { .cw-llm-tray-go:hover { background: var(--ai-blue-hover); color: #fff; text-decoration: none; } }
.cw-llm-tray-go[aria-disabled="true"] { background: var(--ai-tint); color: var(--ai-blue); cursor: not-allowed; }
.cw-llm-tray-toggle { display: none; }

/* ---- the comparison table ------------------------------------------------------------------------------- */
.cw-llm-chead h1 { margin: 6px 0 8px; font-size: clamp(28px, 3vw, 46px); font-weight: 700; line-height: 1.12; }
.cw-llm-ctools { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; margin: 18px 0 8px; }
.cw-llm-addform { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; }
.cw-llm-addform label { font-size: 15px; font-weight: 500; flex-basis: 100%; }
.cw-llm-addform .cw-ai-search { min-width: 240px; }
.cw-llm-legend { margin: 6px 0 0; }
.cw-llm-toolrow { display: contents; }   /* beside the field on a wide screen the three pills are items of the tools row itself */
.cw-llm-found { margin: 12px 0; padding: 12px 18px; border-radius: var(--ai-r); background: var(--ai-card); }
.cw-llm-found h2 { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.cw-llm-found ul { margin: 0; padding-left: 18px; }
.cw-llm-found li { min-height: 32px; }
.cw-llm-found a { color: var(--ai-blue); font-weight: 500; }
.cw-llm-empty, .cw-llm-one { margin: 20px 0; padding: 18px 22px; border-radius: var(--ai-r); background: var(--ai-card); max-width: 74ch; }
.cw-llm-empty h2, .cw-llm-one h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.cw-llm-jump { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 6px; font-size: 15px; font-weight: 500; }
.cw-llm-jump a { color: var(--ai-blue); }
.cw-llm-jump[hidden], .cw-llm-jump a[hidden] { display: none; }   /* the switch for differences hides the groups it empties (display below would win over [hidden]) */
.cw-llm-scroller { overflow-x: auto; margin: 12px 0 0; border-radius: var(--ai-r); }
.cw-llm-scroller:focus-visible { outline: 2px solid var(--ai-blue); outline-offset: 2px; }
table.cw-llm-cmp { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: var(--ai-r); box-shadow: var(--ai-halo); table-layout: fixed; min-width: 560px; }
.cw-llm-cmp th, .cw-llm-cmp td { padding: 12px 14px; text-align: left; vertical-align: top; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; font-weight: 400; }
.cw-llm-cmp tbody tr:not(.cw-llm-grouprow) > * { border-top: 1px solid var(--ai-line); }
.cw-llm-cmp thead th { position: sticky; top: 0; z-index: 3; background: #fff; font-weight: 700; padding-right: 50px; border-bottom: 1px solid var(--ai-line); }
.cw-llm-cmp thead th a { color: #000; text-decoration: none; font-size: 16px; }
@media (hover: hover) { .cw-llm-cmp thead th a:hover { color: var(--ai-blue); } }
.cw-llm-cmp thead th small { display: block; margin-top: 3px; font-size: 13px; font-weight: 400; color: var(--ai-mute); }
.cw-llm-corner, .cw-llm-cmp tbody th[scope="row"] { width: 208px; }
.cw-llm-cmp tbody th[scope="row"] { font-size: 15px; font-weight: 500; }
.cw-llm-cmp tbody th[scope="row"] small { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; color: var(--ai-mute); }
.cw-llm-grouprow th { background: var(--ai-card); font-size: 16px; font-weight: 700; padding: 10px 14px; }
.cw-llm-remove { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; display: inline-flex !important; align-items: center; justify-content: center; border-radius: 50%; color: var(--ai-blue) !important; font-size: 24px !important; line-height: 1; }
@media (hover: hover) { .cw-llm-remove:hover { background: var(--ai-tint); } }
.cw-llm-cmp thead th { position: sticky; }
.cw-llm-cmp .cw-llm-colhead { position: sticky; }
/* the corner above the label column is a header cell too: sticky and solid, so the labels and group headings that scroll under the header do not show through it */
.cw-llm-cmp thead .cw-llm-corner { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid var(--ai-line); }
/* a link inside a cell ("Yes" for the weights, "Free version") is the one blue of the page, not the browser's */
.cw-llm-cmp td a { color: var(--ai-blue); }
/* From 761px the header row sticks to the window, so a jump link (and the focus) must put the group below it, not behind it. The script writes the height it measured
   on <html> (the header grows with long names and a narrow window); without script 170px covers the tallest header seen (four long names at 768px). */
@media (min-width: 761px) { html:has(body.cw-llm .cw-llm-cmp) { scroll-padding-top: calc(var(--cw-llm-cmp-head, 162px) + 8px); } }
/* the leading figure of a row: a tone and a heavier weight (the words "leading figure" are in the cell for assistive technology; forced colours get a border below) */
td.cw-llm-best { background: var(--ai-tint); font-weight: 700; }
td.cw-llm-best .cw-ai-chip { background: #fff; }
.cw-llm-cmp tr[hidden] { display: none; }
.cw-llm-printsource { display: none; }
.cw-llm-swipe { display: none; }

/* ---- model page ------------------------------------------------------------------------------------------ */
.cw-llm-mhead { padding-top: clamp(20px, 2.4vw, 40px); }
.cw-llm-mtitle { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.cw-llm-mtitle h1 { margin: 0; font-size: clamp(30px, 3.2vw, 52px); font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; }
.cw-llm-mhead .cw-llm-meta { font-size: 15px; margin-top: 8px; }
.cw-llm-mhead code { font: inherit; font-size: 13px; overflow-wrap: anywhere; word-break: break-all; }   /* the site's own font (the canon has no monospace); an id of 40 characters with no space wraps anywhere */
.cw-llm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 16px 0 0; }
.cw-llm-actions .cw-llm-pick { margin: 0; }
.cw-llm-two { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ai-gap); margin-top: var(--ai-gap); align-items: start; }
@media (min-width: 1026px) { .cw-llm-two { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.cw-llm-box { background: #fff; border-radius: var(--ai-r); box-shadow: var(--ai-halo); padding: clamp(18px, 1.8vw, 26px); min-width: 0; }
.cw-llm-box h2, .cw-llm-callout h2 { margin: 0 0 10px; font-size: clamp(20px, 1.5vw, 24px); font-weight: 700; }
.cw-llm-box h3 { margin: 18px 0 6px; font-size: 16px; font-weight: 700; }
.cw-llm-bigprice { margin: 0; font-size: clamp(34px, 3vw, 48px); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cw-llm-steps { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; }
.cw-llm-steps dt { font-size: 14px; color: var(--ai-mute); }
.cw-llm-steps dd { margin: 0; font-size: 15px; font-weight: 500; }
.cw-llm-fit { padding: 14px 0 12px; margin-top: 8px; border-top: 1px solid var(--ai-line); }
.cw-llm-cost-line { margin: 8px 0 0; font-size: 14px; line-height: 1.45; }
.cw-llm-cost-line .cw-llm-sub { margin-top: 2px; }
.cw-llm-fit h3 { margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 17px; }
.cw-llm-fit h3 a { color: #000; text-decoration: none; }
@media (hover: hover) { .cw-llm-fit h3 a:hover { color: var(--ai-blue); } }
.cw-llm-callout { margin-top: var(--ai-gap); padding: 18px 22px; border-radius: var(--ai-r); background: var(--ai-card); max-width: 90ch; }
.cw-llm-callout p { margin: 6px 0; font-size: 16px; line-height: 1.45; }
.cw-llm-alts { list-style: none; margin: 10px 0 0; padding: 0; background: #fff; border-radius: var(--ai-r); box-shadow: var(--ai-halo); }
.cw-llm-alts li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 18px; font-size: 15px; }
.cw-llm-alts li + li { border-top: 1px solid var(--ai-line); }
.cw-llm-alts a:not(.cw-ai-pill) { color: #000; text-decoration: none; }
@media (hover: hover) { .cw-llm-alts a:not(.cw-ai-pill):hover { color: var(--ai-blue); } }
.cw-llm-alts .cw-ai-pill { margin-left: auto; }
.cw-llm-tablewrap { overflow-x: auto; margin-top: 12px; background: #fff; border-radius: var(--ai-r); box-shadow: var(--ai-halo); }
.cw-llm-ptable, .cw-llm-btable { width: 100%; border-collapse: collapse; }
.cw-llm-ptable th, .cw-llm-ptable td, .cw-llm-btable th, .cw-llm-btable td { padding: 10px 14px; text-align: left; vertical-align: top; font-size: 15px; font-weight: 400; overflow-wrap: anywhere; }
.cw-llm-ptable thead th, .cw-llm-btable thead th { font-weight: 700; border-bottom: 1px solid var(--ai-line); }
.cw-llm-ptable tbody tr + tr > *, .cw-llm-btable tbody tr + tr > * { border-top: 1px solid var(--ai-line); }
.cw-llm-ptable tbody th[scope="row"], .cw-llm-btable tbody th[scope="row"] { font-weight: 500; }
.cw-llm-btable small { font-size: 12px; font-weight: 400; color: var(--ai-mute); }
/* the figure is one piece at every width; "anywhere" would let the table shrink its column to a letter ("1,262" torn into "1," "26" "2") */
.cw-llm-btable th, .cw-llm-btable td { overflow-wrap: break-word; }
.cw-llm-btable td:nth-child(2) { white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.cw-llm-prow-more { display: none; }
.cw-llm-plist { margin: 8px 0 0; padding-left: 20px; font-size: 15px; line-height: 1.6; }
.cw-llm-defs { margin: 0; display: grid; grid-template-columns: minmax(130px, 40%) minmax(0, 1fr); gap: 8px 16px; }
.cw-llm-defs dt { font-size: 14px; color: var(--ai-mute); }
.cw-llm-defs dd { margin: 0; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.cw-llm-defs dd small { font-weight: 400; color: var(--ai-mute); }
.cw-llm-defs a { color: var(--ai-blue); }
.cw-llm-method { margin-top: clamp(28px, 3vw, 48px); }

/* ---- tablet and phone ----------------------------------------------------------------------------------- */
@media (max-width: 1025px) {
  .cw-llm-item { grid-template-columns: minmax(0, 1fr); }
  .cw-llm-list { background: transparent; box-shadow: none; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cw-llm-item { border-radius: var(--ai-r); box-shadow: var(--ai-halo); padding: 16px 18px; }
  .cw-llm-item.is-selected { box-shadow: inset 0 0 0 2px var(--ai-blue), var(--ai-halo); }
  .cw-llm-cost { align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; gap: 4px 12px; }
  .cw-llm-cost .cw-llm-sub { flex-basis: 100%; }
  .cw-llm-pick { margin-left: auto; min-height: 44px; flex-basis: auto; }
  .cw-llm-tasks .cw-ai-pill, .cw-llm-pill-free { min-height: 44px; }
  .cw-llm-flt-box:not([open]) > :not(summary) { display: none; }
  .cw-llm-pager a, .cw-llm-pager span { min-width: 44px; height: 44px; }
  .cw-llm-found li { min-height: 44px; display: flex; align-items: center; }
  .cw-llm-ptable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .cw-llm-ptable, .cw-llm-ptable tbody, .cw-llm-ptable tr, .cw-llm-ptable th, .cw-llm-ptable td { display: block; }
  .cw-llm-ptable tbody { display: grid; gap: 12px; }
  .cw-llm-ptable tr { padding: 12px 14px; border-radius: var(--ai-r); box-shadow: var(--ai-halo); }
  .cw-llm-ptable tbody tr + tr > * { border-top: 0; }
  .cw-llm-ptable td { padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; }
  .cw-llm-ptable td::before { content: attr(data-label); color: var(--ai-mute); font-size: 14px; }
  .cw-llm-ptable th, .cw-llm-ptable td { padding-left: 0; padding-right: 0; }
  .cw-llm-tablewrap { background: transparent; box-shadow: none; }
  .cw-llm-alts .cw-ai-pill { margin-left: 0; width: 100%; justify-content: center; min-height: 44px; }
  .cw-llm-remove { width: 44px; height: 44px; }
}
@media (max-width: 760px) {
  .cw-llm-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cw-llm-tasks { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -6px; margin-right: -6px; padding: 4px 6px; }
  .cw-llm-tasks::-webkit-scrollbar { display: none; }
  .cw-llm-tasks .cw-ai-pill { flex: none; }
  .cw-llm-toolbar { gap: 10px; }
  /* the label sits above a select as wide as the page: the longest option of any of the ten languages fits whole (no clipped half-word) */
  .cw-llm-sort { flex: 1 1 100%; min-width: 0; max-width: 100%; flex-direction: column; align-items: stretch; gap: 4px; font-size: 14px; }
  .cw-llm-sort select { width: 100%; min-width: 0; text-overflow: ellipsis; }   /* 16px stays: a smaller field makes iOS zoom the page in on focus; a text that still does not fit ends in an ellipsis, not mid-letter */
  .cw-llm-defs { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .cw-llm-defs dd { margin-bottom: 8px; }
  /* the tray is ONE row, [Selected: 3 of 4 v] [Compare]; the chosen models and Clear are in the drawer that the toggle opens above the row */
  .cw-llm-tray { padding: 4px 8px 4px 14px; gap: 8px; flex-wrap: wrap; }
  .cw-llm-tray-title, .cw-llm-tray-count, .cw-llm-tray-full, .cw-llm-tray-panel { display: none; }
  /* with ONE model picked Compare does nothing, and this line (it exists only then) is what says why: above the row, whole width */
  .cw-llm-tray-need { display: block; flex: 1 1 100%; order: -1; font-size: 14px; line-height: 1.3; }
  .cw-llm-tray.is-open .cw-llm-tray-panel { display: flex; flex-direction: column; flex-basis: 100%; order: -1; gap: 8px; padding: 6px 0 4px; }
  .cw-llm-tray.is-open .cw-llm-tray-list { flex: 0 1 auto; max-height: 40vh; overflow: auto; }
  .cw-llm-tray-toggle { display: inline-flex; align-items: center; flex: 1 1 auto; min-height: 44px; min-width: 0; border: 0; background: transparent; font-size: 15px; font-weight: 500; text-align: left; padding: 0; }
  .cw-llm-tray-clear { min-height: 44px; align-self: flex-start; }
  .cw-llm-tray-go { flex: none; justify-content: center; }
  .cw-llm-tray.is-open .cw-llm-tray-item { flex: 1 1 100%; min-height: 44px; }
  .cw-llm-swipe { display: block; }
  /* the comparison: the row label sits above the values and stays pinned; two models fill the width, three or four scroll sideways */
  table.cw-llm-cmp { min-width: 0; table-layout: auto; --cols: 2; }
  table.cw-llm-cols-3 { --cols: 3; }
  table.cw-llm-cols-4 { --cols: 4; }
  table.cw-llm-cols-1 { --cols: 1; }
  .cw-llm-cmp, .cw-llm-cmp thead, .cw-llm-cmp tbody, .cw-llm-cmp tr, .cw-llm-cmp th, .cw-llm-cmp td { display: block; }
  .cw-llm-cmp thead tr, .cw-llm-cmp tr[data-row] { display: grid; grid-template-columns: repeat(var(--cols), minmax(138px, 1fr)); }
  table.cw-llm-cols-1 thead tr, table.cw-llm-cols-1 tr[data-row], table.cw-llm-cols-2 thead tr, table.cw-llm-cols-2 tr[data-row] { min-width: 100%; }
  .cw-llm-cmp .cw-llm-corner { display: none; }
  .cw-llm-cmp thead th { padding: 10px 44px 10px 12px; }
  .cw-llm-cmp thead th small { display: none; }
  .cw-llm-cmp tbody th[scope="row"] { grid-column: 1 / -1; width: auto; position: sticky; left: 0; padding: 12px 12px 2px; font-size: 14px; color: var(--ai-mute); box-shadow: none; background: #fff; }
  .cw-llm-cmp tbody th[scope="row"] small { display: none; }
  .cw-llm-cmp td { padding: 4px 12px 12px; }
  .cw-llm-cmp tbody tr:not(.cw-llm-grouprow) > * { border-top: 0; }
  .cw-llm-cmp tr[data-row] { border-top: 1px solid var(--ai-line); }
  .cw-llm-grouprow { display: block; position: sticky; left: 0; }
  .cw-llm-grouprow th { width: auto; }
  .cw-llm-cmp tr[hidden] { display: none; }
}
@media (min-width: 1441px) { .cw-llm-cmp th, .cw-llm-cmp td { font-size: 16px; } }


/* ---- round 2 (design critique): first screen, phone cards, filter panel, hubs, touch targets ---------------------------------- */
.cw-llm-hero { padding-top: clamp(14px, 1.8vw, 30px); }
.cw-llm-hero h1 { margin: 12px 0 10px; font-size: clamp(28px, 2.8vw, 44px); }
.cw-llm-hero .cw-ai-lead { font-size: clamp(16px, 1.1vw, 19px); }
.cw-llm-factnote { margin: 8px 0 0; font-size: 13px; line-height: 1.4; color: var(--ai-mute); }
.cw-llm-pill-free { margin-right: clamp(6px, 1vw, 16px); }
.cw-llm-taskline { margin: 14px 0 0; font-size: 15px; font-weight: 500; }
.cw-llm-taskline[hidden] { display: none; }
.cw-llm-taskline a { color: var(--ai-blue); }
.cw-llm-freestrip a { color: var(--ai-blue); font-weight: 500; }
.cw-llm-freestrip .cw-llm-sub { margin: 8px 0 0; font-size: 14px; }
.cw-llm-srcchip { margin-right: 6px; }
.cw-llm-flt-actions { align-items: center; }
.cw-llm-reset { display: inline-flex; align-items: center; min-height: 44px; }
.cw-llm-flt-go { display: none; }
@media (max-width: 1025px) {
  .cw-llm-links a, .cw-llm-read summary, .cw-llm-taskline a { display: inline-flex; align-items: center; min-height: 44px; }
  .cw-llm-chip-twin { min-height: 44px; padding: 0 14px; }
  .cw-llm-chip:not(.cw-llm-chip-twin):not(.cw-llm-chip-more) { pointer-events: none; }   /* the whole card is already a link; a 22px chip would be a trap for a thumb */
  /* "+N" is a link of its own (to the model's full list of tasks): the chip stays small, its touch target does not - the pad is drawn by nothing */
  .cw-llm-chip-more { position: relative; }
  .cw-llm-chip-more::after { content: ""; position: absolute; inset: -11px 0 -11px -16px; }   /* to the start side only: nothing hangs over the chip's right edge, so it never scrolls */
  .cw-llm-tray-x { width: 44px; height: 44px; font-size: 30px; }
  .cw-llm-tray-clear { min-height: 44px; }
  .cw-llm-tray-item { padding-left: 14px; }
  .cw-llm-tray-item .cw-llm-tray-x { margin-left: auto; }
  html.cw-js .cw-llm-flt-go { display: inline-flex; position: sticky; bottom: calc(var(--ai-consent, 0px) + var(--cw-llm-tray, 0px) + 8px); margin-top: 14px; width: 100%; justify-content: center; align-items: center; min-height: 48px; border: 0; border-radius: 999px; background: var(--ai-blue); color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; z-index: 5; }
  @media (hover: hover) { html.cw-js .cw-llm-flt-go:hover { background: var(--ai-blue-hover); } }
  html.cw-js .cw-llm-flt-go:disabled { background: var(--ai-tint); color: var(--ai-blue); cursor: not-allowed; }   /* nothing matches: the button has nothing to show */
  .cw-llm-flt-toggle .cw-llm-flt-n { margin-left: 8px; font-weight: 700; color: var(--ai-blue); }
  .cw-llm-flt-toggle::after { content: ""; width: 7px; height: 7px; margin-left: 12px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
  .cw-llm-flt-box[open] > .cw-llm-flt-toggle::after { transform: translateY(1px) rotate(-135deg); }
  .cw-llm-tray-toggle::after { content: ""; flex: none; width: 7px; height: 7px; margin-left: 12px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(1px) rotate(-135deg); }
  .cw-llm-tray.is-open .cw-llm-tray-toggle::after { transform: translateY(-2px) rotate(45deg); }
}
@media (max-width: 1025px) {
  /* first screen: the two figures of the hero repeat the Free pill and the count line, and take the height of a card that belongs to the list (a tablet shows two cards
     of the list below the fold with them); the note under them is in "How to read this list" instead (catalog.ejs) */
  .cw-llm-hero .cw-ai-facts, .cw-llm-hero .cw-llm-factbox, .cw-llm-factnote { display: none; }
  /* The card of a tablet and a phone (the cards are about as wide on both). A header of two columns: name, vendor line and figures at the start, the price (and the box to
     tick) at the end, level with the name; the chips and every line of evidence run the full width under it. The two wrappers of the markup (.cw-llm-id, and the hub rows'
     text) dissolve into the grid so each line can be placed by itself; the third row takes whatever height the price column needs, so the name and the vendor line stay together. */
  /* the price column is capped: with `auto` its longest sub-line (a German or Spanish price caption) took the whole card and left the name 44px */
  .cw-llm-item { grid-template-columns: minmax(0, 1fr) fit-content(46%); grid-template-rows: auto auto 1fr; align-items: start; padding: 12px 14px; gap: 3px 12px; }
  .cw-llm-id { display: contents; }
  .cw-llm-id > * { grid-column: 1 / -1; }
  .cw-llm-id > .cw-llm-name { grid-column: 1; grid-row: 1; }
  .cw-llm-id > .cw-llm-meta { grid-column: 1; grid-row: 2; margin: 0; }
  .cw-llm-id > .cw-llm-specs { grid-column: 1; grid-row: 3; margin: 0; }
  .cw-llm-id > .cw-llm-chips { margin-top: 3px; }
  .cw-llm-id > .cw-llm-why { margin-top: 2px; }
  .cw-llm-cost { grid-column: 2; grid-row: 1 / span 3; flex-direction: column; align-items: flex-end; text-align: right; flex-wrap: nowrap; gap: 1px; }
  .cw-llm-cost .cw-llm-sub { flex-basis: auto; }
  .cw-llm-pick { margin-left: 0; margin-top: -2px; }
  .cw-llm-free-lg { font-size: 16px; padding: 4px 10px; }
}
@media (max-width: 760px) {
  /* first screen: the lead and the two links of the catalog are in "How to read this list" instead (the same words, once: catalog.ejs), and the currency is the
     first group of the filter panel */
  body.cw-llm-kind-catalog .cw-llm-hero .cw-ai-lead, body.cw-llm-kind-catalog .cw-llm-hero .cw-llm-links { display: none; }
  .cw-llm-hero { gap: 6px; }
  .cw-llm-hero .cw-ai-eyebrow { font-size: 14px; padding: 5px 12px; }
  .cw-llm-hero h1 { margin: 10px 0 0; }
  .cw-llm-links { margin-top: 8px; gap: 0 22px; }
  body.cw-llm .cw-ai-currencybar { margin-top: 10px; }
  .cw-llm-tasks { margin-top: 4px; }
  .cw-llm-layout { margin-top: 8px; gap: 12px; }
  .cw-llm-countrow { margin-top: 8px; }
  /* (a hub's first screen on a phone - the crumb line, the one-line links, the spacing of the heading - is with the hub rules at the end of the file) */
  /* 352 cards are 60,000px of page: the ones off the screen are not laid out or painted until they come near. Find-in-page, Tab, a script's
     measuring and the link to the tray still reach them; the estimate (a card's content, without its padding) is the median card */
  .cw-llm-list[data-list] > .cw-llm-item { content-visibility: auto; contain-intrinsic-size: auto 120px; }
}
@media (max-width: 400px) { .cw-llm-item .cw-llm-price { font-size: 17px; } }


/* ---- round 2b (design critique of compare and model pages) ----------------------------------------------------------------------- */
.cw-llm-scroller { position: relative; }                       /* the hidden "leading" labels must not stretch the page */
@media (min-width: 761px) { .cw-llm-scroller { overflow: visible; } }   /* so the header row can stick to the window, not to a scroller that never scrolls up and down */
.cw-llm-cmp td .cw-ai-chip { display: block; width: fit-content; max-width: 100%; margin: 0 0 4px; padding: 4px 10px; border-radius: 10px; white-space: normal; }
.cw-llm-cmp td .cw-ai-chip b { display: block; margin: 0; }
.cw-llm-namesrow { display: none; }
.cw-llm-notrow td { padding: 8px 14px; font-size: 13px; line-height: 1.4; color: var(--ai-mute); border-top: 1px solid var(--ai-line); }
.cw-llm-sub { font-size: 13px; }
.cw-llm-pricebox .cw-llm-sub { font-size: 14px; }
.cw-llm-aside { display: grid; gap: var(--ai-gap); align-content: start; min-width: 0; }
.cw-llm-aside .cw-llm-callout { max-width: none; margin-top: 0; }
.cw-llm-box .cw-llm-caveat { padding: 0; background: none; font-weight: 500; }
@media (min-width: 1026px) {
  .cw-llm-aside { position: sticky; top: 16px; }
  .cw-llm-alts li { display: grid; grid-template-columns: minmax(180px, 2fr) 110px 120px minmax(150px, 1.6fr) auto; gap: 4px 14px; align-items: center; }
  .cw-llm-alts li > .cw-llm-sub { grid-column: 2 / -1; }
}
.cw-llm-ptable td:empty { display: none; }
@media (min-width: 1026px) { .cw-llm-ptable td:empty { display: table-cell; } }
@media (max-width: 1025px) {
  .cw-llm-jump a, .cw-llm-crumbs a, .cw-llm-fit h3 a, .cw-llm-alts a:not(.cw-ai-pill), .cw-llm-actions .cw-ai-note, .cw-llm-cmp thead th > a:not(.cw-llm-remove), .cw-llm-cmp td a { display: inline-flex; align-items: center; min-height: 44px; }
  .cw-llm-cmp thead th { min-height: 44px; }
}
/* a tablet: the label column gives width to the models, so a name like "Gemini 3.1 Flash Lite Preview" takes two lines, not three */
@media (min-width: 761px) and (max-width: 1025px) {
  .cw-llm-corner, .cw-llm-cmp tbody th[scope="row"] { width: 150px; }
  .cw-llm-cmp thead th { padding-right: 48px; }
}
@media (max-width: 760px) {
  .cw-llm-alts .cw-ai-pill { width: auto; margin-left: auto; padding: 0 16px; }
  /* the benchmark table of the model page, one block per score: the name (and its source) across the top, the figure and its rank under it
     (the header row stays for assistive technology, as the price table's does) */
  /* the comparison page: the field and its button share a row, and the jump links are one strip that scrolls (two wrapped rows were 90px of the first screen) */
  .cw-llm-chead h1 { margin: 2px 0 6px; }
  .cw-llm-chead .cw-ai-note { margin-top: 6px; }
  body.cw-llm-kind-compare .cw-ai-currencybar { margin-top: 6px; padding: 4px 0; }
  .cw-llm-addform label { font-size: 14px; line-height: 1.2; }
  .cw-llm-swipe { margin-top: 4px; }
  .cw-llm-scroller { margin-top: 6px; }
  .cw-llm-ctools { margin-top: 8px; gap: 8px 10px; }
  .cw-llm-toolrow { display: flex; flex: 1 1 100%; gap: 8px; overflow-x: auto; scrollbar-width: none; }
  .cw-llm-toolrow::-webkit-scrollbar { display: none; }
  .cw-llm-toolrow .cw-ai-pill { flex: none; }
  /* The third pill of the strip (Print) could sit wholly past the edge with nothing to show it was there (ru, uk and fr at 390px; six languages across the common widths). A phone
     prints from the browser's own menu, so the strip holds the two pills that a visitor of a phone uses; both start well inside the screen, and a pill that is cut by the edge still shows there is more. */
  html.cw-js .cw-llm-toolrow [data-print] { display: none; }
  .cw-llm-addform { flex-wrap: wrap; flex: 1 1 100%; gap: 4px 8px; }
  .cw-llm-addform .cw-ai-search { min-width: 0; flex: 1 1 0; }
  .cw-llm-addform .cw-ai-pill { flex: none; }
  .cw-llm-jump { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 4px 0 0; gap: 0 22px; }
  .cw-llm-jump::-webkit-scrollbar { display: none; }
  .cw-llm-jump a { flex: none; white-space: nowrap; }
  .cw-llm-btable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .cw-llm-btable, .cw-llm-btable tbody { display: block; }
  .cw-llm-btable tr { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 16px; align-items: baseline; padding: 10px 0; }
  .cw-llm-btable tbody tr + tr { border-top: 1px solid var(--ai-line); }
  .cw-llm-btable tbody tr + tr > * { border-top: 0; }
  .cw-llm-btable th, .cw-llm-btable td { display: block; padding: 0; min-width: 0; }
  .cw-llm-btable tbody th[scope="row"] { grid-column: 1 / -1; }
  /* the comparison on a phone: labels stay at the left edge while the columns scroll; the model names repeat under every group heading */
  .cw-llm-cmp thead tr, .cw-llm-cmp tr[data-row], .cw-llm-cmp .cw-llm-namesrow { grid-template-columns: repeat(var(--cols), minmax(clamp(138px, 42vw, 180px), 1fr)); }
  table.cw-llm-cols-3 thead tr, table.cw-llm-cols-3 tr[data-row], table.cw-llm-cols-3 .cw-llm-namesrow,
  table.cw-llm-cols-4 thead tr, table.cw-llm-cols-4 tr[data-row], table.cw-llm-cols-4 .cw-llm-namesrow { width: calc(var(--cols) * clamp(138px, 42vw, 180px)); }
  .cw-llm-cmp tbody, .cw-llm-cmp thead { width: max-content; min-width: 100%; }
  .cw-llm-cmp tbody th[scope="row"] { justify-self: start; width: max-content; max-width: calc(100vw - 56px); }
  .cw-llm-cmp tr[data-row] { box-shadow: none; border-top: 1px solid var(--ai-line); }
  .cw-llm-cmp .cw-llm-grouprow { position: static; background: var(--ai-card); }
  .cw-llm-cmp .cw-llm-grouprow th { position: sticky; left: 0; width: max-content; max-width: calc(100vw - 56px); background: transparent; }
  .cw-llm-cmp .cw-llm-namesrow { display: grid; background: #fff; }
  .cw-llm-cmp .cw-llm-namesrow td { padding: 8px 12px 4px; font-size: 13px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; box-shadow: none; }
  .cw-llm-cmp .cw-llm-notrow { display: block; }
  .cw-llm-cmp .cw-llm-notrow td { display: block; position: sticky; left: 0; width: calc(100vw - 32px); box-sizing: border-box; box-shadow: none; }
  /* The first screen of a comparison is its numbers. The price group is drawn above the overview (whose one row, the tasks, is a stack of chips as tall as a screen), and the jump
     links follow the same order. The names under the header are not printed again right below it: every other group repeats them, because the header scrolls away. */
  table.cw-llm-cmp { display: flex; flex-direction: column; }
  .cw-llm-cmp thead { order: -2; }
  .cw-llm-cmp tbody[data-group="price"] { order: -1; }
  .cw-llm-cmp tbody[data-group="price"] .cw-llm-namesrow { display: none; }
}

/* ---- touch targets that are not controls of the catalog: the footer links and the sources of the method section ------------------------------------ */
@media (max-width: 1025px) {
  body.cw-llm .cw-promo-footer-col a:not(.cw-promo-wordmark) { display: flex; align-items: center; min-height: 44px; }
  body.cw-llm .cw-promo-footer-col { gap: 0; }
  body.cw-llm .cw-promo-footer-col h2 { margin-bottom: 4px; }
}
/* the method section is the rubric's definition list; its rules are shifted shadows there, here they are borders */
body.cw-llm .cw-ai-defs dt, body.cw-llm .cw-ai-defs dd { box-shadow: none; border-bottom: 1px solid var(--ai-line); }
body.cw-llm .cw-ai-defs dt:last-of-type, body.cw-llm .cw-ai-defs dd:last-of-type { border-bottom: 0; }
@media (max-width: 760px) { body.cw-llm .cw-ai-defs dt { border-bottom: 0; } }
body.cw-llm .cw-ai-defs a, body.cw-llm .cw-ai-src a { padding: 4px 0; }   /* an inline link is exempt from a 24px floor only when the line is: these sit on their own */

/* ---- state of a pill that is a link: the diff switch (is-on, aria-pressed once script has made it a button) and the hub sort pills (aria-current) ----- */
body.cw-llm .cw-ai-pill[aria-current="true"], body.cw-llm .cw-llm-diff.is-on { background: var(--ai-blue); color: #fff; box-shadow: none; }
@media (hover: hover) { body.cw-llm .cw-ai-pill[aria-current="true"]:hover, body.cw-llm .cw-llm-diff.is-on:hover { background: var(--ai-blue-hover); color: #fff; } }

/* ---- the link to the tray that sits behind the checkbox ticked last: there for the keyboard, drawn only while it has the focus ------------ */
.cw-llm-tray-skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cw-llm-tray-skip:focus { position: relative; z-index: 2; display: block; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; margin-top: 6px; padding: 2px 0; color: var(--ai-blue); font-size: 14px; font-weight: 500; line-height: 1.3; text-align: right; text-decoration: underline; outline: 2px solid var(--ai-blue); outline-offset: 2px; }

/* ---- print: four models on one portrait page ------------------------------------------------------------ */
/* the tray on a tablet: count and buttons on one row, the chosen models on the row below (four chips fit one row from 761px), so it stays
   about as tall as on a desktop instead of stacking the chips in a column */
@media (min-width: 761px) and (max-width: 1025px) {
  .cw-llm-tray-title { display: none; }
  .cw-llm-tray-count, .cw-llm-tray-need, .cw-llm-tray-full, .cw-llm-tray-clear, .cw-llm-tray-go { order: 1; }
  .cw-llm-tray-clear { margin-left: auto; }
  .cw-llm-tray-list { order: 2; flex: 1 1 100%; }
}

@media print {
  .cw-promo-header, .cw-promo-footer, .cw-ai-currencybar, .cw-llm-tray, .cw-llm-ctools, .cw-llm-jump, .cw-llm-remove, .cw-llm-nojs-bar, .cw-promo-consent, .cw-llm-needs-js, .cw-llm-tray-skip { display: none !important; }
  .cw-llm-scroller { overflow: visible; }
  table.cw-llm-cmp { min-width: 0; box-shadow: none; font-size: 11pt; }
  .cw-llm-cmp thead th, .cw-llm-cmp thead .cw-llm-corner { position: static; }
  .cw-llm-cmp tr { break-inside: avoid; }
  .cw-llm-corner, .cw-llm-cmp tbody th[scope="row"] { width: 22%; }
  td.cw-llm-best { background: transparent; font-weight: 700; border-left: 3px solid #000; print-color-adjust: exact; }   /* paper has no tone to carry the mark: a rule, as a printed table would */
  td.cw-llm-best .cw-ai-vh { position: static; width: auto; height: auto; clip-path: none; font-size: 9pt; font-weight: 400; }
  .cw-llm-free { background: #fff; box-shadow: inset 0 0 0 1px #000; }
  .cw-llm-printsource { display: block; font-size: 9pt; margin-top: 10pt; }
}

/* ---- forced colours ---------------------------------------------------------------------------------------- */
@media (forced-colors: active) {
  .cw-llm-free { border: 1px solid ButtonText; }
  td.cw-llm-best { border-inline-start: 3px solid Highlight; }
  .cw-llm-item.is-selected { outline: 2px solid Highlight; outline-offset: -2px; }   /* inside the row: a later row paints over an outline that hangs outside, and the list's rounded clip cuts the rest */
  .cw-llm-pill-free::before { background: ButtonText; forced-color-adjust: none; }
  body.cw-llm .cw-ai-chip-save::before { background: ButtonText; forced-color-adjust: none; }   /* the chip has its own border (rubric rule); the dot stays a dot */
  .cw-llm-tray { border: 1px solid ButtonText; }
  .cw-llm-submit, .cw-llm-tray-go { border: 1px solid ButtonText; }
  .cw-ai-pill[aria-current="true"], .cw-llm-diff.is-on { background: Highlight; color: HighlightText; forced-color-adjust: none; }
}
@media (prefers-reduced-motion: reduce) { body.cw-llm * { transition: none !important; scroll-behavior: auto !important; } }

/* ---- round 3 (CLIENT): the second review and the third design critique -------------------------------------------------------- */
/* The main action of a model page, a comparison and a hub is not the currency. There the active currency is the quiet pill (a tint and a ring of the one blue); the solid
   blue stays with the catalog, where the currency is one group of the filter panel. */
body.cw-llm:not(.cw-llm-kind-catalog) .cw-ai-currencybar .cw-ai-pill[aria-checked="true"],
body.cw-llm:not(.cw-llm-kind-catalog) .cw-ai-currencybar .cw-ai-pill[aria-checked="true"]:hover { background: var(--ai-tint); color: var(--ai-blue); box-shadow: inset 0 0 0 1px var(--ai-blue); }
body.cw-llm:not(.cw-llm-kind-catalog) .cw-ai-currencybar .cw-ai-pill[aria-checked="true"]:focus-visible { outline-color: var(--ai-blue); outline-offset: -2px; }
/* a touch screen keeps the :hover of the last pill it touched: there the hover look is the resting look (the rubric's pill rules know no such thing) */
@media (hover: none) {
  body.cw-llm .cw-ai-pill:hover { box-shadow: inset 0 0 0 1px var(--ai-line); color: #000; }
  body.cw-llm .cw-ai-pill:is([aria-checked="true"], [aria-pressed="true"], [aria-current="true"], .is-on, .cw-llm-submit):hover { background: var(--ai-blue); color: #fff; box-shadow: none; }
}
/* a link in a cell ("Yes" for the weights, "Free version") darkens like the others */
@media (hover: hover) { .cw-llm-cmp td a:hover { color: var(--ai-blue-hover); } }
/* On a desktop a name that is longer than its chip ends in an ellipsis (the whole name is the tooltip), and the chip is a little tighter. From 1200px the chips share the one row
   (the longest names give way first), so four picks do not make the tray a second row taller; narrower, they wrap as before. A tablet and a phone have their own rows and drawer. */
@media (min-width: 1026px) {
  .cw-llm-tray-item { padding-left: 12px; }
  .cw-llm-tray-item span { max-width: 16ch; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cw-llm-tray-x { width: 32px; height: 32px; font-size: 22px; }
}
@media (min-width: 1200px) {
  .cw-llm-tray-list { flex-wrap: nowrap; }
  .cw-llm-tray-item { flex: 0 1 auto; min-width: 0; }
}
@media (forced-colors: active) {
  body.cw-llm:not(.cw-llm-kind-catalog) .cw-ai-currencybar .cw-ai-pill[aria-checked="true"] { background: Highlight; color: HighlightText; box-shadow: none; }
}

/* ---- round 3: model page and hubs (SURFACE) ---------------------------------------------------------------- */
/* the sizes of the jobs, stated once under the task list of a model page: a note, not a second list of findings */
.cw-llm-assumed { margin: 4px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.5; color: var(--ai-mute); }
.cw-llm-assumed b { font-weight: 500; color: #000; }

/* hubs, first screen: a model row has to be on it. The currency and the order of the list share one row; everything that explains the list
   is one fold whose summary keeps the size of the job; the best free model of a task is one line; the Free hub's warning sits under its figure. */
.cw-llm-hubbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; margin: 14px 0 0; padding: 10px 0; border-bottom: 1px solid var(--ai-line); }
body.cw-llm .cw-llm-hubbar .cw-ai-currencybar { margin: 0; padding: 0; border: 0; box-shadow: none; min-height: 0; max-width: 100%; }
.cw-llm-hubbar .cw-llm-order { margin: 0; }
.cw-llm-readhub { max-width: none; margin: 6px 0 0; }
.cw-llm-readhub summary { justify-content: space-between; gap: 14px; padding: 6px 0; color: #000; font-weight: 400; font-size: 14px; line-height: 1.4; }
.cw-llm-readhub summary::-webkit-details-marker { display: none; }
.cw-llm-readhub summary::after, .cw-llm-fold > summary::after { content: ""; flex: none; width: 7px; height: 7px; margin-right: 4px; border-right: 2px solid var(--ai-blue); border-bottom: 2px solid var(--ai-blue); transform: translateY(-2px) rotate(45deg); }
.cw-llm-readhub[open] > summary::after, .cw-llm-fold[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
@media (hover: hover) { .cw-llm-readhub summary:hover { color: var(--ai-blue); } }
.cw-llm-readhub p { color: #000; }
.cw-llm-striplist { margin: 6px 0; padding: 0; list-style: none; display: grid; gap: 6px 32px; font-size: 15px; line-height: 1.45; }
.cw-llm-striplist a { color: var(--ai-blue); font-weight: 500; }
@media (min-width: 761px) { .cw-llm-striplist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cw-llm-freestrip { margin: 8px 0 0; padding: 10px 16px; }
.cw-llm-freestrip p { margin: 0; }
@media (min-width: 761px) {
  /* the way back and the date of the data share one line; the first list starts closer to the fold above it */
  body.cw-llm-kind-task .cw-llm-hero .cw-llm-crumbs, body.cw-llm-kind-free .cw-llm-hero .cw-llm-crumbs { display: inline-block; margin: 0 14px 0 0; vertical-align: middle; }
  body.cw-llm-kind-task .cw-llm-hero .cw-ai-eyebrow, body.cw-llm-kind-free .cw-llm-hero .cw-ai-eyebrow { vertical-align: middle; }
  [data-announce] + .cw-llm-group { margin-top: 20px; }
}
@media (min-width: 1026px) { .cw-llm-readhub summary { min-height: 36px; } }
.cw-llm-facts dd { margin-top: 8px; }                                 /* the figure sits under its label, not at the foot of a tall card */
.cw-llm-facts:has(> div:only-child) { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1026px) { body.cw-llm-kind-task .cw-llm-hero { grid-template-rows: auto; } }   /* the rubric's second row (for its right-hand column) would add a row gap of nothing below the hero */
.cw-llm-hero .cw-llm-caveat { grid-area: caveat; margin: 0; max-width: none; }
body.cw-llm-kind-free .cw-llm-hero { grid-template-areas: 'copy' 'facts' 'caveat'; row-gap: 14px; }
@media (min-width: 1026px) { body.cw-llm-kind-free .cw-llm-hero { grid-template-areas: 'copy facts' 'copy caveat'; grid-template-rows: auto 1fr; } }
@media (max-width: 1025px) {
  .cw-llm-factbox:has(.cw-llm-facts > div:only-child) { display: none; }      /* one figure beside a link that says the same number: no card */
}
@media (max-width: 760px) {
  body.cw-llm-kind-free .cw-llm-hero { grid-template-areas: 'copy' 'caveat'; row-gap: 8px; }
  .cw-llm-hero:not(.cw-llm-hero-declared) .cw-llm-lead2 { display: none; }   /* the size of the job is on the fold's summary; on a hub of declared features the lead2 carries "we did not test it" and stays. The way up to the catalog stays too: the phone header has no catalog link */
  body.cw-llm-kind-task .cw-llm-hero h1, body.cw-llm-kind-free .cw-llm-hero h1 { margin: 10px 0 8px; }
  body.cw-llm-kind-task .cw-llm-links, body.cw-llm-kind-free .cw-llm-links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-top: 4px; }
  body.cw-llm-kind-task .cw-llm-links::-webkit-scrollbar, body.cw-llm-kind-free .cw-llm-links::-webkit-scrollbar { display: none; }
  body.cw-llm-kind-task .cw-llm-links a, body.cw-llm-kind-free .cw-llm-links a { flex: none; white-space: nowrap; }
  .cw-llm-hubbar { margin-top: 6px; padding: 4px 0 6px; gap: 2px; }
  .cw-llm-freestrip { margin-top: 4px; }
  .cw-llm-hero .cw-llm-caveat { padding: 10px 14px; font-size: 14px; line-height: 1.4; }
  [data-announce] + .cw-llm-group { margin-top: 16px; }
}

/* hub rows: what a row says about the paid version, the media-output note and its quieter price */
.cw-llm-paidlink { position: relative; z-index: 1; }              /* above the card's stretched link */
.cw-llm-paidlink a { color: var(--ai-blue); }
@media (max-width: 1025px) { .cw-llm-paidlink a { display: inline-block; padding: 10px 0; } }
.cw-llm-hubrow .cw-llm-medianote { font-size: 13px; color: var(--ai-mute); }
.cw-llm-item .cw-llm-price.cw-llm-price-quiet { font-size: 15px; font-weight: 500; }

/* the model page: the ids that wrap at a word, one control per line on a phone, a link that looks like one, the benchmark table behind its heading */
.cw-llm-mhead code { word-break: normal; }
.cw-llm-extlink { color: var(--ai-blue); font-weight: 500; font-size: 15px; }
.cw-llm-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 44px; list-style: none; cursor: pointer; }
.cw-llm-fold > summary::-webkit-details-marker { display: none; }
.cw-llm-box .cw-llm-fold > summary h2 { margin: 0; }
.cw-llm-box .cw-llm-fold[open] > summary h2 { margin-bottom: 6px; }
@media (max-width: 1025px) { .cw-llm-actions .cw-llm-extlink { display: inline-flex; align-items: center; min-height: 44px; } }
@media (max-width: 760px) { .cw-llm-actions .cw-llm-pick { flex-basis: 100%; } }
