/**
 * OTA Search page styles.
 *
 * The whole search results route from the OTA design file, frame 441:11544
 * "Search", 1440 wide: a mint hero carrying the breadcrumb, the H1, the intro
 * and the search pill, then a two column body of a 920px results list beside a
 * 320px Refine panel, with a tab strip, a results header and a Show more button.
 *
 * TWO COLOUR REGIMES ON ONE FRAME, AND ONLY ONE OF THEM IS BOUND
 *
 * The hero is fully variable bound and its resolved mode is exactly the Mint
 * colour theme: bar/background #D4F0D9, bar/text and bar/accent #003038,
 * bar/text-muted and bar/overlay #005361. Everything from the tab strip down is
 * bound to nothing at all. `get_variable_defs` returns literally `{}` for the
 * content column, the tab row, the results header, every Article row and the
 * Aside. So the roles below the hero are a reading, not a read: they are matched
 * by hex against the site's registered Elementor globals, the same way the News
 * Block's three unbound layers were. The roles, binding for binding where the
 * frame has one and hex match where it does not:
 *
 *   hero band          bar/background     --ota-background
 *   breadcrumb link    bar/accent         --ota-accent
 *   breadcrumb current bar/text           --ota-text
 *   hero H1            bar/White Text     --ota-white-text
 *   hero intro         bar/text           --ota-text
 *   ochre circles      bar/overlay        baked into the SVG, see the motif note
 *   field pill         brand/white        fixed white, see --osr-field
 *   field magnifier    bar/text-muted     baked into the SVG
 *   clear button       bar/text-muted     --ota-text-muted
 *   Search submit      .ota-btn--primary, which reads cta-bg / cta-text itself
 *   card surface       #FFFFFF            --ota-background
 *   card hairline      rgba(0,48,56,.14)  fixed, see --osr-line
 *   card eyebrow       #F04C3A            fixed brand, see --osr-ochre
 *   card title         #003038            --ota-text
 *   excerpt and meta   #5A6B6E            fixed, see --osr-meta
 *   tag chip           #F0E7D8            fixed brand, see --osr-ash
 *   arrow circle       #003038 / #FFFFFF  --ota-cta-bg / --ota-cta-text
 *   active tab rule    #F04C3A            fixed brand, see --osr-ochre
 *   active count pill  #003038 / #FFFFFF  --ota-cta-bg / --ota-cta-text
 *   Refine panel       #F0E7D8            fixed brand, see --osr-ash
 *   checked box        #005361            --ota-text-muted
 *
 * The frame draws a Mint hero above a white body, which is two variable modes on
 * one page, so the token block below is declared on `.ota-results` and on
 * `.ota-results__card` both, exactly as the News Block and the Events Block do.
 * The duplication is load bearing rather than untidy. A custom property whose
 * value contains `var()` resolves on the element that DECLARES it, so tokens
 * declared once on the root would inherit into the cards already resolved
 * against the page's theme and a theme class on the card would do nothing.
 * Naming the card in the same rule makes it resolve them again, against its own.
 *
 * THREE COLOURS ARE DELIBERATELY NOT ROLES
 *
 * `#5A6B6E` is the excerpt, all the meta lines, the inactive tab labels, the
 * "15 results for" summary, the "Sort by" label and the facet group headings. It
 * is in none of the ten Elementor globals and in none of the sixteen roles of
 * any of the nine themes. Same orphan grey, same problem, already flagged at
 * `assets/css/ota-news-block.css:33`. The News Block bound it to
 * `--ota-text-muted` because its rows sit inside a themed section and a literal
 * hex would go invisible on Navy and Teal. This page is the other case: nothing
 * below the hero carries a variable binding in the frame at all, the body is
 * white, and the grey is used on six different elements that have to agree with
 * each other. So it stays literal here, in one token, and `--osr-meta` is the
 * one line to change if this page is ever put under a theme class.
 *
 * `#F04C3A` (card eyebrow, active tab underline) and `#F0E7D8` (tag chips,
 * inactive count pill, Refine panel) are brand constants, not roles, and binding
 * them is actively wrong on this page rather than merely debatable. `#F04C3A` is
 * `--ota-accent` and `--ota-logo` in Ash, but the hero here resolves Mint, where
 * `--ota-accent` is `#003038`: bind the underline and it turns navy. `#F0E7D8`
 * is `--ota-background` in Ash, which is `#D4F0D9` in Mint: bind the panel and
 * it turns mint. Both are held as fixed brand tokens instead.
 *
 * `rgba(0, 48, 56, 0.14)` is the card hairline, the tab row rule and the sort
 * control border. `--ota-divider` is `#00303833`, Navy at 20%, in every one of
 * the nine themes. Off by 0.06 alpha, so it is held literal in `--osr-line`
 * rather than bound to a role that is visibly heavier at this hairline weight.
 *
 * TYPOGRAPHY, AND THE THREE CUTS THE SCALE DOES NOT HAVE
 *
 * Type comes from the Elementor global fonts, each as a `var()` with the Figma
 * number as its fallback, so the page still renders to spec on a site whose kit
 * has not had the type scale imported. Heading/H1 for the hero title,
 * Body/Caption for the eyebrow, the count pill and the facet headings,
 * Body/Small for the excerpt, the results summary and the chips, Body/Default
 * for the facet labels.
 *
 * Weights and line heights are stated locally wherever the scale publishes a
 * different one: the hero H1 is Bold at 60/60 and the kit's H1 is Regular at
 * 1.372em, so only the size and the tracking come from the global. Same shape of
 * override on the eyebrow, the count pill, the chips and the results term.
 *
 * Three cuts have no global at all and are taken locally with a number:
 *
 *   20px  the card title and the "Refine results" heading. Body/Lead is 22px.
 *   14px  the meta lines, "Sort by" and "Show all tags". Body/Small is 15px.
 *   13px  the breadcrumbs and the facet count.
 *
 * The 14px one is a departure worth naming, because `ota-news-block.css:67-69`
 * made the other call on the same number: it takes the Body/Small global and
 * carries `0.875rem` as the fallback, "since a 1px difference is not worth a
 * tenth style". Here 14px sits beside 15px in the same toolbar (the "Sort by"
 * label against the results summary), so a global that resolves both to 15px
 * would flatten a difference the frame draws on purpose. Stated rather than
 * read, and worth a designer's ruling before sign-off.
 *
 * Tracking is in `em` rather than the design's px so it survives the responsive
 * steps. 0.96/12 and -0.2/20 are the design's own ratios.
 *
 * THE HEADER SEARCH DOES NOT COLLIDE WITH THIS PAGE, AND EARLIER DRAFTS OF
 * THIS COMMENT SAID IT DID
 *
 * Worth stating plainly, because the wrong version of it was relied on. The two
 * components use different prefixes: `templates/header/search.php:26` ships
 * `<div class="ota-search ota-search--utility">` and `ota-mega-menu.css` styles
 * `.ota-search__form`, `.ota-search__field`, `.ota-search__input`,
 * `.ota-search__clear`, `.ota-search__submit` and `.ota-search__go`. This page's
 * vocabulary is `.ota-results` and `.ota-results__*` throughout. No selector in
 * `ota-mega-menu.css` matches anything this page renders: the file contains no
 * `.ota-results` selector at all.
 *
 * So the root is written `.ota-results`, unqualified, and there is no
 * `:not(.ota-search--utility, .ota-search--bar)` anywhere in this file. A
 * previous version of this comment described that qualifier, and the specificity
 * arithmetic below was counted as though it were there.
 *
 * Two consequences a maintainer should know. The theme guard below is (1,3,2),
 * not the (1,4,2) once claimed, because the missing `:not()` was being counted.
 * And the restatements further down on `.ota-results__field`, `.ota-results__clear`
 * and `.ota-results__submit` are not answering a collision, because there is
 * none: they are plain defaults, kept because they are the values this page wants
 * and cost nothing, and each is now labelled as such at its own line. Do not
 * treat them as protection, and do not delete a rule elsewhere on the assumption
 * that one of them is holding the line for it.
 *
 * EVERY GLYPH IS AN `<img>`, WITH ITS COLOUR IN THE FILE
 *
 * The templates render the ten icons as `<img>` rather than inlined SVG, which
 * is the right call at ten glyphs and one that costs something worth naming: an
 * `<img>` cannot be recoloured from CSS, so none of them follows a colour theme.
 * The assets carry the design's literal values instead. The two glyphs that do
 * change state, the checkbox tick and the sort chevron, are consumed as CSS
 * `background-image` for that reason, not as markup. See the note on the motif.
 *
 * THE PAGE RENDERS INSIDE THE THEME'S ARTICLE BODY
 *
 * Unlike every other stylesheet in this plugin, this one is not an Elementor
 * widget. The route renders into `main#agendtheme-content
 * .agendtheme-content-inner`, and that wrapper carries broad descendant rules
 * meant for post content: a border radius on every `img`, a top margin on
 * adjacent `p`, `div`, `ul`, `ol` and `li`, and the theme's body link treatment
 * on `a:not([class])`. Those are the local version of the `.elementor img` trap
 * the News Block and the Events Block already answer, one layer further out, and
 * they are answered explicitly in the guard block below rather than left to luck.
 *
 * NO MOBILE OR TABLET FRAME EXISTS
 *
 * The file was swept end to end: page `0:1` is the only page, and 441:11544 is
 * the only Search frame in it. There is no narrow Search layout, no empty state,
 * no hover, focus or active state on any element of this page, no expanded tag
 * list and no per-facet count. Everything in the narrow block at the bottom of
 * this file, everything in the focus block, the empty state and the facet count
 * are therefore extrapolations from the desktop frame and from the idioms the
 * Events Block and the button baseline already established. Worth designing
 * properly before client sign-off.
 */

/*
 * The roles. The frame's own values as fallbacks, so the page is never unstyled
 * on a site with no colour theme configured. Declared for the cards as well as
 * the root: see the note on the two modes above.
 *
 * `--osr-surface` binds the card to `--ota-background` even though the frame
 * draws a raw `#FFFFFF`, on the same reasoning the News Block used for its three
 * unbound layers: a literal white card is invisible on the White theme and
 * unreadable on Navy, and the neighbouring bound layers all take the background
 * role. The consequence to know is that a page put under `ota-theme--mint` gets
 * mint cards on a white body. That is what the nested declaration is for, and
 * this is the one line to change if the cards should stay white regardless.
 */
.ota-results,
.ota-results__card {
	--osr-surface: var(--ota-background, #ffffff);
	--osr-text: var(--ota-text, #003038);
	--osr-heading: var(--ota-white-text, #003038);
	--osr-teal: var(--ota-text-muted, #005361);
	--osr-accent: var(--ota-accent, #f04c3a);
	--osr-cta: var(--ota-cta-bg, #003038);
	--osr-on-cta: var(--ota-cta-text, #ffffff);

	/*
	 * The field pill and the unchecked checkbox. `brand/white` in the frame,
	 * which is a fixed brand colour rather than a role, and it has to stay one:
	 * these two sit on a mint band and an ash panel respectively, so a role that
	 * follows either surface makes them disappear into it.
	 */
	--osr-field: #ffffff;

	/* The orphan grey. See the long note above before binding it. */
	--osr-meta: #5a6b6e;

	/* Navy at 14%. `--ota-divider` is Navy at 20%, which is visibly heavier at
	   a hairline. Held literal, in one place. */
	--osr-line: rgba(0, 48, 56, 0.14);

	/* Brand constants. Binding either of these is wrong on this exact page:
	   the underline turns navy and the panel turns mint. */
	--osr-ochre: #f04c3a;
	--osr-ash: #f0e7d8;

	/*
	 * The hovered row, and these are the mega menu's own two values rather than
	 * new ones: `--ota-menu-link-bg` and `--ota-menu-link-text` in
	 * ota-mega-menu.css:49-50. A facet row and a menu link are the same object,
	 * a full width row that fills in under the pointer and inverts the disc at
	 * its end, so it is the same pair of colours and the same 999px pill.
	 *
	 * Fixed, not roles, for the reason the panel itself is fixed: it sits on
	 * `--osr-ash`, which is a brand constant, so a themed pill on an unthemed
	 * panel can resolve navy on navy. The nav takes the same decision and says
	 * so at ota-mega-menu.css:280.
	 *
	 * An earlier build tinted the row with navy at 6%. Alpha percentages are not
	 * in the style guide, so it is gone.
	 */
	--osr-row-active-bg: #003038;
	--osr-row-active-text: #ffffff;
}

.ota-results {
	/*
	 * The design's own measure: 1280px of content inside the 1440px artboard,
	 * which is 920 results + 40 gutter + 320 aside, with the 80px page margins
	 * falling out of `margin-inline: auto` at 1440. Same 1280 the News Block and
	 * the Events Block use.
	 */
	--osr-max: 1280px;
	--osr-pad: 2rem;

	/*
	 * The page margin, as padding rather than a wrapper element, because the
	 * vocabulary has no `__inner` to hang a `max-width` on and the hero's band
	 * has to stay full bleed while its text stops at the measure.
	 *
	 * The percentage is the load bearing part and it does NOT resolve here. A
	 * custom property is a token stream: the `var()` lookups are substituted on
	 * this element, but the `calc()` is left alone until something uses it in a
	 * real property, and `100%` in `padding-inline` then resolves against the
	 * containing block. `.ota-results__hero` and `.ota-results__body` are both
	 * children of this element, so both get the same number, and at 1440 that
	 * number is exactly the frame's 80px.
	 */
	--osr-gutter: max(var(--osr-pad), calc((100% - var(--osr-max)) / 2));

	--osr-aside: 320px;
	--osr-column-gap: 40px;
	--osr-form: 622px;
	--osr-radius: 24px;
	--osr-thumb: 200px;
	--osr-thumb-radius: 14px;
	--osr-row-gap: 16px;

	/*
	 * The focus ring is NAVY HERE, not the button system's aqua.
	 *
	 * `--ob-focus-ring` in `ota-buttons.css:170` is a pale aqua, and it is right
	 * where it is used: on a navy or ochre pill, a light ring is the only thing
	 * that reads. This page focuses different objects. The search field is a
	 * white pill on the mint band and the checkboxes are white on sand, so an
	 * aqua ring on a pale surface is a smudge rather than a ring, which is what
	 * it looked like around the search field.
	 *
	 * Solid navy instead, and solid rather than an alpha: colour percentages are
	 * not in the style guide, and every other fixed colour on this page is a
	 * flat brand value. It is the same navy the text and the discs already use,
	 * so a focused control reads as the page's own ink rather than as a new
	 * colour, and it clears 3:1 against white, sand and mint alike.
	 *
	 * Held as a literal rather than bound to `--ota-text`, because a ring has to
	 * stay visible under a theme that paints the text the same colour as the
	 * surface behind it.
	 */
	--osr-focus: #003038;

	color: var(--osr-text);
}

/*
 * Told again, because a `display` declared on a class outranks the browser's own
 * `[hidden]` rule. Same trap as `.ota-header [hidden]` in `ota-mega-menu.css`
 * and `.ota-hero__slide[hidden]` in `ota-hero-carousel.css`, and it has already
 * bitten the hero carousel and the partner board once each. On this page the
 * clear button ships hidden and the script reveals it when the field is not
 * empty, the child term lists ship hidden until their parent is checked, and the
 * capped tail of the tag facet ships hidden until the disclosure is pressed.
 * Without this line all three are visible with JS off and the no-JS page is
 * wrong rather than merely plainer.
 */
.ota-results [hidden] {
	display: none;
}

/* --- The theme's article body -------------------------------------------- */

/*
 * The route renders inside `main#agendtheme-content .agendtheme-content-inner`,
 * which is the theme's post content wrapper, and that wrapper styles raw
 * elements on the assumption they came out of the editor. Three of its rules
 * reach this page:
 *
 *   img                         border-radius: var(--at-border-radius)   1,2,2
 *   p+p, p+ul, p+ol, div+p      margin-top: .5rem                        1,2,3
 *   ul li+li, ol li+li          margin-top: .5rem                        1,3,4
 *   a:not([class])              the body link treatment                  1,3,2
 *
 * The last two are the reason this selector is as long as it is. `ul li + li`
 * reaches 1,3,4 because the theme's own `:not(.chosen-choices, .chosen-results)`
 * hands it a free class, so a component rule cannot beat it from a class alone,
 * and mirroring the chain only reaches a tie. Source order does not settle a tie
 * here either: this file is enqueued by the route on `wp_enqueue_scripts`, the
 * theme loads its skin on the same hook at the same priority, and the plugin
 * boots first, so a tie can resolve the wrong way depending on nothing more than
 * registration order.
 *
 * So the chain is mirrored, which lands this at 1,3,2: above every rule listed,
 * below anything with two IDs, and it wins exactly where the theme fights and
 * nowhere else. That is the same answer `ota-buttons.css` gives the theme's 1,6,1
 * padding rule, and it is preferred to `!important` for the same reason: it costs
 * nothing in overridability.
 *
 * 1,3,2 and not the 1,4,2 an earlier comment claimed: the id from `main`, three
 * from `.agendtheme-content-inner`, the `:not()` argument and `.ota-results`, and
 * two elements from `main` and the `:is()`. The fourth class was the root
 * qualifier described at the top of this file, which does not exist.
 *
 * `a:not([class])` is listed for completeness rather than answered, and that is
 * deliberate rather than an omission. Every anchor this page renders carries a
 * BEM class, so the theme's selector never matches one: the defence is a markup
 * contract on the templates, not a paint. An earlier draft did answer it, with
 * `background: none; border-bottom: 0` on every `a` inside the component, and it
 * was worse than the problem. `background` is a shorthand, so at 1,4,2 it reset
 * `background-color` on every anchor under it and silently erased the tag chip's
 * ash pill and the arrow button's navy fill. A guard that outranks the theme
 * outranks this file too. The one place the theme's rule could still bite is an
 * excerpt that arrives carrying markup, which is why `Search_Result` hands the
 * view plain text.
 */
main#agendtheme-content .agendtheme-content-inner:not(.agendtheme-content-inner__tribe) .ota-results :is(p, div, ul, ol, li, figure, h1, h2, h3, h4) {
	margin-block: 0;
}

/*
 * OUR LISTS ARE ROWS OF CONTROLS, NOT PROSE, AND THE THEME DOES NOT KNOW THAT.
 *
 * `_content.scss` styles every list inside the content area as body copy:
 *
 *   main#agendtheme-content .agendtheme-content-inner:not(…) ul:not(…) li + li
 *     { margin-top: .5rem }
 *
 * That scores (1,3,4). The blanket `margin-block: 0` above scores (1,3,2), so
 * it loses, and every chip after the first sat 8px lower than the first one.
 * It is the wonky row of tags, and it was never a flex bug.
 *
 * Naming our four lists inside an `:is()` buys a fourth class and takes this to
 * (1,4,2), which wins without an `!important` and without an id of our own.
 *
 * `display: flex` on the item as well as zeroed margins: as a `list-item` the
 * `<li>` builds a line box around an inline-flex chip, and that line box is
 * taller than the chip by the leading, which is why the first item measured
 * 41.5px against its own chip's 33.5px. A flex item has no line box, so the
 * `<li>` becomes exactly its chip.
 *
 * `:not([hidden])` IS LOAD BEARING. At (1,4,2) this rule crushed the blanket
 * `[hidden]` guard at (0,2,0), and it applies precisely where the page really
 * lives, inside `.agendtheme-content-inner`. `capGroups()` and `setDisclosure()`
 * set `row.hidden` on facet `li` rows, so with the guard beaten the tag facet
 * never capped and "Show all tags" toggled nothing. Excluding hidden rows here
 * hands them back to the guard rather than fighting it with a second rule.
 */
main#agendtheme-content .agendtheme-content-inner:not(.agendtheme-content-inner__tribe) .ota-results :is(.ota-results__chips, .ota-results__meta, .ota-results__facet-list, .ota-results__children) > li:not([hidden]) {
	display: flex;
	margin: 0;
	padding: 0;
}

/*
 * A facet row that carries a nested list has two flex children, the label and
 * the `<ul>`, and the rule above lays them out on one line: the child terms
 * sat beside their parent and ran out of the panel the first time a term on
 * this site had children (Areas of Practice, Teamwork 49430511, 21 Sep 2026).
 * Wrapping puts the list under the label, and `.ota-results__children` claims
 * the full width so it always wraps rather than sharing the line.
 */
.ota-results__facet-list > li {
	flex-wrap: wrap;
}

main#agendtheme-content .agendtheme-content-inner:not(.agendtheme-content-inner__tribe) .ota-results img {
	border-radius: 0;
}

/*
 * The one anchor on the page the markup contract cannot cover, and it is worth
 * spelling out why. The vocabulary names the HEADING, `ota-results__card-title`,
 * and the link inside it has no name of its own, so it is the one `a` that
 * plausibly ships class-less and it is the one the theme's body link treatment
 * therefore catches: a teal bottom border under every result title, plus a
 * background on hover. Proven in the browser before it was fixed.
 *
 * Three properties, no shorthands. `background: none` would be the shorthand
 * that erased the chips, so `background-color` is named instead, and it is here
 * rather than only in the rest state because the theme's own `:hover` variant is
 * 1,4,2 and only this selector's 1,5,2 clears it.
 */
main#agendtheme-content .agendtheme-content-inner:not(.agendtheme-content-inner__tribe) .ota-results .ota-results__card-title a {
	border-bottom: 0;
	background-color: transparent;
	color: inherit;
}

/*
 * Nothing in this file sets a block margin. That is not a style preference, it
 * is what the guard above requires: every gap on this page is a flex or grid
 * `gap`, or padding, so the reset can be blanket and still be safe. The one
 * exception is `.ota-results__more`, which is an `<a class="ota-btn">` and so is
 * outside the `:is()` list on purpose.
 */

/* --- Hero ---------------------------------------------------------------- */

/*
 * CONTENT DRIVEN, NOT 485. The frame draws this band at 485 with its content
 * block centred, and it was built that way: a `min-height: 485px` with a 48px
 * bottom padding, reproducing an offset Figma reports rather than nudging it.
 *
 * That number is the same kind of accident as the four the page hero band
 * documents at length. It is what auto layout produced from the copy the search
 * frame happened to carry, which is a title, an intro AND a search field. A tag
 * archive has no search field and no intro, and a post type archive has neither
 * plus a two word title, so 485 stopped being a height and became a floor those
 * routes were propped up to. Against a band next to it hugging 297, it read as
 * a mistake, which is how Bryce reported it on 17 Aug 2026.
 *
 * So the floor is gone and the padding is the page hero's 92, which is where
 * every other band on the site gets its height from. The search page, still the
 * tallest thing here because it carries the most, lands near the frame's 485 on
 * its own. The archives that carry less come out shorter, which is the point.
 *
 * `overflow: hidden` is not decoration. The ochre circles motif is half outside
 * the band on the right and a third of the way past its bottom edge, and the
 * frame clips both. The motif itself is a fixed 622x602 anchored to the top
 * right (`.ota-results__motif` below), NOT sized against the band, so a short
 * band shows less of it: the crop gets harder as the band shrinks. That is the
 * cause to check first when the motif looks clipped on a short archive.
 */
.ota-results__hero {
	/*
	 * THE BAND'S OWN TOKENS, DECLARED HERE AND NOT ON THE ROOT. This is the
	 * second of the frame's two variable modes: one `--ota-background` role,
	 * resolved Mint above and White below.
	 *
	 * They have to be declared on this element. A custom property whose value
	 * contains `var()` resolves against the element that DECLARES it, not the
	 * one that reads it, so `--osr-hero-bg` written on `.ota-results` resolves
	 * against the root's theme and the `ota-theme--mint` class the band carries
	 * arrives too late to change it. Written here, the band re-resolves the role
	 * under its own theme and comes out Mint over a White page. This is the same
	 * trap the News Block's featured card documents, and it is worth repeating:
	 * the band rendered White for a build because the declaration was one level
	 * up.
	 *
	 * `--osr-hero-bg` is kept separate from `--osr-surface` rather than
	 * overriding it, on the split the News Block and the Events Block make for
	 * their section bands: the cards read the surface too, so overriding it here
	 * would repaint every card to match the band.
	 */
	--osr-hero-bg: var(--ota-background, #d4f0d9);
	--osr-text: var(--ota-text, #003038);
	--osr-heading: var(--ota-white-text, #003038);
	--osr-teal: var(--ota-text-muted, #005361);

	box-sizing: border-box;
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 24px;
	padding-block: 92px;
	padding-inline: var(--osr-gutter);
	background-color: var(--osr-hero-bg);
	color: var(--osr-text);

	/*
	 * The same two pixels the page hero band carries, for the same reason and
	 * with the same caveat. See the long note on `.ota-page-hero`: the header
	 * above is `position: fixed` over a white page, so a hairline at the join
	 * flashes white, and this paints the band's own colour into it. Mitigation
	 * rather than a proven fix, and free because the header is already this
	 * colour.
	 */
	box-shadow: 0 -2px 0 0 var(--osr-hero-bg);
}

/*
 * Above the motif. The motif is a sibling drawn last in the frame, so leaving
 * the stack to source order would put it over the intro at any width where the
 * two overlap, and they do overlap below about 1013px.
 */
.ota-results__crumbs,
.ota-results__title,
.ota-results__intro,
.ota-results__hero .ota-results__form {
	position: relative;
	z-index: 1;
}

.ota-results__crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding-block-start: 8px;
	/* 13px has no global. See the note on the three local cuts above. */
	font-size: 13px;
	font-weight: 700;
	line-height: 1.65em;
}

.ota-results__crumb {
	color: var(--osr-text);
	text-decoration: none;
}

/*
 * The separator, and it is here rather than in the template on purpose:
 * `hero.php` prints the crumbs and nothing between them, because a printed "/"
 * is a text node that a screen reader announces between every pair, and hiding
 * it needs a wrapper element per slash to hang an `aria-hidden` on. Generated
 * content is not in the accessibility tree in any engine that matters, so the
 * slash is seen and not heard.
 *
 * On the crumb rather than on the gap, so it inherits the trail's own weight and
 * colour, and it takes half the 10px gap on each side, which is what the frame
 * draws: "Home" ends at 34, the slash sits at 44, "Search" starts at 60.75.
 */
.ota-results__crumb + .ota-results__crumb::before {
	content: "/";
	margin-inline-end: 10px;
	color: var(--osr-text);
}

/*
 * The link crumb binds `--ota-accent`, which the frame does. Worth flagging
 * rather than burying: in Mint, which is the mode this hero resolves,
 * `--ota-accent` is the same `#003038` as `--ota-text`, so "Home" has zero
 * visual differentiation from the current crumb as drawn. In Ash it would be
 * ochre. The underline on hover below is this file's, not the frame's, and it is
 * the only thing that makes the crumb read as a link on this theme.
 */
a.ota-results__crumb {
	color: var(--osr-accent);
}

a.ota-results__crumb:hover,
a.ota-results__crumb:focus-visible {
	text-decoration: underline;
}

/*
 * Only the size and the tracking come from the global. The kit publishes
 * Heading/H1 as Regular at 1.372em; the frame draws Bold at 60/60, which is a
 * line height of exactly 1. Applying the global whole does not reproduce the
 * hero, so the two properties it gets wrong are stated here.
 */
.ota-results__title {
	margin: 0;
	max-width: 810px;
	color: var(--osr-heading);
	font-size: var(--e-global-typography-h1-font-size, 3.75rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: var(--e-global-typography-h1-letter-spacing, -0.6px);
}

/*
 * 18px Bold at 1.6. The scale has no 18px cut at all: Body/Lead is 22px and
 * Body/Default is 17px, and neither is this. The Bold is what the frame draws
 * and it is unusual for an intro paragraph, so it is worth confirming rather
 * than assuming it was meant to be Light.
 */
.ota-results__intro {
	margin: 0;
	max-width: 620px;
	color: var(--osr-text);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.6;
}

/*
 * The ochre circles, which are teal on this page: the vector binds `bar/overlay`
 * and Mint resolves that to `#005361`. The name in the layer reflects the Ash
 * default, not what this frame draws.
 *
 * Anchored right, not left. Figma reports `left: 1129.039px` against a 1440
 * artboard, and ported literally that walks off screen or leaves a gap at every
 * other width. The right anchor is the same shape at 1440 and the only one that
 * survives a resize: 1129.039 + 621.918 - 1440 is the 311px of overhang.
 *
 * `max-width: none` and a stated height because this is an `<img>`, and the
 * theme's reboot ships `img { max-width: 100%; height: auto }`: left alone the
 * motif would be squeezed to the hero's width and lose the overhang that is the
 * whole point of it. It overflows the band by 311px horizontally and 208px
 * vertically and the hero's `overflow: hidden` clips both, which is exactly what
 * the frame does, so it costs no document scroll.
 *
 * THE GLYPH'S COLOUR IS IN THE FILE, NOT HERE, and that is true of every icon on
 * this page. `assets/img/search/motif.svg` is `fill="#005361"`, which is what
 * `bar/overlay` and so `--ota-overlay` resolve to in Mint. An `<img>` cannot be
 * recoloured from CSS, so there is deliberately no `--osr-motif` token: a token
 * nothing can consume is worse than none. If the artwork ever has to follow a
 * theme the answer is to swap these ten `<img>` elements for `mask-image` on a
 * `background-color`, which is the shape `ota-buttons.css` already uses for its
 * arrow glyph. Worth knowing before somebody puts this page under a dark theme
 * and wonders why every icon stayed where it was.
 */
.ota-results__motif {
	position: absolute;
	z-index: 0;
	top: 91px;
	right: -311px;
	display: block;
	width: 622px;
	max-width: none;
	height: 602px;
	pointer-events: none;
}

/* --- Search form --------------------------------------------------------- */

/*
 * Qualified by `.ota-results__hero` from here to the end of this block, which is
 * scoping rather than separation: these controls only exist inside the hero and
 * the qualifier says so. The header search is a different component with a
 * different prefix, `.ota-search__*`, so nothing here needs to be kept away from
 * it. See the note at the top of this file.
 */
/*
 * THE PILL IS THE FORM, NOT THE FIELD. Figma 507:16253 is one rounded white box
 * holding the magnifier, the value, the clear button and the Search button, and
 * `hero.php` renders the submit as a sibling of `.ota-results__field` rather than
 * inside it. So the white, the radius and the 12px of padding all live here, and
 * `.ota-results__field` is the group that grows inside it. Putting them on the
 * field instead leaves the Search button sitting outside the pill it belongs to.
 *
 * The pill's 74.75px height is 12 + 50.75 + 12, and the 50.75 is the submit:
 * `.ota-btn-size--sm` rounds that to 52, which is the deliberate call recorded
 * at `ota-buttons.css:139` about not chasing instance-resize decimals.
 *
 * 20px of leading padding is the frame's 12 on the pill plus the 8 it gives the
 * left group, so the magnifier starts where it is drawn.
 *
 * One 12px gap throughout rather than the frame's 10px after the magnifier and
 * 12px between the controls. The 2px is inside the same rounding as the height.
 */
.ota-results__hero .ota-results__form {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	max-width: var(--osr-form);
	padding: 12px;
	padding-inline-start: 20px;
	border-radius: 999px;
	background-color: var(--osr-field);
	transition: box-shadow 150ms ease;
}

/*
 * The ring goes on the pill, not on the input. The input has no border and no
 * background of its own, so a ring around it would draw a floating rectangle
 * inside a pill. No focus state is drawn anywhere on this frame; this is the
 * button baseline's ring, reused rather than invented.
 */
.ota-results__hero .ota-results__form:focus-within {
	box-shadow: 0 0 0 3px var(--osr-focus);
}

/*
 * The field's label. Visually hidden rather than `screen-reader-text`, which is
 * the theme's class and is not this component's to lean on: the only rule for it
 * on this site is `label.screen-reader-text` in the Agend theme's `_forms.scss`,
 * and the last commit on this branch was specifically about undoing that kind of
 * dependency. The clip rectangle, not `display: none`, so the label still names
 * the input for anything reading the accessibility tree.
 *
 * `position: absolute` puts it out of the flex flow as well as out of sight, so
 * it consumes none of the pill's 12px gap.
 */
.ota-results__hero .ota-results__form > label {
	position: absolute;
	overflow: hidden;
	width: 1px;
	height: 1px;
	padding: 0;
	border: 0;
	clip-path: inset(50%);
	white-space: nowrap;
}

/*
 * `border: 0` IS tidying, contrary to what this comment used to say. The rule it
 * named, `ota-mega-menu.css:304`, is `.ota-search__field`, the header's own
 * underlined field, and it cannot match `.ota-results__field`. Nothing gives this
 * element a border to remove. Kept because a pill with no rule is what the frame
 * draws and the declaration states it, not because it is holding anything off.
 */
.ota-results__hero .ota-results__field {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 12px;
	min-width: 0;
	border: 0;
}

/* An `<img>`, so the theme reboot's `height: auto` would drive the box off the
   file's intrinsic size rather than the design's. */
.ota-results__hero .ota-results__icon {
	flex: none;
	display: block;
	width: 20px;
	max-width: none;
	height: 20px;
}

/*
 * `font: inherit` is not enough here, because the pill sets no family of its own
 * and a bare `input` does not inherit one from the page. The family is named the
 * same way `ota-buttons.css` names it and for the same reason: the Agend theme
 * puts its own condensed family on form controls, so leaving the family alone
 * inherits the theme's rather than the design's.
 */
.ota-results__hero .ota-results__input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--osr-text);
	font-family: "NB International Pro", sans-serif;
	font-size: 18px;
	font-weight: 400;
	line-height: normal;
	appearance: none;
}

.ota-results__hero .ota-results__input:focus {
	outline: none;
}

.ota-results__hero .ota-results__input::placeholder {
	color: var(--osr-meta);
	/* Firefox ships placeholders at 54% opacity, which puts this grey under the
	   contrast floor on white. */
	opacity: 1;
}

/* WebKit draws its own clear affordance inside a `type="search"` field, which
   would sit beside the design's own clear button and do the same job. */
.ota-results__hero .ota-results__input::-webkit-search-cancel-button,
.ota-results__hero .ota-results__input::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

.ota-results__hero .ota-results__clear {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background-color: var(--osr-teal);
	/* `opacity: 1` is the initial value and nothing here overrides it. This once
	   claimed to answer `ota-mega-menu.css:350`, which is `.ota-search__clear` and
	   matches the header's own control, not this one. Left in as a statement that
	   the hero's clear is a solid teal disc rather than the ghost the header
	   draws. */
	opacity: 1;
	cursor: pointer;
	transition: background-color 150ms ease;
}

/*
 * The `[hidden]` case restated at this weight, because the rule above defeats the
 * blanket guard near the top of this file. Both are (0,2,0) and this one is later
 * in source order, so the guard lost the cascade and the attribute never took
 * visual effect: the button ships `hidden` from `hero.php` and `syncClear()`
 * toggles `clear.hidden`, so without this the dead button was visible with JS off
 * and never disappeared when the field emptied. (0,3,0) settles it.
 */
.ota-results__hero .ota-results__clear[hidden] {
	display: none;
}

.ota-results__hero .ota-results__clear img {
	display: block;
	width: 19px;
	max-width: none;
	height: 19px;
}

/* No hover is drawn for this button. Darkening to the text role is the least
   invented thing available: it is the pair the clear button already sits
   between, and it holds on every theme. */
.ota-results__hero .ota-results__clear:hover {
	background-color: var(--osr-text);
}

/*
 * The submit is a `.ota-btn ota-btn--primary ota-btn-size--sm`, so its size, its
 * badge and its arrow all come from the button baseline and none of them are
 * restated here.
 *
 * The four that ARE restated are read from the button baseline's own tokens, so
 * nothing is duplicated and nothing can drift.
 *
 * They are NOT answering the header's stylesheet, which is what this comment
 * used to say. `ota-mega-menu.css:380` is `.ota-search__submit`, the header's own
 * control, and no selector in that file matches `.ota-results__submit`. The
 * observation that survives is about `ota-buttons.css`, not the mega menu: the
 * baseline and this file are enqueued on the same hook, so their relative order
 * is an accident of two priorities, and stating these four here settles the paint
 * without depending on it.
 */
.ota-results__hero .ota-results__submit {
	flex: none;
	background-color: var(--ob-bg);
	color: var(--ob-text);
	font-family: var(--ob-font-family);
	font-weight: 700;
}

/* --- Body ---------------------------------------------------------------- */

/*
 * 920 + 40 + 320 in the frame, written as `minmax(0, 1fr)` for the results
 * column rather than a fixed 920. Two reasons, and they point the same way.
 *
 * A grid item's automatic minimum size is its content, not zero, so a long
 * unbroken title in a card would push the column past its share; `minmax(0, 1fr)`
 * is the fix, the same one the Events Block grid uses.
 *
 * And the route cannot promise 1440 of room. Depending on which chrome branch
 * the theme takes, this page renders either full bleed or inside a Bootstrap
 * `.container`, which is 1140px at its widest. A fixed 920 + 40 + 320 overflows
 * that by 140px; a fractional results column simply narrows.
 *
 * `align-items: start` so the Refine panel hugs its content instead of
 * stretching to the height of the results list. The frame draws it 1018.625
 * against a 2215.328 column, and it draws no sticky treatment.
 *
 * Deliberately unpainted. The frame draws this band white, which is this site's
 * own page background, and painting it would fight a theme class that an editor
 * might one day put on the page while also flattening the card-on-page reading
 * the hairline border depends on.
 */
.ota-results__body {
	box-sizing: border-box;
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--osr-aside);
	align-items: start;
	gap: var(--osr-column-gap);
	padding-block: 52px 96px;
	padding-inline: var(--osr-gutter);
}

/*
 * One column, for a page with no Refine panel: every term archive, and the
 * search page's All and Pages tabs. The second track is a fixed width, not a
 * fraction, so without this the grid goes on holding 320px plus the 40px gap
 * for an element that was never rendered and the cards stop 360px short of the
 * container. Set from PHP in results.php, which already knows.
 */
.ota-results__body--wide {
	grid-template-columns: minmax(0, 1fr);
}

/*
 * The body when the listing sits inside another page instead of being one, which
 * is the OTA Group Archive widget. The 52px above and 96px below are the routed
 * page's own breathing room under its hero and above its footer. Inside an
 * Elementor container there is a hero and a sub-nav above, a section below, and
 * spacing the editor sets on the container itself, so the routed padding stacks
 * on top of all three. Zeroed at both breakpoints: the selector is one class
 * longer than the `max-width: 1024px` rule further down, so it wins there
 * without needing to be repeated. The inline gutter is kept, because it is what
 * centres the list on the 1280px measure in a full width container.
 */
.ota-results--embedded .ota-results__body {
	padding-block: 0;
}

/* 22px between the tab row, the results header and the list, which is what the
   frame's coordinates give twice over. */
.ota-results__main {
	display: flex;
	flex-direction: column;
	gap: 22px;
	min-width: 0;
}

/*
 * The Refine panel. 28px of padding all round, a 24px radius and the ash fill,
 * all three off the documented scales, which is why they are numbers here rather
 * than tokens: `radius/md` is 14 and `radius/full` is 999, and the spacing scale
 * is 8 / 12 / 16 / 24 / 32 / 48.
 */
.ota-results__aside {
	box-sizing: border-box;
	padding: 28px;
	border-radius: var(--osr-radius);
	background-color: var(--osr-ash);
	color: var(--osr-text);
}

/* --- Tabs ---------------------------------------------------------------- */

/*
 * The row rule is an inset shadow rather than a `border-block-end`, and that is
 * the whole trick that lets the active tab's 2px underline sit ON the row's 1px
 * line instead of stacking 3px under it. A parent's inset shadow paints in the
 * parent's own phase, and a child's border paints later, so the active tab's
 * ochre covers the hairline across its own segment and nothing needs a negative
 * margin to pull it up.
 *
 * Every tab carries the 2px at rest, transparent when it is not the active one,
 * so activation cannot shift the row. The frame draws that explicitly: the
 * inactive tabs have a 2px `rgba(0,0,0,0)` border, not no border.
 */
.ota-results__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
	box-shadow: inset 0 -1px 0 var(--osr-line);
}

.ota-results__tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding-block: 0 15px;
	border-block-end: 2px solid transparent;
	color: var(--osr-meta);
	text-decoration: none;
	/* 16px has no global either. The whole page except the H1 runs on the kit's
	   1.65 ratio, so the ratio is right and only the stop is missing. */
	font-size: 16px;
	font-weight: 500;
	line-height: 1.65em;
	white-space: nowrap;
	transition:
		color 150ms ease,
		border-color 150ms ease;
}

/* No tab hover is drawn. Bringing the label to the text colour without touching
   the underline is the smallest thing that reads as interactive and it cannot be
   confused with the active state, which is the underline. */
.ota-results__tab:hover {
	color: var(--osr-text);
	text-decoration: none;
}

/*
 * Note the weight inversion, which is the frame's and not a slip in
 * transcription: the ACTIVE tab is Regular and the inactive ones are Medium.
 * Reproduced as drawn, and flagged for confirmation, because every other active
 * state in this design file goes heavier rather than lighter.
 */
.ota-results__tab--active {
	border-block-end-color: var(--osr-ochre);
	color: var(--osr-text);
	font-weight: 700;
}

.ota-results__tab-count {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	padding: 2px 9px;
	border-radius: 999px;
	background-color: var(--osr-ash);
	color: var(--osr-text);
	font-size: var(--e-global-typography-caption-font-size, 0.75rem);
	font-weight: 700;
	line-height: 1.65em;
}

.ota-results__tab--active .ota-results__tab-count {
	background-color: var(--osr-cta);
	color: var(--osr-on-cta);
}

/* --- Toolbar ------------------------------------------------------------- */

.ota-results__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 45px;
}

.ota-results__summary {
	margin: 0;
	color: var(--osr-meta);
	font-size: var(--e-global-typography-small-font-size, 0.9375rem);
	font-weight: var(--e-global-typography-small-font-weight, 300);
	line-height: 1.65em;
}

/* The quoted term inside the summary. Medium at the same size, which the kit
   publishes Light, so only the weight and the colour are local. */
.ota-results__term {
	color: var(--osr-text);
	font-weight: 500;
}

/*
 * The sort control is a `<form>`, and the "Sort by" text is a bare `<label>`
 * inside it, so the label takes its type from this rule rather than from a class
 * of its own.
 */
.ota-results__sort {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	color: var(--osr-meta);
	/* 14px, the second of the three local cuts. */
	font-size: 14px;
	font-weight: 300;
	line-height: 1.65em;
}

/*
 * A native `<select>`, drawn as the frame's custom pill. That is a real decision
 * and not the lazy one: the frame is a 999px box with a 1px hairline, 17px of
 * symmetric inline padding and a bespoke 15px chevron at a fixed offset, so a
 * select cannot get there without `appearance: none` and a glyph of its own, at
 * which point it is custom either way. What the native element still buys is the
 * whole no-JS path, the platform's own option list on every device, and the
 * keyboard behaviour for free.
 *
 * The glyph is a `background-image` rather than a pseudo-element, because a
 * `<select>` is a replaced element and renders neither `::before` nor `::after`.
 * That works here only because `assets/img/search/chevron-down.svg` carries the
 * design's `#003038` in the file rather than `currentColor`, which the note on
 * the motif covers: a background image cannot read a colour from CSS. If the
 * chevron ever has to follow a theme, this becomes `mask-image` with
 * `background-color`, which needs a wrapper element the markup does not have.
 *
 * The trailing padding is 17 for the frame's own inset, plus the 15px glyph,
 * plus the 10px between them.
 */
.ota-results__sort-select {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	min-height: 45px;
	padding-block: 0;
	padding-inline: 17px 42px;
	border: 1px solid var(--osr-line);
	border-radius: 999px;
	background-color: var(--osr-field);
	background-image: url("../img/search/chevron-down.svg");
	background-repeat: no-repeat;
	background-position: right 17px center;
	background-size: 15px 15px;
	color: var(--osr-text);
	font-family: "NB International Pro", sans-serif;
	font-size: var(--e-global-typography-small-font-size, 0.9375rem);
	font-weight: 500;
	line-height: 1.65em;
	text-align: start;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

/*
 * The no-JS Sort submit. `ota-search.js` retires it with the `hidden` attribute
 * as soon as it runs, so on nearly every visit this rule paints nothing at all,
 * and on the visit that matters it has to look like it belongs beside the pill
 * rather than like a stray form control.
 *
 * Not a `.ota-btn`. The button baseline's smallest size is 52px against this
 * control's 45, and it would read as the page's primary action sitting next to
 * a filter. This is the same pill as the select with the fill and the glyph
 * taken out, which is as quiet as a submit can be while still being one.
 */
.ota-results__sort-button {
	box-sizing: border-box;
	display: inline-flex;
	flex: none;
	align-items: center;
	min-height: 45px;
	padding-block: 0;
	padding-inline: 17px;
	border: 1px solid var(--osr-line);
	border-radius: 999px;
	background-color: transparent;
	color: var(--osr-text);
	font-family: "NB International Pro", sans-serif;
	font-size: var(--e-global-typography-small-font-size, 0.9375rem);
	font-weight: 500;
	line-height: 1.65em;
	cursor: pointer;
	transition: border-color 150ms ease;
}

.ota-results__sort-button:hover {
	border-color: var(--osr-text);
}

/* --- Results ------------------------------------------------------------- */

.ota-results__results {
	display: flex;
	flex-direction: column;
	gap: var(--osr-row-gap);
}

/*
 * The card is NOT one anchor, and that is a real departure from the News Block
 * and the Events Block rather than an oversight. Both of those wrap the whole
 * card in a single link and make the affordance text a span, precisely so a
 * screen reader announces one destination. This card cannot: the tag chips are
 * links of their own with their own URLs, and an anchor cannot contain an
 * anchor. `result-card.php` makes it an `<article>` with the one real link on
 * the title and the arrow an `aria-hidden` span, and a stretched-link overlay is
 * not used either, because it would sit over the chips and swallow them.
 *
 * The hover treatment is a border colour rather than the transparent
 * pseudo-element ring the other two cards use. Those need the pseudo-element
 * because they have no border at rest and adding one on hover would resize them.
 * This card already carries its hairline at rest, so changing its colour costs
 * no layout and needs no second box.
 */
/*
 * `align-items: flex-start`, not `stretch`. Stretch makes the media column as
 * tall as the tallest thing in the row, so a card with a square thumbnail and
 * four lines of text grew the image to match the text instead of the other way
 * round. Starting both at the top lets the card be as tall as its content and
 * no taller.
 */
.ota-results__card {
	box-sizing: border-box;
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 20px;
	padding: 16px;
	border: 1px solid var(--osr-line);
	border-radius: var(--osr-radius);
	background-color: var(--osr-surface);
	color: var(--osr-text);
	transition: border-color 150ms ease;
}

.ota-results__card:hover {
	border-color: var(--osr-text);
}

/*
 * THE WHOLE CARD IS THE LINK, AND IT IS STILL ONE LINK.
 *
 * Wrapping the card in an `<a>` is the obvious build and it is invalid: the
 * chips inside are anchors too, and an anchor inside an anchor is silently
 * reparented by the parser. Giving the image and the arrow their own anchors is
 * the other obvious build, and it puts three links to the same place in the
 * accessibility tree so a screen reader announces the destination three times
 * per result.
 *
 * The overlay does neither. The title's anchor grows a transparent `::after`
 * that covers the card, so the image, the arrow, the excerpt and the empty
 * space all activate it, while the accessibility tree still holds exactly one
 * link, named by the title. The card is already `position: relative`, which is
 * what the overlay resolves against.
 *
 * The chips must be lifted above it or they stop being clickable, because the
 * overlay paints after them in source order. They get `position: relative` and
 * a z-index rather than the overlay getting a negative one: a negative z-index
 * would drop the overlay behind the card's own background and nothing would be
 * clickable at all.
 */
.ota-results__card-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.ota-results__card .ota-results__chips {
	position: relative;
	z-index: 1;
}

/*
 * 200px wide and stretched to the text column's height. The thumbnail has no
 * aspect ratio of its own in the frame: its height is 192.391 on a news row and
 * 198.742 on an event row, which is exactly the content column's height in each
 * case. So the text drives the picture, not the other way round.
 *
 * The divider tint stands in while the image loads, and the wrapper is what
 * disappears entirely when a result has no image: 37 of the 39 pages on this
 * site have none, so a missing thumbnail has to render nothing at all rather
 * than an empty 200px box.
 */
/*
 * THE THUMBNAIL IS A SQUARE, AND THE SQUARE IS ENFORCED HERE RATHER THAN ASKED
 * OF WORDPRESS. `wp_get_attachment_image()` is handed `medium`, which is a
 * bounding box and not a crop, so a portrait original comes back portrait. Left
 * to itself the media column then sets the card's height: one 3:4 photo made a
 * 600px card holding four lines of text, with the excerpt and the chips
 * stranded at the top and the rest of the card empty.
 *
 * `aspect-ratio` on the frame plus `object-fit: cover` on the image crops to
 * the centre without touching the upload or generating a new size, so it costs
 * no regeneration and works on the images already in the library.
 */
.ota-results__card-media {
	flex: none;
	overflow: hidden;
	aspect-ratio: 1;
	width: var(--osr-thumb);
	border-radius: var(--osr-thumb-radius);
	background-color: var(--osr-line);
}

.ota-results__card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*
 * Two classes, not for style but for specificity, and the rule being answered is
 * a different one from the rest of the plugin. The News Block and the Events
 * Block are fighting Elementor's `.elementor img { height: auto; max-width: 100% }`
 * at 0,1,1. This page is not Elementor rendered, so there is no `.elementor`
 * ancestor and that rule never matches; what does match is the theme's own
 * reboot, `img { max-width: 100%; height: auto }` at 0,0,1, which collapses the
 * box to the image's intrinsic size in exactly the same way. The border radius
 * the theme puts on the same element is answered in the guard block above, which
 * needs a great deal more weight.
 */
.ota-results .ota-results__card-thumb {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
}

/*
 * A group file has no picture, so its tile is the file type's icon centred on
 * the cream the site uses for its tiles. The `<img>` inside is the icon at its
 * own size, not a cover image, so it is pulled out of the rule above, which
 * would stretch it across the whole tile.
 */
.ota-results .ota-results__card-thumb--file {
	display: grid;
	place-items: center;
	background-color: var(--osr-ash);
}

.ota-results .ota-results__card-thumb--file img {
	width: 56px;
	height: 56px;
	object-fit: contain;
}

/*
 * One 10px gap. The frame's own gaps down this column are 9.4, 9.0 and 11.0,
 * which are hand-nudged half-leading artefacts rather than a spec, and only the
 * 13px above the tag row is consistent across both row variants. So the column
 * takes one gap and the chip row makes up its own difference in padding.
 */
.ota-results__card-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	min-width: 0;
}

/*
 * Ochre on every row type. The frame draws News, Event and Interest group with
 * the same `#F04C3A`, so there is no per-type differentiation to build and none
 * should be invented. Tracking is 0.96/12, which is 0.08em.
 */
.ota-results__eyebrow {
	color: var(--osr-ochre);
	font-size: var(--e-global-typography-caption-font-size, 0.75rem);
	font-weight: 700;
	line-height: 1.65em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* 20px, the first of the three local cuts. Tracking is -0.2/20. */
.ota-results__card-title {
	margin: 0;
	color: var(--osr-text);
	font-size: 20px;
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.ota-results__card-title a {
	color: inherit;
	text-decoration: none;
}

.ota-results__card:hover .ota-results__card-title a,
.ota-results__card-title a:hover {
	text-decoration: underline;
}

/*
 * Clamped to two lines, which is what the frame's 45px clipped box holds at
 * 15/22.5. The line height is the one property that does not come from
 * Body/Small: the kit publishes 1.65 and the frame draws 1.5.
 *
 * No post on this site has an excerpt today, so in practice this element is
 * usually absent rather than empty. It renders nothing at all when there is
 * nothing to render, which is why there is no min-height here.
 */
.ota-results__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	margin: 0;
	color: var(--osr-meta);
	font-size: var(--e-global-typography-small-font-size, 0.9375rem);
	font-weight: var(--e-global-typography-small-font-weight, 300);
	line-height: 1.5;
}

/* 18px between meta items in the frame, and a row gap so a wrapped second line
   does not sit against the first. */
.ota-results__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ota-results__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--osr-meta);
	font-size: 14px;
	font-weight: 300;
	line-height: 1.65em;
}

.ota-results__meta-icon {
	flex: none;
	display: block;
	width: 15px;
	max-width: none;
	height: 15px;
}

/* The 3px is what turns the column's 10px gap into the 13px the frame draws
   above the tag row, which is the one gap that is consistent on both variants. */
.ota-results__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding-block-start: 3px;
	padding-inline: 0;
	list-style: none;
}

/*
 * The 1px transparent border is the fixed-height trick already documented around
 * `ota-buttons.css:190`, and the frame draws it: a `rgba(0,0,0,0)` stroke on
 * every chip. Without it a hover border would grow the chip by 2px and reflow
 * the row.
 */
.ota-results__chip {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	border: 1px solid transparent;
	border-radius: 999px;
	background-color: var(--osr-ash);
	color: var(--osr-text);
	text-decoration: none;
	font-size: var(--e-global-typography-small-font-size, 0.9375rem);
	font-weight: 500;
	line-height: 1.3;
	transition: border-color 150ms ease;
}

.ota-results__chip:hover,
.ota-results__chip:focus-visible {
	border-color: var(--osr-text);
	text-decoration: none;
}

/*
 * The arrow. Qualified by `.ota-results__card` for scope, not for defence: the
 * rule this once cited, `ota-mega-menu.css:250`, is `.ota-search__go` and belongs
 * to the header's own submit dot, which shares no class with this element.
 *
 * Centred on the whole card box rather than on the text column, which the frame
 * confirms arithmetically: (234.391 - 48) / 2 is the y it reports on a news row
 * and (240.742 - 48) / 2 is the y on an event row.
 *
 * A `<span>`, `aria-hidden`, and not a link: `result-card.php` puts the only
 * anchor on the title, because the tag chips are links too and an anchor cannot
 * contain an anchor. So this takes no focus and has no hover of its own, and
 * every state it has comes off the card.
 *
 * THE HOVER IS A FILL SWAP, NOT THE BUTTON'S INVERSION, and the reason is the
 * glyph. `.ota-btn--primary` inverts on hover by moving the fill colour to the
 * text, which works because its arrow is a mask painted with a CSS colour. This
 * arrow is `arrow-right.svg` in an `<img>`, stroked `#FFFFFF` in the file, so an
 * inversion would leave a white arrow on a white card: invisible. Moving the
 * disc to the muted role keeps the glyph readable and still says something
 * happened, which is the Events Block's dot idiom with the two ends swapped.
 */
.ota-results__card .ota-results__go {
	box-sizing: border-box;
	display: inline-flex;
	flex: none;
	align-self: center;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	background-color: var(--osr-cta);
	transition: background-color 150ms ease;
}

.ota-results__card .ota-results__go img {
	display: block;
	width: 20px;
	max-width: none;
	height: 20px;
}

.ota-results__card:hover .ota-results__go {
	background-color: var(--osr-teal);
}

/* --- Show more ----------------------------------------------------------- */

/*
 * A local size override on the shared button, not a fourth size in the button
 * system. `ota-buttons.css:134-138` already names this exact conflict and leaves
 * it open: the design file's in-page `ota-btn--md` buttons are drawn 48px tall
 * against the component's 64, and the Search frame is now the second independent
 * data point for 48 / 1.5 / 29.5, alongside the Dashboard's "Join OTA". Until
 * that is settled the numbers live here, on one button, where they cannot resize
 * every Medium button on the site.
 *
 * `.ota-btn.ota-results__more` rather than `.ota-results__more` alone, because the
 * baseline declares these tokens on `.ota-btn` at 0,1,0 and this file is not
 * guaranteed to load after `ota-buttons.css`. Two classes is the same weighting
 * the baseline gives its own `.ota-btn.ota-btn-size--sm`, and it settles the
 * question without depending on enqueue order.
 *
 * `--ob-pad-end` is restated because the baseline tightens the trailing side for
 * a badge that is not drawn here, and left alone the pill comes out 29.5px
 * leading against 10px trailing. `ota-btn-arrow--none` sets the same token, so
 * this is a no-op when the template carries that class and the fix when it does
 * not.
 *
 * `margin-block-start` is the one block margin in this file, and it is legal
 * because the theme guard's `:is()` list deliberately excludes the anchor this
 * button is. 22px of column gap plus 8px is the 30px the frame draws under the
 * last card.
 */
.ota-btn.ota-results__more {
	--ob-height: 48px;
	--ob-border: 1.5px;
	--ob-pad-inline: 29.5px;
	--ob-pad-end: var(--ob-pad-inline);

	align-self: center;
	margin-block-start: 8px;
}

/*
 * The in-flight state, which the script sets as `aria-disabled="true"` while a
 * page is being fetched. Nothing styled it, and the script's guard silently
 * swallows repeat clicks, so on a slow connection the reader pressed Show more,
 * saw nothing change, pressed again and got no acknowledgement of either press:
 * the button read as broken. Assistive tech was already told, via the attribute
 * and `aria-busy` on the list; this is the same message for everyone else.
 *
 * Invented, like every other state on this page, and in the bucket the PR flags
 * for a designer's pass.
 */
.ota-btn.ota-results__more[aria-disabled="true"] {
	opacity: 0.6;
	cursor: progress;
}

/* --- Empty --------------------------------------------------------------- */

/*
 * Invented. There is no zero-results frame anywhere in the design file, no "no
 * results for" copy, no suggestion treatment and no error state, so this is the
 * quietest thing that is consistent with the rest of the page: the card title's
 * cut for the heading and the excerpt's for the line under it, on the page's own
 * background rather than in a box. Worth designing properly, because a search
 * page's empty state is one of the two states it spends most of its life in.
 */
.ota-results__empty {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-block: 40px;
}

.ota-results__empty-title {
	margin: 0;
	color: var(--osr-text);
	font-size: 20px;
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.ota-results__empty-text {
	margin: 0;
	color: var(--osr-meta);
	font-size: var(--e-global-typography-small-font-size, 0.9375rem);
	font-weight: var(--e-global-typography-small-font-weight, 300);
	line-height: 1.65em;
}

/* --- Facets -------------------------------------------------------------- */

/*
 * A `<form>`, not a wrapper: the facets post with `method="get"` so the panel
 * works with scripting off, which is why the Apply button below exists at all.
 * Its hidden inputs are flex children in principle and never in practice, since
 * the HTML rendering rules give `input[type=hidden]` a `display: none` that is
 * marked `!important` and so outranks the flow set here.
 */
.ota-results__facets {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 28px;
}

/*
 * "Refine results", reached through its element. The vocabulary names the group
 * heading `ota-results__facet-title`, which is the 12px bold uppercase grey, and
 * this one is 20px bold navy: one class cannot be both and there is no third
 * name for it, so `facets.php` leaves it unclassed by agreement rather than by
 * omission. 20px is the first of the three cuts the scale does not have.
 *
 * The frame puts 21.9px under it and 28px between the groups. One 28px gap for
 * all of them, and the 6px is inside the same hand-nudging as everything else on
 * this panel: 28px padding, 24px radius, 14px row gap and a 42.047 row pitch are
 * none of them on a documented scale either.
 */
.ota-results__facets > h2 {
	margin: 0;
	color: var(--osr-text);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.01em;
}

/*
 * The Apply button, which is the no-JS path's only way to commit a tick and is
 * retired by the script the moment it loads. It is the site's Button component
 * reached through the `.ota-btn` contract, so nothing about its colour is
 * restated here; it takes the same local 48px size override as Show more, for
 * the same reason and with the same note. Two classes so it beats the baseline's
 * own 0,1,0 whatever order the two files load in.
 */
.ota-results__facets > .ota-btn {
	--ob-height: 48px;
	--ob-border: 1.5px;
	--ob-pad-inline: 24px;
	--ob-pad-end: var(--ob-pad-inline);
}

/*
 * 17px. The frame draws 17.2 under the group heading and 19 above the
 * disclosure, and the difference is inside its own hand-nudging: both rows in
 * both groups sit on a 42.047 pitch that no spacing token accounts for either.
 */
.ota-results__facet {
	display: flex;
	flex-direction: column;

	/*
	 * `width: 100%` because the parent is a COLUMN flex container with
	 * `align-items: flex-start`, and on a column that property governs the
	 * HORIZONTAL axis: it was shrinking this group to its widest label rather
	 * than letting it fill the panel. The rows then ended 21px short of where
	 * the panel's own padding puts them, so the counts pinned to the end of the
	 * row lined up against nothing, 21px inside the edge and looking like a
	 * mistake. The group has to be the full width for "pin the count to the
	 * right" to mean the panel's right.
	 */
	width: 100%;
	align-items: flex-start;

	/*
	 * The heading to its first row. 10px rather than the frame's 17px, for the
	 * same reason the rows tightened: the first row now carries 6px of padding
	 * above it that the frame's rows did not, so 17 measured as 23.
	 */
	gap: 10px;
}

.ota-results__facet-title {
	margin: 0;
	color: var(--osr-meta);
	font-size: var(--e-global-typography-caption-font-size, 0.75rem);
	font-weight: 700;
	line-height: 1.65em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/*
 * 4px, and the number is smaller than it looks because the rows carry 6px of
 * their own padding-block for the hover pill: the space between two labels is
 * 6 + 4 + 6, not 4. The frame's 42px pitch was measured on rows that had no
 * pill and therefore no padding, so porting it literally left the list looking
 * loose once the pill was added.
 */
.ota-results__facet-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
 * 34px is the 22px box plus the 12px gap, so a child term's label starts on the
 * same vertical as its parent's. Nothing in the design file draws a nested term,
 * because the Category facet it does draw is a flat list of states, but the code
 * is hierarchy-first and `tribe_events_cat` is the taxonomy that exercises it,
 * so the indent has to exist and this is the only reading of it that lines up
 * with anything already on the panel.
 */
.ota-results__children {
	display: flex;
	flex-direction: column;
	gap: 14px;
	flex: 0 0 100%;
	width: 100%;
	margin: 0;
	padding-block-start: 14px;
	padding-inline-start: 34px;
	list-style: none;
}

/*
 * The box sits 2px above the label's line-box centre in the frame. That is an
 * optical nudge on a 28.05 line box, not a spec, so this centres them and the
 * difference is under the rounding.
 */
/*
 * `width: 100%` is what pins the count to the panel's trailing edge.
 *
 * The count already carries `margin-inline-start: auto`, which pushes it to the
 * end of ITS OWN flex line. A `<label>` is not a block box, so without a width
 * the label shrank to the text and "auto" had no free space to push into: the
 * counts sat immediately after each label and stepped in and out down the panel
 * following the length of the words. Given the full row they line up in a
 * column against the edge, which is what makes them scannable.
 *
 * The row is also the hover target, hence the padding and the negative inline
 * margin: the tint has to reach the panel's padding on both sides, or it reads
 * as a stripe floating inside the panel rather than as the row lighting up.
 */
.ota-results__check {
	display: flex;
	align-items: center;
	gap: 12px;

	/*
	 * `flex: 1` and not `width: 100%`. Both fill the row, but `100%` resolves
	 * against the list and then the negative margins move that fixed box left,
	 * so the row started 8px early and finished 8px short and the counts sat
	 * inside the panel's own edge. A flex basis is computed AFTER margins, so
	 * the row grows by the 16px it is pulled out by and stays symmetric.
	 */
	flex: 1 1 auto;

	/*
	 * The padding and the matching negative margin are what let the pill be
	 * wider than the row without moving anything inside it: the content stays
	 * on the panel's own measure whether the pill is painted or not, so nothing
	 * shifts under the pointer. 14px so the box is inset rather than touching
	 * the pill's edge, and it stays inside the panel's 28px padding.
	 */
	padding-block: 6px;
	padding-inline: 14px;

	/*
	 * `margin-block: 0` is not tidiness. The theme gives every `label` a
	 * `margin-bottom` of 0.5rem, for stacked form fields where a label sits
	 * above its input. This label IS the row, so that 8px landed under each
	 * facet and read as the gap between them. It is why tightening the list's
	 * `gap` appeared to do nothing: the space was the label's own margin, not
	 * the gap, and the two were being adjusted in different files.
	 */
	margin-block: 0;
	margin-inline: -14px;
	border-radius: 999px;
	cursor: pointer;
	transition:
		background-color 0.18s ease,
		color 0.18s ease;
}

/*
 * THE HOVERED ROW IS THE MEGA MENU'S LINK PILL, deliberately and to the letter:
 * the same two colours, the same 999px radius, the same 0.18s ease, and the
 * same inversion of the disc at the end of the row. A facet row and a menu link
 * do the same job, so they should not be two different objects.
 *
 * `:focus-within` and not a separate `:focus` rule, because the real checkbox is
 * visually hidden inside this label: the row is the only thing either a pointer
 * or a keyboard can be seen to reach. The ring on the box stays as well, and the
 * two together say which row and which control. That ring has to be inverted to
 * survive this background, which is done where the focus rings are drawn near
 * the end of this file: in the row's own colour it was invisible.
 */
.ota-results__check:hover,
.ota-results__check:focus-within {
	background: var(--osr-row-active-bg);
	color: var(--osr-row-active-text);
}

/*
 * The label carries its own colour at rest, so it has to be told to follow the
 * row rather than inheriting from further up.
 */
.ota-results__check:hover .ota-results__check-label,
.ota-results__check:focus-within .ota-results__check-label {
	color: inherit;
}

/* The disc inverts, exactly as the nav's link dot does. */
.ota-results__check:hover .ota-results__check-count,
.ota-results__check:focus-within .ota-results__check-count {
	background-color: var(--osr-row-active-text);
	color: var(--osr-row-active-bg);
}

/*
 * The box inverts too, or it disappears into the row it is sitting on: at rest
 * a checked box is teal filled, and teal on navy is barely a shape. White box,
 * navy tick, which is the same pairing the disc just took.
 */
.ota-results__check:hover .ota-results__check-box,
.ota-results__check:focus-within .ota-results__check-box {
	border-color: var(--osr-row-active-text);
}

/*
 * The border is repeated here, not left to the rule above it. A checked box
 * sets its own border to teal at (0,3,1); the plain hover rule is (0,3,0) and
 * loses, so without naming the checked state again the box came up white with a
 * teal edge on a navy row.
 */
.ota-results__check:hover input:checked + .ota-results__check-box,
.ota-results__check:focus-within input:checked + .ota-results__check-box {
	border-color: var(--osr-row-active-text);
	background-color: var(--osr-row-active-text);
}

.ota-results__check:hover input:checked + .ota-results__check-box::after,
.ota-results__check:focus-within input:checked + .ota-results__check-box::after {
	background-color: var(--osr-row-active-bg);
}

/*
 * The real input is present and visually hidden rather than replaced, so the
 * facet works with the keyboard, works with JS off and posts with the form. The
 * painted box is the sibling span, and the clip rectangle is the standard one
 * rather than `display: none`, which would take the control out of the
 * accessibility tree and out of the tab order along with it.
 */
.ota-results__check input {
	position: absolute;
	overflow: hidden;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	clip-path: inset(50%);
	white-space: nowrap;
}

/*
 * THE TICK IS A BACKGROUND IMAGE ON THIS BOX, WHICH IS WHY THE SPAN IS EMPTY.
 * `facet-group.php` ships `<span class="ota-results__check-box" aria-hidden>` with
 * nothing in it, on the reasoning that ten rows of a 14px `<img>` that is
 * invisible on nine of them is ten requests and ten elements for one glyph, and
 * that an `<img>` cannot react to `:checked` without a sibling selector reaching
 * into it anyway. So the glyph is declared here on both states and only its
 * `background-size` moves: stated at rest as well as checked, so the browser has
 * the image decoded before the first tick rather than fetching it on click.
 *
 * `assets/img/search/check.svg` is stroked `#FFFFFF` in the file, which is the
 * design's tick on the teal fill and is why nothing here paints it. It is Lucide
 * `check` at 1.75 times Lucide's own stroke weight, which the frame draws and an
 * off-the-shelf glyph does not.
 */
.ota-results__check-box {
	box-sizing: border-box;
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border: 1.5px solid var(--osr-text);
	border-radius: 6px;
	background-color: var(--osr-field);
	transition:
		background-color 120ms ease,
		border-color 120ms ease;
}

/*
 * THE TICK IS A MASK, NOT A BACKGROUND IMAGE, SO THAT IT CAN CHANGE COLOUR.
 *
 * `check.svg` is a stroked path with the white baked into it, which is right on
 * the teal fill it sits on at rest and wrong everywhere else. On the hovered row
 * the box inverts to white, and a white tick on a white box is nothing at all.
 * A background image cannot be recoloured; a mask takes its shape from the
 * asset's alpha and its colour from a property, so the tick follows the state
 * the same way the button system's arrow follows `--ob-glyph`.
 *
 * Scaled rather than hidden, so the box never changes size and the rows do not
 * shift under the pointer. Same idiom as the nav's link dot.
 */
.ota-results__check-box::after {
	content: "";
	width: 14px;
	height: 14px;
	background-color: var(--osr-field);
	-webkit-mask: url("../img/search/check.svg") no-repeat center / contain;
	mask: url("../img/search/check.svg") no-repeat center / contain;
	transform: scale(0);
	transition:
		transform 120ms ease,
		background-color 120ms ease;
}

.ota-results__check input:checked + .ota-results__check-box {
	border-color: var(--osr-teal);
	background-color: var(--osr-teal);
}

.ota-results__check input:checked + .ota-results__check-box::after {
	transform: scale(1);
}

/*
 * Body/Default, and the only exact token match on the whole panel: NB
 * International Pro Light at 17/28.05 with no tracking, property for property.
 *
 * The colour is the one thing that is not the frame's. It draws pure `#000000`,
 * which is in no global and in no role, sitting beside navy everywhere else on
 * the page. Bound to the text role on the same reasoning `ota-news-block.css`
 * gives for its three unbound layers: the role is the only reading that survives
 * a theme change, and a stray pure black in a navy palette is far more likely a
 * slip than an instruction.
 */
.ota-results__check-label {
	color: var(--osr-text);
	font-size: var(--e-global-typography-body-font-size, 1.0625rem);
	font-weight: var(--e-global-typography-body-font-weight, 300);

	/*
	 * THE LINE HEIGHT IS LOCAL, AND IT IS WHAT SETS THE ROW'S HEIGHT.
	 *
	 * Body/Default is 17/28.05, a 1.65 ratio, and that is a paragraph measure:
	 * it exists to space stacked lines of prose. A facet label is one line
	 * inside a control, so the 28px line box was the tallest thing in the row
	 * and the list read as loose no matter what the gap between rows was set to.
	 * Tightening the gap alone could not fix it, because the gap was never the
	 * problem.
	 *
	 * 1.3 puts the line box at 22.1px, which is the 22px checkbox beside it, so
	 * the row is now as tall as its own controls. The size and the weight still
	 * come from the global, following the house rule: take the size from the
	 * scale, state locally only what the scale has no answer for.
	 */
	line-height: 1.3;
}

/*
 * Invented, and required. The design draws counts on the type tabs and none on
 * the facets, but the facet counts are computed with that group's own filter
 * excluded precisely so siblings never all drop to zero, and that only helps
 * anyone if the number is on screen. Set at 13px so it reads as an annotation
 * against the 17px label rather than as part of it.
 */
/*
 * The count is a filled disc pinned to the right of the row, deliberately the
 * same object as the active tab's count so the two counting surfaces on the
 * page read as one idea. `margin-inline-start: auto` does the pinning, so the
 * label can be any length and the discs still line up in a column down the
 * panel's trailing edge.
 *
 * A circle and not a pill: every count here is a single digit today and a disc
 * that silently becomes a lozenge at three digits is the more forgiving shape.
 * `min-width` equal to the height is what makes it round at one digit and grow
 * to a lozenge rather than clip at four.
 */
.ota-results__check-count {
	box-sizing: border-box;
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	margin-inline-start: auto;
	padding-inline: 9px;
	border-radius: 999px;
	background-color: var(--osr-cta);
	color: var(--osr-on-cta);

	/*
	 * Deliberately identical to `.ota-results__tab-count`: same size, same
	 * weight, same disc. The two are the same object, a count of results, and
	 * a reader should not have to work out whether they mean different things.
	 *
	 * NO `font-variant-numeric: tabular-nums`, and that is the whole reason this
	 * comment exists. It was here so the counts would line up in a column, which
	 * they do not need to: the discs are pinned to the panel's edge and the
	 * digit is flex-centred inside each one. What it actually did was select NB
	 * International Pro's tabular figures, whose "1" carries a foot serif that
	 * the proportional "1" does not, so the number beside a filter was visibly a
	 * different glyph from the number beside a tab.
	 */
	font-size: var(--e-global-typography-caption-font-size, 0.75rem);
	font-weight: 700;
	line-height: 1;
}

/*
 * "Show all tags". A button, not a link, because with JS off it is a submit that
 * round-trips the expanded state and with JS on it toggles in place, and neither
 * of those is a navigation. The chevron points down when collapsed, which is
 * what the frame draws; there is no expanded variant anywhere in the file, so
 * the 180 degree rotation is this file's reading of it.
 */
.ota-results__disclosure {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--osr-teal);
	font-family: "NB International Pro", sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.65em;
	text-align: start;
	cursor: pointer;
}

.ota-results__disclosure:hover {
	text-decoration: underline;
}

.ota-results__disclosure img {
	flex: none;
	display: block;
	width: 15px;
	max-width: none;
	height: 15px;
	transition: transform 150ms ease;
}

/*
 * The chevron carries the state, because the label does not: the design draws no
 * "Show fewer" variant anywhere in the file, so there is no string to swap to and
 * inventing one is a translation nobody has approved.
 *
 * Note which way round it is. `facet-group.php` ships `aria-expanded="true"`,
 * because with no script every term is already on screen, and the script flips it
 * to `false` when it caps the list. So `true` is the state where the chevron has
 * to point up, and this is the rotation rather than the resting position.
 *
 * The glyph is `chevron-down.svg`, which carries the sort control's `#003038` at
 * Lucide's stock stroke. The frame draws the disclosure's own chevron in teal at
 * 1.25 times that weight, and one file cannot be both. The difference is 15px
 * wide and the label beside it is already teal.
 */
.ota-results__disclosure[aria-expanded="true"] img {
	transform: rotate(180deg);
}

/* --- Focus --------------------------------------------------------------- */

/*
 * `:focus-visible` rather than `:focus`, so a mouse click does not leave a ring
 * behind on something that was only pressed, and a `box-shadow` rather than an
 * `outline`, so the ring follows a 999px pill's radius for free and costs no
 * layout. Both of those are the button baseline's calls, and this reuses its
 * ring colour rather than authoring a second one.
 *
 * Two elements are absent from this list on purpose. `.ota-results__more` and the
 * facet panel's Apply button are both `.ota-btn`, and the baseline already gives
 * them the identical ring. `.ota-results__go` is absent because it is an
 * `aria-hidden` span rather than a link, so it never takes focus: the card's one
 * destination is its title.
 *
 * No focus state is drawn anywhere on frame 441:11544, for any element. All of
 * this is invention, and it is not optional invention: without it the page is
 * unusable from a keyboard.
 */
.ota-results__crumb:focus-visible,
.ota-results__tab:focus-visible,
.ota-results__chip:focus-visible,
.ota-results__card-title a:focus-visible,
.ota-results__disclosure:focus-visible,
.ota-results__sort-select:focus-visible,
.ota-results__sort-button:focus-visible,
.ota-results__hero .ota-results__clear:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px var(--osr-focus);
}

/* The input inside the box is the thing that takes focus, so the ring has to be
   drawn on the box that stands in for it. */
.ota-results__check input:focus-visible + .ota-results__check-box {
	box-shadow: 0 0 0 3px var(--osr-focus);
}

/*
 * THE SAME RING, INVERTED, ONCE THE ROW HAS BEEN PAINTED BY FOCUS.
 *
 * `--osr-focus` and `--osr-row-active-bg` are both #003038, and a focused row
 * paints itself the second one. So the ring above was drawn in the row's own
 * background colour and was invisible exactly when it mattered, leaving the row
 * inversion as the only focus indicator on the control. The inverted role is
 * already the colour every other part of an active row switches to, so the box
 * follows its label and its count rather than introducing a fourth colour.
 */
.ota-results__check:focus-within input:focus-visible + .ota-results__check-box {
	box-shadow: 0 0 0 3px var(--osr-row-active-text);
}

/* --- Narrow -------------------------------------------------------------- */

/*
 * EVERYTHING BELOW THIS LINE IS EXTRAPOLATION
 *
 * There is no mobile or tablet Search frame in the design file. The whole canvas
 * was swept for frames at 375, 390, 768, 834 and 1024, and the only Search
 * layout in the file is the 1440 one this stylesheet implements. So the four
 * decisions taken here are ours and each one should be put to the designer
 * before client sign-off:
 *
 *   1. The Refine panel moves ABOVE the results rather than below them, and
 *      becomes a disclosure. Below them it is unreachable without scrolling the
 *      entire result set, which defeats the point of a facet.
 *   2. The tab strip scrolls horizontally with an edge fade rather than wrapping.
 *      Wrapping turns a one-line control into three lines of navigation above
 *      every result; the fade is the affordance that says there is more.
 *   3. The 622px form goes fluid. It has to: the frame's own arithmetic puts the
 *      right-anchored motif into the form at about 1013px viewport width, and
 *      something has to give.
 *   4. The motif hides outright rather than shrinking. At this width the visible
 *      crop is a single ring fragment in the corner, which reads as a rendering
 *      fault rather than as a motif.
 *
 * The breakpoints themselves are not invented: 1024 and 600 are the two every
 * other stylesheet in this plugin already uses.
 */
@media (max-width: 1024px) {
	.ota-results {
		--osr-pad: 1.1875rem;
		--osr-column-gap: 24px;
		/* Fluid, which is decision 3 above. Stepped on the token rather than by
		   restating `max-width`, so the form rule stays the one place the
		   measure is stated. */
		--osr-form: none;
	}

	/* The band's padding steps down with everything else. It used to drop a
	   `min-height: 485px` here too, because at this width the intro runs to
	   three lines and a fixed box clipped it; that floor is gone from the
	   desktop rule now, so there is nothing left to undo. */
	.ota-results__hero {
		gap: 20px;
		padding-block: 56px 48px;
	}

	.ota-results__title {
		font-size: 2.5rem;
	}

	.ota-results__intro {
		font-size: 17px;
	}

	.ota-results__motif {
		display: none;
	}

	.ota-results__body {
		grid-template-columns: minmax(0, 1fr);
		padding-block: 32px 64px;
	}

	/* Above the results. See decision 1 above. */
	.ota-results__aside {
		order: -1;
	}

	/*
	 * `flex-wrap: nowrap` first, or the row wraps before it ever scrolls. The
	 * fade is a mask rather than a gradient overlay because an overlay would have
	 * to be painted in the page's background colour to disappear into it, and
	 * this band is deliberately unpainted.
	 *
	 * The scrollbar is hidden on the two engines that let it be. That is
	 * deliberate on a touch-first breakpoint, where the bar is an overlay that
	 * fades out anyway, and it is why the fade has to carry the affordance
	 * instead.
	 *
	 * The static mask below is the floor, and it is only correct at scroll
	 * position 0: fading the right edge says "there is more this way". Scrolled
	 * to the end it lied, holding the last tab and its count pill permanently
	 * under 32px of fade, and it never offered anything at the left edge for the
	 * tabs that had gone out of view behind the reader.
	 */
	.ota-results__tabs {
		overflow-x: auto;
		flex-wrap: nowrap;
		gap: 24px;
		scrollbar-width: none;
		-webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 32px), transparent 100%);
		mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 32px), transparent 100%);
	}

	/*
	 * Driven off scroll position where the engine can do it, so each edge fades
	 * only while there is something behind it. The keyframes interpolate, so a
	 * strip parked mid-scroll gets both edges, which is the honest answer there.
	 *
	 * `@supports` rather than a bare rule: this is Chromium-only at the time of
	 * writing, and everything else keeps the static mask above, which is the
	 * behaviour that shipped. No JS is involved either way, so the no-JS page
	 * gets whichever of the two its engine supports.
	 */
	@supports (animation-timeline: scroll()) {
		.ota-results__tabs {
			animation: ota-results-tabs-fade linear both;
			animation-timeline: scroll(self inline);
		}
	}

	.ota-results__tabs::-webkit-scrollbar {
		display: none;
	}
}

@keyframes ota-results-tabs-fade {
	from {
		mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 32px), transparent 100%);
	}

	to {
		mask-image: linear-gradient(to right, transparent 0, #000 32px, #000 100%);
	}
}

@media (max-width: 600px) {
	.ota-results__title {
		font-size: 2.25rem;
	}

	/*
	 * The pill breaks apart, and it has to break INSIDE the field rather than
	 * inside the form: the submit is a child of the pill in the design, not a
	 * sibling of it, so wrapping the form does nothing and the button simply runs
	 * off the right of a 390px screen. Proven in the browser.
	 *
	 * At this width 20px of leading padding, a magnifier, a usable field, a 44px
	 * clear button and a 115px submit do not share a line, and squeezing them
	 * leaves about 40px to type in. So the submit takes a row of its own inside
	 * the pill and the pill becomes a rounded box rather than a capsule, which is
	 * the smaller of the two lies.
	 */
	.ota-results__hero .ota-results__form {
		flex-wrap: wrap;
		row-gap: 12px;
		border-radius: 28px;
	}

	/* `flex-basis` rather than `width`, because the button baseline sets
	   `width: max-content` and the flex base size is what actually wins the main
	   axis. */
	.ota-results__hero .ota-results__submit {
		flex: 1 0 100%;
	}

	/*
	 * The card stacks. The 200px thumbnail against a 24px gap leaves under 100px
	 * of text column on a 375px screen, which is a title a word a line.
	 *
	 * Stacked, the thumbnail loses its stretch and needs a height of its own for
	 * the first time: nothing is beside it any more to give it one.
	 */
	.ota-results__card {
		flex-direction: column;
		gap: 16px;
	}

	.ota-results__card-media {
		width: 100%;
		height: 180px;
	}

	/* The arrow goes back to the flow rather than floating in the middle of a
	   tall stack. */
	.ota-results__card .ota-results__go {
		align-self: flex-start;
	}

	/* The sort control drops under the summary rather than sharing its line. */
	.ota-results__toolbar {
		align-items: flex-start;
		flex-direction: column;
		gap: 12px;
	}

	.ota-results__aside {
		padding: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ota-results__hero .ota-results__form,
	.ota-results__hero .ota-results__clear,
	.ota-results__tab,
	.ota-results__card,
	.ota-results__card .ota-results__go,
	.ota-results__chip,
	.ota-results__check-box,
	.ota-results__disclosure img,
	.ota-results__sort-button {
		transition: none;
	}
}
